From Memorization to Reasoning in the Spectrum of Loss Curvature

LLM Model Editing Latent Reasoning ML NNGTB LFDDR
我们刻画了记忆化在Transformer模型中的表征方式,并表明通过基于损失景观曲率的分解方法,可以在语言模型(LMs)和视觉Transformer(ViTs)的权重中将记忆化成分分离出来。这一发现基于先前的理论与实证研究,这些研究表明,被记忆的训练样本所对应的曲率明显比未被记忆的样本更尖锐,因此按权重分量从高到低排列曲率,即可在无需显式标签的情况下揭示出这种差异。这一观察启发了一种权重编辑方法,该方法在抑制非目标记忆内容复述方面,效果显著优于近期提出的一种遗忘学习方法(BalancedSubnet),同时还能保持更低的困惑度。由于曲率基底对模型权重中的共享结构具有自然的解释意义,我们系统分析了该编辑方法对语言模型下游任务的影响,发现事实检索和算术任务的表现受到特别且持续的负面影响,而开放式事实检索和一般性逻辑推理能力则得以保留。我们认为,这些任务高度依赖于权重空间中特定的专业化方向,而非通用机制,无论单个数据点是否被明确记忆。我们通过展示任务数据在被编辑掉的低曲率分量上的激活强度与其任务性能下降之间的对应关系,为上述观点提供了支持。本研究深化了人们对神经网络中记忆化现象的理解,为实际去除记忆化提供了可行路径,同时也为数学计算和事实检索等任务中存在特异性强、用途狭窄的内部结构提供了证据。
We characterize how memorization is represented in transformer models and show that it can be disentangled in the weights of both language models (LMs) and vision transformers (ViTs) using a decomposition based on the loss landscape curvature. This insight is based on prior theoretical and empirical work showing that the curvature for memorized training points is much sharper than non memorized, meaning ordering weight components from high to low curvature can reveal a distinction without explicit labels. This motivates a weight editing procedure that suppresses far more recitation of untargeted memorized data more effectively than a recent unlearning method (BalancedSubnet), while maintaining lower perplexity. Since the basis of curvature has a natural interpretation for shared structure in model weights, we analyze the editing procedure extensively on its effect on downstream tasks in LMs, and find that fact retrieval and arithmetic are specifically and consistently negatively affected, even though open book fact retrieval and general logical reasoning is conserved. We posit these tasks rely heavily on specialized directions in weight space rather than general purpose mechanisms, regardless of whether those individual datapoints are memorized. We support this by showing a correspondence between task data's activation strength with low curvature components that we edit out, and the drop in task performance after the edit. Our work enhances the understanding of memorization in neural networks with practical applications towards removing it, and provides evidence for idiosyncratic, narrowly-used structures involved in solving tasks like math and fact retrieval.
许愿