Deep Neural Networks (DNNs) are increasingly being used in software engineering and code intelligence tasks. These are powerful tools that are capable of learning highly generalizable patterns from large datasets through millions of parameters. At the same time, their large capacity can render them prone to memorizing data points. Recent work suggests that the memorization risk manifests especially strongly when the training dataset is noisy, involving many ambiguous or questionable samples, and memorization is the only recourse. The goal of this paper is to evaluate and compare the extent of memorization and generalization in neural code intelligence models. It aims to provide insights on how memorization may impact the learning behavior of neural models in code intelligence systems. To observe the extent of memorization in models, we add random noise to the original training dataset and use various metrics to quantify the impact of noise on various aspects of training and testing. We evaluate several state-of-the-art neural code intelligence models and benchmarks based on Java, Python, and Ruby codebases. Our results highlight important risks: millions of trainable parameters allow the neural networks to memorize anything, including noisy data, and provide a false sense of generalization. We observed all models manifest some forms of memorization. This can be potentially troublesome in most code intelligence tasks where they rely on rather noise-prone and repetitive data sources, such as code from GitHub. To the best of our knowledge, we provide the first study to quantify memorization effects in the domain of software engineering and code intelligence systems. This work raises awareness and provides new insights into important issues of training neural models in code intelligence systems that are usually overlooked by software engineering researchers.
Provable Separations between Memorization and Generalization in Diffusion Models
Department of Industrial Engineering and Management Sciences, Northwestern University(工业工程与管理科学系,西北大学);Department of Statistics and Data Science, Northwestern University(统计与数据科学系,西北大学);School of Mathematics, Georgia Institute of Technology(数学系,佐治亚理工学院)
RMIT University(皇家墨尔本理工大学);University of Technology Sydney(悉尼科技大学);Griffith University(格里菲斯大学);Data61, CSIRO(联邦科学与工业研究组织Data61);Swinburne University of Technology(斯威本科技大学)
Generalization v.s. Memorization: Tracing Language Models' Capabilities Back to Pretraining Data
University of California, Santa Barbara(加利福尼亚大学圣巴巴拉分校);Allen Institute for AI(艾伦人工智能研究所);University of Washington(华盛顿大学);SynthLabs;Carnegie Mellon University(卡内基梅隆大学)
On the Memorization of Consistency Distillation for Diffusion Models
School of Computing & Data Science, The University of Hong Kong(计算与数据科学学院,香港大学);School of Computing & Data Science and Institute of Data Science, The University of Hong Kong(计算与数据科学学院和数据科学研究所,香港大学)
On the Dynamics & Transferability of Latent Generalization during Memorization
Centre for Artificial Intelligence Research, Department of Computer Science & Information Systems, Birla Institute of Technology & Science Pilani(人工智能研究中心,计算机科学与信息系统系,比拉理工学院)
Two Calm Ends and the Wild Middle: A Geometric Picture of Memorization in Diffusion Models
Department of Mathematics, University of Missouri(数学系,密苏里大学);Halıcıoğlu Data Science Institute, University of California San Diego(哈利奇奥数据科学研究所,加州大学圣地亚哥分校)
Unveiling Memorization-Generalization Coexistence: A Case Study on Arithmetic Tasks with Label Noise
Taylor Lab, Huawei Technologies Co., Ltd.(华为技术有限公司泰勒实验室);Key Laboratory of Interdisciplinary Research of Computation and Economics, Shanghai University of Finance and Economics(上海财经大学计算与经济交叉研究重点实验室)
Montréal Institute for Learning Algorithms(蒙特利尔学习算法研究所);Université de Montréal(蒙特利尔大学);Jagiellonian University(雅盖隆大学);McGill University(麦吉尔大学);University of California, Berkeley(加州大学伯克利分校);Polytechnique Montréal(蒙特利尔理工学院);University of Bonn(波恩大学)
Measures of Information Reflect Memorization Patterns
Delhi Technological University(德里理工大学);Google Research India(谷歌研究院印度分部);Amazon Web Services(亚马逊网络服务);Technion – Israel Institute of Technology(以色列理工学院);Carnegie Mellon University(卡内基梅隆大学)