2604.18567v1 Apr 20, 2026 cs.LG

잠재 위상 변화 기반 되돌리기: 잔류 스트림 모니터링 및 KV-캐시 조절을 통한 추론 시간 오류 수정

Latent Phase-Shift Rollback: Inference-Time Error Correction via Residual Stream Monitoring and KV-Cache Steering

Dhruv Kumar
Dhruv Kumar
Citations: 26
h-index: 2
Manan Gupta
Manan Gupta
Citations: 0
h-index: 0

대규모 언어 모델은 생성 과정 중에 회복 불가능한 추론 오류를 자주 발생시킵니다. 한 번 잘못된 단계를 밟으면, 이후 토큰들은 오류를 수정하는 대신 실수를 더욱 심화시키는 경향이 있습니다. 본 연구에서는 **잠재 위상 변화 기반 되돌리기 (Latent Phase-Shift Rollback, LPSR)**를 제안합니다. LPSR은 각 생성 단계에서 중요한 레이어 lcrit에서 잔류 스트림을 모니터링하고, 코사인 유사성 + 엔트로피를 이용한 이중 게이트를 통해 갑작스러운 방향 전환(위상 변화)을 감지합니다. 감지 시, KV-캐시를 되돌리고 미리 계산된 제어 벡터를 주입합니다. LPSR은 별도의 파인 튜닝, 그래디언트 계산, 또는 추가적인 순방향 연산을 필요로 하지 않습니다. LPSR은 8B 모델에서 MATH-500 데이터셋에서 44.0%의 정확도를 달성했으며, 이는 표준 AR 방식(28.8%)보다 15.2% 포인트 높은 성능입니다 (McNemar χ² = 66.96, p < 10⁻¹⁵). 특히, 가장 자연스러운 추론 시간 기준선인 프롬프트 기반의 자체 수정 방식은 19.8%의 성능에 그치며, 이는 표준 AR 방식보다 낮은 수치입니다. LPSR은 이 방식보다 24.2% 포인트 더 높은 성능을 보입니다 (χ² = 89.4, p ≈ 0). 또한, LPSR은 Best-of-16 방식보다 7.8% 포인트 더 높은 성능을 보이지만, 토큰 비용은 5.4배 낮습니다. 더 나아가, LPSR은 70B 모델(35.2%)보다 8.75배 적은 파라미터로, 토큰 예산은 약 3배 낮은 조건에서 더 높은 성능을 달성합니다. 32개의 레이어를 분석한 결과, **오류 감지와 수정의 분리**라는 새로운 현상을 발견했습니다. 오류 감지 성능(AUC)은 14번째 레이어에서 최고조(0.718)에 달하지만, 작업 정확도는 16번째 레이어에서 최고조(44.0% vs. 29.2%)를 보입니다. 이는 오류 감지와 수정에 최적의 모니터링 깊이가 다르다는 것을 보여줍니다.

Original Abstract

Large language models frequently commit unrecoverable reasoning errors mid-generation: once a wrong step is taken, subsequent tokens compound the mistake rather than correct it. We introduce $\textbf{Latent Phase-Shift Rollback}$ (LPSR): at each generation step, we monitor the residual stream at a critical layer lcrit, detect abrupt directional reversals (phase shifts) via a cosine-similarity $+$ entropy dual gate, and respond by rolling back the KV-cache and injecting a pre-computed steering vector. No fine-tuning, gradient computation, or additional forward passes are required. LPSR achieves $\mathbf{44.0\%}$ on MATH-500 with an 8B model versus $28.8\%$ for standard AR ($+15.2$ pp; McNemar $χ^2 = 66.96$, $p < 10^{-15}$). Critically, prompted self-correction, the most natural inference-time baseline, scores only $19.8\%$, below standard AR; LPSR exceeds it by $+24.2$ pp ($χ^2 = 89.4$, $p \approx 0$). LPSR also outperforms Best-of-16 ($+7.8$ pp) at $5.4\times$ lower token cost, and surpasses a standard 70B model ($35.2\%$) with $8.75\times$ fewer parameters at ${\sim}3\times$ the token budget. A 32-layer sweep reveals a novel \textbf{detection-correction dissociation}: error-detection AUC peaks at layer~14 ($0.718$) but task accuracy peaks at layer~16 ($44.0\%$ vs.\ $29.2\%$), demonstrating that optimal monitoring depth differs for detection and correction.

0 Citations
0 Influential
1 Altmetric
5.0 Score
Original PDF

No Analysis Report Yet

This paper hasn't been analyzed by Gemini yet.

Log in to request an AI analysis.

댓글

댓글을 작성하려면 로그인하세요.

아직 댓글이 없습니다. 첫 번째 댓글을 남겨보세요!