arXiv:2610.37706cs.AROct 2026

Manuscript Offprint

arXiv:2610.37706

Search-Guided Reasoning Trace Curation for Verilog Generation

Matthew DeLorenzo, Kevin Tieu, Prithwish Jana, Piyush Jha, Dileep Kalathil, Vijay Ganesh, Jeyavijayan Rajendran

Matthew DeLorenzo

Texas A&M University

matthewdelorenzo@tamu.edu

Kevin Tieu

Texas A&M University

kevin.tieu@tamu.edu

Prithwish Jana

Georgia Institute of Technology

pjana7@gatech.edu

Piyush Jha

Georgia Institute of Technology

piyush.jha@gatech.edu

Dileep Kalathil

Texas A&M University

dileep.kalathil@tamu.edu

Vijay Ganesh

Georgia Institute of Technology

vganesh45@gatech.edu

Jeyavijayan Rajendran

Texas A&M University

jv.rajendran@tamu.edu

ABSTRACT

Recent advances in reasoning-capable large language models (LLMs) have improved Verilog generation. However, most training pipelines distill natural-language reasoning traces whose intermediate design decisions are weakly structured and are primarily selected according to the correctness of the final generated RTL. We present MCTS-SFT, a verifier-guided framework for curating reasoning traces for supervised fine-tuning (SFT) of Verilog generation models. MCTS-SFT formulates trace construction as search over intermediate reasoning states and uses Monte Carlo Tree Search (MCTS) to propagate functional feedback from complete Verilog rollouts to earlier design decisions. Within this framework, we introduce Plan-MCTS, which searches over compact hardware-design plans that explicitly represent interfaces, timing, state, behavior, and update rules. We further study plan-preserving supervision, in which the searched structured state is retained as part of the downstream SFT target. Our experiments find that Plan-MCTS achieves the highest functional trace yield, with 84.2% correct traces compared with 81.9% for one-shot structured planning and 82.0% for unguided tree exploration. For identical Plan-MCTS trajectories and Verilog outputs, retaining the explicit searched plan during SFT raises pass@10 from 52.56% to 57.7%, demonstrating that the representation of intermediate design decisions materially affects downstream learning. In a separate 6,000-trace study, MCTS-curated supervision improves pass@10 over full-response chain-of-thought distillation by up to 3.7 points while reducing downstream generation length by approximately 50% on VerilogEval-v2. These results demonstrate that structured hardware planning, verifier-guided search, and explicit intermediate-state supervision provide complementary mechanisms for constructing more effective and token-efficient training data for Verilog generation.

1 INTRODUCTION

Large language models (LLMs) have recently made substantial progress on long-horizon, multi-step tasks, driven in part by reasoning models that generate extended intermediate traces before producing a final response (Guo et al., 2025; Wang et al., 2024). These reasoning trajectories have become an increasingly important source of supervision for distillation and fine-tuning, enabling smaller models to inherit aspects of the reasoning behavior of stronger teachers. However, the quality of the intermediate traces remains underexplored. Long reasoning sequences can introduce substantial token overhead and may contain repetitive, inconsistent, or weakly relevant content (Qu et al., 2025), motivating the construction of effective reasoning supervision.

This issue is particularly relevant for hardware description language (HDL) generation. Recent work has applied reasoning-capable LLMs to functional Verilog generation and has shown that fine-tuning on chain-of-thought (CoT) responses, often combined with executable feedback, can substantially improve final design correctness (Yubeaton et al., 2025; Zhu et al., 2025; Wang et al., 2025b). Existing approaches, however, generally curate complete reasoning responses and evaluate them according to the final generated Verilog, providing limited control over the quality of the intermediate reasoning that is ultimately used for training. Moreover, these traces are typically expressed as free-form natural language, despite RTL design being naturally organized around explicit decisions concerning interfaces, timing, state, behavior, and signal updates. This motivates a reasoning-trace curation process that can both evaluate intermediate design decisions using functional feedback and represent them in a form that provides effective supervision for downstream fine-tuning.

To address this problem, we present MCTS-SFT, a verifier-guided framework for curating Verilog reasoning traces for supervised fine-tuning. MCTS-SFT formulates intermediate reasoning as a sequence of design states and applies Monte Carlo Tree Search (MCTS) to estimate their quality from terminal testbench feedback. We study two forms of intermediate representation. Thought-MCTS searches directly over free-form reasoning steps, while Plan-MCTS maintains a compact structured hardware plan whose updates correspond to explicit design decisions. The resulting search trajectories are then converted into prompt-response examples for SFT, allowing the student model to learn from reasoning paths selected using executable feedback. In Plan-MCTS, we additionally retain the searched plan itself as part of the training response, directly exposing the intermediate hardware decisions discovered during curation.

Our main contributions are:

  1. We introduce MCTS-SFT, a verifier-guided framework for curating reasoning traces for Verilog supervised fine-tuning. MCTS-SFT uses terminal testbench feedback to assign value to intermediate reasoning states, enabling executable verification to guide training-data construction without a separate process-reward model.

  2. Within MCTS-SFT, we introduce Plan-MCTS, a structured curation strategy that represents intermediate reasoning as explicit hardware design decisions rather than accumulated free-form text. Controlled comparisons show that structured planning is independently useful, while verifier-guided search provides additional benefit for discovering functionally correct training trajectories.

  3. We demonstrate that preserving the searched hardware plan as SFT supervision is critical to downstream learning. For identical Plan-MCTS trajectories and Verilog outputs, explicit plan supervision improves pass@10 from 52.56% to 57.7%; in the larger 6k-trace study, MCTS-curated SFT also improves correctness over full-response CoT distillation while reducing generation length by approximately 50% on VerilogEval-v2.

References (26)