A2b feasibility: G0/G1 endpoint-recovery probe for input-level re-embedding - #89
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2b6d7a3a4d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| label_matches = 0 | ||
| with torch.no_grad(): | ||
| for i in rows: | ||
| ds_idx = split_indices[i] |
There was a problem hiding this comment.
Guard split-length mismatches before indexing
When the replayed split is shorter than the cache (one of the G0 failure modes this probe is meant to diagnose), the script still samples cache rows and indexes split_indices[i] before it reaches the later split_len_ok verdict logic. In that environment the probe raises IndexError instead of writing the intended FAIL report, so the length check needs to abort/report before any per-row recovery is attempted.
Useful? React with 👍 / 👎.
Scope — feasibility only (no experiment, no detector changes)
Narrow gate for the A2b input-level re-embed fidelity study (follow-on to #88). This PR adds only the G0/G1 endpoint-recovery probe and the design scope. It does not build
ReembedDriftStream, run the subset experiment, or touchforward(),associative_core.py, the detector, or any existing analyzer.What this proves
The faithful input-level arm needs to map each cached ImageNet-R ViT-L/14 row back to its exact source image and re-embed it, sharing endpoints with the cache-linear arm. G0/G1 de-risks that before any harness is written:
Verdict: PASS (gentoo, CUDA, train split):
Sample: classes {166, 63, 77, 156} + attractor 134 + 5 out-of-class negatives, seed 0. Split/transform/model taken from
extract_imagenet_r_vitl14itself (not reimplemented from memory). Cosines are exactly 1.0 — the row↔image mapping is bit-exact (deterministic encoder,shuffle=Falsecache).Consequence for the next step
Because the cache stores raw (~45-norm) features, the input-level arm must feed raw DINOv2 output to the engine (engine normalizes internally, as the text
RealDriftStreamdoes); unit-normalize only for geometry diagnostics. The next risk is no longer endpoint identity — it is whether input-level interpolation yields a meaningful drift path vs. visual artifacts / a degenerate trajectory.Files
probe_g0g1_reembed.py— read-only probe over the mergedfeature_cache_inr_vitl14cacheresults/issue_input_reembed_fidelity/G0_G1_PROBE.md— verdict + run metadataresults/issue_input_reembed_fidelity/SCOPE.md— A2b paired-experiment design (diagnostic / not-production framing preserved)🤖 Generated with Claude Code