Neuro-Symbolic Verification on Instruction Following of LLMs

Yiming Su, Kunzhao Xu, Yanjie Gao, Fan Yang, Cheng Li, Mao Yang, Tianyin XuarXiv 2026

TL;DR

Large Language Models (LLMs) frequently fail to follow complex, multi-part instructions, a problem that compounds rapidly in multi-agent workflows. This paper introduces NSVIF, a universal neuro-symbolic framework that treats instruction verification as a constraint-satisfaction problem (CSP). By decomposing instructions into logical constraints (verified via generated Python code) and semantic constraints (verified via LLMs) and evaluating them using a Z3 SMT solver, NSVIF drastically improves verification accuracy and provides clear, actionable failure traces.

What Problem Does This Paper Address?

While frontier LLMs have become incredibly capable, their ability to strictly adhere to complex instructions remains unreliable. They routinely ignore or misunderstand specific constraints—such as word limits, formatting rules, or stylistic tones. In agentic workflows, these minor deviations propagate and amplify down reasoning chains, leading to catastrophic task failures.

Verifying whether an LLM followed instructions is surprisingly difficult. The standard approach, "LLM-as-a-judge," relies on another LLM to evaluate the output. However, these judges suffer from the same systemic flaws as the models they evaluate: they struggle with precise counting, fail at complex logical reasoning, and are prone to hallucinations. This paper addresses the critical need for a general-purpose, rigorous, and interpretable verification framework.

Methods

The authors propose NSVIF (Neuro-Symbolic Verification on Instruction Following), which formalizes verification as a CSP solved via First-Order Logic (FOL). Instead of judging an entire output holistically, NSVIF uses a multi-agent architecture to execute a divide-and-conquer strategy:

  1. Formulation Agent: Translates the prompt's instructions into a first-order logic formula and automatically generates a Z3 SMT (Satisfiability Modulo Theories) solver program to represent the relationship between constraints.
  2. Checking Agent: Classifies each extracted constraint into one of two categories:
  3. Logic Constraints: Objective rules (e.g., keyword inclusion/exclusion, word counts). The agent generates standalone Python code to statically check these rules.
  4. Semantic Constraints: Subjective qualities (e.g., tone, sentiment). The agent prompts an LLM to act as a localized judge.
  5. Solver Agent: Executes the generated Z3 program using the boolean outputs from the checking step. It outputs a definitive SAT (satisfied) or UNSAT (unsatisfied) verdict.
Figure 1: Overview of the NSVIF framework and the verification workflow.

Datasets

To rigorously evaluate instruction verifiers, the authors developed VIFBENCH, a new benchmark containing 820 labeled data entries structured as <instruction, output, result> tuples.

Unlike existing benchmarks (such as LLMBar) that only offer a binary preference label, VIFBENCH provides fine-grained, constraint-level annotations detailing exactly which constraints were violated. It features English writing tasks that scale in complexity from 2 to 10 concurrent constraints, balanced evenly between successful (sat) and mutated, failing (unsat) outputs.

Key Insights and Ideas

  • Code is Better Than Reasoning for Logic: LLMs are notoriously bad at precisely counting words or strictly matching strings, but they are excellent at writing Python code to do so. Generating deterministic code snippets to handle logical constraints eliminates LLM reasoning errors.
  • The Power of SMT Solvers: By offloading the final composition of constraints to a symbolic tool like the Z3 solver, the framework guarantees mathematically sound logical deduction, avoiding the logical fallacies common in pure LLM judges.
  • Interpretable Feedback Loops: Because the framework maps failures back to specific constraints in the SMT formula, it provides a precise "trace" explaining why an output failed. This trace can be fed back to the generator model for automated, multi-turn correction without requiring post-training.

Key Results

The authors evaluated NSVIF against several LLM-as-a-judge baselines across multiple model families (GPT, DeepSeek, Qwen):

  • Substantial Performance Gains: Using GPT-4.1, NSVIF achieved an F1 score of 94.8%, vastly outperforming the standard LLM-as-a-judge baseline (69.1%).
  • Outperforming Advanced Prompting: Even when compared against advanced prompt optimization techniques like GEPA-CoT (67.1%) and multi-role conversational debate frameworks like CONV-CoT (78.9%), NSVIF maintained a significant lead.
  • Ablation Proof: A variant of the framework that omitted symbolic code execution and queried LLMs for all constraints (NSVIF-NEU) dropped to an 84.0% F1 score, validating the necessity of the symbolic Python checkers.
  • Successful Multi-turn Correction: In agentic experiments, providing NSVIF's detailed constraint-level feedback allowed GPT-4.1 to correct its initially flawed outputs and achieve 100% instruction adherence within 5 iterations.

Limitations and Future Work

  • Dependency on Initial LLM Parsing: NSVIF still relies on an LLM to extract and classify constraints. When tested with smaller models like GPT-4o-mini, the framework's performance degraded significantly because the model misclassified semantic constraints as logical ones, leading to broken checker code.
  • Task and Language Scope: VIFBENCH is currently restricted to English text-generation tasks. Future work is required to extend the framework to multilingual settings and non-text domains like planning or information retrieval.
  • Hard vs. Soft Constraints: The current CSP formulation treats all constraints as strict requirements. The authors plan to explore Constraint Optimization Problems (COP) to accommodate "soft" user preferences that can be partially satisfied.

Summary updated

BibTeX
@misc{su2026neuro,
  author = {Yiming Su and Kunzhao Xu and Yanjie Gao and Fan Yang and Cheng Li and Mao Yang and Tianyin Xu},
  title = {{Neuro-Symbolic Verification on Instruction Following of LLMs}},
  year = {2026},
  eprint = {2601.17789},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2601.17789},
}
Figure