Skip to content
Preprint

Memorization Diagnostics for Code LLMs Should be Scale-Aware

Aug 2026 · 0 citations · 52 references
Computer Science

TL;DR

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.

Abstract

The extent to which large language models for code rely on memorization over genuine understanding remains highly debated. While current literature frequently reports widespread memorization, evaluating the underlying probing techniques across dense architectures reveals a severe breakdown in their utility at scale. Traditional encoder-style probes using perturbations such as synonym fuzzing or dead-code insertion struggle to expose memorization in scaled models, even on known-contaminated benchmarks, and decoder-style probes that rely on log probabilities show similar performance degradation. The specific mode of failure for these probes, particularly why such techniques disrupt smaller models but fail to impact larger ones, motivates us to untangle representation load from memorization rather than treating them as a single phenomenon. By applying invertible mathematical transforms to numeric problems, we isolate these two factors and reveal that scaled encoders successfully absorb substantial representation load while still converging on the correct family of solutions. In practical software engineering, this ability to adapt to varying surface forms is what truly matters for usability and generalizability in LLM and agentic applications. Whether a specific solution was seen during training becomes a much less pressing question because although memorization inflates scores on contaminated benchmarks, factoring out representation load makes it debatable how much we should truly care if a functional answer was originally memorized. Future evaluations must therefore be built around separating these phenomena rather than relying on methodologies that quietly entangle them.

View source

Similar papers

Book Open access Jul 2026

When AI Coding Assistants Leak Training Data: A Study of LLM Memorization in Code Generation

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.

Xiaoyu Cheng, Kundi Yao, Pengyu Nie et al. · 0 citations
#natural language process... Preprint Jul 2026

Towards Mechanistically Understanding Why Memorized Knowledge Fails to Generalize in Large Language Model Finetuning

Self-patching identifies activation locations where relocating representations substantially improves failed generalization cases and design a simple heuristic strategy which recovers 58--75\% of the oracle headroom in generalization failure.

Lu Dai, Ziyang Rao, Yili Wang et al. · 1 citation
Preprint Aug 2026

Lexical Perturbations Disrupt LLM Reasoning: An Empirical Study of Attention Diversion

Attention Diversion explains why inference-time strategies, including chain-of-thought prompting, spell-checking, self-repair, and stronger repair models, fail to consistently recover performance: each addresses one channel at a time.

Jiaqi Zhu, Yang Zhang, Jun-Hua Ding et al. · 0 citations
Preprint Aug 2026

Execution-Anchored Hallucination Calibration Reranking for Verilog Code Generation

EAHC is proposed, an Execution-Anchored Hallucination Calibration reranking framework that anchors reasoning judgments to execution behavior so that execution-equivalent candidates receive consistent scores, which implements a dual-channel architecture.

Guang Yang, Xing Hu, Xiang Chen et al. · 0 citations
Jul 2026

Mitigating LLM Sycophancy in Code Smell Detection Using Evidence-Guided Reasoning Prompts

This paper presents the first systematic empirical study of sycophancy bias in LLM-based code smell detection, and proposes Evidence-Guided Debiasing Prompting (EGDP), a structured prompting strategy that enforces evidence-first reasoning and reduces decision instability and improves robustness.

Istiaq Ahmed Fahad, K. Asif, Mohammad A. Tawhid · 0 citations
Book Open access Jul 2026

Context-Aware Feedback Compression in Online Judge Programming with LLMs

This work instantiates budgeted oracle-to-hint compression in online judge (OJ) style algorithmic programming as a modular interactive agent that couples an LLM core with a sandboxed judger, a feedback-to-hint prompt constructor, and trajectory memory.

Jialiang Gu, Keren Zhou, Daming Li et al. · 2 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.