Evaluating Harmful Memorization in LLM Code Generation
4 Mar · Lizhe Zhang, Wentao Chen, Li Zhong +3 · arXiv:2503.02296
Assessing memorization in LLM code generation is challenging because code reuse is not inherently harmful. Correct programs often share APIs, templates, and algorithmic idioms, so code similarity alone may reflect benign reuse rather than problematic memorization. We focus on the harmful case: a model fails to adapt when task semantics change and instead produces code that remains highly similar to the original…