LeanGuard is presented, a neuro-symbolic framework that assigns each act to the side equipped for it, and it is argued that the remedy is not better prompting but a separation of roles: the component that interprets the code must not also be the one that decides a safety obligation is met.
Abstract
Ask a large language model (LLM) whether a pointer dereference is safe, and it can often produce a plausible justification for ``yes''. The difficulty is that a fluent justification is not a proof. This gap is precisely where automated vulnerability detection lives: deciding, for a given operation in source code, whether a memory safety defect such as a null dereference, use-after-free, or double free can actually occur. We trace the unreliability of LLM-based vulnerability detection to a mechanism, the premature discharge of safety obligations, and argue that the remedy is not better prompting but a separation of roles: the component that interprets the code must not also be the one that decides a safety obligation is met. In this paper, we present LeanGuard, a neuro-symbolic framework that assigns each act to the side equipped for it. On the neural side, an LLM serves strictly as a semantic filter over candidate facts extracted from the abstract syntax tree (AST): it prunes spurious facts and keeps the real ones, but never discharges an obligation or decides the verdict on its own. On the symbolic side, the surviving facts are compiled into a verification model in Lean 4 (a formal proof assistant whose kernel accepts a conclusion only when it is formally proved), where every dangerous operation must be matched by a guard that provably covers it in scope; absent such a guard, the obligation stays open rather than being argued away. Because a function rarely arrives with full context, this symbolic model is necessarily partial: an unproved obligation is not yet a defect. An evidence-aware adjudicator therefore weighs the symbolic and neural verdicts by the quality of each. We instantiate the framework on five CWE classes to ask how far this division of labor can be pushed.
Large language models (LLMs) increasingly serve as data-driven reasoners, yet their chains-of-thought (CoT) can be unfaithful even when final answers are correct. Most existing ''verification'' signals are not diagnostic: answer matching observes only the outcome, LLM-as-judge provides subjective and non-verifiable critiques, and scalar rewards (e.g., PRMs/RMs) offer little insight into where a multi-step derivation fails.We propose SymDiag, a neuro-symbolic framework that reframes reasoning verification as structured failure diagnosis. SymDiag translates natural-language CoT into symbolic constraints and performs step-level satisfiability/entailment checks to (i) localize failing steps and (ii) produce verifiable diagnostic evidence, including counterexamples, inconsistency witnesses, and missing-premise indicators. A central challenge is that apparent ''logic violations'' can be caused either by genuine reasoning defects or by neural-to-symbolic translation noise. SymDiag therefore incorporates a Self-Auditor that disentangles TranslationError from ReasoningError via dual symbolic encodings consistency checks, enabling robust diagnosis under partial observability. Across diverse mathematical, logical, scientific, and general reasoning benchmarks, SymDiag improves detection of unfaithful reasoning and provides substantially more effective feedback for multi-round reasoning repair than outcome-only verification and LLM-based judging, offering a principled foundation for trustworthy and scalable reasoning diagnosis.
Wenyao Cui, Huaping Zhang, Yongyi Huang et al.· Proceedings of the 32nd ACM...· 0 citations
A previously unrecognised failure mode in LLM-to-logic compilation is characterise a previously unrecognised failure mode in LLM-to-logic compilation and a practical engineering toolchain for producing verifiable knowledge-base programs from natural-language specifications is demonstrated.
A probe corpus of 42 retracted, fraudulent, and pseudoscientific papers is paired with a methodology for eliciting and scoring single-shot model engagement with each paper's framing, indicating an urgent need for guardrail infrastructure for scientific deployment of language models.
Large language models (LLMs) and retrieval-augmented generation (RAG) are increasingly used in legal decision support, but retrieved evidence and fluent explanations do not guarantee valid normative inference. This paper proposes a proof-carrying neuro-symbolic method for non-monotonic legal reasoning. The LLM component is restricted to source-linked extraction of facts, defeasible rules, defeaters, priorities, citations, and operational confidence scores, while a deterministic symbolic engine computes the conclusion. Evidence is represented as a finite defeasible normative theory and compiled into a Dung-style argumentation framework; accepted conclusions are obtained from the grounded extension and returned with proof graphs showing support, attacks, and priority-based defeats. Under gold formalization, the symbolic engine achieved 99.3% accuracy on a 600-case controlled benchmark. In a 240-scenario LLM-to-logic experiment, the GPT-4o extractor followed by symbolic reasoning achieved 86.7% downstream accuracy versus 75.8% for a direct LLM over the same retrieved evidence; the paired difference was supported by an exact McNemar test after Holm correction (adjusted p = 0.016). Differences from the PDL and simpler symbolic baselines were not statistically established. Validation-triggered repair yielded 90.4% observed accuracy. Public-contract, Russian-law, stress-test, scalability, and lawyer-verification experiments further delimit the feasibility and current limitations of proof-carrying legal decision support.
Maxim Ulizko, Tatiana Polevaya, I. Tomilov et al.· Big Data and Cognitive Compu...· 0 citations
Real-world vulnerabilities often span multiple functions, yet most learning-based detectors classify each function in isolation: on a sample of real CVEs, we find that 71.7% of vulnerable functions require evidence from outside the function to be classified correctly. Agentic reinforcement learning (RL) could close this gap by enabling a model to gather that evidence itself, but it lacks a reliable reward, since a reward defined on the final verdict alone can be obtained without performing any investigation. We propose VulAgentRL, an agentic RL framework for interprocedural vulnerability detection built on a Code Property Graph (CPG). The CPG serves two roles: at inference time the policy queries it for callers, callees, dataflow, and other queries, and at training time the same graph verifies the evidence the policy cites. Because every CPG node carries a persistent integer identifier, this verification is an exact comparison rather than a textual match, so the reward credits verdicts that are supported by evidence. We further initialize the policy by distilling teacher investigations, and show that this warm start is necessary, since RL cannot acquire tool-use behavior it never samples. Under a repository-level split that prevents leakage, VulAgentRL outperforms state-of-the-art baselines, including frontier models, on the strict pair-wise-correct metric while issuing fewer tool calls, and its advantage persists on an out-of-distribution corpus and under class imbalance.
Yikun Li, Ting Zhang, Jiakun Liu et al.· arXiv.org· 2 citations
Neuro-formal verification is introduced, which harnesses that automation for developers of mainstream programming languages and returns a Dafny proof of correctness or of a bug on 57% of the entries at 92% precision, and a CBMC counterexample for 63% of the buggy programs at 90% precision.
Shuvendu K. Lahiri· 0 citations
We use cookies to run the site and, with your consent, for analytics and to show ads.
See our Cookie Policy.