WP_Term Object
(
    [term_id] => 15
    [name] => Cadence
    [slug] => cadence
    [term_group] => 0
    [term_taxonomy_id] => 15
    [taxonomy] => category
    [description] => 
    [parent] => 157
    [count] => 646
    [filter] => raw
    [cat_ID] => 15
    [category_count] => 646
    [category_description] => 
    [cat_name] => Cadence
    [category_nicename] => cadence
    [category_parent] => 157
)

Inference-Aware Fine Tuning for LLMs. Innovation in Verification

Inference-Aware Fine Tuning for LLMs. Innovation in Verification
by Bernard Murphy on 11-30-2026 at 6:00 am

Key takeaways ▼

Inference accuracy can be improved by sampling for a best response over multiple attempts, potentially expensive unless mitigated by fine-tuning LLM weights in direct support of this strategy. Paul Cunningham (GM, Verification at Cadence), Raúl Camposano (Silicon Catalyst, entrepreneur, former Synopsys CTO and lecturer at Stanford, EE292A) and I continue our series on research ideas. As always, feedback welcome.

Inference-Aware Fine Tuning for LLMs. Innovation in Verification

The Innovation

This month’s pick is Inference-Aware Fine-Tuning for Best-of-N Sampling in Large Language Models. The authors are from Google DeepMind and Google Research. This 2025 paper was published in arXiv and has 118 citations.

A naïve application of a best-of-N strategy at minimum would require run-times scaling linearly with N. The authors suggest a better approach in which support for best-of-N is built into the LLM weights and the LLM directly produce N candidate responses to a prompt. A scoring function using a novel method chooses the most suitable among these responses. The method also better aligns training with expected inference usage, balancing high-quality, high-confidence responses with exploration-motivated options adapting to in practice usage.

Paul’s view

Back in October 2024, we took a short detour into AI research with a blog on state space models. This month, with all the buzz around domain-specialized LLMs, we figured another short detour was in order, this time on model fine-tuning.

The paper, out of Google DeepMind/Research, is a heavy read, but its high-level takeaways are intuitive. The authors begin by observing that modern agentic systems rarely use a one-shot strategy.  Typically, the same prompt is passed to the LLM multiple times to generate multiple responses which are then graded, and the best selected, an approach known as Pass@N. For example, an RTL generation agent generates N candidate RTLs from a spec, then runs these candidates through a fast logic synthesis to see which one has the best PPA.

The authors go on to observe that the cost function used in traditional fine-tuning algorithms is intended to produce better one-shot responses. The key contribution of their paper is an improved cost function that is intended to produce better responses in a Pass@N agentic flow. This is tricky, since Pass@N is essentially a “max” function over the N attempts, which is discontinuous and can’t be differentiated, a key requirement for model fine tuning. So the authors need to construct a clever approximation to the max function that can be differentiated.

Results are solid. For example, on a relatively recent mathematical reasoning benchmark from 2024, MATH(), fine-tuning Gemma2B using the authors’ improved cost function raises the Pass@30 score from ~62% to ~75%. On HumanEval, a mature Python coding benchmark, Pass@16 improves from 62% to 67%.

One further key insight the authors share relates to the trade-off between exploitation and exploration. Exploitation refers to how dialed a model is to just pick its highest scoring token as the next output. Exploration refers to how much the model is permitted to pick tokens that don’t have the highest score as the next output. Pass@N enables a model to be more explorative – the bigger N, the more exploration can improve the overall result. However, in the case of the authors’ cost function to approximate Pass@N during fine-tuning, too much exploration results in the approximation becoming too inaccurate. There turns out to be an optimal N of around 5, which conceptually balances between exploitation and exploration during fine-tuning.

Raúl’s view

How much of the progress in AI comes from using existing models more effectively? In Inference-Aware Fine-Tuning for Best-of-N Sampling in Large Language Models, Yinlam Chow and colleagues at Google DeepMind and Google Research explore an intriguing possibility: training AI models specifically for the way they will be used.

