语言模型的安全纠错:冻结基座调整与能力保持
研究论文 · 2026/09/29
本文研究一个实际问题:小型纠错模块能否在不降低冻结语言模型基础能力的前提下修正其输出错误?作者提出 CRN v2,一个轻量级 logit 级纠错模块(约 3400 万可训练参数,占 46.5 亿文本模块的 0.73%),置于完全冻结的 Gemma 4 E2B 模型之上。基础模型从不更新,仅纠错模块通过监督微调及后续在 83,400 个纠错对上的无参考 DPO 进行学习。在 60 题领域考试(CEHRI:认证人机智能,涵盖事实、算术和隐式目标推理)上,CRN v2 纠正了 53.3% 的基础模型错误(改写变体:43.3%),同时在所测能力基准(MMLU/BoolQ N=200;car-wash N=8)上无退化。在匹配 CRN v1 预算(660 万参数,秩 19)的 LoRA 基线达到 83.3% 纠正率,但在相同基准上遭受 30-75% 的能力损失——即纠错-能力权衡。消融实验表明 KL 保持项(lambda=0.1)至关重要:将其降至 0.01 会使纠错率降至 35.0%。早期层的隐藏状态注入变体(160 万参数,仅 SFT)达到 50.0%/55.8%,但未超过 logit 纠错;更浅层注入(第 4 层)降至 30.0%/28.3%;多深度 logit 纠错(约 3500 万)仅达 40%;更长训练(5,000 SFT + 2,000 DPO)仍为 53.3%——所测试的替代配置均未超过秩 128 的 logit 结果,与约 53% 的最佳达成结果而非下限一致。本研究探讨一种设计原则(冻结基础 + logit 纠错 + KL 锚定),并非声称架构新颖。所有代码、主结果权重和评估脚本均已发布(深度变体仅代码——无训练好的深度检查点)。
该研究针对语言模型纠错中能力保持的关键问题,提出了一种参数高效且不损害基础能力的解决方案,并通过严谨的消融和对比实验揭示了设计原则,对实际部署具有重要参考价值。
We study a practical question: can a small correction module fix errors in a frozen language model's outputs without degrading its base capabilities? We propose CRN v2, a lightweight logit-level correction module (~34M trainable parameters, 0.73% of the 4.65B text module) that sits atop a fully frozen Gemma 4 E2B model. The base model is never updated; only the correction module learns, via supervised fine-tuning followed by reference-free DPO on 83,400 error-correction pairs. On a 60-question domain exam (CEHRI: Certified Human-Robot Intelligence, covering facts, arithmetic, and implicit-goal reasoning), CRN v2 corrects 53.3% of base-model errors (reworded variant: 43.3%) while showing no degradation on tested capability benchmarks (MMLU/BoolQ N=200; car-wash N=8). A LoRA baseline at the matched CRN v1 budget (6.6M params, rank 19) achieves 83.3% correction but suffers 30-75% capability loss on the same benchmarks -- the correction-capability tradeoff. An ablation shows that the KL preservation term (lambda=0.1) is critical: lowering it to 0.01 degrades correction to 35.0%. A hidden-state injection variant at earlier layers (1.6M params, SFT-only) reaches 50.0%/55.8% but does not exceed logit correction; shallower injection (layer 4) drops to 30.0%/28.3%; multi-depth logit correction (~35M) reaches only 40%; and longer training (5,000 SFT + 2,000 DPO) stays at 53.3% -- none of the alternative configurations we tested exceeded the rank-128 logit result, consistent with a best-achieved result of ~53% rather than a floor. This is a study of a design principle (frozen base + logit correction + KL anchoring), not a claim of architectural novelty. All code, main-result weights, and evaluation scripts are released (deep variant as code only -- no trained deep checkpoints).