Learned or Memorized ? Quantifying Memorization Advantage in Code LLMs
Djir\'e Alb\'erick Euraste, Kabor\'e Abdoul Kader, Jordan Samhi, Earl T. Barr, Jacques Klein, Tegawend\'e F. Bissyand\'e

TL;DR
This paper introduces a perturbation-based method to measure memorization in code LLMs, revealing that memorization varies by model, task, and dataset, with implications for evaluation and security.
Contribution
It proposes a novel approach to quantify memorization advantage in code LLMs and evaluates multiple models and benchmarks to understand their generalization and memorization behaviors.
Findings
Memorization advantage varies widely across models and tasks.
Code summarization shows low sensitivity, test generation shows high sensitivity.
Certain benchmarks suspected of leakage actually show low memorization advantage.
Abstract
The lack of transparency about code datasets used to train large language models (LLMs) makes it difficult to detect, evaluate, and mitigate data leakage. We present a perturbation-based method to quantify memorization advantage in code LLMs, defined as the performance gap between likely seen and unseen inputs. We evaluate 8 open-source code LLMs on 19 benchmarks across four task families: code generation, code understanding, vulnerability detection, and bug fixing. Sensitivity patterns vary widely across models and tasks. For example, StarCoder reaches high sensitivity on some benchmarks (up to 0.8), while QwenCoder remains lower (mostly below 0.4), suggesting differences in generalization behavior. Task categories also differ: code summarization tends to show low sensitivity, whereas test generation is substantially higher. We then analyze two widely discussed benchmarks, CVEFixes…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
