The Counting Power of Transformers
Marco Sälzer, Chris Köcher, Alexander Kozachinskiy, Georg Zetzsche, Anthony W. Lin
摘要
Counting properties (e.g. determining whether certain tokens occur more than other tokens in a given input text) have played a significant role in the study of expressiveness of transformers. In this paper, we provide a formal framework for investigating the counting power of transformers. We argue that all existing results demonstrate transformers' expressivity only for (semi-)linear counting properties, i.e., which are expressible as a boolean combination of linear inequalities. Our main result is that transformers can express counting properties that are highly nonlinear. More precisely, we prove that transformers can capture all semialgebraic counting properties, i.e., expressible as a boolean combination of arbitrary multivariate polynomials (of any degree). Among others, these generalize the counting properties that can be captured by C-RASP softmax transformers, which capture only linear counting properties. To complement this result, we exhibit a natural subclass of (softmax) transformers that completely characterizes semialgebraic counting properties. Through connections with the Hilbert's tenth problem, this expressivity of transformers also yields a new undecidability result for analyzing an extremely simple transformer model -- surprisingly with neither positional encodings (i.e. NoPE-transformers) nor masking. We also experimentally validate trainability of such counting properties.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper3
- Transformers are Inherently SuccinctPascal Bergsträßer, Ryan Cotterell, Anthony W. LinICLR 2026 · 被引用 5 次
- Length Generalization Bounds for TransformersAndy Yang, Pascal Bergsträßer, Georg Zetzsche, David Chiang 等ICML 2026
- MeshFlow: Mesh Generation with Equivariant Flow MatchingQi Sun, Kiyohiro Nakayama, Jing Nathan Yan, Qixing Huang 等SIGGRAPH 2026
它引用的顶会 Paper15
- Exploring Length Generalization in Large Language ModelsCem Anil, Yuhuai Wu, Anders Andreassen, Aitor Lewkowycz 等NeurIPS 2022 · 被引用 267 次
- What Algorithms can Transformers Learn? A Study in Length GeneralizationHattie Zhou, Arwen Bradley, Etai Littwin, Noam Razin 等ICLR 2024 · 被引用 189 次
- A Logic for Expressing Log-Precision TransformersWilliam Merrill, Ashish SabharwalNeurIPS 2023 · 被引用 87 次
- Masked Hard-Attention Transformers Recognize Exactly the Star-Free LanguagesAndy Yang, David Chiang, Dana AngluinNeurIPS 2024 · 被引用 58 次
- Neural Networks and the Chomsky HierarchyGrégoire Delétang, Anian Ruoss, Jordi Grau-Moya, Tim Genewein 等ICLR 2023 · 被引用 45 次
相关 Paper
- Characterizing the Expressivity of Fixed-Precision Transformer Language ModelsJiaoda Li, Ryan CotterellNeurIPS 2025 · 被引用 18 次
- Softmax Transformers are Turing-CompleteHongjian Jiang, Michael Hahn, Georg Zetzsche, Anthony W. LinICLR 2026 · 被引用 12 次
- Knee-Deep in C-RASP: A Transformer Depth HierarchyAndy Yang, Michaël Cadilhac, David ChiangNeurIPS 2025 · 被引用 15 次
- On the Ability and Limitations of Transformers to Recognize Formal LanguagesSatwik Bhattamishra, Kabir Ahuja, Navin GoyalEMNLP 2020 · 被引用 7 次
- The Power of Hard Attention Transformers on Data Sequences: A formal language theoretic perspectivePascal Bergsträßer, Chris Köcher, Anthony Widjaja Lin, Georg ZetzscheNeurIPS 2024 · 被引用 7 次
