diff options
| author | YurenHao0426 <Blackhao0426@gmail.com> | 2026-07-26 12:27:52 -0500 |
|---|---|---|
| committer | YurenHao0426 <Blackhao0426@gmail.com> | 2026-07-26 12:27:52 -0500 |
| commit | 00baa870b8b61a0974438233d9240eebb40c384f (patch) | |
| tree | bae281f38fe7512a0e0ad46da43f6262eb3c94dc /sdil/conv.py | |
| parent | 8f9364e8ee2e2a19eb83b58452fa0e8cb155353c (diff) | |
experiment: freeze KP teaching-signal ablation
Diffstat (limited to 'sdil/conv.py')
| -rw-r--r-- | sdil/conv.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sdil/conv.py b/sdil/conv.py index ebb29ab..1034202 100644 --- a/sdil/conv.py +++ b/sdil/conv.py @@ -820,7 +820,16 @@ class CIFARKPMixedTrafficResNet(CIFARKPResNet): def mixed_apical_components(self, instruction, hiddens, rule, compute_matched=False, neutral_projection=False): - """Return used, raw, innovation, matched, and traffic fields.""" + """Return used, raw, innovation, matched, and traffic fields. + + When ``neutral_projection`` is enabled, every rule pays for and + reports the same instruction-off projection. Only the innovation + rule applies the subtractive direction. Raw keeps the unmodified + apical vector, while matched keeps its direction and borrows only the + projected innovation norm. This makes raw and matched strict sham + controls for the subtractive operation without changing their local + information or observation budget. + """ if rule not in ("raw", "matched", "innovation"): raise ValueError(f"unknown mixed-traffic rule: {rule}") if not (len(instruction) == len(hiddens) == self.n_hidden): @@ -829,9 +838,6 @@ class CIFARKPMixedTrafficResNet(CIFARKPResNet): projected_neutral = None projection_report = None if neutral_projection: - if rule != "innovation": - raise ValueError( - "neutral projection is defined only for innovation") projected_neutral, projection_report = ( self.neutral_residual_projection(hiddens)) raw = [] |
