Instructions to use debjyotikm/siliconshield-rtl-contract-1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Laya
How to use debjyotikm/siliconshield-rtl-contract-1 with Laya:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
SiliconShield-RTL Contract-1 (local-guard specialist)
SiliconShield-RTL Contract-1 is a locally executable decision model for specification-conditioned RTL security assessment. It evaluates an RTL region together with an English security requirement and explicit execution assumptions, then returns a structured satisfies, violates, or insufficient-context decision. On balanced, group-disjoint development families, Contract-1 classified 191 of 192 fully specified decisions correctly, including 95 of 96 violations, with zero observed false-safe predictions. It helps hardware engineers prioritize simulation, formal verification, and review while keeping sensitive designs on local hardware.
Pair it with Contract-2, which owns FIFO, counter, and arbitration behavior. Neither model alone covers every RTL area. The SiliconShield router consults each on its qualified scopes and reports the rest as thin-evidence.
Labels
Given a self-contained RTL region, an explicit security requirement, and stated execution assumptions, the model produces one of three structured answers. It runs locally and keeps design inputs on user hardware.
| Label | Description |
|---|---|
| satisfies_requirement | The model predicts that the supplied RTL region looks consistent with the stated requirement under the supplied assumptions. |
| violates_requirement | The model predicts a possible inconsistency between the RTL and the requirement. |
| insufficient_context | The model predicts that omitted implementation detail, assumption, or policy information prevents a reliable determination. |
Quickstart
from huggingface_hub import snapshot_download
checkpoint = snapshot_download(
repo_id="debjyotikm/siliconshield-rtl-contract-1",
revision="2f63a4a87d0d6010fca033b1637ff4142ff7cc60",
)
import json
from laya.agent import load
agent = load(checkpoint)
contract = json.load(open(checkpoint + "/question_contract.json"))
questions = {
"security": {
"type": "security",
"instructions": contract["instructions"],
"criteria": contract["criteria"],
"option_order": [0, 1, 2],
}
}
answers = agent.predict_batch(
[state_text],
questions,
batch_size=16,
sort_by_length=False,
max_len=1536,
head_max_len=256,
)
probs = answers[0]["answers"]["security"]["probabilities"]
label = max(probs, key=lambda name: float(probs[name]))
state_text is the RTL plus requirement and assumptions in the
benchmark row format (see below). Scores round to four decimals.
Treat exact-zero target scores as confident misses. The SiliconShield
workflow conclusion combines model assessment, executable checks, a
repair proposal, and post-patch verification. The decision model
alone neither proves the violation nor accepts the repair.
Benchmark
Headline results on reviewed development populations:
| Metric | Contract-1 |
|---|---|
| Fully specified decisions | 191 of 192 at 99.48 percent |
| Satisfying cases | 96 of 96 at 100 percent |
| Violating cases | 95 of 96 at 98.96 percent |
| False-safes | 0 of 96 |
| Full three-way accuracy | 257 of 288 at 89.24 percent |
Counterbalanced qualification at 249 of 288 at 86.46 percent with zero false-safes on 96 violations and shifted evaluation at 330 of 756 at 43.65 percent with 25 false-safes define the measured operating envelope. Broad retention at 3682 of 4095 is reported separately. Full matrices and family breakdowns are in the companion limitations record. Sealed populations stay sealed.
Public benchmark comparison on the SiliconShield RTL benchmark (5,589 rows, 11 areas), scored with the pinned prompt above. Development evidence. Sealed qualification and test populations were never opened.
| Area | Contract-1 | Contract-2 |
|---|---|---|
| fifo | 36/108 | 97/108 |
| counter | 41/108 | 92/108 |
| arbitration | 14/18 | 14/18 |
| interrupt-wake | 158/234 | 145/234 |
| input-filter | 91/162 | 94/162 |
| ot-access-control | 108/108 | 77/108 |
| local-safety-cwe | 2601/2610 | 933/2610 |
| transfer-pairs | 606/621 | 275/621 |
| write-paths | 179/432 | 244/432 |
| guard-semantics | 171/432 | 268/432 |
| requirement-clarity | 346/756 | 271/756 |
Overall 4,351/5,589 for Contract-1 and 2,510/5,589 for Contract-2.
Reproduce with the SiliconShield repo (no training needed):
python -m siliconshield.benchmark run --registry models.json \
--out-dir bench-out
What it handles well
Contract-1 is strongest when the requirement names a visible state element or write path and relevant guards are present in the RTL and assumptions define reset and sampling precisely. Representative strengths include lock-gated write paths, privileged or authorized controls before register updates, explicit reset exemption from hold requirements, and distinct treatment of normal and debug paths.
Limitations
- Narrow guard specialist. FIFO, counter, and arbitration behavior are outside its strength. Route temporal scopes to Contract-2.
- Misses some multi-path violations. A debug write missing a privilege guard was returned as satisfying with 99.74 percent confidence. One correct path does not prove every path was checked.
- Fragile to rewording. Shifted requirement and context evaluation scores 330/756 with 25 false-safes.
- Overconfident errors. Wrong answers routinely carry very high scores. Scores are not calibrated risk estimates.
- Small-fragment scope. Judges bounded RTL regions against one requirement at a time. No full-IP, SoC-level, FSM, clock-domain, bus-protocol, crypto, or firmware-interface reasoning.
- Out of scope. Broad discovery, CWE classification, localization, calibrated risk scores, and automatic patch approval.
- A verdict is not a proof. Confirm findings by simulation or formal verification before acting on them.
Training and lineage
Continued from the OpenTitan-expansion winner through the
SiliconShield security task: full encoder, rank-256 residual
adapters, and decision head with the action head frozen. Training
sampled 576 reviewed rows in 192 complete triplets with a
group-disjoint 288-row development set. Learning rate 2e-6 with
10-update warmup and cosine decay to 0.1, batch 48, seed 3301,
250 updates with evaluation every 25, plain row cross-entropy.
The release checkpoint scored 257/288 with zero false-safes and
66/96 whole triplets under frozen development gates. A follow-up
improvement study trained three arms on a wider mixture and
promoted none, so no released weight comes from those rows.
Question contract siliconshield-requirement-context-v1,
max length 1536.
Provenance
| Field | Evaluated value |
|---|---|
| Release | SiliconShield-RTL Contract-1 |
| Weights SHA-256 | f4130223ed19be5cc7e21b3da70cb7aebf944ad6ed4a8a80f11d8f59bcd05ee7 |
| Question contract | siliconshield-requirement-context-v1 |
| Contract file SHA-256 | dd1f38ee223abac1f75b19d9086fd26d90865c9aa43097674fffdd61dbbf8bd3 |
| Adapter metadata | 28 residual-adapter layers, rank 256, scale 8 |
| Evaluation precision | BF16 model inference, FP32 probabilities and metrics |
| Input budgets | max_len 1536, head_max_len 256 |
Model bytes plus question contract plus runtime behavior plus label order are one identity. Marginal decisions can differ across hardware even when identities match, so reproducible claims must name runtime, precision, contract, checkpoint, and population.
License
Apache-2.0. LAYA foundation weights retain their upstream terms. See the SiliconShield repository for the exact pinned revision.
- Downloads last month
- 33
Model tree for debjyotikm/siliconshield-rtl-contract-1
Base model
convaiinnovations/laya