Study finds code models complete code or skeletons depending on context
Start here
An arXiv study released on November 29, 2026 shows that code language models decide, based on context, whether to complete a function signature with a docstring and empty body into a solution or an exercise skeleton: when the context resembles a skeleton, the model outputs deferred placeholder openings such as pass rather than real code. Across 24 open-source models, the form of neighboring functions can determine the model's choice; when there is nothing to copy, file-level text serves as a genre cue, and changing just one word in the path raised the deferral rate on all 23 comparable models. In real GitHub files, the same cue raised the proportion of real code mistakenly written as placeholder openings from 0.5% to 7.1%. Mechanism analysis localized late-stage comment and code decision points and distributed read-write circuits, and a representation-level intervention designed accordingly outperformed coarse-grained comment suppression by 8.5 and 5.5 percentage points on two instruction-tuned HumanEval settings. The behavior appears only under completion-style prompts and disappears under chat templates that allow free-form answers.
Generated by AI from reports · Updated 2 days ago
Related research
This event's paper
- Solution or Skeleton? Distributional Alignment and Mode Switching in Code Language Models
arXiv · 2026-11-29 · Deep reading
Progress timeline
- arXivSolution or skeleton? Distribution alignment and pattern switching in code language models
Code language models decide from context whether a function signature with a docstring and empty body should be completed as a solution or as an exercise skeleton; when the context resembles a skeleton, models output deferred placeholder openings such as pass rather than real code. Across 24 open-source models, the form of neighboring functions can determine the model's choice; when there is nothing to copy, file-level text serves as a genre cue, and changing a single word in the path raised the deferral rate on all 23 comparable models. In real GitHub files, the same cue raised the proportion of real code mistakenly written as placeholder openings from 0.5% to 7.1%. Mechanistic analysis located late comment and code decision points and distributed read-write circuits; a representation-level intervention designed accordingly outperformed coarse-grained comment suppression by 8.5 and 5.5 percentage points on two instruction-tuned HumanEval settings and avoided failures caused by suppressing useful comments. This behavior appears only under completion-style prompts and disappears under chat templates that allow free-form responses.
Related discussion
Attention trend
New sources per day
- Dec 1: 1 new sources (1 outlets, 0 accounts)
- Dec 2: 0 new sources (0 outlets, 0 accounts)
- Dec 3: 0 new sources (0 outlets, 0 accounts)