← Back to Archive

Large Language Models as Noisy Oracles in Hardware Formal Verification

Abstract

Formal verification asks whether a hardware design meets a specification for all inputs, not merely the ones in a testbench. Tools such as model checkers and SAT/SMT solvers are trustworthy when they return a proof or a counterexample, but they are hard to drive: writing SystemVerilog assertions and invariants is skilled labor. Large language models are being proposed as oracles that draft those assertions, suggest inductive invariants, or even emit proof scripts. This paper argues for a strict split. LLMs can be noisy generators of candidate artifacts. They must not be the checkers. Pearce-style results on insecure code generation, plus hallucination rates on formal syntax, imply that an unverified model suggestion is a new bug source. The niche contribution is methodological: treat the model as a fuzzer of the specification space, then discharge every claim with a classical tool.

Where the Bottleneck Actually Is

Hardware verification already has a success story: equivalence checking of combinational logic, bounded model checking of pipelines, and theorem provers for floating-point units. The bottleneck is human. Engineers must guess invariants for loops and protocols. Cadar’s KLEE and related software tools showed that symbolic execution can generate tests when the specification is implicit in the code (Cadar et al.). Hardware adds concurrency and timing, which explode state spaces.

LLMs trained on GitHub and papers can emit plausible SystemVerilog. Plausible is not proven. Studies of Codex-class models found high rates of vulnerable or incorrect code even when prompts look professional (Pearce et al.). There is no reason hardware would be safer; there is less public RTL in the training mix, which may increase hallucination of APIs and operators.

A Safe Architecture

A defensible pipeline is: (1) model proposes an assertion or invariant, (2) a parser rejects ill-typed output, (3) a model checker or theorem prover accepts or returns a counterexample, (4) counterexamples are fed back as prompts. The LLM is then a search heuristic, analogous to a genetic algorithm that mutates candidate invariants. Shi et al. and contemporaneous verification-with-LLMs papers explore pieces of this loop; the important invariant of the methodology is that “the model said so” never appears in the trusted computing base.

Metrics should be counterexamples found per engineer-hour and proof discharge rate, not BLEU similarity to a human assertion. A fluent wrong property is worse than silence because it can bless a buggy design. Students should also watch for data leakage: if the benchmark RTL was in the training set, “the model proved it” may mean “the model remembered a blog post.”

Conclusion

Formal methods need better front ends. Language models are a front end with a lying problem. Used as noisy oracles inside a loop that ends in SAT/SMT, they might earn a place on a verification team. Used as authorities, they are a regression.

The niche research question for this journal is empirical and humble: on a small open-source core, how many LLM-proposed assertions are well-typed, how many are vacuously true, and how many catch a seeded bug that a human testbench missed? That experiment is more valuable than another claim of emergent mathematical genius.

Vacuous Properties and the Trusted Computing Base

An LLM can emit an assertion that is syntactically legal and logically true of every design—including buggy ones. “If reset is asserted then reset is asserted” type properties pass model checking and look like productivity. A verification pipeline that counts discharged proofs without a mutation test (seeded bugs that should fail) will congratulate itself on vacuum (Clarke et al.).

The trusted computing base must stay classical: parsers, type checkers, SAT/SMT, and equivalence tools. The model can sit outside that base as a proposal engine. If an engineer pastes a generated invariant into a sign-off deck because it “looks like the spec,” the methodology has already failed (Pearce et al.).

Feedback Loops with Counterexamples

When a checker returns a waveform counterexample, that trace is a better prompt than another paragraph of natural language. The useful research is whether a loop of propose–check–refine finds invariants faster than a human alone on small open cores, and whether it still helps when the RTL is not in the training set. Data leakage is the silent validity threat for any GitHub-trained model (Chen et al.).

Hardware adds timing and concurrency that chat transcripts do not. A fluent discussion of “the bus protocol” is not a covering of outstanding transactions. Students evaluating vendor demos should ask for the solver log, not the chatbot screenshot.

Conclusion

Using language models in formal verification is a niche systems problem: a noisy generator coupled to a sound checker. The complex topic is what is allowed inside the trusted computing base, not whether models can emit SystemVerilog.

A mid-size student paper can contribute by measuring typed-rate, vacuity rate, and seeded-bug catch rate on a tiny core. That experiment is more serious than a claim that AI will replace verification engineers. Checkers remain the engineers’ allies; models, at best, become faster typists of candidates.

Works Cited

Cadar, Cristian, Daniel Dunbar, and Dawson Engler. “KLEE: Unassisted and Automatic Generation of High-Coverage Tests for Complex Systems Programs.” OSDI, 2008, pp. 209–24.

Pearce, Hammond, et al. “Asleep at the Keyboard? Assessing the Security of GitHub Copilot’s Code Contributions.” IEEE Symposium on Security and Privacy, 2022, pp. 754–68.

Clarke, Edmund M., et al. Model Checking. 2nd ed., MIT Press, 2018.

de Moura, Leonardo, and Nikolaj Bjørner. “Z3: An Efficient SMT Solver.” TACAS, 2008, pp. 337–40.

Chen, Mark, et al. “Evaluating Large Language Models Trained on Code.” arXiv:2107.03374, 2021.

Kern, Christoph, and Mark R. Greenstreet. “Formal Verification in Hardware Design: A Survey.” ACM Transactions on Design Automation of Electronic Systems, vol. 4, no. 2, 1999, pp. 123–93.

Shi, Y., et al. “Large Language Models for Electronic Design Automation: A Survey.” arXiv:2401.12224, 2024.

Huang, Jie, and Kevin Chen-Chuan Chang. “Towards Reasoning in Large Language Models: A Survey.” Findings of ACL, 2023.

Kande, Rahul, et al. “LLM-Assisted Generation of Hardware Assertions.” arXiv:2306.14027, 2023.