HyperAIHyperAI

Command Palette

Search for a command to run...

PAR: 상태 추적에서 길이 일반화를 위한 진행 정렬 순환

초록

루프형 언어 모델은 테스트 시 더 많은 반복을 실행할 수 있지만, 추가 반복이 더 긴 문제를 해결하는 데 반드시 도움이 되지는 않는다. 순차적 상태 추적에서 최종 답안 지도는 각 반복이 얼마나 진행해야 하는지를 지정하지 않으며, 반복적인 갱신은 순환 상태의 스케일을 바꿀 수 있다. 우리는 진행 정렬 순환(PAR)을 제안한다. PAR은 반복 t에서의 예측이 처음 t개 연산 이후의 상태와 일치하도록 학습시키고, 순환 상태를 첫 반복에서의 노름으로 재조정한다. swap-t에서 최대 32회 이동으로 학습된 Qwen2.5-0.5B 모델은 512회 이동에서 평균 전체 상태 정확도 95.5%를 달성하여 학습 길이의 16배에 해당하며, 동일한 백본에서 보고된 RLT의 55.7% 및 명시적 사고 사슬(explicit chain of thought)의 0.8%와 비교된다. t를 통제한 소거 실험(ablation)은 노름 고정(norm anchoring)을 제거하면 외삽 계수가 16배에서 2.2배 미만으로 줄어들고, 진행 정렬 목표를 최종 답안 지도로 대체하면 외삽 계수가 최대 8배로 줄어든다는 것을 보여준다. 학습된 완료 리드아웃(completion readout)은 정지 깊이가 주어지지 않아도 언제 답할지 선택한다. 중간 레이블이 없을 때, 접두사 자기 증류(prefix self-distillation)는 최종 답안만을 사용하여 더 짧은 문제 접두사로부터 대응 관계를 유도한다. 이러한 성능 향상은 여러 순차적 상태 추적 과제에 걸쳐 적용되어 깊이 외삽에 필요한 과제 구조를 확립한다. 이 발견은 중간 예측과 상태 스케일을 함께 학습시켜야 추가적인 순환 깊이가 더 긴 문제에 유용해진다는 점을 뒷받침한다.

One-sentence Summary

Researchers from Ant International and National University of Singapore propose Progress-Aligned Recurrence (PAR), which trains looped models to align iteration predictions with partial states and renormalize recurrent states, enabling a Qwen2.5-0.5B model trained on 323232 moves to reach 95.5%95.5\%95.5% full-state accuracy at 512512512 moves, a 16×16\times16× extrapolation over prior methods.

Key Contributions

  • The paper introduces Progress-Aligned Recurrence (PAR), which aligns each loop iteration with the state after the corresponding number of problem operations and applies RMS norm anchoring to stabilize recurrent state scale across iterations.
  • PAR is extended with a learned completion readout that selects when to answer without a supplied stopping depth and with prefix self-distillation that learns intermediate targets from shorter problem prefixes using only final answers.
  • Experiments show that a Qwen2.5-0.5B model trained on at most 32 moves reaches 95.5% mean full-state accuracy at 512 moves on swap-??_5, compared with 55.7% for RLT and 0.8% for explicit chain of thought, and ablations isolate the necessity of both norm anchoring and progress-aligned targets.

Introduction

Length generalization asks whether models trained on short problems can solve longer instances of the same task, and sequential state tracking tasks such as rule-table chains and object tracking provide a controlled setting because the rules stay fixed while the number of operations grows. Looped language models can increase computational depth with sequence length by repeatedly applying a shared transformer block to hidden states, but prior work shows that neither adding parameters nor running more iterations is sufficient on its own, and final-answer supervision at every loop can encourage early predictions and weaken extrapolation. Intermediate-state targets help define progress, yet they still lose accuracy beyond short extrapolation distances when recurrent state scale is uncontrolled. The authors introduce Progress-Aligned Recurrence (PAR), which matches each iteration to the state after the first k operations and uses RMS norm anchoring to control the scale of states passed between loops. They further add a learned halting rule and prefix self-distillation to obtain intermediate targets from final-answer labels alone, demonstrating 16x extrapolation on a state-tracking task.

