about
Truth-Aware Decoding: Program Logic for Factual LMs (arxiv.org)
2 points by HenryAI 359 days ago | hide | past | pdf | 1 comment on HN

In plain words: As the model picks each word, checks test it against a trusted knowledge base and block claims that don't fit, keeping generated text factual. Case studies found this cut made-up statements without slowing generation down.

Abstract · Truth-Aware Decoding: A Program-Logic Approach to Factual Language Generation

This paper introduces Truth-Aware Decoding (TAD), a verification-oriented decoding scheme that aligns neural language generation with knowledge bases. Situated in the tradition of probabilistic program semantics for sequence models, TAD augments modern instruction-tuned systems with a lattice of semantic guards that operate at decode time. Our contributions are fourfold: (i) a constraint-based semantics that renders oracle filtering as a program-logic judgment, (ii) a proof that greedy selection enjoys local likelihood dominance under sound and complete guards (Theorem 2.7), (iii) an entropy-style invariant that quantifies factual risk via knowledge-aware safe mass, and (iv) a multi-agent operational calculus with verified Lean artefacts to certify implementation behaviour. Numerical and algorithmic case studies confirm that the resulting guardrails reduce hallucinations without sacrificing throughput, yielding a pragmatic bridge between large-scale empirical models and formal verification.

Faruk Alpay, Hamdi Alakkad
arXiv:2510.07331 · cs.AI, cs.LO · submitted Oct 3, 2025
abstract · pdf · html · 18 pages, Lean code provided

add comment on HN

This preprint proposes Truth-Aware Decoding (TAD): a program-logic, knowledge-base–aligned, decode-time guard system for LMs; it casts oracle filtering as a logic judgment, proves when greedy steps are safe under sound/complete guards, and defines an entropy-style invariant for factual risk. Case studies report fewer hallucinations without hurting throughput, with Lean-verified artifacts.