Learned or Memorized ? Quantifying Memorization Advantage in Code LLMs
Not on the map. Why?
Abstract (arXiv)
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 and Defects4J, often suspected of leakage. Contrary to common concerns, both show low memorization advantage across models: CVEFixes remains below 0.1, and Defects4J is lower than other program repair benchmarks. These results suggest that, for these datasets, models may rely more on learned generalization than direct memorization. Overall, our findings provide evidence that memorization risk is highly task- and model-dependent, and highlight the need for stronger evaluation protocols, especially in security-focused settings.
Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). First posted on arXiv 15 Apr 2026.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2026: 4.
4 papers.
- 2026Memorization Diagnostics for Code LLMs Should be Scale-Awarecited by 0
- 2026Do Not Copy/Paste: Soft Barriers for Copying in AI-Assisted Programmingcited by 0
- 2026Evaluating Inference-Time Defenses Against Package Hallucination in LLM-Generated Codecited by 0
- 2026Predicting Program Exit Code with LLMs and Programming Language Semanticscited by 0
- 2026Predicting Program Exit Code with LLMs and Programming Language Semantics1 Sep 2026
- 2026Evaluating Inference-Time Defenses Against Package Hallucination in LLM-Generated Code23 Aug 2026
- 2026Do Not Copy/Paste: Soft Barriers for Copying in AI-Assisted Programming23 Aug 2026
- 2026Memorization Diagnostics for Code LLMs Should be Scale-Aware13 Aug 2026