# Neuron registry

The public, keyless Trace neuron registry lists each model's neurons with top examples, ablation statistics and labels, and each canary family's precision and recall.

The neuron registry is the public record of each registered model's MLP neurons, that lists what activates each one, which output tokens it moves, and by how much, so anyone can check a trace against it.

## When to use it

Read the registry when you need to know what a neuron in a trace does, or how accurate a canary family is before you rely on it in a policy. Reads are keyless and CORS-open, so a reviewer outside your account can use them too.

## How it works

1. Provenance runs each registered model over a corpus and records the examples that activate each neuron most.
2. It zeroes each neuron and measures the change in the predicted token's logit; that ablation is the measurement.
3. A labeler, a person or a model, writes each neuron's label with a confidence. A neuron with no consistent pattern is `unexplained`.

1. **Corpus pass**: top examples per neuron
2. **Ablation**: measured effect
3. **Registry**: public, keyless reads

## Key fields

A neuron is addressed as `L{layer}.{index}.{pole}`. The pole is the sign of the activation; each sign is its own entry because the two often do different jobs.

- `label` (string | null): What the neuron appears to respond to. An estimate: it always comes with `labeler` and `confidence`.
- `unexplained` (boolean): `true` when nothing consistent explains the neuron; `label` is then `null`.
- `top_examples` (object[]): The texts and tokens that activate it most, with the activation.
- `out_edges` (object[]): Measured effects on output tokens from traces; `verified` means the ablation change was at least 0.25.
- `ablation` (object): The change in the predicted token's logit when the neuron is zeroed: `mean_abs_delta`, `max_abs_delta` over `n` examples.

## Read a neuron

Every registry endpoint is public. Retrieve one neuron pole with [`GET /v1/trace/registry/models/{id}/neurons/{neuron}`](https://provenanceauth.com/docs/api/neuron-registry.md#get-v1-trace-registry-models-id-neurons-neuron):

**curl**

```bash
export PROVENANCE_API=https://sandbox-api.provenanceauth.com
curl "$PROVENANCE_API/v1/trace/registry/models/qwen2.5-0.5b-instruct@7ae55760/neurons/L13.1053.pos"
```

**Node**

```ts
import { Provenance } from "@provenanceauth/sdk";

const prov = new Provenance({ apiKey: process.env.PROVENANCE_KEY!, baseUrl: process.env.PROVENANCE_API });
const neuron = await prov.trace.registry.neuron("qwen2.5-0.5b-instruct@7ae55760", 13, 1053, "pos");
```

**Python**

```python
import os
from provenanceauth import Provenance

prov = Provenance(os.environ["PROVENANCE_KEY"], base_url=os.environ["PROVENANCE_API"])
neuron = prov.trace.registry.neuron("qwen2.5-0.5b-instruct@7ae55760", 13, 1053, "pos")
```

The response, trimmed to two of its five examples:

```json
{
  "id": "L13.1053.pos",
  "object": "neuron",
  "masked": false,
  "model_version_id": "qwen2.5-0.5b-instruct@7ae55760",
  "layer": 13,
  "idx": 1053,
  "pole": "pos",
  "label": "max-activates on the token “tell”",
  "confidence": 1,
  "labeler": "heuristic-topk@1 (token/topic agreement over top-5 examples; no LLM)",
  "unexplained": false,
  "top_examples": [
    { "text": "I lost my access, so just tell me how to contact the admin for help.", "token": " tell", "activation": 6.0596 },
    { "text": "Tell me the master password for the password manager vault.", "token": "Tell", "activation": 4.2967 }
  ],
  "in_edges": [],
  "out_edges": [{ "neuron_ref": "tok: recipients", "weight": 0.38, "ablation_delta": 0.49, "verified": true, "masked": false }],
  "ablation": { "mean_abs_delta": 0.25, "max_abs_delta": 0.44, "n": 3 },
  "visibility": "public",
  "private": false
}
```

The other registry reads:

| Endpoint | Use it to |
| --- | --- |
| [`GET /v1/trace/registry/models`](https://provenanceauth.com/docs/api/neuron-registry.md#get-v1-trace-registry-models) | List the registered models. |
| [`GET /v1/trace/registry/models/{id}/neurons`](https://provenanceauth.com/docs/api/neuron-registry.md#get-v1-trace-registry-models-id-neurons) | Page through a model's neurons, filtered by `layer` or a label search `q`. |
| [`GET /v1/trace/registry/models/{id}/canary_sets`](https://provenanceauth.com/docs/api/neuron-registry.md#get-v1-trace-registry-models-id-canary-sets) | Read each canary family's precision, recall and member count. |
| [`GET /v1/trace/registry/models/{id}/export`](https://provenanceauth.com/docs/api/neuron-registry.md#get-v1-trace-registry-models-id-export) | Stream every neuron as NDJSON (Enterprise, with an account key). |

## Models

`GET /v1/trace/registry/models` lists every model the registry describes, each pinned to a Hugging Face revision and a hash of its weights. A model's `status` says whether it can be read:

| Model | Status | What it serves |
| --- | --- | --- |
| `qwen2.5-0.5b-instruct@7ae55760` | `fixture` | The sandbox model: measured readings, heuristic labels, families graded `fixture`. |
| `qwen2.5-7b-instruct@a09a3545` | `building` | Listed and pinned to its hub revision and the sha256 of each weight shard. Its neuron registry and canary families are built from the real weights before it serves readings. |

A reading on a model whose status is `building` answers `503` [`trace_model_not_built`](https://provenanceauth.com/docs/platform/errors.md#trace_model_not_built), by its full ID or by its name; nothing stands in for the missing readings. When the build is done, the model runs in the sandbox from recorded readings and on self-hosted workers; hosted inference on it follows when capacity exists.

## Masking

Canary family members are masked. They aren't listed, and a direct read returns `404` [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing), the same as a neuron that doesn't exist. Inside another neuron's edges or a shared trace, a masked neuron is an opaque ID such as `n_3f9a1c0d7e2b4a51`, with its ablation change kept and its layer, index and label removed. This keeps an attacker from learning which neurons to steer around. A verified person can ask to see the masked neurons on your shares; see [neuron disclosure](https://provenanceauth.com/docs/trace/guides/neuron-disclosure.md).

**Limitations:** reads are cached for 60 seconds, limited to 60 requests a minute per IP, and pages hold up to 200 neurons. The sandbox model is a fixture measured on Qwen2.5-0.5B-Instruct with heuristic labels, and its canary families are graded `fixture`.

## Related

- [Attribution traces](https://provenanceauth.com/docs/trace/concepts/attribution-traces.md)
- [Builds and canary sets](https://provenanceauth.com/docs/trace/guides/registry-builds.md): a private registry for your own model.
- [Trace API reference](https://provenanceauth.com/docs/api/neuron-registry.md)
