通过信息瓶颈突破 LLM 代码微调中的记忆障碍以提升泛化能力
Breaking Memorization Barriers in LLM Code Fine-Tuning via Information Bottleneck for Improved Generalization
AI总结:
针对 LLM 代码监督微调中的记忆障碍,提出 IB-FT,通过信息瓶颈压缩隐藏表示中的记忆化虚假特征并保留任务信息,从而提升代码生成泛化与稳定性能。
摘要:
通过监督微调(FT)使预训练大语言模型(LLM)适应代码领域,已被广泛用于代码生成。然而,我们发现了一种此前未被充分重视的失败模式,即记忆障碍:基础模型对下游代码数据的强烈记忆可能困住优化过程,并阻碍标准 FT 有效获取新的、可泛化的代码知识。为克服这一障碍,我们提出了信息瓶颈(IB)引导的微调,称为 IB-FT;该方法对代码数据的隐藏表示施加 IB 惩罚,以压缩虚假的、被记忆的特征,同时保留与任务相关的信息。在两个代码基准(OriGen 和 Evol-CodeAlpaca-V1)上的大量实验表明,与传统 FT 相比,IB-FT 显著缓解了记忆障碍,提升了 top-1 性能(Pass@$1$),并在更严格的多样本指标 Pass@$k^{(m)}$(仅当 k 个样本中至少有 m 个通过单元测试时,问题才算解决)下产生了远为稳定的收益。
英文摘要:
Adapting pretrained large language models (LLMs) to code domains via supervised fine-tuning (FT) has been commonly used for code generation. However, we identify a previously underappreciated failure mode, the memorization barrier, where strong memorization of downstream code data in the base model could trap optimization and prevent the standard FT from effectively acquiring new, generalizable code knowledge. To overcome this barrier, we propose the information bottleneck (IB)-guided fine-tuning, termed IB-FT, which applies an IB penalty on hidden representations of the code data to compress spurious, memorized features while preserving task-relevant information. Extensive experiments on two code benchmarks (OriGen and Evol-CodeAlpaca-V1) show that IB-FT substantially alleviates the memorization barrier, improves top-1 performance (Pass@$1$), and yields far more stable gains under the stricter multi-sample metric Pass@$k^{(m)}$ (a problem counts as solved only if at least $m$ of $k$ samples pass unit tests) compared with conventional FT.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。