← Latest papers
🤖 machine learning

Adaptive Generate-Rank-Verify: Inference-Time Search with Costly Verification

This paper introduces ADAP, an adaptive inference-time algorithm that efficiently balances cheap reward scoring with costly verification by dynamically sampling and ranking candidates, achieving near-optimal cost performance in tasks like mathematical reasoning and code generation under monotonicity assumptions.

Original authors: Shaddin Dughmi, Mahdi Haghifam, Yusuf Hakan Kalayci

Published 2026-05-19
📖 5 min read🧠 Deep dive

Original authors: Shaddin Dughmi, Mahdi Haghifam, Yusuf Hakan Kalayci

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are a detective trying to solve a mystery, but you have two very different tools at your disposal, and both cost money to use.

The Tools:

  1. The "Gut Feeling" (The Reward Model): This is a cheap, fast, but sometimes unreliable hunch. It can look at a suspect and say, "This person looks guilty!" or "This person looks innocent!" It costs almost nothing to ask, but it makes mistakes.
  2. The "Lie Detector" (The Verifier): This is the expensive, slow, but 100% accurate test. It tells you for sure if a suspect is guilty. But every time you use it, it costs a fortune (like a huge bill for a lab test).

The Problem:
You have a list of suspects (candidate answers generated by an AI). You need to find the one guilty person (the correct answer).

  • If you use the Lie Detector on everyone, you go bankrupt.
  • If you only trust your Gut Feeling, you might arrest the wrong person.
  • The old way of doing this was to pick a fixed rule: "I will ask the Gut Feeling about 100 people, then use the Lie Detector on the top 5."
    • The Flaw: Some mysteries are easy (the guilty person is obvious), so you wasted money checking 100 people. Other mysteries are hard (the guilty person is hidden), so checking only 5 wasn't enough, and you failed. You can't use one fixed rule for every case.

The Solution: "ADAP" (The Adaptive Detective)
The authors of this paper created a smart strategy called ADAP. Instead of sticking to a fixed rule, ADAP is like a detective who learns on the fly.

Here is how ADAP works, using a simple analogy:

The "Shell" Strategy

Imagine you are looking for a needle in a haystack, but you don't know how big the haystack is.

  1. Start Small: ADAP starts by asking the cheap "Gut Feeling" about just a few suspects.
  2. Rank Them: It lines them up from "Most Likely Guilty" to "Least Likely."
  3. The First Check: It uses the expensive "Lie Detector" on the very top suspect.
    • Did it work? Great! Stop and celebrate.
    • Did it fail? Okay, the top suspect was innocent.
  4. The "Shell" Expansion: Since the first check failed, ADAP realizes, "This mystery is harder than I thought." It doesn't give up. Instead, it doubles its effort.
    • It asks the Gut Feeling about more new suspects.
    • It re-ranks the whole pile (old and new).
    • It uses the Lie Detector on the new top suspects.
  5. Repeat: If it still fails, it doubles the effort again. It keeps expanding its search in "shells" (layers), getting bigger and bigger, until it finds the answer.

Why is this brilliant?

  • For Easy Cases: If the answer is obvious, ADAP finds it quickly with very few checks. It saves a ton of money.
  • For Hard Cases: If the answer is hidden, ADAP keeps going until it finds it. It doesn't give up prematurely like a fixed rule might.
  • The Result: On average, ADAP spends much less money than the old "fixed rule" methods while still finding the correct answer 100% of the time.

The "Monotonicity" Rule (The Secret Sauce)

For ADAP to work, there is one important assumption: The Gut Feeling must be somewhat right.
The paper assumes that if the Gut Feeling says a suspect is "very likely guilty," they are actually more likely to be guilty than someone it says is "slightly likely." It doesn't need to be perfect, just generally in the right order. If the Gut Feeling was completely random, ADAP wouldn't work. But in the real world (math problems and coding), the Gut Feeling usually does a decent job of ranking things.

What the Paper Proved

The authors didn't just guess this would work; they did the math to prove it.

  1. The Ideal Scenario: They first imagined a detective who knows exactly how likely every suspect is to be guilty. They calculated the absolute minimum cost to solve the mystery.
  2. The Real World: They showed that ADAP, without knowing the future, can get within a constant factor of that "perfect" cost. In plain English: ADAP is almost as good as a detective with a crystal ball, but it doesn't need one.
  3. The Necessity of Structure: They also proved that if the Gut Feeling was completely chaotic (no pattern at all), no strategy could be efficient. You need that "higher score = more likely to be correct" pattern to save money.

The Real-World Test

The team tested this on two difficult tasks:

  1. Math Problems: Solving tricky math questions.
  2. Coding: Writing computer programs that pass hidden tests.

The Results:

  • ADAP found the correct answer 100% of the time.
  • Old Fixed Methods (checking a set number of people) either failed to find the answer or spent 3 to 5 times more money to get the same result.
  • Even when compared to a "smart" method that tried to guess the difficulty of the problem beforehand, ADAP performed just as well or better, without needing any prior knowledge.

Summary

The paper introduces a smart, adaptive way to use AI. Instead of blindly generating a fixed number of answers and checking a fixed number of them, it dynamically adjusts its effort based on how hard the specific problem looks. It saves massive amounts of computing power (and money) by being flexible, ensuring you don't overspend on easy tasks or underspend on hard ones.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →