LoopCoder-v2: 효율적인 테스트 시간 계산 확장을 위한 단일 루프 구조
LoopCoder-v2: Only Loop Once for Efficient Test-Time Computation Scaling
루프 트랜스포머(Looped Transformers)는 공유 블록을 반복적으로 적용하여 잠재적 연산을 확장하지만, 순차적인 루프는 루프 횟수에 따라 지연 시간을 증가시키고 KV-캐시 메모리 사용량을 늘립니다. 병렬 루프 트랜스포머(PLT)는 크로스-루프 위치 오프셋(CLP) 및 공유된 KV 게이티드 슬라이딩 윈도우 어텐션을 통해 이러한 비용을 줄여, 루프 횟수를 실용적인 설계 요소로 만듭니다. 따라서 우리는 PLT의 루프 횟수 선택을 이득-비용 관점에서 연구합니다. 추가적인 루프는 표현을 개선할 수 있지만, CLP는 각 루프 경계에서 위치 불일치를 발생시킵니다. 본 연구에서는 18조 개의 토큰으로 처음부터 학습된 다양한 루프 횟수를 가진 7B PLT 코더 모델인 LoopCoder-v2 패밀리를 구축하고, 매칭된 명령 튜닝 및 평가를 수행했습니다. 실험 결과, 두 번의 루프를 사용하는 변형은 코드 생성, 코드 추론, 에이전트 기반 소프트웨어 엔지니어링 및 도구 사용 벤치마크에서 기존 모델보다 전반적으로 성능 향상을 보였습니다. 특히 SWE-bench Verified는 43.0점에서 64.4점으로, Multi-SWE는 14.0점에서 31.0점으로 개선되었습니다. 반면 세 개 이상의 루프를 사용하는 변형은 성능 저하를 보여, 루프 횟수가 강하게 비선형적인 영향을 미침을 나타냅니다. 분석 결과, 두 번째 루프가 주요한 성능 향상을 가져오는 것으로 나타났으며, 이후 루프는 점진적으로 감소하는 효과와 함께 표현의 다양성을 줄이는 경향이 있습니다. CLP로 인한 불일치는 개선 효과가 줄어들면서 상대적으로 일정하게 유지되므로, 오프셋 비용이 점점 더 두드러지게 됩니다. 이러한 이득-비용 균형은 PLT가 두 번의 루프에서 성능이 포화되는 현상을 설명하며, 루프 횟수 선택에 대한 지침을 제공합니다.
Looped Transformers scale latent computation by repeatedly applying shared blocks, but sequential looping increases latency and KV-cache memory with the loop count. Parallel loop Transformers (PLT) alleviate this cost through cross-loop position offsets (CLP) and shared-KV gated sliding-window attention, making loop count a practical design choice. We therefore study PLT loop-count selection through a gain--cost view: an extra loop may refine representations, but CLP also introduces a positional mismatch at each loop boundary. We instantiate this study by training LoopCoder-v2, a family of 7B PLT coders with different loop counts, from scratch on 18T tokens, followed by matched instruction tuning and evaluation. Empirically, the two-loop variant delivers broad gains over the non-looped baseline across code generation, code reasoning, agentic software engineering, and tool-use benchmarks, improving SWE-bench Verified from 43.0 to 64.4 points and Multi-SWE from 14.0 to 31.0 points. In contrast, variants with three or more loops regress, revealing a strongly non-monotonic loop-count effect. Our diagnostics show that loop 2 provides the main productive refinement, while later loops yield diminishing, oscillatory updates and reduced representational diversity. Because the CLP-induced mismatch remains roughly fixed as refinement gains shrink, the offset cost increasingly dominates. This gain--cost trade-off explains PLT's saturation at two loops and provides diagnostics for loop-count selection.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.