Plectis
This page

Paper module

Mechanistic Interpretability Circuit Attribution Replay

Mechanistic interpretability replay validates public circuit-attribution result record contracts without live model access or private activation export.

Contains 23 sections · 1 diagram · 3 references

The write-up

Interpretability writing is easy to overstate. A named feature can read like understanding. Interpretability writing is easy to overstate. A named feature can read like understanding. A graph picture can read like a discovered circuit. A small local script can read like access to a real model. This component exists to hold one kind of claim to a checkable size.

It answers one question. Before the system lets a circuit-attribution story stand as public evidence, does the story survive a deterministic replay instead of being taken on trust? It answers one question. Before the system lets a circuit-attribution story stand as public evidence, does the story survive a deterministic replay instead of being taken on trust? The runtime lives in src/microcosm_core/organs/mechanistic_interpretability_circuit_attribution_replay.py. It reads a fixture or an exported bundle, recomputes a tiny toy transformer, checks the graph and source-body evidence, and writes result records that carry refs, digests, counts, and verdicts. They carry no model weights, no raw activations, no prompts, and no hidden reasoning.

The current fixture has six sparse features and six replay rows. A pass is bounded evidence about that fixture. The current fixture has six sparse features and six replay rows. A pass is bounded evidence about that fixture. It is not access to any trained model.

Purpose

The problem is that an interpretability-shaped fixture can look convincing while being wrong or stale. A feature label can lack a catalog id. The problem is that an interpretability-shaped fixture can look convincing while being wrong or stale. A feature label can lack a catalog id. A graph can be a screenshot with no traversable edges. A row can claim transparency with no intervention result record behind it. And an attribution claim that was once true of its inputs can stay in place after the inputs change.

A loose check passes all of these. This component makes the claim smaller and forces each claim-bearing row across four gates: a replay-schema gate, a graph-traversal gate, a toy-transformer recomputation gate, and a source-body boundary gate. A loose check passes all of these. This component makes the claim smaller and forces each claim-bearing row across four gates: a replay-schema gate, a graph-traversal gate, a toy-transformer recomputation gate, and a source-body boundary gate. A row passes only when all four hold.

How it works

Two entry points drive the same gates. run validates the first-wave fixture with negative cases included. Two entry points drive the same gates. run validates the first-wave fixture with negative cases included. run_attribution_bundle validates an exported bundle without the negative-case files, and can reuse a cached bundle result when _fresh_bundle_receipt confirms the cache is still coupled to the current inputs. Both call _build_result, which runs the checks in order and then _write_receipts, which writes the result, board, validation, and sign-off records.

_build_result loads the fixture payloads, then for each replay row it calls _replay_policy_findings, _graph_analysis_for_replay, and a feature-catalog resolution check. _build_result loads the fixture payloads, then for each replay row it calls _replay_policy_findings, _graph_analysis_for_replay, and a feature-catalog resolution check. After the loop it runs _weight_sequence_analysis once across all rows, _toy_transformer_attribution_runtime once, and scan_paths over the inputs and copied source modules. The overall status is pass only when every gate passes and the secret scan passes.

_replay_policy_findings is the schema gate. It requires all 29 fields in REQUIRED_REPLAY_FIELDS, a toy prompt ref with no inline prompt body, at least one sparse feature id, and a replacement_model_approximation_score inside the range 0 to 1. _replay_policy_findings is the schema gate. It requires all 29 fields in REQUIRED_REPLAY_FIELDS, a toy prompt ref with no inline prompt body, at least one sparse feature id, and a replacement_model_approximation_score inside the range 0 to 1. It emits INTERPRETABILITY_INTERVENTION_RECEIPT_REQUIRED when a row claims transparency without a causal_intervention_receipt_ref, and INTERPRETABILITY_FAITHFULNESS_REQUIRES_LIMITS when a row claims faithfulness without a faithfulness_limit_ref. It rejects any row whose private_model_weights_exported, raw_activation_dump_exported, proprietary_prompt_exported, hidden_chain_of_thought_exported, or release_authorized flag is true, and any row whose serialized text contains a private needle from PRIVATE_NEEDLES.

