hans / hans/barakeet

MAP · Late-window perceptual projection: context-gated reactivation paper-claim go/no-go

Open
#19 0 comments 0 reactions 0 assignees View on GitHub
wayfinder:map
Dominant language
Jupyter Notebook
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Spun off from [MAP · Integration response: same-word-end perceptual reactivation (go/no-go) (#15)](https://github.com/hans/barakeet/issues/15) at its GO (see [Go/no-go on the context-gated perceptual-reactivation direction (#17)](https://github.com/hans/barakeet/issues/17)). Map #15 decided *to build* the late-window projection; this map builds it, runs it, and decides the paper claim on its result.

## Destination

A **GO/NO-GO on the paper's positive claim**: *context-gated reactivation of the **perceptual** (not acoustic) code* — the within-completion late (integration) percept gap re-expresses **that word-end's own** unambiguous /d/–/n/ tuning (â = the late unambiguous window, same word end). Grounded in the **late-window perceptual projection's own result** (π = ⟨â, p⟩ ported from [ADR-0002](https://github.com/hans/barakeet/blob/master/docs/adr/0002-perceptual-site-identification-by-projection.md) to the late window, strict same-word-end, no pooling).

**NO-GO** retreats the integration section to **negative claims only** (not lexicality / mismatch / surprisal; not an extended acoustic-or-perceptual response to the word-initial sound) — same fallback as map #15.

## Notes

**This effort carries execution** (overrides wayfinder "plan, don't do"): it produces a real notebook (`late_perceptual_projection` + aggregate) + a prod run + the decision. The map still drives to a *decision* (the paper-claim go/no-go); code + prod run are the evidence-gathering.

**Confirmatory, not exploratory** (Jon, 2026-07-21): the pass criterion — including **which â-population is claim-bearing** — is **pre-registered in a pre-run design ticket**, before Jon sees the prod numbers. This is why the criterion is its own ticket (blocking the build), not folded into the final go/no-go.

**The spine — the â-reliable population.** Stage-1 (#16) already previews that the answer swings on it: same-sign is **49/77** ignoring â-reliability but only **9/77** when a reliable late â (β_unamb ≠ 0) is required (34/187 cells have reliable â at all). The projection's *per-cell permutation null is calibrated even at low ‖â‖* (â_unit held fixed, labels permuted), so this is **not** a false-positive-inflation problem — it is **interpretive**: a significant ⟨â_unit, p⟩ where â is a noise direction is "percept projected onto noise", not "reactivation of the acoustic tuning". So the claim-bearing population *is* the â-reliable subset — the map forces this choice **before** the run.

**Late window is word-end-specific** — cannot reuse early's global [50,280]ms grid: offsets differ (desolate 0.498s vs necessary 0.887s) and the perceptual response extends past offset. Default the design toward a word-end-anchored late grid; a sliding-window search must have its null absorb the search; `b_windows.parquet` is a candidate snap target but is selected on *p* (clean w.r.t. â, not independent of the tested percept).

**Prod-only constraint** (same as before): `b4_bootstrap.parquet` (= p, `mean_diff_raw` per cell×window×replicate) and `outputs/epochs_preprocessed/` (needed for â via `bootstrap_endpoint_beta`) are **not synced to the dev container**. Code is written in dev; every run needs **Jon on prod**. Use `uv run`, run serially (never concurrent `uv run`).

**Current phase: EDA, not writing.** No paper drafting until the go/no-go resolves — the reconciliation/figures fog blocks on it. **Deadline: paper draft by end of July 2026.**

**Substrate already in place (the porting surface):**
- `notebooks/causal46_joined/early_perceptual_projection.py` (+ `_aggregate.py`) — the method to port. Per-subject notebook computes π_cell + per-site/per-word-end permutation null; aggregate does Test 1 (FDR) / Test 2 (CPO count-vs-null) / Test 3 (label cross-tab). **The per-word-end null machinery already exists.**
- `b4_bootstrap.parquet` = **p** (β_amb) per (subject, electrode_idx, phoneme_pair, word_end) × searchlight window × replicate.
- `_within_completion.py::bootstrap_endpoint_beta` = **â** (β_unamb, step6−step1 within word_end, per window) — the late acoustic template, per word end (already used by `strong_generator_scan.py`).
- `behavioral_discriminative_windows.py` → `b_windows.parquet` = an *independent* per-cell late-window search (candidate window-snapping source).
- `_within_completion.py` module docstring = canonical B3/B4 subsampling rule. Read before touching trial-selection.

**Skills:** `/grilling` + `/domain-modeling` for the design + decision tickets; `/prototype` only once data is reachable (prod).

## Decisions so far

- [Late-window projection: per-cell statistic — late â, window rule, normalization (#20)](https://github.com/hans/barakeet/issues/20) — π_cell = ⟨â_unit, p⟩ ported to the late window via **1c** (â-anchored **contiguous reliable run**: β_unamb CI-excludes-0, anchor argmax|β_unamb|, unit-normalize â over the run; NaN where no reliable window). **p deterministic** (`compute_p_we`), within-step label-permutation null (b4_bootstrap = cross-check only, not the null engine). Exports π_peak + â-reliability descriptors for #21; searchlight π-search (1b) recorded as fallback. Spec + ADR-0003, PR #24.
- [Late-window projection: population test + pre-registered pass criterion (#21)](https://github.com/hans/barakeet/issues/21) — **pre-registration LOCKED** (confirmatory, before #22 prod run). Claim-bearing population = **â-reliable cells × π_anchored** (~34/187; â-estimable/π_peak = diagnostic only; *mutable* choice). Unit = **per-cell**, each word_end independent (asymmetry descriptive). Statistic = **CPO count-vs-null** (early Test 2). **GO iff p_cpo < 0.05, one-tailed π > 0, no floor**; Binomial + FDR reported, non-gating; **NO-GO = p_cpo ≥ 0.05** → negative claims only. Bar is **purely CPO** (manual-label cross-tab = non-gating diagnostic). Licensing: positive π ⇒ mechanism-1 reactivation of the **perceptual** code *along the tuning direction only*; reconciliation deferred to write-up. Spec §§8–9 + ADR-0003, PR #24.

## Not yet specified

- **CLAUDE.md / ADR reconciliation** — a positive late-reactivation finding revisits the "Reactivation tentatively disfavored / transfer-bimodality" framing. It does **not** contradict transfer bimodality (that was code *inconsistency between windows*; this is a claim about the *perceptual* code specifically) — but the write-up must state the reconciliation. Partly pre-decided in the pass-criterion ticket (why a positive π lands in mechanism-1, not a ruled-out mechanism); the write-up itself + a new ADR documenting the late-projection method graduate **on GO**.
- **Figure plan** for the integration-response section. On GO.
- **Complementary acoustic-context-conditioned subset** — sites whose late contextual response tracks *acoustic* (not perceptual) context. Post-result characterization.

## Out of scope

- **Downstream pipeline rewiring on a GO** — replacing / re-selecting on top of PR #14's pooled TFCE late-window gate, and the cascade it feeds (`strong_generator`, `contrast_plot`, `mismatch_regression`, `acoustic_endpoint_windows`, `acoustic_transfer`). A consequence of a GO, past this map's destination; charted later as its own execution effort (Jon, 2026-07-21).
- **Repairing/tuning PR #14's pooled TFCE gate** to rescue a population binomial — foreclosed in map #15; this effort routes around it per-word-end.
- **The early perceptual response** (settled; figure polish only) — a separate paper track.

Contributor guide

No contributing guide indexed for this repository

Research direction

Read notebooks/causal46_joined/early_perceptual_projection.py and its aggregate companion, then read _within_completion.py's module docstring and review ADR-0003. Port the method to the late word-end window, run the notebook and aggregate serially on prod with uv run, and compare the pre-registered CPO result against the p < 0.05 GO criterion; the outcome is a paper-claim GO or NO-GO.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, python
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.