Papers › MetRex: A Benchmark for Verilog Code Metric Reasoning Using LLMs

MetRex: A Benchmark for Verilog Code Metric Reasoning Using LLMs

5 Nov 2024arXiv:2411.03471archive 2025-07-28

Manar Abdelatty, Jingxiao Ma, Sherief Reda

Large Language Models (LLMs) have been applied to various hardware design tasks, including Verilog code generation, EDA tool scripting, and RTL bug fixing. Despite this extensive exploration, LLMs are yet to be used for the task of post-synthesis metric reasoning and estimation of HDL designs. In this paper, we assess the ability of LLMs to reason about post-synthesis metrics of Verilog designs. We introduce MetRex, a large-scale dataset comprising 25,868 Verilog HDL designs and their corresponding post-synthesis metrics, namely area, delay, and static power. MetRex incorporates a Chain of Thought (CoT) template to enhance LLMs' reasoning about these metrics. Extensive experiments show that Supervised Fine-Tuning (SFT) boosts the LLM's reasoning capabilities on average by 37.0\%, 25.3\%, and 25.7\% on the area, delay, and static power, respectively. While SFT improves performance on our benchmark, it remains far from achieving optimal results, especially on complex problems. Comparing to state-of-the-art regression models, our approach delivers accurate post-synthesis predictions for 17.4\% more designs (within a 5\% error margin), in addition to offering a 1.7x speedup by eliminating the need for pre-processing. This work lays the groundwork for advancing LLM-based Verilog code metric reasoning.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2411.03471")

Code

Syntology Ran 0 of 13 code samples harvested from 1 repository linked to this paper; 13 have no recorded run.

By repository: official repository: 13 samples from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

scale-lab/MetRex officialpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

13 samples harvested; 0 ran; 0 honoured the contract we drafted; 13 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

13unverified

Licence: 13 of the 13 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from scale-lab/MetRex. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

combine_cfgs scale-lab/MetRex/src/config/config.py official repository unverified no licence file found · pointer only · 5f145285b869418a · report
compute_mre scale-lab/MetRex/src/model/metrics.py official repository unverified no licence file found · pointer only · 937691c80ff7c36a · report
create_area_cot scale-lab/MetRex/src/synth/cot.py official repository unverified no licence file found · pointer only · 73f05e7deab9b24a · report
create_delay_cot scale-lab/MetRex/src/synth/cot.py official repository unverified no licence file found · pointer only · 88b94f732c80ee9e · report
create_synth_thought scale-lab/MetRex/src/synth/cot.py official repository unverified no licence file found · pointer only · e7ffe6a11b7c5796 · report
generate scale-lab/MetRex/src/model/model.py official repository unverified no licence file found · pointer only · 7b34b7bcd774e5d0 · report
get_logger scale-lab/MetRex/src/utils.py official repository unverified no licence file found · pointer only · 4804099ebf1f246c · report
parse_answer_mistral scale-lab/MetRex/src/utils.py official repository unverified no licence file found · pointer only · d4e29831be0745a6 · report
parse_area scale-lab/MetRex/src/synth/genus_cot.py official repository unverified no licence file found · pointer only · 71f27e6804c64e84 · report
parse_delay scale-lab/MetRex/src/synth/genus_cot.py official repository unverified no licence file found · pointer only · 69e18eef992616b9 · report
parse_metrics scale-lab/MetRex/src/utils.py official repository unverified no licence file found · pointer only · ad7ea4e07329dd72 · report
parse_power scale-lab/MetRex/src/synth/genus_cot.py official repository unverified no licence file found · pointer only · c50955f73dfb142d · report
test_model scale-lab/MetRex/src/model/model.py official repository unverified no licence file found · pointer only · 8543df2964e03d8e · report

Tasks

Bug fixingCode Generation

Datasets

Introduced by this paper, per the archive.

MetRex

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

SFT

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections