Skip to content
This repository was archived by the owner on Jul 17, 2026. It is now read-only.

feat(deep-linear): frozen-identity toy domain — the chunkwise-recon testbed#981

Open
claude-spd1 wants to merge 3 commits into
feature/jaxfrom
bridge/task-deep-linear-identity-decomposition
Open

feat(deep-linear): frozen-identity toy domain — the chunkwise-recon testbed#981
claude-spd1 wants to merge 3 commits into
feature/jaxfrom
bridge/task-deep-linear-identity-decomposition

Conversation

@claude-spd1

Copy link
Copy Markdown
Collaborator

What

New toy domain param_decomp_lab/experiments/deep_linear/ (pd-deep-linear): one-hot inputs → n_layers linear layers hardcoded to eye(n_features) → softmax, decomposed through the generic core engine. The recon comparison is the LM's kl_per_position on the final logits, which makes this the smallest target that exercises ChunkwiseSubsetReconLoss end-to-end — the ground truth at every site is n_features live rank-1 components e_i e_iᵀ with one-hot per-feature CI, checked in-loop via the TMS identity_ci_error.

  • layers.* wildcard site expansion (a 200-layer stack is one config stanza)
  • No pretraining: the target is constructed, a run is reproducible from the config alone
  • PersistentPGDReconLoss is rejected loudly at build time (the engine pins persistent sources to a sequence axis; positionless targets have none)
  • Canonical configs: d=30 and d=128, L=5 base (the chunk-count sweep rewrites n_layers / sites_per_chunk)

Also

pd-tms / pd-resid-mlp probe calls were broken at tip by the ci_fn(..., remat=) kwarg (the toy CLIs have no CI coverage — same failure class as PR #903's). Fixed both; the deep_linear tests pin the calling pattern.

Tests

  • 15 tests incl. slow: contract (frozen-path exactness, mask=1 identity, ablation propagates), chunk plan tiling for sites_per_chunk ∈ {1,2,4}, train-step finiteness, config parse+build for both repo yamls, PPGD rejection, and an end-to-end d=6 L=2 decomposition that recovers the identity (zero identity_ci_error).
  • make check clean; full toy-domain suite (58 tests) green.
  • CPU smoke of the real CLI: 300 steps, losses finite, identity_ci_error falling.

Context: bridge task deep-linear-identity-decomposition (chunk-count sweep for the deep identity model, d ∈ {30,128} × L ∈ {5,50,200}).

Crew-Address: task/deep-linear-identity-decomposition

🤖 Generated with Claude Code

PD User (shared) and others added 3 commits July 13, 2026 17:04
…estbed

New toy domain: n_layers frozen eye(n_features) sites (layers.*), uniform one-hot
data, KL-on-final-logits recon — the smallest end-to-end ChunkwiseSubsetReconLoss
target. pd-deep-linear CLI mirrors pd-tms minus pretraining. Persistent-PGD is
rejected loudly (engine pins persistent sources to a sequence axis).

Also fixes pd-tms / pd-resid-mlp probe calls broken by the ci_fn remat kwarg
(nothing in CI exercises the toy CLIs; the deep_linear tests now pin the pattern).

Crew-Address: task/deep-linear-identity-decomposition

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ended, additive)

Two new routing configs for the subset recon terms:
- fixed_k_subset: per position, a uniform subset of exactly k live sites
  (vs uniform_k's k ~ U{1..n}).
- scheduled_probability: static_probability with p evaluated per step from
  a ScheduleConfig (increasing ramps use final_val_frac > 1; both endpoints
  validated as probabilities).

SAMPLE_ROUTING gains the traced step: RoutingSampler is now
(key, leading_shape, step_f32) -> draws; only scheduled samplers read the
step (all others ignore it), and build_loss_terms/make_plan thread
total_steps down so the scheduled sampler can evaluate its schedule with
scheduled_value_traced. SPEC S11 + the SAMPLE_ROUTING binding-seam row
amended additively; R1 independence unchanged (draws stay independent
across sites, positions, forwards, steps — the schedule only moves p).

Motivation (board task run-some-random-architecture-ideas): test whether
the subset recon term wants more base-model supervision early — low
routing p ramped up over training — vs the static uniform-k baseline.

Crew-Address: task/run-some-random-architecture-ideas
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ting to all subset types

target.logit_scale multiplies the final output only (softmax temperature for the
KL recon; layers stay exact identities, ground truth unchanged). target.recon
picks kl|mse. The ChunkwiseSubsetReconLoss uniform_k routing pin in
build_loss_terms is lifted — the sampler dispatch already handles every
SubsetRoutingType (incl. the cherry-picked fixed_k/scheduled_probability).

Crew-Address: task/deep-linear-identity-decomposition

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@claude-spd1

Copy link
Copy Markdown
Collaborator Author

Scope addition for the follow-up experiments (braun's 1-chunk-at-depth ask on the bridge task): cherry-picked feature/routing-schedules-fixed-k (5a18ff7, additive routing types — will dedupe if that branch merges first), lifted the ChunkwiseSubsetReconLoss uniform_k routing pin (the sampler dispatch already handles every SubsetRoutingType), and added target.logit_scale (softmax temperature; layers stay exact identities) + target.recon: kl|mse to the deep_linear toy. make check + toy/routing suites green.

Crew-Address: task/deep-linear-identity-decomposition

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant