ARLoop: Fully-Open Pre-trained Looped Transformers with Attention Residuals
Abstract: Looped transformers increase effective depth by repeatedly applying a shared set of transformer layers, offering a parameter-efficient way to scale computation. However, standard residual connections aggregate information across recurrent depth into a single stream, providing limited control over which intermediate representations from preceding layers should be reused. In this paper, we introduce ARLoop, a looped transformer architecture based on attention residuals, where the input of each layer is selectively aggregated through attention over model depth. Distinct from standard transformers, we find that looped transformers do not require access to the full residual history: sliding-window depth attention matches or outperforms full-history attention at larger recurrent depths. Across controlled experiments with multiple parameter scales (140M and 370M) and recurrent depths (R = 1 to 5), ARLoop consistently outperforms prior residual designs for looped transformers. More importantly, we further scale ARLoop to 0.6B and 1.2B parameters under a realistic LLM pretraining recipe, demonstrating that the gains transfer to realistic pretraining, with particularly strong improvements on math and coding tasks. Our 1.2B model, pretrained on only 0.5T tokens with three recurrences, outperforms Huginn-3.5B (the only fully-open looped LLM as of our release date) across all evaluated tasks and is competitive with similar-sized non-looped models such as Qwen3.5-2B despite being trained on substantially less data.
Paper Prompts
Sign up for free to create and run prompts on this paper.
Explain it Like I'm 14
1. What is this paper about?
This paper introduces a new type of LLM called ARLoop.
LLMs usually become stronger by adding more layers, but more layers also mean more parameters, memory, and training cost. A looped transformer tries to solve this problem by using the same layers repeatedly. It is like sending a message through the same group of workers several times instead of hiring a larger group of workers.
The problem is that ordinary looped transformers mix all their earlier information together in a simple way. ARLoop gives the model a better method for deciding which earlier information is useful and which can be ignored.
2. What questions did the researchers investigate?
The researchers mainly wanted to answer these questions:
- Can a looped transformer perform better if it chooses which earlier representations to use?
- Is this new method better than the usual residual connections used in transformers?
- Does the model need to remember its entire history, or are its most recent results enough?
- Do the improvements still work when the model is trained at a realistic LLM scale?
- Can ARLoop improve difficult abilities such as mathematics and writing computer code?
Here, a representation means the model’s internal version of the text at a particular point in its processing.
3. How does ARLoop work?
Looped transformers
A normal transformer has a fixed sequence of layers. Each layer changes the text representation a little.
A looped transformer reuses the same sequence several times:
- The text goes through the transformer layers.
- It goes through the same layers again.
- It may go through them a third, fourth, or fifth time.
This creates a model that acts as if it were much deeper, without needing a separate set of parameters for every layer.
For example, a model with 12 layers used three times has the computational depth of 36 layers, but it does not have 36 completely different layers.
The usual residual connection
Transformers use residual connections to carry earlier information forward. A simple way to imagine this is adding notes to a growing notebook. Each new layer writes more information into the notebook, while keeping the older notes.
In the usual method, called PreNorm, the model gives every previous update roughly the same basic importance. This can cause too much information to pile up, especially when the layers are reused many times.
Attention residuals
ARLoop uses something called an attention residual.
Instead of treating every earlier result similarly, the model asks:
“Which earlier results are most useful for what I am doing now?”
It then gives more weight to useful information and less weight to unhelpful information. This is similar to studying for a test: rather than rereading every page of a notebook, a student chooses the pages most relevant to the current question.
The researchers also group several nearby updates into residual blocks. This reduces the amount of information the model must examine and makes the system more efficient.
Sliding-window attention
The researchers tested two choices:
- Full-history attention: the model can look at every earlier residual block.
- Sliding-window attention: the model mainly looks at the most recent few blocks, while still having access to the original input.
Surprisingly, the smaller sliding window often worked just as well as, or better than, looking at everything.
The researchers think this happens because repeatedly using the same layers produces many similar internal representations. Older information may therefore add little that is new.
4. How did the researchers test ARLoop?
The researchers used several kinds of experiments.
Small and medium controlled experiments
They trained models with approximately 140 million and 370 million parameters. They tested different numbers of recurrences, from one to five.
They compared ARLoop with:
- The standard PreNormLoop design
- Other previously proposed residual designs for looped transformers
- Full-history attention
- Sliding-window attention
They measured:
- Perplexity, which measures how well a LLM predicts the next word. Lower is better.
- Accuracy on general knowledge, reading comprehension, commonsense, and reasoning tests.
Perplexity can be compared to a student’s prediction error: a lower score means the model is generally making better predictions.
Larger LLMs
The researchers also trained:
- PreNormLoop-0.6B
- ARLoop-0.6B
- ARLoop-1.2B
The two 0.6-billion-parameter models had the same size and training budget, making them a fair comparison.
They tested the models on:
- General knowledge and reasoning
- Mathematics, including GSM8K and MATH
- Programming, including MBPP and HumanEval
They also compared ARLoop with other LLMs, including the looped model Huginn-3.5B and the non-looped Qwen3.5-2B.
5. What did the researchers find?
ARLoop was usually better than the standard design
In the controlled experiments, ARLoop achieved lower validation perplexity than PreNormLoop and the other tested residual designs.
The advantage became larger when the model was used more times. For example, the improvement over PreNormLoop was small with one recurrence but more noticeable with three or five recurrences.
This suggests that ARLoop is better at taking advantage of the extra computation provided by looping.
A small memory window was enough
At larger recurrence depths, sliding-window attention matched or outperformed full-history attention.
The model usually focused most of its attention on recent residual blocks. The researchers also found that representations from different recurrences were often very similar.
This is important because the sliding-window method:
- Uses less information at each step
- Reduces computation
- Can be slightly faster than full-history attention
- Does not appear to hurt performance
ARLoop helped mathematics and coding especially strongly
When comparing the two 0.6B models trained under the same conditions, ARLoop performed better on 7 of 8 tasks.
Some of the improvements were:
- GSM8K mathematics: 35.7% to 40.9%, an improvement of 5.2 percentage points
- MBPP programming: 33.1% to 36.2%, an improvement of 3.1 percentage points
- HumanEval programming: 17.6% to 20.1%
These results suggest that better control over repeated computation may be especially useful for tasks that require several steps of reasoning.
The 1.2B ARLoop model performed surprisingly well
The ARLoop-1.2B model:
- Used 1.2 billion parameters
- Was trained on 0.5 trillion tokens
- Used three recurrences
It outperformed the larger Huginn-3.5B model on every task reported in the paper.
It was also competitive with the non-looped Qwen3.5-2B, even though ARLoop used considerably less training data.
The paper also reports that ARLoop-1.2B performed better than some larger models on selected mathematics and programming tests.
There was a speed cost
ARLoop used about the same amount of training memory as the ordinary residual design. However, it was approximately 10% slower with sliding-window attention and about 15% slower in some other settings.
Therefore, ARLoop improves accuracy and reasoning ability, but it is not completely free: it requires extra calculations during training.
More recurrences did not automatically work at test time
The researchers tried using more recurrences during testing than the model had seen during training.
Performance improved only up to the number of recurrences used during training. Adding even more recurrences did not provide further improvements.
This means ARLoop is not yet able to automatically become better simply by “thinking longer” than it was trained to do.
6. Why are these findings important?
The main lesson is that reusing layers works better when the model can carefully choose which earlier information to keep using.
A normal looped transformer is like a student who combines every note ever written into one large, messy page. ARLoop is more like a student who looks back through the notebook and selects the notes that matter most for the current problem.
This could make LLMs:
- Smaller for their level of ability
- More efficient in the use of parameters
- Better at mathematics, coding, and multi-step reasoning
- Easier for researchers to study and reproduce
The paper is also important because the researchers publicly released the models, code, data-processing tools, and training checkpoints. This allows other researchers to check the results and build on the work.
7. Simple conclusion
ARLoop is a new way to build LLMs that reuse the same transformer layers several times. Its main improvement is that it lets the model selectively reuse useful earlier information instead of mixing everything together equally.
The experiments show that ARLoop generally performs better than older looped-transformer designs, especially on mathematics and programming. Its 1.2B-parameter model even outperformed a much larger fully open looped model called Huginn.
However, ARLoop still has limitations. It is somewhat slower to train, and using more loops during testing does not automatically make it smarter. Overall, the research suggests that smarter information reuse may be a powerful way to create capable LLMs without simply making them much larger.
Practical Applications
Immediate Applications
The paper’s released weights, training code, data-processing code, and checkpoints make several applications feasible now, although most should begin as pilots because the reported evaluations are benchmark-based rather than production-specific.
- Efficient open-weight language-model deployment — Software/AI infrastructure
- Deploy ARLoop-0.6B or ARLoop-1.2B as compact local or private LLMs for summarization, classification, question answering, drafting, and retrieval-augmented generation.
- The models offer competitive benchmark performance relative to larger open models while using fewer parameters and training tokens, which may reduce storage, hosting, and fine-tuning costs.
- Dependencies: The models must be evaluated on domain-specific data, licensed data requirements must be checked, and production systems require safety filtering, monitoring, and calibration. The paper does not establish robustness, factuality, or safety in high-stakes settings.
- Mathematical tutoring and problem-solving assistants — Education
- Integrate ARLoop into educational tools that provide worked solutions, hints, and step-by-step feedback for algebra, word problems, and competition-style mathematics.
- The strongest practical evidence is the improvement over the matched PreNormLoop baseline on GSM8K and MATH, including a reported 5.2-point GSM8K gain for ARLoop-0.6B.
- Dependencies: Outputs should be verified by symbolic solvers or independent checkers. Benchmark gains do not guarantee correct pedagogical explanations, and automated systems should not be used as unsupervised assessment authorities.
- Code-completion and lightweight programming assistants — Software development
- Use ARLoop models for code completion, bug-fix suggestions, test generation, documentation, and small program synthesis tasks.
- The reported improvements on MBPP and HumanEval suggest that selective residual access may be useful for tasks requiring multi-step code generation.
- A practical workflow could combine ARLoop with an IDE, repository retrieval, unit-test execution, static analysis, and human review.
- Dependencies: Generated code must be sandboxed and tested. HumanEval and MBPP are limited proxies for real repositories, security vulnerabilities, dependency management, and long-context software engineering.
- Private or on-premises enterprise assistants — Finance, legal services, healthcare administration, and government
- Organizations can use the fully open checkpoints to build document question-answering, internal search, meeting summarization, and workflow automation without depending entirely on a hosted API.
- The relatively small parameter scale may be suitable for controlled deployment on institutional hardware or dedicated cloud instances.
- Dependencies: Sensitive deployments require privacy-preserving data pipelines, access controls, audit logs, domain adaptation, and compliance review. The paper provides no evidence of performance on confidential, regulated, or adversarially manipulated documents.
- Compute-aware inference configuration — Cloud and edge systems
- Use the fixed recurrence count as a predictable inference budget: organizations can select a model and recurrence configuration according to latency and quality requirements.
- Sliding-window depth attention can reduce residual-history overhead while retaining recent representations, making it a practical default for recurrent depths greater than two.
- Dependencies: ARLoop remains approximately 10% slower than the baseline with sliding-window attention in the reported training measurements. Actual inference latency, memory use, batching behavior, and hardware efficiency require separate benchmarking and kernel optimization.
- Reproducible research and educational experimentation — Academia
- Researchers and students can use the public implementation to compare PreNorm, attention-residual, sliding-window, and other looped-transformer designs under a common framework.
- The released checkpoints and intermediate artifacts enable replication studies, ablations, curriculum experiments, and analyses of recurrent-depth representations.
- Dependencies: Reproducibility depends on access to comparable hardware, exact data mixtures, preprocessing pipelines, software versions, and evaluation harnesses. The paper contains some malformed or incomplete citation and placeholder fields, so artifact validation is necessary.
- Baseline architecture for domain-specific fine-tuning — Industry and academia
- Fine-tune ARLoop models for customer support, scientific literature assistance, code search, technical documentation, or multilingual classification.
- Its attention residual mechanism can serve as a drop-in experimental alternative to conventional residual aggregation in decoder-only transformers.
- Dependencies: The reported benefits may depend on the paper’s pretraining mixture, fixed recurrence, model scale, and training schedule. Fine-tuning should compare ARLoop against standard transformer baselines rather than assuming transferability.
- Policy and procurement benchmarking for open AI systems — Public-sector technology policy
- Use ARLoop as a fully open reference model when evaluating claims about parameter efficiency, training-data efficiency, and transparency in foundation models.
- Governments and institutions can include open training artifacts, reproducible evaluations, and deployment cost in model procurement criteria.
- Dependencies: Benchmark scores alone are insufficient for procurement. Evaluations should include privacy, bias, cyber-abuse potential, energy consumption, accessibility, and performance on locally relevant languages and tasks.
Long-Term Applications
These applications require further research, larger-scale validation, or engineering development before they can be considered dependable production solutions.
- Adaptive-compute LLMs — General-purpose AI systems
- Develop models that dynamically select the number of recurrences per input, allocating more computation to difficult mathematics, coding, planning, or reasoning requests and less to routine queries.
- ARLoop provides a mechanism for recurrent computation, but the paper reports that fixed recurrence training performed better than dynamic recurrence in its experiments.
- Dependencies: Future systems need stable halting criteria, calibrated uncertainty estimates, training methods for variable depth, and safeguards against excessive latency or computation. Recurrence extrapolation beyond the trained range currently does not improve performance reliably.
- Low-cost reasoning models for edge devices — Mobile computing and embedded AI
- Combine parameter sharing, sliding-window residual attention, quantization, pruning, and hardware-specific kernels to produce compact reasoning models for laptops, phones, vehicles, or industrial devices.
- Potential products include offline tutoring, field-service assistants, private document analysis, and robotics interfaces.
- Dependencies: The paper demonstrates parameter efficiency, not end-to-end edge efficiency. Quantization sensitivity, memory bandwidth, thermal limits, battery consumption, and real-time latency remain to be established.
- Autonomous coding agents — Software engineering
- Use ARLoop as the reasoning component of agents that inspect repositories, propose patches, write tests, execute code, and iteratively repair failures.
- Its coding gains and recurrent depth could support repeated internal refinement before producing a final patch.
- Dependencies: The paper does not test tool use, long-horizon planning, repository-scale context, or agent reliability. Deployment requires secure sandboxes, provenance tracking, test coverage, rollback mechanisms, and protection against malicious repository instructions.
- Verified mathematical and scientific reasoning systems — Education, research, and engineering
- Couple ARLoop with theorem provers, computer algebra systems, numerical solvers, or process-level verifiers to produce auditable solutions.
- Attention over recurrent depth could potentially help preserve and selectively reuse intermediate reasoning states.
- Dependencies: The paper measures final-task benchmarks rather than formal correctness or interpretability of intermediate states. Further work must establish whether recurrent representations correspond to reliable reasoning steps and whether external verification improves performance without excessive cost.
- Memory- and compute-efficient robotics or embodied agents — Robotics
- Apply recurrent-depth transformers to robot instruction following, trajectory planning, sensor interpretation, and multi-step task execution where repeated computation may be more valuable than increasing parameter count.
- Sliding-window residual access could provide a bounded mechanism for retaining recent internal states during sequential control.
- Dependencies: The study uses language-model benchmarks and does not evaluate perception, action grounding, real-time control, distribution shift, or safety. Robotics applications require multimodal training, closed-loop evaluation, and strict latency guarantees.
- Scientific and biomedical literature assistants — Healthcare and research
- Develop systems for evidence retrieval, literature synthesis, hypothesis generation, and structured extraction from technical documents.
- ARLoop’s open weights could support institution-specific adaptation and on-premises deployment.
- Dependencies: High-stakes use requires citation verification, provenance, uncertainty estimation, up-to-date retrieval, and expert review. Benchmark performance on general knowledge, mathematics, and coding cannot be treated as evidence of clinical or scientific validity.
- Large-scale open foundation-model training — AI research and public infrastructure
- Use ARLoop as a basis for training larger models with mixture-of-experts layers, multimodal inputs, longer contexts, or specialized data mixtures while controlling parameter growth through recurrence.
- The paper suggests that selective residual access can make recurrent computation more useful than conventional residual accumulation, particularly for math and code.
- Dependencies: Scaling beyond 1.2B parameters and 0.5T tokens may introduce optimization instability, representation collapse, communication overhead, or different residual-history behavior. Larger studies must examine scaling laws, multilingual performance, data quality, and comparisons with modern non-looped and sparse models.
- Learned memory systems for long-context modeling — Information retrieval and agentic workflows
- Extend the residual-source mechanism into a learned memory selector that retains recent, salient, or task-relevant representations rather than all intermediate states.
- This could support long-document analysis, multi-session assistants, and persistent agent memory with bounded storage.
- Dependencies: Sliding-window attention in ARLoop is not equivalent to long-context memory. Real systems would need memory insertion, eviction, retrieval, privacy controls, temporal consistency, and evaluations over very long interactions.
- Energy- and cost-aware model policy — Government and data-center operations
- Use recurrence selection and parameter sharing to build serving policies that trade quality against energy, latency, and cost for different request types.
- A data center could route simple requests to fewer recurrent steps and difficult tasks to a deeper configuration, once reliable adaptive recurrence is developed.
- Dependencies: The current results favor fixed recurrence and show no reliable benefit from inference beyond the trained recurrence range. Energy claims require measurements of complete training and serving pipelines, not only parameter counts or estimated FLOPs.
- Interpretability and controllable computation research — Academia
- Analyze attention weights over residual blocks as a tool for studying which recurrent stages influence mathematical, coding, or factual outputs.
- Researchers could investigate whether depth-attention patterns provide useful intervention points for editing, explanation, uncertainty estimation, or targeted computation.
- Dependencies: Attention weights should not automatically be interpreted as causal explanations. The paper’s layer-effect analysis is suggestive but limited; causal interventions, diverse tasks, and human-validated explanations are required.
Glossary
- Activation checkpointing: A memory-saving training technique that recomputes intermediate activations instead of storing them throughout the forward pass. “When activation checkpointing (e.g.\ recomputation of intermediate hidden states) is not enabled”
- Attention residuals: Residual connections that use attention weights to selectively combine representations from different depths. “Attention Residuals \citep{kimi2026attentionresiduals} replace this fixed aggregation with attention-based aggregation over residual sources across depth.”
- Autoregressive LLM: A LLM that predicts each token based on preceding tokens. “Our 1.2B model, pretrained on only 0.5T tokens with three recurrences”
- Backpropagation: The algorithm for computing gradients through a neural network to update its parameters. “the residual sources used by attention residual are already retained for backpropagation”
- Block attention residuals: An attention-residual method that groups consecutive sublayer outputs into block-level representations. “Following \citet{kimi2026attentionresiduals}, we therefore use block attention residuals”
- Candidate source: A representation that can be selected and weighted by an attention mechanism. “all preceding residual blocks as candidate sources”
- Cosine learning rate schedule: A training schedule that changes the learning rate according to a cosine-shaped decay curve. “we use AdamW \citep{kingma2017adammethodstochasticoptimization} with a cosine learning rate schedule.”
- Cosine similarity: A measure of similarity between vectors based on the cosine of the angle between them. “the pairwise cosine similarity between residual blocks”
- Decoder-only transformer: A transformer architecture that uses only causal self-attention to generate sequences from left to right. “We start by defining a standard decoder-only transformer”
- Depth attention: Attention performed over representations associated with different computational depths or recurrences. “sliding-window depth attention can match or outperform full-history attention”
- Dynamic recurrence: A training strategy in which the number of recurrent applications varies rather than remaining fixed. “Existing looped LLMs often vary the number of recurrences during training”
- Effective depth: The total computational depth obtained after repeatedly applying shared layers. “The resulting unrolled network therefore has an effective depth of $2LR$ sublayers”
- Embedding: A learned vector representation of a token or input item. “where denotes the input embedding”
- Feed-forward network (FFN): A neural-network sublayer in a transformer that independently transforms each token representation. “transformer layer to refer to a pair of self-attention and FFN sublayers”
- Fixed recurrence: A setup in which the number of loop repetitions remains constant during training. “For all ARLoop models, we use fixed recurrence”
- Full-history depth attention: Depth attention that can access every preceding residual source. “which we refer to as full-history depth attention”
- Grouped-query attention: An attention variant in which multiple query heads share key and value heads. “we replace multi-head attention with grouped-query attention”
- Hidden state: An internal vector representation produced by a neural network layer. “maps the final hidden states to output logits”
- Input injection: A technique that repeatedly reintroduces the original input representation into deeper computations. “both with and without input injection”
- Inference-time recurrence extrapolation: Applying more recurrent iterations during inference than were used during training. “enables inference-time recurrence extrapolation”
- Intermediate representation: A temporary internal representation produced between the input and final output of a model. “which intermediate representations from preceding layers should be reused”
- Layer effect: A measure of how much a layer’s representation influences outputs at subsequent layers. “we adopt the layer effect metric”
- Language-modeling head: The output component that converts final hidden states into token-prediction logits. “where denotes the language-modeling head”
- Latent reasoning: Reasoning performed in internal continuous representations rather than explicitly generated text. “Scaling up Test-Time Compute with Latent Reasoning”
- Looped transformer: A transformer that repeatedly applies the same stack of layers. “an -layer looped transformer reuses the same transformer stack”
- Multi-head attention: An attention mechanism that computes several attention operations in parallel using separate projection subspaces. “each transformer layer uses multi-head attention”
- Multi-hop reasoning: Reasoning that requires combining information across multiple inferential steps. “generalization on controlled multi-hop reasoning tasks”
- Parameter sharing: Reusing the same model parameters across multiple computational applications. “the same transformer stack is shared across all recurrences”
- Perplexity: A metric indicating how well a LLM predicts a sequence, with lower values representing better predictions. “We use perplexity (PPL) on a held-out validation set”
- PreNorm: A transformer residual design that applies normalization before the sublayer computation. “Under PreNorm, residual updates from previous depths are accumulated”
- Residual block: A group of consecutive sublayers whose outputs are combined and used as one attention source. “residual block to refer to a group of consecutive sublayers used as a source in attention residuals”
- Residual history: The collection of earlier residual representations available to later layers. “access to the full residual history is unnecessary for looped transformers”
- Residual stream: The representation formed by accumulating residual updates throughout a transformer. “into a single residual stream with fixed unit coefficients”
- Residual update: The new information added by a transformer sublayer to its input representation. “every residual update produced at an earlier sublayer contributes”
- Recurrent depth: Computational depth increased by repeatedly applying shared transformer layers. “how selective residual access should be adapted to recurrent depth”
- Recurrence: One application of a shared transformer stack in a looped architecture. “The number of recurrences provides an explicit axis”
- Representation redundancy: The degree to which representations at different depths contain similar information. “highly redundant representations across recurrences”
- Self-attention: An attention mechanism in which tokens use their own representations to compute interactions with other tokens. “each of which contains a self-attention sublayer followed by an FFN”
- Sublayer: One component of a transformer layer, such as self-attention or a feed-forward network. “we use sublayer to refer to either a self-attention or a feed-forward network (FFN) module”
- Sliding-window depth attention: Depth attention restricted to a fixed number of the most recent residual blocks while retaining the input embedding. “sliding-window depth attention restricts the source set”
- SwiGLU: A gated feed-forward activation architecture used in modern transformer models. “use SwiGLU \citep{shazeer2020gluvariantsimprovetransformer} in place of the standard FFN sublayers”
- Throughput: The amount of data processed by a model per unit of time. “In terms of throughput, ARLoop is approximately 15\% slower than PreNorm on average”
- Unrolled network: The expanded computation graph obtained by representing every recurrence as a separate sequential application. “The resulting unrolled network therefore has an effective depth of $2LR$ sublayers”
- Validation perplexity: Perplexity measured on data held out from training for model evaluation. “ARLoop consistently outperforms existing residual designs in language modeling.”