_graph_analysis_for_replay is the traversal gate. It reads graph_nodes and graph_edges, checks that every edge endpoint resolves to a declared node, then does a depth-first walk from the row's sparse_feature_ids looking for a path to a node whose kind is public_error_node. _graph_analysis_for_replay is the traversal gate. It reads graph_nodes and graph_edges, checks that every edge endpoint resolves to a declared node, then does a depth-first walk from the row's sparse_feature_ids looking for a path to a node whose kind is public_error_node. A row with no such path gets INTERPRETABILITY_GRAPH_PATH_REQUIRED. _weight_sequence_analysis collects edge weights column by column across rows and calls _constant_delta_sequence; a column of four or more weights with one constant nonzero step is flagged as a decorative arithmetic sequence, not real circuit evidence.

_toy_transformer_attribution_runtime is the recomputation gate. It reads token_ids, embeddings, layer1, layer2, and target_logit_index from the fixture. _toy_transformer_attribution_runtime is the recomputation gate. It reads token_ids, embeddings, layer1, layer2, and target_logit_index from the fixture. _toy_transformer_forward averages the token embeddings into a context vector, applies layer1, applies a tanh hidden activation, applies layer2, and reads the target logit. The runtime then computes gradient scores using the analytic tanh derivative 1 - h^2, so the attribution rests on the same forward pass, and ablates each hidden feature in turn to measure its logit delta. It picks the top feature by attribution and by ablation and compares both against the fixture's declared winners. A mismatch emits INTERPRETABILITY_TOY_TRANSFORMER_DECLARED_TOP_FEATURE_MISMATCH. It also records a weight_digest so a cached or exported card can prove which fixture basis it is coupled to. If the spec came from the internal default rather than the fixture, input_coupled_fixture is false and _build_result raises INTERPRETABILITY_TOY_TRANSFORMER_FIXTURE_SPEC_REQUIRED.

On the current fixture the target logit is 0.044176, and both the gradient attribution and the ablation delta select toy_hidden_feature_1, which matches the declaration. On the current fixture the target logit is 0.044176, and both the gradient attribution and the ablation delta select toy_hidden_feature_1, which matches the declaration. The row passes because two independent recomputed paths agree with each other and with the fixture.

_source_module_manifest_result is the boundary gate. For each row in the source-module manifest it checks that the classification is copied_non_secret_macro_body, that the material class is one of the allowed public source classes, that the body was copied without any result record body text, that the target file exists and its digest matches target_sha256 and source_sha256, that sha256_match is true, and that every required anchor appears in the target text. _source_module_manifest_result is the boundary gate. For each row in the source-module manifest it checks that the classification is copied_non_secret_macro_body, that the material class is one of the allowed public source classes, that the body was copied without any result record body text, that the target file exists and its digest matches target_sha256 and source_sha256, that sha256_match is true, and that every required anchor appears in the target text. _source_open_body_import_summary folds the verified modules into a summary whose scope limit flags are all false. _write_receipts emits the records with body_in_receipt set to false throughout, and result_card omits the large payload keys listed in CARD_OMITTED_FULL_PAYLOAD_KEYS.

Diagram of the mechanism (7 steps).
Fixture or exported bundlefeatures, replay rows,toy-transformer specFixture or exported bundle features, replay rows, toy-transformer spec_replay_policy_findingsrequired fields, refs, forbiddenflags_replay_policy_findings required fields, refs, forbidden flags_graph_analysis_for_replayfeature ids to public error node_graph_analysis_for_replay feature ids to public error node_weight_sequence_analysisreject arithmetic edge weights_weight_sequence_analysis reject arithmetic edge weights_toy_transformer_attribution_runtimeforward + gradient + ablation vsdeclared_toy_transformer_attribution_runtime forward + gradient + ablation vs declared_source_module_manifest_resultcopied bodies, digest, anchors_source_module_manifest_result copied bodies, digest, anchors_write_receiptsrefs, digests, counts, verdicts_write_receipts refs, digests, counts, verdicts
Diagram source & refs
flowchart TD Input["Fixture or exported bundle features, replay rows, toy-transformer spec"] Schema["_replay_policy_findings required fields, refs, forbidden flags"] Graph["_graph_analysis_for_replay feature ids to public error node"] Weights["_weight_sequence_analysis reject arithmetic edge weights"] Toy["_toy_transformer_attribution_runtime forward + gradient + ablation vs declared"] Source["_source_module_manifest_result copied bodies, digest, anchors"] Result["_write_receipts refs, digests, counts, verdicts"] Input --> Schema Input --> Graph Input --> Weights Input --> Toy Input --> Source Schema --> Result Graph --> Result Weights --> Result Toy --> Result Source --> Result

