mlsanityData to 14 Oct 2026

Localized Calibrated Uncertainty in Code Language Models

arXiv 2512.24560 ↗First posted 31 Dec 2025cs.SE cs.AIcited by 3

Not on the map. Why?

Abstract (arXiv)

Large Language models (LLMs) can generate complicated source code from natural language prompts. However, LLMs can generate output that deviates from what the user wants, requiring supervision and editing. To support this process, we offer techniques to localize where generations might be misaligned from user intent. We first create a dataset of "Minimal Intent Aligning Patches" of repaired LLM generated programs. Each program uses test cases to verify correctness. After creating a dataset of programs, we measure how well various techniques can assign a well-calibrated probability to indicate which parts of code will be edited in a minimal patch (i.e., give a probability that corresponds with empirical odds it is edited). We compare white-box probing (where we propose a technique for efficient arbitrary-span querying), against black-box reflective and self-consistency based approaches. We find probes with a small supervisor model can achieve low calibration error and Brier Skill Score of approx 0.2 estimating edited lines on code generated by models many orders of magnitude larger. We discuss the generalizability of the techniques, and the connections to AI oversight and control, finding a probe trained only on code shows some signs of generalizing to natural language errors if new probability scaling is allowed.

Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 39 of its 65 references that are in the map. First posted on arXiv 31 Dec 2025.

Builds on

39 of 65 references.

References · 39

  1. 2014Adam: A Method for Stochastic Optimizationcited by 37,240
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  3. 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,708
  4. 2017On Calibration of Modern Neural Networkscited by 4,960
  5. 2021Program Synthesis with Large Language Modelscited by 3,637
  6. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 2,004
  7. 2022Language Models (Mostly) Know What They Knowcited by 1,856
  8. 2016Concrete Problems in AI Safetycited by 1,642
  9. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
  10. 2024Qwen2.5-Coder Technical Reportcited by 1,203
  11. 2019BERT Rediscovers the Classical NLP Pipelinecited by 1,059
  12. 2022Teaching Models to Express Their Uncertainty in Wordscited by 751
27 more
  1. 2024Mechanistic Interpretability for AI Safety -- A Reviewcited by 422
  2. 2024LLM2Vec: Large Language Models Are Secretly Powerful Text Encoderscited by 404
  3. 2021Revisiting the Calibration of Modern Neural Networkscited by 390
  4. 2020Calibrating Deep Neural Networks using Focal Losscited by 357
  5. 2025Layer by Layer: Uncovering Hidden Representations in Language Modelscited by 311
  6. 2025Emergent Misalignment: Narrow finetuning can produce broadly misaligned LLMscited by 172
  7. 2024Fact-Checking the Output of Large Language Models via Token-Level Uncertainty Quantificationcited by 162
  8. 2023LM-Polygraph: Uncertainty Estimation for Language Modelscited by 131
  9. 2024Do I Know This Entity? Knowledge Awareness and Hallucinations in Language Modelscited by 115
  10. 2025Detecting Strategic Deception Using Linear Probescited by 68
  11. 2023Do Androids Know They're Only Dreaming of Electric Sheep?cited by 67
  12. 2023It's MBR All the Way Down: Modern Generation Techniques Through the Lens of Minimum Bayes Riskcited by 51
  13. 2023A Quantitative and Qualitative Evaluation of LLM-Based Explainable Fault Localizationcited by 50
  14. 2024Calibration and Correctness of Language Models for Codecited by 49
  15. 2023Large Language Models and Simple, Stupid Bugscited by 45
  16. 2025Ctrl-Z: Controlling AI Agents via Resamplingcited by 44
  17. 2022Probing Pretrained Models of Source Codecited by 26
  18. 2025From Calibration to Collaboration: LLM Uncertainty Quantification Should Be More Human-Centeredcited by 21
  19. 2023Generation Probabilities Are Not Enough: Uncertainty Highlighting in AI Code Completionscited by 20
  20. 2025Correctness Assessment of Code Generated by Large Language Models Using Internal Representationscited by 17
  21. 2025MICE for CATs: Model-Internal Confidence Estimation for Calibrating Agents with Toolscited by 15
  22. 2024Calibration of Large Language Models on Code Summarizationcited by 12
  23. 2025Influences on LLM Calibration: A Study of Response Agreement, Loss Functions, and Prompt Stylescited by 12
  24. 2023R-U-SURE? Uncertainty-Aware Code Suggestions By Maximizing Utility Across Random User Intentscited by 10
  25. 2016Spectrum-based Software Fault Localization: A Survey of Techniques, Advances, and Challengescited by 9
  26. 2025Risk Assessment Framework for Code LLMs via Leveraging Internal Statescited by 9
  27. 2024Fact-Level Confidence Calibration and Self-Correctioncited by 5

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 3.

3 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2023On the Calibration of Large Language Models and Alignment
  2. 2024Does Alignment Tuning Really Break LLMs' Internal Confidence?
  3. 2026Large Language Models for Programming: Actually Fixing or Reimplementing Incorrect Code?
  4. 2025Multicalibration for LLM-based Code Generation
  5. 2025Artificial or Just Artful? Do LLMs Bend the Rules in Programming? ↗
  6. 2026Reward-Free Code Alignment from Pretrained or Fine-Tuned LLM: Unpacking the Trade-offs for Code Generation
  7. 2024Aligning Large Language Models with Representation Editing: A Control Perspective
  8. 2024CodecLM: Aligning Language Models with Tailored Synthetic Data