SpecAlign: A Semantic Alignment Framework for SystemVerilog Assertion Generation
Jaime Rafael Imperial, Hao Zheng · 2026
Read SpecAlign: A Semantic Alignment Framework for SystemVerilog Assertion Generation by Jaime Rafael Imperial, Hao Zheng (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2605-25181.txt.
Introduction
Jaime Rafael Imperial and Hao Zheng present SpecAlign, a tool that checks whether assertions made by language models for SystemVerilog hardware designs match their written specs. Two feedback loops compare both plain-language properties and candidate assertions against the spec using entailment classification. Several reasoning paths are combined by vote. A single alignment score tracks consistency across rounds, catching mismatches and guiding fixes. The checks run early, before a golden design exists, so teams catch errors sooner.
Catalog record
| CREATOR | Jaime Rafael Imperial, Hao Zheng |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 42307 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2605.25181
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
SpecAlign: A Semantic Alignment Framework for SystemVerilog Assertion Generation Jaime Rafael Imperial, Hao Zheng Abstract Existing Large Language Model (LLM) approaches to SystemVerilog Assertion (SVA) generation primarily focus on syntactic validity and formal verification outcomes, while semantic alignment between generated assertions and natural language specifications remains difficult to quantify. As a result, hallucinated or misaligned SVAs can reduce confidence and increase debugging efforts in the absence of golden RTL. This paper presents SpecAlign , a framework for semantic evaluation and refinement of LLM-generated SVAs. SpecAlign introduces two iterative alignment loops that assess both natural language properties and SVAs against the design specification using entailment-based classification. We improve alignment decisions by generating multiple reasoning paths using chain-of-thought prompting and aggregating them via a self-consistency voting mechanism. Misaligned assertions are analyzed to generate actionable feedback for refinement. We further define a quantitative alignment score to measure semantic consistency across iterations. Experimental results demonstrate that SpecAlign effectively detects semantic inconsistencies and improves assertion alignment without relying on golden RTL, providing a scalable complement to traditional formal verification evaluation metrics. I Introduction The increasing complexity of modern hardware designs has motivated the use of Large Language Models (LLMs) in the VLSI design flow, particularly for verification tasks such as Assertion-Based Verification (ABV) [ 8 ] . ABV uses formal properties, commonly written as SystemVerilog Assertions (SVAs), to capture expected design behavior and check whether the Register-Transfer Level (RTL) implementation satisfies the intended specification. LLM-generated SVAs are useful only if they are both syntactically valid and semantically aligned with the design specification. Syntactic validity can be checked automatically, and formal verification (FV) tools can determine whether an assertion is proven or produces a counterexample on a given RTL implementation. However, these outcomes do not directly answer whether the generated assertion correctly reflects the behaviroal semantics captured in the natural language specification. This distinction is important because LLMs can hallucinate unsupported behavior, introduce incorrect timing or signal relationships, or generate assertions that are formally provable but semantically ineffective [ 5 ] . A concrete example is the following LLM-generated assertion: • @(posedge wb_clk_i) disable iff (arst_i !== ARST_LVL || wb_rst_i) !$isunknown(wb_clk_i); This assertion states that, on the positive edge of wb\_clk\_i and outside reset, wb\_clk\_i is not unknown. Although it may pass syntax checking and be proven by FV, it is semantically ineffective because it samples the same clock on the edge that triggers the property. Thus, the assertion can be formally valid while providing little useful evidence that the generated SVA captures the intended design behavior. This example shows that FV-based evaluation alone is insufficient for assessing LLM-generated SVAs. Formal verification determines whether an assertion holds on a particular RTL model under given assumptions, while semantic alignment determines whether the assertion expresses behavior supported by the natural language specification. In the absence of golden RTL, manual inspection of the generated SVAs reduces confidence and increases debugging efforts [ 3 ] . Furthermore, FV engines face scalability limitations such as state-space explosion, making it difficult to use formal proof alone as a scalable evaluation mechanism for large sets of generated assertions targetting large complext designs [ 15 ] . This paper introduces SpecAlign, a specification-centric framework for evaluating and refining the semantic alignment of LLM-generated SVAs without relying on golden RTL. SpecAlign uses two iterative alignment loops: a Property Alignment Loop , which checks natural language properties against the design specification, and an SVA Alignment Loop , which checks generated SVAs after converting them into natural language summaries. Each loop performs alignment checking and inconsistency analysis to identify unsupported or contradictory behavior and generate structured feedback for refinement. By separating semantic correctness from RTL proof outcomes, SpecAlign provides a scalable complement to traditional FV-based evaluation and improves confidence in LLM-generated assertions. Our contributions are as follows: • We propose a novel semantic alignment evaluation framework for LLM-generated SVAs that assesses their validity against natural language specifications, without relying on FV applied to golden RTL. • We develop a semantic alignment framework for iterative refinement consisting of Alignment Checking, Inconsistency Analysis, and SVA Summary Extraction, designed to be easily integrated into existing LLM-based SVA generation frameworks. • We define an alignment scoring metric based on semantic entailment classification to quantitatively measure specification alignment, providing a scalable alternative to traditional FV-based correctness evaluation. • We present a semantic inconsistency analysis mechanism that generates feedback for contradicting properties and SVAs, supporting manual review or automated refinement, and improving confidence in LLM-generated SVAs. • Experiments on designs including APB and UART show that semantic refinement reduces contradictory assertions, converting 58 and 71 contradictory SVAs for APB and UART, respectively, into semantically aligned SVAs. II Related Work II-A SVA Generation using LLMs Several approaches have explored various strategies to directly synthesize assertions from design specifications [ 17 , 4 , 13 , 16 ] while other incorporate RTL into the generation process [ 1 , 12 , 6 ] . These methods typically treat SVA generation as a sequence-to-sequence translation task, mapping informal requirements to formal properties using carefully engineered prompts or instruction-tuned models. While promising, such approaches largely rely on implicit reasoning within the LLM and do not explicitly validate semantic alignment between the generated assertions and the underlying specification. AssertLLM [ 17 ] is a representative example of specification-driven SVA synthesis. It focuses on extracting properties directly from natural language descriptions using LLM prompting and post-processing techniques. Although effective in generating syntactically valid assertions, its pipeline does not explicitly incorporate structured intermediate representations or systematic semantic validation mechanisms to detect inconsistencies or contradictions in generated properties. More recently, AssertionForge [ 1 ] introduces a knowledge-graph-based framework that explores structured information extracted from both RTL code and natural language specifications. By constructing a unified structured representation, AssertionForge enables multi-resolution context synthesis for improved prompt construction. This structured grounding significantly improves the quality and relevance of generated SVAs. However, its primary focus lies in improving generation quality through structured context integration rather than explicitly quantifying semantic alignment or iteratively refining assertions based on contradiction analysis. II-B Self-Consistency Checking Wang et al. propose self-consistency, a decoding strategy that improves LLM reasoning by sampling multiple diverse chain-of-thought paths and aggregating their outputs to select the most consistent answer [ 14 ] . The method is based on the observation that correct reasoning paths often converge on the same conclusion, and it improves performance on arithmetic, commonsense, and symbolic reasoning tasks without additional training or supervision. We adapt this idea to Judge LLMs by sampling multiple semantic-alignment verdicts for LLM-generated properties or SVAs and aggregating the classifications. n our alignment loops, self-consistency acts as a semantic validation mechanism that improves the reliability of misalignment detection and downstream feedback generation. II-C Self-Refine Madaan et al. introduce SELF-REFINE, an iterative framework in which a single LLM generates an output, critiques it with natural-language feedback, and refines it accordingly [ 7 ] . The key idea is that LLMs can serve as their own critics, producing actionable feedback without supervised data, external reward models, or additional training. SELF-REFINE improves performance across tasks such as code optimization, reasoning, and natural-language generation. Our work similarly uses iterative feedback, but for a different purpose. Rather than directly refining outputs to