Skip to content
  • enzuazua
  • Events Calendar
  • Jobs
cmc.deusto.eus
  • Home
  • About us
    • About DeustoCCM
    • Head of DeustoCCM
    • Team
    • Past Members
  • Research
    • Projects
    • ERC CoDeFeL
    • Computational Mathematics Research Group
    • DyCon Blog
    • DyCon Toolbox
    • Industrial & Social TransferenceContents related to the industrial and social transference aspects of the work in the Chair of Computational Mathematics.
  • Publications
    • Publications (All)
    • Publications by year
      • Publications 2025
      • Publications 2024
      • Publications 2023
      • Publications 2022
      • Publications 2021
      • Publications 2020
      • Publications 2019
      • Publications 2018
      • Publications 2017
      • Publications 2016
    • AcceptedAccepted to be released
    • SubmittedSubmitted publications
  • Activities
    • Events calendar
    • Seminars
    • Highlights
    • Our Latest
    • Courses
    • Past Events
    • enzuazua
    • Gallery
  • Jobs
  • Contact

Exact Sequence Classification with Hardmax Transformers

A. Alcalde Zafra, G. Fantuzzi, E. Zuazua (2025) Exact Sequence Classification with Hardmax Transformers, arxiv: 2502.02270

Abstract. We prove that hardmax attention transformers perfectly classify datasets of $N$ labeled sequences in \mathbb{R}^d, d\geq 2. Specifically, given N sequences with an arbitrary but finite length in \mathbb{R}^d, we construct a transformer with \mathcal{O}(N) blocks and \mathcal{O}(Nd) parameters perfectly classifying this dataset. Our construction achieves the best complexity estimate to date, independent of the length of the sequences, by innovatively alternating feed-forward and self-attention layers and by capitalizing on the clustering effect inherent to the latter. Our novel constructive method also uses low-rank parameter matrices within the attention mechanism, a common practice in real-life transformer implementations. Consequently, our analysis holds twofold significance: it substantially advances the mathematical theory of transformers and it rigorously justifies their exceptional real-world performance in sequence classification tasks.

arxiv: 2502.02270

  • Benasque XI Workshop-Summer School 2026: Partial differential equations, optimal design and numerics
  • The Mathematics of Scientific Machine Learning and Digital Twins
  • DeustoCCM Seminar: Research on Control Problems of Several Types of Infinite-Dimensional Systems
  • DeustoCCM Seminar: Developing Mathematical and Physical Tools for Multiscale Dynamical Systems. Applications to Neurophysiological Data
Copyright 2016 - 2025 DeustoCCM — cmc.deusto.eus. All rights reserved. Chair of Computational Mathematics, University of Deusto
Scroll to Top
  • Aviso Legal
  • Política de Privacidad
  • Política de Cookies
  • Configuración de Cookies
WE USE COOKIES ON THIS SITE TO ENHANCE USER EXPERIENCE. We also use analytics. By navigating any page you are giving your consent for us to set cookies.    more information
Privacidad