Parallel Loop Transformer for Efficient Test-Time Computation Scaling

Bohong Wu, Mengzhao Chen, Xiang Luo, Shen Yan, Qifan Yu, Fan Xia, Tianqi Zhang, Hongrui Zhan, Zheng Zhong, Xun Zhou, Siyuan Qiao, Xingyan BinarXiv 2025 · DOI

Introduction

Looped transformers, such as the Universal Transformer, offer significant parameter efficiency by reusing the same weights across multiple iterations (loops). This allows a relatively small model to simulate the depth and reasoning capabilities of much larger architectures. However, traditional implementations suffer from a major drawback: sequential dependency. In a standard looped model, each token must complete all $L$ loops before the next token can begin processing. This results in latency and KV-cache memory requirements that scale linearly with the number of loops ($O(L)$), making them impractical for real-time inference.

Methodology: The Parallel Loop Transformer (PLT)

To overcome these bottlenecks, the Parallel Loop Transformer (PLT) introduces two key innovations: Cross-Loop Parallelism and a novel KV-cache sharing strategy.

Cross-Loop Parallelism (CLP)

The core idea of CLP is to transform the sequential loop execution into a parallel pipeline. Instead of waiting for a single token to traverse all loops, PLT staggers the computation. In any given forward pass, the model processes the first loop for the current token ($t_i$), the second loop for the previous token ($t_{i-1}$), and the third loop for the token before that ($t_{i-2}$). This "pipeline" approach allows the model to achieve the effective depth of multiple loops while maintaining the wall-clock latency of a single-loop (shallow) transformer.

Comparison between sequential loop execution (left) and Cross-Loop Parallelism (right).

Efficient Representation Enhancement

Scaling the number of loops typically leads to a linear increase in KV-cache size. PLT mitigates this through a two-part strategy:

  1. KV-Cache Sharing: All loops beyond the first reuse the Key-Value cache generated during the initial loop. This provides a stable "global" context without additional memory overhead.
  2. Gated Sliding-Window Attention (G-SWA): To maintain local precision, non-first loops utilize a small, private local KV cache (window size $w=64$). A learned sigmoid gate fuses this local information with the shared global context, ensuring the model retains fine-grained accuracy.
Detailed architectural flow of the Parallel Loop Transformer, showing the staggered dependency and the Loop Transformer block.

Evaluation and Results

The authors evaluated PLT across a comprehensive suite of benchmarks, including MMLU (general knowledge), GSM8k (math), and HumanEval (coding), using models ranging from 680M to 7B parameters (Seed-MoE, OLMo, and OLMoE).

Key Findings

  • Latency Neutrality: PLT-2 (two loops) achieves nearly the same latency as a standard non-looped transformer, with only a ~1.02x overhead, compared to the ~2x increase seen in vanilla looped models.
  • Throughput Efficiency: In high-throughput settings, PLT-2 reduces per-token latency by 47% relative to traditional looped architectures.
  • Scaling Advantages: A 1.7B parameter PLT model with two loops outperformed a 2.5B parameter vanilla model while offering 30% lower latency and reduced memory usage.
  • Accuracy Recovery: The G-SWA mechanism effectively recovers the performance lost by KV-sharing, matching the accuracy of "naive" models that store separate caches for every loop.

Conclusion

The Parallel Loop Transformer demonstrates that test-time computation scaling can be achieved without sacrificing inference speed. By exploiting the memory-bound nature of LLM decoding and implementing staggered execution, PLT allows models to "think deeper" for nearly free. Future work may explore adaptive looping, where the model dynamically adjusts its computation depth based on the complexity of the input token.

Summary updated

BibTeX
@misc{wu2025parallel,
  author = {Bohong Wu and Mengzhao Chen and Xiang Luo and Shen Yan and Qifan Yu and Fan Xia and Tianqi Zhang and Hongrui Zhan and Zheng Zhong and Xun Zhou and Siyuan Qiao and Xingyan Bin},
  title = {{Parallel Loop Transformer for Efficient Test-Time Computation Scaling}},
  year = {2025},
  eprint = {2510.24824},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.24824},
}
Figure