summaryrefslogtreecommitdiff
path: root/notes/01_theory_notes.md
blob: d0ac8da9e496e4eaccd759d1da8b554a926dfd1f (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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
# Theory Notes

## Notation

MLP widths:

\[
n_0,n_1,\dots,n_L.
\]

Forward weights:

\[
W_l\in \mathbb R^{n_l\times n_{l-1}}.
\]

For ordinary FA, feedback matrix for layer \(l\):

\[
B_l\in \mathbb R^{n_l\times n_{l+1}},
\]

which replaces:

\[
W_{l+1}^{\top}\in \mathbb R^{n_l\times n_{l+1}}.
\]

Matrix direction dimension:

\[
D_l=n_l n_{l+1}.
\]

## Candidate Theorem 1: Static Alignment Distribution

Assume:

- \(A_l=W_{l+1}^{\top}\).
- \(A_l/\|A_l\|_F\) and \(B_l/\|B_l\|_F\) are independent isotropic directions in \(\mathbb R^{D_l}\).

Define:

\[
Q_l =
\frac{
\langle A_l,B_l\rangle_F^2
}{
\|A_l\|_F^2\|B_l\|_F^2
}.
\]

Then:

\[
Q_l\sim
\mathrm{Beta}\left(\frac12,\frac{D_l-1}{2}\right).
\]

Consequences:

\[
\mathbb E[Q_l]=\frac1{D_l}.
\]

\[
D_lQ_l \Rightarrow \chi_1^2
\quad
\text{as } D_l\to\infty.
\]

Tail:

\[
\Pr(Q_l\ge q)
=
1-I_q\left(\frac12,\frac{D_l-1}{2}\right).
\]

High-dimensional approximation to refine:

\[
\Pr(Q_l\ge q)
\lesssim
2\exp\left[-\frac{(D_l-1)q}{2}\right].
\]

## Capacity Definition

For a required alignment threshold \(q\):

\[
C_l(q)
=
-\log \Pr(Q_l\ge q).
\]

Under the beta law:

\[
C_l(q)
=
-\log
\left[
1-I_q\left(\frac12,\frac{D_l-1}{2}\right)
\right].
\]

High-dimensional approximation:

\[
C_l(q)
\approx
\frac{D_l-1}{2}\log\frac1{1-q}.
\]

Small-\(q\) approximation:

\[
C_l(q)\approx \frac{D_l q}{2}.
\]

Open detail: decide whether logs are natural logs or base-2 bits. Use natural logs in theorem statements unless the paper explicitly wants bit units.

## Candidate Corollary 1: Multilayer Scaling

If layerwise feedback matrices are independent and act on distinct matrix blocks, then:

\[
p_{\mathrm{all}}
=
\prod_l
\Pr(Q_l\ge q_l),
\]

and:

\[
C_{\mathrm{all}}
=
\sum_l C_l(q_l).
\]

Interpretation:

- Log-capacity cost is additive.
- Raw feasible volume is multiplicative.

Equal-width case:

\[
D_l\approx n^2.
\]

Fixed threshold \(q>0\):

\[
C_{\mathrm{all}}=\Theta(Ln^2).
\]

Chance-level threshold \(q=c/D_l\):

\[
C_l\approx c/2,
\qquad
C_{\mathrm{all}}=\Theta(L).
\]

## Candidate Corollary 2: Observed Capacity Distribution

The threshold cost \(C_l(q)\) is deterministic once \(q\) is chosen. For empirical distribution matching, define the observed alignment surprisal:

\[
S_l
=
-\log \Pr(Q_l'\ge Q_l),
\]

where \(Q_l'\) is an independent draw from the same beta law as \(Q_l\). If:

\[
Q_l\sim \mathrm{Beta}\left(\frac12,\frac{D_l-1}{2}\right),
\]

and the survival function is continuous, then by the probability integral transform:

\[
U_l=\Pr(Q_l'\ge Q_l)\sim \mathrm{Uniform}(0,1),
\]

so:

\[
S_l=-\log U_l\sim \mathrm{Exp}(1).
\]

For \(L\) independent feedback-aligned layers, the observed total capacity surprisal is:

\[
S_{1:L}=\sum_{l=1}^L S_l.
\]

If the layerwise feedback matrices are independent, then:

\[
S_{1:L}\sim \mathrm{Gamma}(L,1).
\]

This is useful because it predicts a full distribution rather than only a mean or bound. It also shows that after the beta-tail transform, the null distribution of observed capacity surprisal is dimension-free; dimension enters through the raw \(Q_l\) scale and the threshold cost \(C_l(q)\), not through the transformed surprisal law.

## Candidate Theorem 2: Prior-Free Minimax Bound

Let:

\[
\hat b=\frac{\operatorname{vec}(B)}{\|B\|_F}\in\mathbb S^{D-1}.
\]

Any feedback initialization distribution \(\mu\) induces:

\[
M_\mu=\mathbb E_\mu[\hat b\hat b^\top],
\qquad
\operatorname{tr}M_\mu=1.
\]

For target direction \(a\in\mathbb S^{D-1}\):

\[
\mathbb E_\mu[(a^\top \hat b)^2]=a^\top M_\mu a.
\]

Since:

\[
\lambda_{\min}(M_\mu)\le \frac{\operatorname{tr}M_\mu}{D}=\frac1D,
\]

we have:

\[
\inf_{\|a\|=1}
\mathbb E_\mu[(a^\top \hat b)^2]
\le
\frac1D.
\]

Thus:

\[
\sup_\mu
\inf_{\|a\|=1}
\mathbb E_\mu[(a^\top \hat b)^2]
=
\frac1D.
\]

Isotropic initialization attains this bound.

### Proof Sketch

The proof only needs second moments. For any feedback initialization \(\mu\), define:

\[
M_\mu=\mathbb E_\mu[\hat b\hat b^\top].
\]

Since \(\|\hat b\|=1\):

\[
\operatorname{tr}M_\mu
=
\mathbb E_\mu[\operatorname{tr}(\hat b\hat b^\top)]
=
\mathbb E_\mu[\|\hat b\|^2]
=1.
\]

For any fixed target direction \(a\):

\[
\mathbb E_\mu[(a^\top \hat b)^2]
=
\mathbb E_\mu[a^\top \hat b\hat b^\top a]
=
a^\top M_\mu a.
\]

The worst-case target direction is the minimum-eigenvalue direction of \(M_\mu\):

\[
\inf_{\|a\|=1} a^\top M_\mu a
=
\lambda_{\min}(M_\mu).
\]

Because the average eigenvalue is \(1/D\):

\[
\lambda_{\min}(M_\mu)
\le
\frac1D.
\]

Hence:

\[
\inf_{\|a\|=1}
\mathbb E_\mu[(a^\top \hat b)^2]
\le
\frac1D
\]

for every initialization \(\mu\). If \(\mu\) is isotropic, then:

\[
M_\mu=\frac1D I,
\]

so every direction has:

\[
a^\top M_\mu a=\frac1D.
\]

Thus:

\[
\sup_\mu
\inf_{\|a\|=1}
\mathbb E_\mu[(a^\top \hat b)^2]
=
\frac1D.
\]

This is a worst-case theorem. If the target direction is itself uniformly random, then:

\[
\mathbb E_a[a^\top M_\mu a]
=
\frac{\operatorname{tr}M_\mu}{D}
=
\frac1D
\]

for every \(\mu\). Therefore prior-free average-case alignment over uniform targets cannot distinguish initializations by their mean; the distinction is worst-case coverage, tail behavior, and conditioning.

## Prior-Aware Corollary

If target directions have prior covariance:

\[
\Sigma_A=\mathbb E[aa^\top],
\]

then:

\[
\mathbb E_{a,B}[(a^\top \hat b)^2]
=
\operatorname{tr}(\Sigma_A M_\mu).
\]

Therefore the optimal structured feedback distribution depends on the eigenspectrum of \(\Sigma_A\). Without prior information, isotropy is minimax; with prior information, top-eigenspace feedback can be better.

## Functional Capacity

Let total parameter dimension be:

\[
P=\sum_l n_l(n_{l-1}+1).
\]

Let task Jacobian be:

\[
J=\frac{\partial f_\theta(X)}{\partial \theta}.
\]

Local task rank:

\[
d=\operatorname{rank}(J).
\]

If alignment constraints remove a generic \(k\)-dimensional parameter subspace, then hard local function rank after constraints is:

\[
d_{\mathrm{hard}}=\min(d,P-k).
\]

Hard functional loss:

\[
\Delta d_{\mathrm{hard}}
=
d-d_{\mathrm{hard}}
=
\max(0,k-(P-d)).
\]

Interpretation:

- \(P-d\) is the local redundant parameter dimension.
- If \(k\le P-d\), generic alignment constraints can be absorbed by redundant directions without reducing hard local function rank.
- If \(k>P-d\), every additional generic constraint reduces hard local function rank one-for-one.

This gives the proposed FA/BP functional-gap onset: parameter-volume cost can grow before the model loses hard function rank, but once the alignment burden exhausts redundancy, FA should separate from BP more sharply.

Soft overlap model. Let \(E\) be the alignment constraint subspace and \(S\) be the task-sensitive subspace:

\[
T_k=\operatorname{tr}(P_E P_S).
\]

For random subspaces:

\[
\mathbb E[T_k]=\frac{kd}{P}.
\]

Variance:

\[
\operatorname{Var}(T_k)
=
\frac{
2kd(P-k)(P-d)
}{
P^2(P-1)(P+2)
}.
\]

Interpretation:

- Hard rank loss has a redundancy-exhaustion threshold.
- Soft conditioning loss can grow approximately linearly from the start.

## Trajectory Bridge

BP gradient:

\[
g_t=\nabla_\theta L(\theta_t).
\]

FA surrogate gradient:

\[
\tilde g_t(B).
\]

Mismatch:

\[
\epsilon_t(B)=\tilde g_t(B)-g_t.
\]

Linearized deviation from the BP trajectory:

\[
\delta\theta_T(B)
\approx
-\eta
\sum_{t<T}
\Phi_{T,t+1}\epsilon_t(B),
\]

where:

\[
\Phi_{T,t+1}
=
\prod_{s=t+1}^{T-1}(I-\eta H_s).
\]

Second-order excess loss:

\[
\Delta L_T(B)
\approx
\frac12
\delta\theta_T(B)^\top H_T\delta\theta_T(B).
\]

If \(\epsilon_t(B)\) is approximately Gaussian under random \(B\), then:

\[
\Delta L_T(B)
\approx
\frac12\sum_i \lambda_i\chi_i^2.
\]

This should be treated as a bridge approximation, not as a primary architecture-only theorem.

### First Empirical Bridge Variant

For a concrete first trajectory-distribution predictor, ignore the Hessian propagation factors and integrate the FA/BP gradient mismatch along the BP path:

\[
\widehat{\delta\theta}_T(B)
=
-\eta
\sum_{t<T}
\left[
g_t^{\mathrm{FA}}(\theta_t^{\mathrm{BP}};B)
-
g_t^{\mathrm{BP}}(\theta_t^{\mathrm{BP}})
\right].
\]

Then predict the final FA/BP loss gap by evaluating the loss at the BP endpoint plus this bridge deviation:

\[
\widehat{\Delta L}_T(B)
=
L(\theta_T^{\mathrm{BP}}+\widehat{\delta\theta}_T(B))
-
L(\theta_T^{\mathrm{BP}}).
\]

This is expected to be misscaled when curvature and contraction along the BP path are important. It is still useful as a distributional shape test: if the standardized \(\widehat{\Delta L}_T(B)\) distribution matches the standardized empirical \(\Delta L_T(B)\) distribution, then the bridge captures the random-feedback shape but not yet the absolute scale. A stronger next theorem should include a curvature or response operator replacing the identity propagation used here.