NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Recurrent CircuitSAT Sampling for Sequential Circuits

Arash Ardakani, Kevin He, John Wawrzynek · DOI

Abstract

Generating test stimuli for sequential digital circuits is a fundamental challenge in hardware verification. Traditional Constrained Random Verification (CRV) methods often struggle with the state explosion and timing uncertainties inherent in sequential logic. This paper presents a novel approach that reframes sequential circuit sampling as a recurrent neural network (RNN) optimization problem. By relaxing discrete logic into differentiable probabilistic models and leveraging Backpropagation Through Time (BPTT), the proposed method achieves significant throughput improvements—up to 105x—over state-of-the-art heuristic solvers using GPU acceleration.

Introduction

In modern hardware design, Constrained Random Verification (CRV) serves as the primary methodology for identifying design flaws. Engineers define specific constraints, and samplers generate random input stimuli to satisfy these constraints, testing the circuit's behavior under various conditions. While this process is well-understood for combinational circuits, sequential circuits—which incorporate memory elements like flip-flops—present a significantly higher degree of complexity.

Sequential verification typically requires "unrolling" the circuit over multiple clock cycles, transforming it into a massive Boolean Satisfiability (SAT) problem. This leads to two primary challenges:

  1. State Explosion: The resulting SAT formulas grow exponentially with the number of cycles, often exceeding the capacity of traditional solvers.
  2. Temporal Uncertainty: The exact number of clock cycles required to reach a specific state or trigger a constraint is often unknown. Traditional methods rely on fixed-cycle guesses, which may fail to find existing solutions if the guess is incorrect.

Methodology

The core innovation of this research is the conceptualization of a sequential circuit as a Recurrent Neural Network (RNN). In this framework, the combinational logic represents the hidden layers, and the flip-flops represent the state transitions.

Probabilistic Relaxation and Differentiability

To enable gradient-based optimization, the researchers replace discrete logic gates (e.g., AND, OR, NOT) with continuous probabilistic functions. For instance, an AND gate is modeled as the product of input probabilities ($p_1 \cdot p_2$). This relaxation transforms the circuit into a differentiable graph, allowing the use of Backpropagation Through Time (BPTT)—the standard algorithm for training RNNs—to propagate error signals from the constraints back to the primary inputs.

Backtracking for Variable Cycle Lengths

To address the problem of unknown timing, the authors implemented a backtracking algorithm. The solver iteratively attempts to find a satisfying sequence starting from a single clock cycle and incrementing the depth until a solution is found or a predefined limit is reached. This allows the system to discover valid input sequences of varying lengths dynamically.

GPU-Accelerated Parallelism

By formulating the sampling task as a multi-output regression problem within the PyTorch framework, the method leverages the massive parallel processing power of GPUs. Unlike traditional CPU-bound solvers that process instances sequentially, this approach generates thousands of independent candidate solutions simultaneously, significantly increasing the probability of convergence on complex instances.

Experimental Evaluation

The method was evaluated using 16 representative instances from two industry-standard benchmark suites: ISCAS-89 (classic sequential benchmarks) and ITC’99 (modern complex designs). These benchmarks ranged from small controllers to large-scale circuits containing approximately 30,000 gates and over 700 flip-flops.

Performance and Throughput

The Recurrent CircuitSAT sampler demonstrated substantial performance gains over state-of-the-art tools such as CMSGEN, UniGen3, and DiffSampler:

  • Maximum Speedup: The tool achieved a 105.1× improvement in sampling throughput on the s208.1 benchmark compared to CMSGEN.
  • Average Performance: Across all benchmarks where CMSGEN successfully produced results, the proposed method was, on average, 24.3× faster.
  • Scalability: The sampler successfully handled large-scale instances like b22, where several traditional solvers reached timeout limits.

Discussion and Limitations

While the results are promising, the authors identify several areas for further development. Because the optimization landscape is non-convex, gradient descent can occasionally become trapped in saddle points. The researchers mitigate this through noise injection and random initialization, but it remains a theoretical challenge for extremely deep logic paths.

Furthermore, unlike specialized samplers like UniGen3, this method does not currently provide formal guarantees of "near-uniform" sampling. Ensuring that every valid solution has an equal probability of being selected is a critical requirement for some verification workflows.

Conclusion

Recurrent CircuitSAT sampling represents a significant shift in hardware verification by applying deep learning optimization techniques to traditional logic problems. By treating circuits as differentiable RNNs and utilizing GPU acceleration, this method overcomes many of the throughput bottlenecks associated with sequential SAT solving. Future work will focus on integrating these differentiable models into standard Hardware Description Language (HDL) workflows to enable end-to-end differentiable hardware design.

Summary updated

BibTeX
@inproceedings{ardakani2025recurrent,
  author = {Arash Ardakani and Kevin He and John Wawrzynek},
  title = {{Recurrent CircuitSAT Sampling for Sequential Circuits}},
  booktitle = {MLCAD},
  year = {2025},
  doi = {10.1109/mlcad65511.2025.11189141},
}
Figure