The basic idea is simple. We can ask an LLM to generate multiple candidate answers and use a separate verifier to select the best one. This is known as Best-of-N (BoN) sampling, where N is the number of candidate responses. This approach is not new, but explicitly adapting model training to this objective is the paper’s contribution. If a model is allowed to generate several responses, rather than producing the single “best” answer, it may be preferable to produce a sufficiently diverse set of high-quality candidates so that at least one is correct and can be identified by the verifier. This distinction is one of the central insights of the paper: the best model for producing one answer is not necessarily the best model for producing a set of answers from which another system will select. The authors develop two approaches that explicitly optimize this process: supervised fine-tuning (SFT), which learns from examples of desired responses, and reinforcement learning (RL), which learns from rewards based on the success of generated responses.

Their experiments demonstrate meaningful improvements in mathematical problem solving and code generation, using relatively small Gemma 2 language models with 2 and 9 billion parameters.  For Gemma 2B on the MATH benchmark, Best-of-32 accuracy (the verifier actually picks a correct answer) increases by 4% over the baseline to 30.8%.  Pass@32 (at least one of the 32 generated responses is correct, regardless of whether the verifier selects it) improves by 7% to 67%.  There are several reasons to be cautious about these findings. Absolute accuracy remains modest, improvements depend on the quality of the verifier, and the evaluations focus on mathematical reasoning and code generation rather than more open-ended tasks. In fact, the paper shows that increasing N can actually reduce BoN accuracy when an imperfect verifier selects incorrect responses. Finally, the experiments demonstrate improved accuracy, not that fine-tuning itself is inexpensive. Training requires additional computation, and generating multiple responses remains more costly than generating one.

In electronic design automation, the trade-off between searching for new solutions and exploiting promising ones is familiar. Simulated annealing, introduced into VLSI placement in the 1980s, is a classic example. The algorithm balances two competing objectives: exploration, searching different regions of the solution space at high temperatures, and exploitation, improving promising solutions as the temperature is lowered. LLM inference has a surprisingly similar mechanism. When an LLM generates a response, its temperature parameter (T) controls the randomness of token selection, while N controls how many responses are generated. Higher temperatures encourage diversity, which can be exploited by generating more candidates. The temperature is conceptually related to that of simulated annealing, although the mechanisms differ. In simulated annealing, temperature controls acceptance of optimization moves; in an LLM, it controls the probability distribution from which tokens are sampled. Simulated annealing is an iterative optimization process in which candidate solutions are generated and accepted or rejected over time. BoN sampling generates multiple candidate responses and subsequently selects one. Both approaches confront the same fundamental tension between exploration and exploitation, under a limited computational budget.

What does this have to do with chip verification? Strictly speaking, nothing directly. AI is arguably the most consequential development in computing in decades, with the potential to profoundly transform semiconductor design and verification. Over time, our blog has reviewed an increasing number of AI-related papers, to the point that AI has become our most common topic. It is increasingly difficult to imagine future EDA workflows without substantial AI involvement.

The paper raises several ideas relevant to chip verification. First, generating solutions is not the same as verifying them. In chip verification an AI system can generate assertions, testbenches, stimuli, or candidate fixes, but their usefulness depends on reliably assessing correctness, coverage, and design intent. Second, the quality of the verifier matters as much as the quality of the generator. This is particularly challenging in hardware verification, where ground truth is often unavailable and passing tests or achieving coverage does not guarantee functional correctness. Third, generating multiple diverse candidates may be as valuable as producing the most likely one. This is particularly relevant for verification, where finding corner cases and unexpected behaviors is essential. Finally, the paper suggests that AI models intended for EDA should be trained or fine-tuned for the complete workflows in which they operate.

Share this post via:

Comments

There are no comments yet.

You must register or log in to view/post comments.