summaryrefslogtreecommitdiff
path: root/CONTRASTIVE_BIAS.md
blob: 5d6a718f37cc7bbc4d6f53e1a28edc298abc6fd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# Contrastive state-bias protocol

## Question and prior-work boundary

This protocol asks whether neuron-specific bias in a contrastive teaching
difference can destroy Dual Propagation (DP), and whether a neutral-period
somato-dendritic innovation removes that bias locally.

This is not the finite-nudge estimator bias already studied for Equilibrium
Propagation (EP).  Symmetric `+beta/-beta` EP reduces that numerical bias, and
Dual Propagation already studies asymmetric nudging.  The candidate claim here
is narrower: ordinary cell activity can produce a nonzero, state-dependent
offset in the measured contrast even when the task instruction is absent.

For DP population `l`, let

```
h_l = alpha * s_plus_l + (1 - alpha) * s_minus_l
d_l = s_plus_l - s_minus_l
```

and let the observed teaching difference be

```
d_raw_l = d_l + n_l(h_l).
```

The raw condition uses `d_raw_l`.  The innovation condition receives one
instruction-off observation of `n_l(h_l)`, fits a per-cell affine neutral
prediction from `h_l`, and uses

```
d_innovation_l = d_raw_l - n_hat_l(h_l).
```

The oracle condition subtracts the generated nuisance exactly.  No task label,
task loss, clean DP difference, downstream weight, or BP gradient enters the
neutral fit.  The extra neutral observation is counted.

A bias added identically to both compartments must cancel before this operation:

```
(s_plus_l + b_l) - (s_minus_l + b_l) = d_l.
```

That common-bias condition is a required negative control.  A claimed gain
there would indicate an implementation error.

## B0: equation and locality checks

Before any task endpoint, deterministic tests must establish:

1. zero bias makes clean, raw, innovation, and oracle differences identical;
2. identical common bias cancels to numerical precision;
3. a fixed differential offset is removed by the affine intercept;
4. activity-dependent affine bias is removed by the per-cell slope;
5. the innovation fit sees zero task-instruction observations;
6. raw bias changes the local DP update while oracle and innovation recover the
   clean update to numerical precision;
7. the forward parameters, initial values, minibatches, and DP inference rule
   are identical across conditions.

## B1: frozen development screen

B1 uses the patched author Dual Propagation implementation at frozen upstream
revision `7b2595b34421e1483a721dbfdeff8cdabda3a1ff`, miniCNN on CIFAR-10,
validation-only model seed `1988`, minibatch seed `1988`, `alpha=0`,
`beta=0.1`, `fwK`, 16 inference passes, learning rate `0.025`, batch size 100,
and 20 epochs.  Test is not evaluated.

The complete cell set is:

- one clean DP cell;
- one ratio-4 common activity-bias cell using the raw rule;
- raw, innovation, and oracle rules for differential fixed bias at ratios 1
  and 4;
- raw, innovation, and oracle rules for differential activity-dependent bias
  at ratios 0.25, 1, and 4.

The ratio is calibrated once at initialization as nuisance RMS divided by the
clean DP state-difference RMS, separately for every hidden population.  It is
then frozen.  A failed, nonfinite, or chance-level cell remains in the grid.

B1 advances only if all mechanical checks pass and:

- clean DP reaches at least 70% validation accuracy at epoch 20;
- common bias stays within 0.2 accuracy points of clean DP and its teaching
  difference relative error is at most `1e-6`;
- at some activity-bias ratio, raw is at least 5 accuracy points below clean
  or becomes nonfinite, while innovation is within 2 points of clean and
  within 1 point of oracle;
- innovation's post-subtraction nuisance RMS is at most `1e-3` of its raw
  nuisance RMS;
- every predictor report records zero task-instruction observations.

The selected confirmation ratio is the largest activity-bias ratio satisfying
the innovation conditions.  If none exists, no confirmation is opened.

## B2: untouched confirmation

If B1 passes, B2 freezes five new model/minibatch seeds before running clean,
raw, innovation, and oracle at the selected activity-bias ratio for the full
130-epoch author schedule.  Each seed uses identical initialization and batch
order across conditions.  Accuracy, finite status, gradient alignment,
teaching-difference error, wall time, task-loss queries, and neutral
observations are reported.  Test is evaluated once only after the complete
seed panel exists.

The paper-facing claim requires the paired innovation-minus-raw accuracy gain
to be positive in all five seeds, a one-sided 95% lower bound above 3 points,
innovation within 1 point of oracle on average, and no nonfinite innovation
run.  Failure narrows or closes the contrastive-bias claim; seeds and ratios
are not removed after inspection.

## Later extensions

Random zero-mean noise, slowly drifting bias, missing neutral observations,
and EP are separate experiments.  Random noise is expected not to be removed
by the affine innovation and is a negative control.  EP task-accuracy evidence
is allowed only after its clean matched implementation learns above chance;
otherwise only equation-level EP checks may be reported.