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 Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
4 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Free Energy Mixer cites Long Range Arena : A Benchmark for Efficient Transformers
- Free Energy Mixer cites Rethinking Attention with Performers
- Free Energy Mixer cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Long Range Arena : A Benchmark for Efficient Transformers cites Rethinking Attention with Performers
- Rethinking Attention with Performers cites Long Range Arena : A Benchmark for Efficient Transformers
- HATSolver: Learning Gröbner Bases with Hierarchical Attention Transformers cites Neural Execution of Graph Algorithms
- Learning to Execute Graph Algorithms Exactly with Graph Neural Networks cites Neural Execution of Graph Algorithms
- Can Transformers Really Do It All? On the Compatibility of Inductive Biases Across Tasks cites Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
Cited 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
- Do Transformers Grok Succinct Algorithms? Mechanistic Evidence for Counting CircuitsYizheng ZhaoACL Findings 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
