Memorization Diagnostics for Code LLMs Should be Scale-Aware
作者: Prateek Kumar Rajput, Abdoul Aziz Bonkoungou, Alberick Euraste Djiré, Xunzhu Tang, Yewei Song, Iyiola Emmanuel Olatunji, El Hacen Diallo, Jacques Klein, Tegawendé F. Bissyandé
分类: cs.SE, cs.AI
发布日期: 2026-08-13
备注: 26 pages, 6 figures, 6 tables. Under review at EMSE
💡 一句话要点
提出规模感知的记忆诊断方法以解决代码LLM的理解问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 大型语言模型 记忆与理解 可逆变换 软件工程 代码生成 探测技术
📋 核心要点
- 现有的探测技术在评估大规模代码LLM的记忆能力时表现不佳,无法有效区分记忆与理解。
- 论文提出通过可逆数学变换将表示负载与记忆分开,从而更准确地评估模型的能力。
- 研究表明,大规模编码器能够有效处理表示负载,且在解决方案上表现出色,提升了模型的实用性。
📝 摘要(中文)
大型语言模型在代码生成中的记忆与理解能力的争论仍在继续。现有文献普遍报告了记忆现象,但对密集架构的探测技术在规模上表现出严重的效用下降。传统的编码器探测方法在处理大规模模型时难以揭示记忆现象,而解码器探测方法也表现出类似的性能退化。本文通过可逆数学变换将表示负载与记忆分离,揭示了大规模编码器能够有效吸收表示负载,同时仍能收敛到正确的解决方案。这一发现对软件工程的可用性和通用性具有重要意义。
🔬 方法详解
问题定义:本文旨在解决大型语言模型在代码生成中记忆与理解的混淆问题。现有方法在探测记忆现象时,尤其是在大规模模型中,表现出严重的效用下降,难以有效评估模型的真实能力。
核心思路:论文的核心思路是通过可逆数学变换将表示负载与记忆分开,明确这两者的不同作用。这样设计的原因在于,传统探测方法未能有效揭示大规模模型的记忆现象,导致对模型能力的误判。
技术框架:整体架构包括两个主要模块:首先是使用可逆变换处理数值问题,以分离表示负载与记忆;其次是评估模型在不同表面形式下的适应能力。
关键创新:最重要的技术创新在于将表示负载与记忆视为独立现象,从而提供了一种新的评估框架。这与现有方法的本质区别在于,后者通常将两者混为一谈,导致评估结果的偏差。
关键设计:在技术细节上,论文采用了特定的损失函数和网络结构,以确保在分离表示负载与记忆的过程中,模型仍能有效收敛到正确的解决方案。
🖼️ 关键图片
📊 实验亮点
实验结果表明,采用新方法后,大规模编码器在处理表示负载时表现出显著提升,能够有效收敛到正确的解决方案。与传统方法相比,模型在已知污染基准上的表现得到了改善,具体提升幅度未知。
🎯 应用场景
该研究的潜在应用领域包括软件工程、自动代码生成和智能编程助手等。通过更准确地评估模型的记忆与理解能力,开发者可以更好地利用大型语言模型,提高代码生成的质量和效率,推动智能编程工具的发展。
📄 摘要(原文)
The extent to which large language models for code rely on memorization over genuine understanding remains highly debated. While current literature frequently reports widespread memorization, evaluating the underlying probing techniques across dense architectures reveals a severe breakdown in their utility at scale. Traditional encoder-style probes using perturbations such as synonym fuzzing or dead-code insertion struggle to expose memorization in scaled models, even on known-contaminated benchmarks, and decoder-style probes that rely on log probabilities show similar performance degradation. The specific mode of failure for these probes, particularly why such techniques disrupt smaller models but fail to impact larger ones, motivates us to untangle representation load from memorization rather than treating them as a single phenomenon. By applying invertible mathematical transforms to numeric problems, we isolate these two factors and reveal that scaled encoders successfully absorb substantial representation load while still converging on the correct family of solutions. In practical software engineering, this ability to adapt to varying surface forms is what truly matters for usability and generalizability in LLM and agentic applications. Whether a specific solution was seen during training becomes a much less pressing question because although memorization inflates scores on contaminated benchmarks, factoring out representation load makes it debatable how much we should truly care if a functional answer was originally memorized. Future evaluations must therefore be built around separating these phenomena rather than relying on methodologies that quietly entangle them.