Constraint-Aware Test-Time Scoring for LLM and VLM Candidate Selection

Constraint-Aware Test-Time Scoring for LLM and VLM Candidate Selection


arXiv:2611.33161 (cs.AI) — Submitted 31 August 2026


Authors: Rangarajan Ramesh, Yongchao Huang


Comments: 25 pages, 1 figure, 7 tables


Subjects: Artificial Intelligence (cs.AI)


Cite as: arXiv:2611.33161 [cs.AI]


DOI: https://doi.org/10.48550/arXiv.2611.33161


Abstract


When an LLM or VLM produces several candidate answers, selecting the best one typically relies on the model's own confidence, a learned judge model, or a domain check. Each approach has a known weakness: an answer can be fluent but insecure, mathematically plausible but physically infeasible, or rated highly by a judge while quietly violating a task requirement.


We propose a scoring framework that combines a small set of hard checks every answer must pass with a wider set of softer checks whose scores are blended into a single number per candidate. This adaptive scoring framework comprises three components:


  • Drafting model — produces the candidates.
  • Configuring model — selects and weights the checks for each task.
  • Scoring models — rate properties that no grounded tool can compute.

We apply the proposed method to four tasks:


  1. Writing code that is both correct and secure (CWEval)
  2. Generating robot manipulation plans (LIBERO with added safety variants)
  3. Passing competitive-programming hidden tests (LiveCodeBench)
  4. Answering questions from retrieved documents (HotpotQA)

  5. An ablation study isolates the contribution of each component. The largest gains come from combining hard checks with candidate comparison: on tasks where the first sampled answer is often broken or unsafe, this pairing lifts joint correctness-and-safety by up to +0.21 (retrieval-augmented QA) and code-generation safety by up to +0.28 (CWEval). The size of the gain tracks how weak the first sample is, falling to near zero or slightly negative where the first sample is already strong.


    The per-task layer that selects and weights the softer checks adds no measurable value over simpler alternatives.


    Overall, this work builds a unified scoring framework, together with an ablation that identifies the grounded hard checks—not the soft-factor configuration—as the source of the gain.


    Key Takeaways


    • Hard checks drive the gains. Grounded, verifiable constraints—not learned or weighted soft scoring—account for the measured improvements.
    • Candidate comparison matters. The biggest benefit arises when hard checks are paired with comparison across multiple candidates.
    • Gains scale with baseline weakness. Improvements are largest where first-sample quality is poor and diminish (or turn slightly negative) where it is already strong.
    • Soft-check configuration adds little. The per-task selection and weighting layer provides no measurable advantage over simpler alternatives.

    2026 Context


    As of 2026, test-time compute and candidate selection have become central to deploying LLMs and VLMs reliably. Rather than relying solely on a model's self-reported confidence or a single judge model—both prone to reward hacking and fluent-but-unsafe outputs—this framework reflects a broader industry shift toward verifiable, grounded constraints at inference time. The finding that hard checks outperform elaborate soft-scoring layers is especially relevant as teams build adaptive inference pipelines across code generation, robotics planning, and retrieval-augmented QA, where correctness and safety must be jointly enforced.

    via ArXiv AI

Related