It is confirmed that memorization persists in modern LLMs and is influenced more by a complex interplay of training domain, dataset composition, architectural choices, and content characteristics, rather than parameter count alone.
Abstract
Large Language Models (LLMs) for code generation risk memorizing and reproducing sensitive training data, including licensed code and proprietary information. We investigate memorization behavior in recent open-weight LLMs in code generation using a two-stage memorization evaluation pipeline, which combines a similarity-based extractability filter with a targeted data extraction attack. We evaluate four models (StarCoder2-3B, StarCoder2-7B, Llama3-8B, and DeepSeek-R1-distilled-Llama-8B) on a custom dataset of 30,000+ Python files. Our results reveal memorization rates of 42-64%, with code-specialized models exhibiting higher rates than general-purpose models. Categorical analysis shows that repetitive content (license headers, documentation) is memorized at rates up to 70%, while complex code exhibits lower susceptibility. Notably, realistic code completion scenarios trigger unintentional memorization in 13-14% of cases, posing practical risks for AI coding assistants. We demonstrate that knowledge distillation reduces extraction rates by approximately 19%, offering a cost-effective mitigation approach. Our findings confirm that memorization persists in modern LLMs and is influenced more by a complex interplay of training domain, dataset composition, architectural choices, and content characteristics, rather than parameter count alone.
It is revealed that scaled encoders successfully absorb substantial representation load while still converging on the correct family of solutions, and this ability to adapt to varying surface forms is what truly matters for usability and generalizability in LLM and agentic applications.
P. Rajput, Abdoul Aziz Bonkoungou, Albérick Euraste Djiré et al.· 0 citations
CoGate is proposed, a confidence-gated co-decoding approach that controls the expert's influence on the co-decoding process based on its confidence, and outperforms existing co-decoding methods (CoSec+) across multiple benchmarks.
Minghao Hu, Lannan Luo, Allen G. Roush et al.· 0 citations
Upon benchmarking against LLMs, it is found that functionality pass rate is consistently higher than vulnerability pass rate for all programming languages, highlighting the necessity of vulnerable code benchmarks with larger CWE coverage.
Samuel Osebe, Fan Yang, Junyi Li et al.· Annual Meeting of the Associ...· 0 citations
Six state-of-the-art quantization methods are evaluated on two representative large code model families using the multilingual McEval and CoderEval benchmarks for Python and Java to provide practical guidance for selecting quantization strategies for deploying large code models on resource-constrained hardware.
Saima Afrin, MD Zahidul Haque, A. Mastropaolo· 0 citations
AlquistCoder, a compact 3.8B‐parameter coding assistant designed to address both risks through targeted synthetic‐data alignment, is introduced and publicly released to support reproducible research on security alignment for code‐generation models.
Ondřej Kobza, Adam Černý, Ivanka M. Dostal et al.· International Conference on...· 0 citations
A paired-prompt benchmark for human-versus-machine detection across English text, Python code, and mixed text–code documents shows that reliable deployment requires cross-domain evaluation, mixed-content testing, and calibration beyond in-distribution accuracy.