Yanchor improves long-horizon reasoning with constant memory use
YANchor-4B: Effective Long-Horizon Reasoning in O(N) Time with O(1) Memory
Machine LearningComputation and Language
Summary
Remembering all past information when solving long or complex problems can be slow and use a lot of memory. The authors designed YANchor-4B, a system that keeps only important key memories to refer back to, allowing it to reason over long problems quickly without using much memory. This method achieves better results on difficult math tests than other approaches that try to keep track of everything or compress information. It also runs much faster when generating long answers compared to traditional methods.
What this means in practice
- •For ai engineers: Build AI systems that solve complex long-step problems efficiently without requiring large memory or compute resources.
- •For cloud infrastructure teams: Increase throughput of long text generation tasks by using memory-efficient models to reduce hardware time and costs.
Authors
Huishan Ji, Hua Xu, Weiming Zhang, Qirui Ye
Abstract
Long-horizon reasoning demands access to earlier information at a manageable generation cost. Full-history attention incurs growing storage and computation, while recurrent compression can lose precise details. Therefore, we present YANchor-4B, a general-purpose recurrent model that preserves crucial memory as ANchors for retrieval during subsequent reasoning. Beyond $O(N)$-time generation and $O(1)$ memory, YANchor enables effective long-horizon reasoning through its multidimensional memory mechanism. For example, on challenging math problems, it achieves 82.93% mean pass@1 on AIME 2024--2026 and 63.64% on HMMT, substantially outperforming linear-time, constant-state counterparts, including larger models. It also delivers several-fold higher batched long-generation throughput than Transformer and hybrid baselines on H100. Furthermore, evaluations across dozens of benchmarks demonstrate YANchor's superiority in general-purpose capabilities.