Tropical Attention: Neural Algorithmic Reasoning for Combinatorial Algorithms
Baran Hashemi, Kurt Pasque, Christopher Teska, Ruriko Yoshida
Abstract
Can algebraic geometry enhance the sharpness, robustness, and interpretability of modern neural reasoning models by equipping them with a mathematically grounded inductive bias? To answer this, we introduce Tropical Attention, an attention mechanism grounded in tropical geometry that lifts the attention kernel into tropical projective space, where reasoning is piecewise-linear and 1-Lipschitz, thus preserving the polyhedral decision structure inherent to combinatorial reasoning. We prove that Multi-Head Tropical Attention (MHTA) stacks universally approximate tropical circuits and realize tropical transitive closure through composition, achieving polynomial resource bounds without invoking recurrent mechanisms. These guarantees explain why the induced polyhedral decision boundaries remain sharp and scale-invariant, rather than smoothed by Softmax. Empirically, we show that Tropical Attention delivers stronger out-of-distribution generalization in both length and value, with high robustness against perturbative noise, and substantially faster inference with fewer parameters compared to Softmax-based and recurrent attention baselines, respectively. For the first time, we push the domain of neural algorithmic reasoning beyond PTIME problems to NP-hard/complete problems, paving the way toward sharper and more expressive Large Reasoning Models (LRMs) capable of tackling complex combinatorial challenges in Phylogenetics, Cryptography, Particle Physics, and Mathematical Discovery. The code is available at https://github.com/Baran-phys/Tropical-Attention/.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext dd8600ad-4110-41e8-8f0d-19da8ce9d369Cited by top-tier papers4
- Can Transformers Really Do It All? On the Compatibility of Inductive Biases Across TasksDamien Teney, Liangze Jiang, Hemanth Saratchandran, Simon LuceyICLR 2026 · 3 citations
- Free Energy MixerJiecheng Lu, Shihao YangICLR 2026 · 1 citation
- HATSolver: Learning Gröbner Bases with Hierarchical Attention TransformersMohamed Malhou, Ludovic Perret, Kristin E. LauterICLR 2026
- Learning to Execute Graph Algorithms Exactly with Graph Neural NetworksMuhammad Fetrat Qharabagh, Artur Back de Luca, George Giapitzakis, Kimon FountoulakisICML 2026
Builds on18
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- Train Short, Test Long: Attention with Linear Biases Enables Input Length ExtrapolationOfir Press, Noah A. Smith, Mike LewisICLR 2022 · 1,168 citations
- Long Range Arena : A Benchmark for Efficient TransformersYi Tay, Mostafa Dehghani, Samira Abnar, Yikang Shen et al.ICLR 2021 · 881 citations
- Neural Execution of Graph AlgorithmsPetar Velickovic, Rex Ying, Matilde Padovano, Raia Hadsell et al.ICLR 2020 · 192 citations
- Rethinking Attention with PerformersKrzysztof Marcin Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song et al.ICLR 2021 · 122 citations
Related papers
- Tropical Mathematics and the Lambda-Calculus II: Tropical Geometry of Probabilistic Programming LanguagesDavide Barbarossa, Paolo PistonePOPL 2026
- AlgoTrace: Algorithmic Primitives and Compositional Geometry of Reasoning in Language ModelsSamuel Lippl, Thomas McGee, Kimberly Lopez, Ziwen Pan et al.ICML 2026
- Neural Network Approximation based on Hausdorff distance of Tropical ZonotopesPanagiotis Misiakos, Georgios Smyrnis, George Retsinas, Petros MaragosICLR 2022 · 10 citations
- Infusing Lattice Symmetry Priors in Attention Mechanisms for Sample-Efficient Abstract Geometric ReasoningMattia Atzeni, Mrinmaya Sachan, Andreas LoukasICML 2023 · 6 citations
- Arboreal Neural Networkyan wubin, Wei Ma, Shixiang Wan, Dongchen Li et al.ICML 2026