Negative cases

run loads eight named negative fixtures and checks that each produces its expected error code, listed in EXPECTED_NEGATIVE_CASES. run loads eight named negative fixtures and checks that each produces its expected error code, listed in EXPECTED_NEGATIVE_CASES. private_model_weights_export must raise INTERPRETABILITY_PRIVATE_WEIGHTS_FORBIDDEN. raw_activation_dump must raise INTERPRETABILITY_RAW_ACTIVATION_DUMP_FORBIDDEN. proprietary_prompt_export must raise INTERPRETABILITY_PROPRIETARY_PROMPT_FORBIDDEN. hidden_chain_of_thought_export must raise INTERPRETABILITY_HIDDEN_COT_FORBIDDEN. unverifiable_feature_name must raise INTERPRETABILITY_FEATURE_NAME_UNVERIFIABLE. graph_screenshot_without_edges must raise INTERPRETABILITY_MACHINE_READABLE_EDGES_REQUIRED. transparency_claim_without_intervention must raise INTERPRETABILITY_INTERVENTION_RECEIPT_REQUIRED. faithfulness_claim_without_sufficiency_limit must raise INTERPRETABILITY_FAITHFULNESS_REQUIRES_LIMITS. A case that fails to raise its code leaves an entry in expected_missing, and the overall status is then blocked.

Prior Art Grounding

The accounting shape borrows from the mechanistic interpretability tradition, the study of the internal circuits of neural networks (Anthropic, Transformer Circuits): circuits should be graph-structured, features should be identifiable, causal language should be backed by interventions, and faithfulness language should be bounded. The accounting shape borrows from the mechanistic interpretability tradition, the study of the internal circuits of neural networks (Anthropic, Transformer Circuits): circuits should be graph-structured, features should be identifiable, causal language should be backed by interventions, and faithfulness language should be bounded. This component does not reproduce those methods. It puts a replay boundary around an interpretability-shaped fixture: machine-readable edges instead of screenshots, causal-intervention refs instead of bare transparency language, and fixture recomputation instead of trusting a stale row. The result is fixture-bound runtime evidence, not live model access.

Validation Result record Path

Run from the microcosm-substrate/ public root:

PYTHONPATH=src python3 -m pytest tests/test_mechanistic_interpretability_circuit_attribution_replay.py -q
PYTHONPATH=src python3 scripts/build_doctrine_projection.py --check-paper-module-corpus

The focused test exercises the fixture and bundle: recomputation, stale-row rejection, the graph and weight gates, source-body import checks, and cached-card reuse. The focused test exercises the fixture and bundle: recomputation, stale-row rejection, the graph and weight gates, source-body import checks, and cached-card reuse. A pass is reader-verifiable evidence only. It excludes launch, external model access, source-file changes, or whole-system correctness.

Scope boundary

Scope limit

The bounded attribution-replay claim

The strongest claim the evidence supports is a public, cold-replayable circuit-attribution accounting for the named fixture and exported bundle. The strongest claim the evidence supports is a public, cold-replayable circuit-attribution accounting for the named fixture and exported bundle. Feature ids are tied to machine-readable graph edges with a traversable path to a public error node. Transparency and faithfulness language passes only when it carries a causal-intervention result record ref and an explicit limit ref. The toy-transformer declaration is coupled to recomputed forward, gradient, and ablation results, and a stale declaration is rejected. Copied source bodies are verified by manifest and digest checks while the records stay metadata-only.

Where the replay proof boundary stops

The proof boundary is that fixture and bundle. This component does not access a live model, does not export private weights, raw activations, proprietary prompts, or hidden reasoning, and is not a model-transparency product. The proof boundary is that fixture and bundle. This component does not access a live model, does not export private weights, raw activations, proprietary prompts, or hidden reasoning, and is not a model-transparency product. It carries no benchmark, public sharing, hosting, or launch-scope decision. The scope limit is a public circuit-attribution runtime record and copied source-body evidence, nothing wider.

Context & evidence

Source

Source Source module: src/microcosm_core/organs/mechanistic_interpretability_circuit_attribution_replay.py · Design note · Source registry