Download docs/certificate_format.md from fahadhafeezofficial/clsa-code: direct link, hf CLI and curl.
- Browser
- Download file 3.46 kB
-
https://huggingface.co/datasets/fahadhafeezofficial/clsa-code/resolve/main/docs/certificate_format.md
- Command line
-
hf download hf://datasets/fahadhafeezofficial/clsa-code/docs/certificate_format.md
-
curl -L -o certificate_format.md https://huggingface.co/datasets/fahadhafeezofficial/clsa-code/resolve/main/docs/certificate_format.md
Certificate format (v1.0)
A certificate is the object an auditor reads instead of a transcript. It is
published as schemas/certificate.schema.json, versioned, and validated on every
write; a record that fails validation is never appended to the ledger.
Shape
Cert(a_t) = <G, Fork, E, Bound>
| Element | Question it answers |
|---|---|
G |
Why this action was scored as it was: the attributed subgraph over admitted features |
Fork |
What else could have been done, and what the model said would happen |
E |
What evidence was used, whether it was stale, and whether it conflicted |
Bound |
How wrong the risk estimate could be, at what confidence, at what cost |
Fields
Identity
cert_id— 24 hex characters, derived from item, step, time and process.schema_version—"1.0".item_id,episode_id,step— the decision point in PreAct-Bench.
Decision
decision— what the agent did:execute,abstain,clarify,verify.mode— which controller mode produced it:direct,simulate,verify/acquire,clarify,abstain.action— the chosen candidate, as{name, args}.
G — attribution
{"method": "feature_ablation_attribution",
"nodes": [{"id": "f17", "kind": "feature", "label": "...", "weight": 0.42}],
"edges": [{"src": "f17", "dst": "harm", "weight": 0.42}]}
Nodes are admitted features or outcome variables; edges carry the ablation effect. A certificate without an attribution method is invalid.
Fork — counterfactual
alternative (the next-best candidate), predicted and replayed outcomes
(success, harm, irreversible_harm), consistent (boolean) and divergence
(scalar). When no replay was performed, replayed.available is false and the
divergence is not used in the bound.
E — evidence
claims_used (ids), stale (any claim past its freshness window), conflict
(claims disagree across modalities) and acquired (evidence fetched at this step).
Evidence is not free: acquisitions appear in cost.verifications.
Bound — risk
alpha— target miscoverage.coverage— empirical coverage on the calibration split.selective_risk_upper— Clopper–Pearson upper bound atnaccepted decisions.n— calibration sample size behind the bound.method—clopper_pearson_selectiveorconformal_split.feasible— whether the bound is belowalphaon the calibration split.budget_spent,budget_limit,components— tokens charged, split intomonitor,simulation,verification,allocator.
Ledger
prev_hash and cert_hash chain records:
cert_hash = sha256(prev_hash || canonical_json(record_without_cert_hash))
Editing any record breaks verification from that point onward. verify_chain()
returns (ok, message); audit_ledger(path) returns counts, chain status and
schema status for a file.
Why these four elements
A safety claim needs to be falsifiable. G makes the cause inspectable. Fork
makes the alternative explicit. E makes the inputs auditable. Bound makes the
error quantitative. Remove any one and the claim becomes a narrative.
Versioning
The schema is additive within a major version. A consumer must reject records with
an unknown schema_version rather than guess. cert_id is not a hash of the
record (the record contains its own hash chain); it is an identifier.