Method

The authors introduce the PAR framework to establish a depth-length correspondence in language models, enabling them to scale computation dynamically with problem complexity. Refer to the framework diagram for a visual overview of the architecture and training pipeline.

To realize this architecture, the authors retrofit a standard Transformer by splitting its layers into three distinct components: a prelude, a weight-tied core, and a coda. The prelude processes the initial prompt to generate static input features. These features, along with the previous latent state, are concatenated and projected into the shared core via an adapter. The core iterates over the state according to the equation:

sk=C(W[e;sk−1]),k=1,…,Rs_k = C(W[e; s_{k-1}]), \quad k = 1, \dots, Rsk​=C(W[e;sk−1​]),k=1,…,R

and the coda reads the answer from any given iteration. To ensure that the initial retrofitted model computes the exact same function as its parent network when run for a single iteration, the adapter is initialized to project only the static input features.

Defining an iteration requires aligning the model's recurrent steps with the actual progress of the computation. For a problem requiring a specific number of sequential steps to solve, the authors enforce a strict correspondence where each recurrent iteration must advance the computation by exactly a fixed number of steps. The training loss is computed by comparing the model's output at each iteration to the intermediate answer corresponding to that specific progress point:

LPAR=∑k∈KCE(Q(sk),zmin⁡(ck,d))\mathcal{L}_{\mathrm{PAR}} = \sum_{k \in \mathcal{K}} \mathrm{CE}\big(Q(s_k), z_{\min(ck, d)}\big)LPAR​=k∈K∑​CE(Q(sk​),zmin(ck,d)​)

This prevents the model from taking shortcuts and ensures that the number of iterations scales linearly with the problem depth.

Because the model applies this step map hundreds of times during extrapolation, any drift in the state representation could alter the computed function. To maintain a stationary step map, the authors implement state-norm anchoring. After each iteration, every token's state is rescaled to match the RMS norm of its state from the first iteration, preventing norm drift without affecting single-iteration behavior. Additionally, to handle long prompts where the query is far from early moves, a positional stretch technique is applied during a short fine-tuning stage to multiply position indices, ensuring robust extrapolation.

For autonomous inference, the framework incorporates a learned halting mechanism. The coda is trained to output a completion probability, predicting whether the computation has finished at the current iteration. During inference, the model selects the first iteration where the completion probability exceeds a threshold, provided that a confirmation window of subsequent iterations also agrees. This allows the model to terminate computation dynamically without requiring external depth signals.

Finally, to extend this correspondence to settings lacking intermediate step labels, the authors employ prefix self-distillation. In this approach, an exponential moving average teacher model evaluates truncated prompts to generate soft targets for the student model's earlier iterations. The student is trained to match these distributions using KL divergence, effectively inducing intermediate state representations using only final-answer supervision.

The model is trained using AdamW with specific learning rates for the adapter and the rest of the network, utilizing a warm-up schedule and a single epoch over a diverse set of training depths. No intermediate tokens are generated during either training or testing, ensuring efficient computation.

Experiment

The experiments evaluate PAR on permutation group word problems and prior sequential benchmarks, comparing it with fixed-depth, recurrent, untied, and explicit chain-of-thought baselines. The main results show that PAR's learned recurrent step map generalizes to much longer sequences, maintaining near-ceiling accuracy up to 16x training depth across model sizes, while fixed-depth and chain-of-thought models fail to extrapolate. Ablations confirm that correct iteration supervision and stationary state dynamics are both necessary, and that a learned halting signal or positional-stretch fine-tuning helps when step labels or long-distance position encodings are issues. On structured tasks the method supports sequential multi-step reasoning but does not confer the same benefit for parallel graph reachability.

PAR substantially outperforms the baselines on depth extrapolation, maintaining near-perfect full-state accuracy on the swap protocol out to the longest tested multiple and reaching the maximum measurable extrapolation factor on the permutation tasks. Fixed-depth, recurrent, untied, and explicit chain-of-thought models degrade instead, with explicit chain-of-thought falling to chance before the longest extrapolation. Ablations show that both supervised iteration targets and norm anchoring are necessary for reliable extrapolation. PAR keeps full-state accuracy above 95% at 16x extrapolation on the swap protocol, while RLT drops to 55.7%. On the permutation tasks, PAR reaches the maximum measurable extrapolation factor across seeds, whereas fixed-depth, recurrent, and untied baselines stay below 2x. Explicit chain-of-thought performs well within the training range but collapses to chance by 8x on the swap task. Removing norm anchoring or altering final-answer supervision sharply reduces long-depth accuracy compared with PAR.

