Pith. sign in

REVIEW 3 cited by

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

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 2501.12934 v2 pith:SWUXT6IZ submitted 2025-01-22 cs.SE cs.LG

classification cs.SEcs.LG
keywords codecorrectnessopeniagenerationinternalapproachesgeneratedllms
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

Ensuring the correctness of code generated by Large Language Models (LLMs) presents a significant challenge in AI-driven software development. Existing approaches predominantly rely on black-box (closed-box) approaches that evaluate correctness post-generation, failing to utilize the rich insights embedded in the LLMs' internal states during code generation. In this paper, we introduce OPENIA, a novel white-box (open-box) framework that leverages these internal representations to assess the correctness of LLM-generated code. OPENIA systematically analyzes the intermediate states of representative open-source LLMs specialized for code, including DeepSeek-Coder, CodeLlama, and MagicCoder, across diverse code generation benchmarks. Our empirical analysis reveals that these internal representations encode latent information, which strongly correlates with the correctness of the generated code. Building on these insights, OPENIA uses a white-box/open-box approach to make informed predictions about code correctness, offering significant advantages in adaptability and robustness over traditional classification-based methods and zero-shot approaches. Experimental results demonstrate that OPENIA consistently outperforms baseline models, achieving higher accuracy, precision, recall, and F1-Scores with up to a 2X improvement in standalone code generation and a 46% enhancement in repository-specific scenarios. By unlocking the potential of in-process signals, OPENIA paves the way for more proactive and efficient quality assurance mechanisms in LLM-assisted code generation.

Discussion (0). Sign in to comment.

Forward citations

Cited by 3 Pith papers

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

  1. When the Reward Suite Is Leaky: A Preregistered Causal Contrast of Natural Verifier False Positives in RLVR

    cs.LG 2026-07 accept novelty 7.0 of 10

    Natural false positives in MBPP rewards inflate train reward and pay for real bugs, yet a preregistered leaky-vs-hardened GRPO contrast finds held-out non-inferiority and selection of pre-existing errors, not learned ...

  2. Code Correctness Is Linearly Decodable from LLM Hidden States Before Generation

    cs.LG 2026-06 conditional novelty 7.0 of 10

    On Qwen3-4B and LiveCodeBench, first-attempt code correctness is linearly decodable from the prompt-final hidden state after residualizing prompt length, while a raw repair-success direction collapses under residualiz...

  3. Position Paper: Programming Language Techniques for Bridging LLM Code Generation Semantic Gaps

    cs.SE 2025-07 unverdicted novelty 2.0 of 10

    A position paper arguing that PL techniques, especially formal verification and structure-aware representations, should be deeply integrated into LLM code generation.

Pith tools