Close Menu
SkytikSkytik

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    What's Hot

    At Least 32 People Dead After a Mine Bridge Collapsed Due to Overcrowding

    November 17, 2025

    Here’s how I turned a Raspberry Pi into an in-car media server

    November 17, 2025

    Beloved SF cat’s death fuels Waymo criticism

    November 17, 2025
    Facebook X (Twitter) Instagram
    • About Us
    • Contact Us
    SkytikSkytik
    • Home
    • AI Tools
    • Online Tools
    • Tech News
    • Guides
    • Reviews
    • SEO & Marketing
    • Social Media Tools
    SkytikSkytik
    Home»AI Tools»[2512.07404] On LLMs’ Internal Representation of Code Correctness
    AI Tools

    [2512.07404] On LLMs’ Internal Representation of Code Correctness

    AwaisBy AwaisJanuary 22, 2026No Comments2 Mins Read0 Views
    Facebook Twitter Pinterest LinkedIn Telegram Tumblr Email
    Measuring Intelligence Efficiency of Local AI
    Share
    Facebook Twitter LinkedIn Pinterest Email

    [Submitted on 8 Dec 2025 (v1), last revised 21 Jan 2026 (this version, v3)]

    View a PDF of the paper titled On LLMs’ Internal Representation of Code Correctness, by Francisco Ribeiro and 3 other authors

    View PDF
    HTML (experimental)

    Abstract:Despite the effectiveness of large language models (LLMs) for code generation, they often output incorrect code. One reason is that model output probabilities are often not well-correlated with correctness, and reflect only the final output of the generation process. Inspired by findings that LLMs internally encode concepts like truthfulness, this paper explores if LLMs similarly represent code correctness. Specifically, we identify a correctness representation inside LLMs by contrasting the hidden states between pairs of correct and incorrect code for the same programming tasks. By experimenting on four LLMs, we show that exploiting this extracted correctness representation outperforms standard log-likelihood ranking, as well as verbalized model confidence. Furthermore, we explore how this internal correctness signal can be used to select higher-quality code samples, without requiring test execution. Ultimately, this work demonstrates how leveraging internal representations can enhance code generation systems and make LLMs more reliable, thus improving confidence in automatically generated code.

    Submission history

    From: Francisco Ribeiro [view email]
    [v1]
    Mon, 8 Dec 2025 10:38:03 UTC (293 KB)
    [v2]
    Mon, 5 Jan 2026 11:52:55 UTC (293 KB)
    [v3]
    Wed, 21 Jan 2026 12:24:23 UTC (228 KB)

    code Correctness Internal LLMs Representation
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Awais
    • Website

    Related Posts

    Manifold-Matching Autoencoders

    March 18, 2026

    One Model to Rule Them All? SAP-RPT-1 and the Future of Tabular Foundation Models

    March 18, 2026

    Bridging Facts for Cross-Document Reasoning at Index Time

    March 18, 2026

    SpecMoE: Spectral Mixture-of-Experts Foundation Model for Cross-Species EEG Decoding

    March 18, 2026

    How a Neural Network Learned Its Own Fraud Rules: A Neuro-Symbolic AI Experiment

    March 18, 2026

    Bridging Modality Gap with Temporal Evolution Semantic Space

    March 18, 2026
    Leave A Reply Cancel Reply

    Top Posts

    At Least 32 People Dead After a Mine Bridge Collapsed Due to Overcrowding

    November 17, 20250 Views

    Here’s how I turned a Raspberry Pi into an in-car media server

    November 17, 20250 Views

    Beloved SF cat’s death fuels Waymo criticism

    November 17, 20250 Views
    Don't Miss

    70+ AI art styles to use in your AI prompts

    March 18, 2026

    Peek into any AI art community, and you’ll be wowed by the surprisingly unique image…

    Manifold-Matching Autoencoders

    March 18, 2026

    One Model to Rule Them All? SAP-RPT-1 and the Future of Tabular Foundation Models

    March 18, 2026

    Why customer personas help you win earlier in AI search

    March 18, 2026
    Stay In Touch
    • Facebook
    • YouTube
    • TikTok
    • WhatsApp
    • Twitter
    • Instagram
    Latest Reviews

    Google expands Personal Intelligence to AI Mode, Gemini, Chrome

    March 18, 2026

    Google AI Overviews Cut Germany’s Top Organic CTR By 59%

    March 18, 2026
    Most Popular

    13 Trending Songs on TikTok in Nov 2025 (+ How to Use Them)

    November 18, 20257 Views

    How to watch the 2026 GRAMMY Awards online from anywhere

    February 1, 20263 Views

    Corporate Reputation Management Strategies | Sprout Social

    November 19, 20252 Views
    Our Picks

    At Least 32 People Dead After a Mine Bridge Collapsed Due to Overcrowding

    November 17, 2025

    Here’s how I turned a Raspberry Pi into an in-car media server

    November 17, 2025

    Beloved SF cat’s death fuels Waymo criticism

    November 17, 2025

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    Facebook X (Twitter) Instagram Pinterest YouTube Dribbble
    • About Us
    • Contact Us
    • Privacy Policy
    • Terms & Conditions
    • Disclaimer

    © 2025 skytik.cc. All rights reserved.

    Type above and press Enter to search. Press Esc to cancel.