# PHYSARIUM_COVERAGE_AUDIT

**Date:** 2026-04-27
**Why:** Earlier `PHYSARIUM_RESULTS_RECONCILE.md` (first draft) speculated
that Physarium-v1 surgery covered ≈ 6 % of target weights via 256×256
windows. That was wrong. This audit reconstructs the actual coverage from
the surgery code (`src/physarium/physarium_engine.cpp`) and the per-tensor
log (`reports/physarium7b_surgery_run.log`).

## How surgery actually iterates the matrix

`prune_matrix()` walks **non-overlapping** `block_size × block_size`
tiles (default `block_size = 256`), with `min(...)` clipping at the matrix
edges:

```cpp
for (int bi = 0; bi < rows; bi += p.block_size) {
    for (int bj = 0; bj < cols; bj += p.block_size) {
        int br = std::min(p.block_size, rows - bi);
        int bc = std::min(p.block_size, cols - bj);
        // process tile [bi..bi+br, bj..bj+bc]
    }
}
```

This means **every weight in every target tensor is processed exactly
once**. Coverage of the target tensor set is 100 %.

## Audit numbers (Physarium-7B)

Reconstructed from the safetensors index + the per-tensor surgery log.

| Quantity                                     | Elements         | Pct of target | Pct of full |
|----------------------------------------------|------------------|---------------|-------------|
| Total elements in full 7B model              | 7,615,616,512    | —             | 100 %       |
| Target proj elements (q/k/v/o + gate/up/down)| 6,525,288,448    | 100 %         | 85.68 %     |
| Processed (logged) by surgery                | 6,525,288,448    | **100.00 %**  | 85.68 %     |
| Killed (zeroed) by surgery                   | 1,450,103,613    | **22.22 %**   | 19.04 %     |
| Tensors processed                            | 196 (28×7)       | —             | —           |

`processed / total_target = 100.00 %` — surgery did not skip a tile.

## Per-projection sparsity (audit)

| Projection            | Processed elements | Killed elements | Killed % |
|-----------------------|--------------------|-----------------|----------|
| `mlp.down_proj`       | 1,901,068,288      | 426,068,415     | 22.41 %  |
| `mlp.gate_proj`       | 1,901,068,288      | 421,099,975     | 22.15 %  |
| `mlp.up_proj`         | 1,901,068,288      | 419,952,080     | 22.09 %  |
| `self_attn.k_proj`    | 51,380,224         | 11,914,046      | 23.19 %  |
| `self_attn.o_proj`    | 359,661,568        | 78,357,784      | 21.79 %  |
| `self_attn.q_proj`    | 359,661,568        | 81,377,034      | 22.63 %  |
| `self_attn.v_proj`    | 51,380,224         | 11,334,279      | 22.06 %  |

## What this means for prior claims

| Claim source                              | Original phrasing                       | Audit verdict |
|-------------------------------------------|-----------------------------------------|---------------|
| `PHYSARIUM7B_SURGERY_REPORT.md`            | "1,450,103,613 / 6,525,288,448 = 22.22 % of target proj weights" | ✅ correct as stated |
| `GIGACHAD_PHASE7_CONSOLIDATED.md`          | "22.22 % of target proj weights"        | ✅ correct as stated |
| `PHYSARIUM_RESULTS_RECONCILE.md` (first draft) | "practical surgery coverage is ≈ 6 %" | ❌ **wrong**, replaced |

## Correct statements going forward

- **22.22 % is the kill rate over all target proj weights** (denominator =
  6,525,288,448), not over a sampled 6 % window.
- **19.04 % is the kill rate over the full 7B model** (denominator =
  7,615,616,512). Use this when comparing against "model-wide sparsity"
  numbers from other pruning literature.
- **Non-target tensors** (token embeddings, lm_head, RMSNorm scales, all
  biases) — together ~14.32 % of model — were untouched (BF16 copied
  verbatim).
- v1 is still **magnitude-flow** (the food signal in `physarum_block` is
  `|w|`, not activation contribution). That separate critique stands; it is
  about *what* the surgery sees, not *how much* of the matrix it sees.

## Raw machine-readable copy

`reports/physarium_coverage_audit.json` — full JSON with per-projection
counts, ratios, and the `denominator_correct: true` reconcile flag.

## Source of truth references

- Code: `src/physarium/physarium_engine.cpp::prune_matrix()`
- Log: `reports/physarium7b_surgery_run.log` (196 tensors)
- Index: `Physarium-7B-Native/model.safetensors.index.json`