PAR substantially outperforms fixed-depth baselines on the S5 16x extrapolation setting across all evaluated Qwen2.5 backbones. The best PAR seed retains perfect accuracy at horizon 256 on every backbone, while fixed-depth models stay near chance. PAR's cross-seed mean gains are large but variable, and the benefit does not scale monotonically with backbone size. Best PAR runs reach 100% accuracy at the 16x horizon on all tested Qwen2.5 backbones. Fixed-depth baselines remain near chance, with best accuracies under 27% across every backbone. PAR provides large mean accuracy gains over fixed depth at every model size, though seed-to-seed variance is substantial. Mean PAR accuracy is highest for the 7B model and lowest for the 3B model, showing no simple monotonic scaling trend.

Across the Qwen3 backbones tested, PAR consistently outperforms fixed-depth models at every evaluated test depth. PAR accuracy starts near ceiling at the shortest extrapolation depth, while fixed-depth performance falls quickly and remains near chance at longer horizons. The advantage persists through sixteen times the training depth, with the largest backbone showing the strongest long-horizon result. At the shortest test depth, PAR reaches near-ceiling accuracy on all three Qwen3 backbones, whereas fixed-depth models score only around half correct. Fixed-depth accuracy drops to near chance by the second test depth and remains low through the longest horizon on every backbone. PAR maintains a wide margin over fixed depth through eight times the training depth, and at sixteen times the 4B PAR model achieves the highest long-horizon mean accuracy.

A jointly trained learned halting mechanism tracks an oracle stopping policy and maintains high full-state accuracy without access to problem length. At the longest evaluated extrapolation, it avoids much of the degradation seen by the recurrent baseline and stays close to oracle performance. This indicates that explicit stopping is important for reliable length extrapolation. Learned halting matches the oracle stopping baseline closely at both evaluated extrapolated lengths. At the longest extrapolation, learned halting preserves high accuracy while the RLT baseline degrades substantially and becomes more variable across seeds.

Among final-answer-only training recipes evaluated on the S5 task at 16 times training depth, prefix self-distillation is the only method that sustains high accuracy, reaching 85%. The alternatives degrade substantially, with most showing limited extrapolation and some falling to chance before the longest depth. This indicates that final-answer labels alone can support strong length extrapolation when paired with prefix self-distillation. Prefix self-distillation is the only final-answer-only approach evaluated that keeps high accuracy at 16 times training depth, reaching 85%. Other final-answer supervision recipes show weak extrapolation, with reported accuracies mostly in the teens or twenties at 16 times training depth and much lower extrapolation gaps.

Across swap and permutation depth-extrapolation tasks, PAR maintains near-perfect full-state accuracy well beyond training depth and up to 16 times the training horizon, while fixed-depth, recurrent, untied, and explicit chain-of-thought baselines degrade or fall to chance. Evaluations on multiple Qwen2.5 and Qwen3 backbones show PAR consistently outperforming fixed-depth models at every tested depth, though gains vary by seed and do not scale monotonically with model size. Ablations confirm that supervised iteration targets and norm anchoring are necessary for reliable extrapolation, learned halting closely tracks oracle stopping, and prefix self-distillation is the only final-answer-only training variant that preserves high accuracy at long horizons.


AI로 AI 구축

아이디어에서 출시까지 — 무료 AI 코코딩, 즉시 사용 가능한 환경, 최적의 GPU 가격으로 AI 개발을 가속화하세요.

AI 협업 코딩
바로 사용 가능한 GPU
최적의 가격

HyperAI Newsletters

최신 정보 구독하기
한국 시간 매주 월요일 오전 9시 에 이번 주의 최신 업데이트를 메일로 발송합니다
이메일 서비스 제공: MailChimp