Pith. sign in

REVIEW 14 cited by

Calibration and Correctness of Language Models for Code

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2402.02047 v4 pith:TRYRDK33 submitted 2024-02-03 cs.SE cs.LG

classification cs.SEcs.LG
keywords codecalibrationmodelscorrectnessgeneratedsettingsconfidenceengineering
verification ladder T0 review T1 audit T2 compute T3 formal

Signed reviews

No signed human review yet.

0 comments
read the original abstract

Machine learning models are widely used, but can also often be wrong. Users would benefit from a reliable indication of whether a given output from a given model should be trusted, so a rational decision can be made whether to use the output or not. For example, outputs can be associated with a confidence measure; if this confidence measure is strongly associated with likelihood of correctness, then the model is said to be well-calibrated. A well-calibrated confidence measure can serve as a basis for rational, graduated decision-making on how much review and care is needed when using generated code. Calibration has so far been studied in mostly non-generative (e.g. classification) settings, especially in software engineering. However, generated code can quite often be wrong: Given generated code, developers must decide whether to use directly, use after varying intensity of careful review, or discard model-generated code. Thus, calibration is vital in generative settings. We make several contributions. We develop a framework for evaluating the calibration of code-generating models. We consider several tasks, correctness criteria, datasets, and approaches, and find that, by and large, generative code models we test are not well-calibrated out of the box. We then show how calibration can be improved using standard methods, such as Platt scaling. Since Platt scaling relies on the prior availability of correctness data, we evaluate the applicability and generalizability of Platt scaling in software engineering, discuss settings where it has good potential for practical use, and settings where it does not. Our contributions will lead to better-calibrated decision-making in the current use of code generated by language models, and offers a framework for future research to further improve calibration methods for generative models in software engineering.

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 14 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. Uncertainty-aware Generative Recommendation

    cs.IR 2026-02 conditional novelty 6.0 of 10

    UGR injects uncertainty into generative recommendation preference optimization via confidence-weighted rewards, difficulty-aware reweighting, and explicit confidence tokens, improving ranking accuracy and training stability.

  2. From Noise to Knowledge: Interactive Summaries for Developer Alerts

    cs.SE 2025-08 conditional novelty 6.0 of 10

    CLARITY uses interactive inductive-logic rules to group static-analysis warnings that share structural or code-level features, and reports modest user-study gains in sensemaking.

  3. Are They All Good? Evaluating the Quality of CoTs in LLM-based Code Generation

    cs.SE 2025-07 reject novelty 6.0 of 10

    An empirical study of 1,023 CoT-code pairs shows that 76.4% of LLM-generated CoTs are low quality and that CoT correctness does not guarantee code correctness.

  4. SQLens: An End-to-End Framework for Error Detection and Correction in Text-to-SQL

    cs.CL 2025-06 conditional novelty 6.0 of 10

    SQLens uses weak supervision over database and LLM error signals to detect clause-level semantic errors in text-to-SQL and fixes them iteratively, improving execution accuracy on BIRD and Spider.

  5. Correctness Assessment of Code Generated by Large Language Models Using Internal Representations

    cs.SE 2025-01 conditional novelty 6.0 of 10

    Internal hidden states of code LLMs carry a usable signal about whether the generated code is correct, and a lightweight probing classifier on those states predicts test-passing with F1 around 0.7 to 0.8 across benchmarks.

  6. Unseen Horizons: Unveiling the Real Capability of LLM Code Generation Beyond the Familiar

    cs.SE 2024-12 conditional novelty 6.0 of 10

    A code-obfuscation benchmark shows LLM code generation pass rates fall sharply when descriptions, code, and dependencies are rewritten to remove training-data familiarity.

  7. VeCoGen: Automating Generation of Formally Verified C Code with Large Language Models

    cs.SE 2024-11 conditional novelty 6.0 of 10

    VeCoGen automatically generates and formally verifies loop-free C functions from ACSL and natural language specifications, solving 13 of 15 Codeforces problems with its default model.

  8. When Models Know When They Do Not Know: Calibration, Cascading, and Cleaning

    cs.AI 2026-01 conditional novelty 5.0 of 10

    A confidence-based, training-free routing and cleaning framework improves accuracy-efficiency trade-offs and identifies mislabeled data in image and language benchmarks.

  9. Are LLM Agents the New RPA? A Comparative Study with RPA Across Enterprise Workflows

    cs.CY 2025-09 conditional novelty 5.0 of 10

    In head-to-head tests on three standard automation challenges, RPA bots beat LLM computer-use agents on speed and reliability, while the agents needed far less development time.

  10. Maximizing Confidence Alone Improves Reasoning

    cs.LG 2025-05 conditional novelty 5.0 of 10

    Reinforcement learning with a reward equal to the negative entropy of the model's own token distribution improves benchmark accuracy without any labeled answers.

  11. Understanding the Fundamental Design Decisions of Retrieval-Augmented Generation Systems

    cs.SE 2024-11 conditional novelty 5.0 of 10

    RAG deployment must be context-aware: QA benefits from 5 to 10 retrieved documents, code generation has no stable optimal document count, and prompting helps code tasks far more than QA tasks.

  12. HASHIRU: Hierarchical Agent System for Hybrid Intelligent Resource Utilization

    cs.MA 2025-06 conditional novelty 4.0 of 10

    A hierarchical AI agent framework that dynamically hires and fires specialist models and creates tools reports strong benchmark numbers, though its gains may come from tool use rather than the architecture.

  13. Can You Trust LLM Judgments? Reliability of LLM-as-a-Judge

    cs.CL 2024-12 conditional novelty 4.0 of 10

    LLM judges are often internally inconsistent across seed variations, with McDonald's omega reliability scores mostly below acceptable thresholds.

  14. A Survey on Uncertainty Quantification of Large Language Models: Taxonomy, Open Research Challenges, and Future Directions

    cs.CL 2024-12 conditional novelty 4.0 of 10

    A review that organizes LLM uncertainty quantification into token-level, self-verbalized, semantic-similarity, and mechanistic interpretability categories.

Pith tools