ADAPTER_CONTRACT.md

SRIC: external semantic admission

ADAPTER_CONTRACT.md

Download original file

Original Markdown with line links

Adapter Contract

The adapter is valid only when it satisfies all of the following.

Trace identity

capture(task) returns the vectors actually reinjected at the model's latent-token positions, in recurrent order, with shape [latent_steps, hidden_size].

Supplied-trace replay

score_with_trace(task, trace) runs the same teacher-forced prompt and answer suffix while replacing only the reinjected latent vectors. Exact own-trace replay must reproduce answer logits within the frozen tolerance.

Source parity

The package includes a separate reference recurrence derived from the pinned upstream source. The adapter engine must match it exactly on a controlled PyTorch fixture.

Fixed surfaces

Across clean and intervention arms, the following remain fixed:

Modes

Fingerprint

The adapter fingerprint commits:

Failure

Any replay, source-lock, cache representation, latent-position, or trace-shape mismatch returns an adapter failure. It must not be treated as evidence about the model's semantics.

Other PDFs for this work

Original file and source record

This copy matches the recorded source file. Its publication here does not change the work’s review status.

SHA-256: 5593972709850c0ac41d3d0900c268640373fe8295fbc9170db8c720c4d7e4dc

Original source on GitHub

Back to SRIC: external semantic admission