Skip to content
  • enzuazua
  • Events Calendar
  • Jobs
cmc.deusto.eus
  • Home
  • About DeustoCCM
    • About DeustoCCM
    • Head of DeustoCCM
    • Team
    • Contact
    • Past Members
  • Research
    • Publications DeustoCCM
    • Projects
    • ERC CoDeFeL
      • CoDeFeL • WP1
      • CoDeFeL • WP2
      • CoDeFeL • WP3
      • CoDeFeL • WP4
      • CoDeFeL • GitHub
      • CoDeFeL • Blog
      • Industrial & Social Transference
    • DyCMaMod
    • Computational Mathematics Research Group
  • Activities
    • Events calendar
    • Seminars
    • Highlights
    • Our Latest
    • Courses
    • enzuazua
    • Past Events
    • Gallery
  • Partners
    • COST
    • FAU MoD
    • FAU MoD Members
    • FAU DCN-AVH
    • FAU DCN-AvH Team
    • Projects at FAU
    • FAU MoD Lectures
    • FAU MoD Courses / Workshops
    • Teaching
    • Academy
    • FAU Math and Research posts
    • FAU Initiatives
    • Contributors
    • FAU Past members
  • Jobs

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

  • IKTrace Seminar: The long and winding road to dementia: Exploring Alzheimer’s disease trajectories through mathematical modelling
  • DeustoCCM Seminar: On the existence of stationary solutions for certain systems of integro-differential equations with the double scale anomalous diffusion
  • DeustoCCM Seminar: Energy spectra for Light-Matter Interactions
  • NUS Colloquium Series: Machine Learning and Learning Systems by E. Zuazua
Copyright 2016 - 2026 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