Gary's LIF:Factorial Ordering + Reusable Navigator Rule
Gary's LIF: Factorial Ordering + Reusable Navigator Rule
更新到 Experiment 3.5。這一版特別修正四個最容易混淆的概念: Recovery 是人為指定 target 的修復測試、Adam 是外部 optimizer、 unseen target 不是 target-free inference,以及 \(\eta,T\) 不在 LIF 方程,而在 navigation rule。
Updated through Experiment 3.5, with explicit corrections on recovery, Adam, the true meaning of unseen targets, and the fact that \(\eta,T\) belong to the navigation rule rather than the LIF neuron equation.
§1 Mechanism 到底是什麼What “mechanism” means here
Mechanism = 一套因果運作規則。不是一個 neuron,不是一個 parameter,也不是一個 loss。
Mechanism = a causal operating procedure. It is not a single neuron, parameter, or loss.
目前你的 mechanism 最簡單可以寫成:
The current mechanism can be written as:
如果還沒到 target,就再做一輪。這就是 closed-loop mechanism。
If the target has not been reached, repeat. That repeated feedback process is the closed-loop mechanism.
§2 LIF 本身的函式The LIF neuron function itself
最基本 continuous LIF:
Base continuous LIF:
在 \(V_i(0)=0\)、constant input 下:
With \(V_i(0)=0\) and constant input:
當 \(V_i(t)\) 碰到 \(V_{{th},i}\),第一次 spike time:
When \(V_i(t)\) reaches \(V_{{th},i}\), the first-spike time is:
LIF 函式裡有 \(I,\tau,V_{th},R,V,t^*\)。沒有 \(\eta\),也沒有 \(T_{\rm rule}\)。
The LIF function contains \(I,\tau,V_{th},R,V,t^*\). It does not contain \(\eta\) or \(T_{\rm rule}\).
§3 四個 physical controls 到底在控制什麼What the four physical controls do
| Parameter | 意思 | Meaning | 變大時 | If increased |
|---|---|---|---|---|
| \(I_i\) | input current,外部 drive | input current / external drive | \(t_i^*\downarrow\) | \(t_i^*\downarrow\) |
| \(\tau_i\) | 膜時間常數 | membrane time constant | \(t_i^*\uparrow\) | \(t_i^*\uparrow\) |
| \(V_{{th},i}\) | spike threshold | spike threshold | \(t_i^*\uparrow\) | \(t_i^*\uparrow\) |
| \(R_i\) | membrane resistance | membrane resistance | \(t_i^*\downarrow\) | \(t_i^*\downarrow\) |
3.2 的四個 arm 都成功,就是因為這四種 knob 都能改 first-spike timing;但四個 arm 是分開學,不是同時學 24 個參數。
All four 3.2 arms succeed because each knob can alter first-spike timing; however, the arms are separate, not a joint 24-parameter fit.
§4 為什麼 6 顆 neuron 形成 720 個 ordering statesWhy six neurons form 720 ordering states
state 是「誰先、誰後」的完整關係,不是每顆 neuron 單獨代表一個 class。
The state is the complete relation of who spikes before whom, not one class per neuron.
§5 5-D Navigator 是什麼What the 5-D Navigator is
假設 target:
Suppose the target is:
代表:
Meaning:
Navigator 只看 target 中相鄰的 5 個 gap:
The Navigator uses only the five adjacent gaps in the target order:
M=6 所以是 5-D。這五個關係都對,就會因傳遞性得到完整 ordering。
For M=6 it is 5-D. If all five adjacent relations are satisfied, transitivity determines the full ordering.
Navigator 不會自己猜 target。它需要已知的 \(\pi^*\) 才知道要計算哪五個 gap。
The Navigator does not predict the target. It needs the target \(\pi^*\) in order to know which five gaps to compute.
§6 Loss:怎麼知道 ordering 還差多少Loss: how far the ordering is from the target
strict margin 設:
Set a strict margin:
每一個 gap 的 smooth violation:
Smooth violation for each gap:
總 loss:
Total loss:
如果 \(g_k<0\),順序反了;如果 \(0 If \(g_k<0\), the pair is reversed; if \(0
§7 Gradient 與 Adam:它們到底在哪裡Gradient and Adam: where they sit in the system
3.2 / 3.4B 的流程
The 3.2 / 3.4B pipeline
Gradient 告訴我們「往哪個方向改 parameter 會讓 loss 下降」。
The gradient tells us which direction should reduce the loss.
Adam 是外部 optimizer:它讀 gradient,決定每個 parameter 實際更新多少。
Adam is an external optimizer: it reads the gradient and chooses the actual update size for each parameter.
Adam 不是 LIF neuron 的生物/物理方程。它是我們放在外面的 optimization algorithm。
Adam is not part of the physical/biological LIF neuron equation. It is an external optimization algorithm.
§8 3.0–3.3:到 3.4 前我們已經知道什麼3.0–3.3: what was established before 3.4
| Series | 主要問題 | Main question | 結果 | Result |
|---|---|---|---|---|
| 3.0 | 5-D Navigator 能否直接 gradient-address 720 targets? | Can the 5-D Navigator gradient-address all 720 targets? | 7,200/7,200 exact runs;median 62 steps | 7,200/7,200 exact runs; median 62 steps |
| 3.1 | 任意 source→target,不給 symbolic path 能否到達? | Can arbitrary source→target transitions succeed without a symbolic path? | 518,400/518,400 | 518,400/518,400 |
| 3.2 | 可否直接學 intrinsic LIF parameters? | Can intrinsic LIF parameters themselves be learned? | I、τ、Vth、R 四個獨立 6-value arms 全部 720 targets 成功 | Independent six-value I, τ, Vth, R arms all succeed on all 720 targets |
| 3.3 | cross-node voltage coupling 可否控制 ordering? | Can cross-node voltage coupling control ordering? | 6-value row-shared 與 30-edge directed 都 100% | Both six-value row-shared and 30-edge directed reach 100% |
§9 3.4A — Robustness:加 noise 之後 state 還在嗎3.4A — Robustness: does the state survive noise?
直接拿 3.2 tau arm 的全部 3,600 個成功 solutions,不重新 polish。每一個 noise level 每個 solution 做 100 次 perturbation,共 360,000 trials/level:
Use all 3,600 successful solutions from the 3.2 tau arm without re-polishing. Each solution receives 100 perturbations per noise level, for 360,000 trials per level:
| Noise | Hard-order survival | Strict-margin survival |
|---|---|---|
| 1% | 1.000000 | 0.574211 |
| 2% | 0.999725 | 0.380931 |
| 5% | 0.898042 | 0.173019 |
| 10% | 0.515614 | 0.074081 |
Hard order 只要求沒有 crossing;strict margin 還要求每個 adjacent gap 都至少 0.1。因為原 3.2 runner 第一次跨過 0.1 就停止,所以很多 solution 本來就貼近 margin boundary。
Hard order only requires no crossings; strict margin also requires every adjacent gap to remain at least 0.1. Because the 3.2 runner stopped as soon as 0.1 was crossed, many solutions naturally sit close to the margin boundary.
§10 3.4B — Recovery:壞掉後「人工指定原 target」再修回去3.4B — Recovery: restore a perturbed state using the known original target
Recovery 不是系統自己發現「我錯了」。我們知道原 target \(\pi^*\),故意加 noise,然後重新把同一個 target + 5-D Navigator + Adam 打開,看它能不能修回去。
Recovery does not mean the system autonomously discovers that it is wrong. We know the original target \(\pi^*\), deliberately add noise, then re-enable the same target, 5-D Navigator, and Adam to test whether the system can return.
所以 3.4B 測的是:
Therefore 3.4B measures:
不是:
Not:
| Noise | Initially broken | Conditional recovery | Median steps | Failures |
|---|---|---|---|---|
| 1% | 38,250 | 1.000000 | 1 | 0 |
| 2% | 55,562 | 1.000000 | 1 | 0 |
| 5% | 74,387 | 1.000000 | 2 | 0 |
| 10% | 83,215 | 0.999940 | 4 | 5 |
10% noise 下:
At 10% noise:
所以可以說 highly recoverable / highly self-correctable under the specified target controller,但不能說 autonomous,也不能說 10% 全部修回。
So the states are highly recoverable / self-correctable under the specified target controller, but this is not autonomous and 10% does not achieve perfect recovery.
§11 3.5 — 把 Adam 拿掉:Shared local rule3.5 — Remove Adam: shared local rule
對每一條 target adjacent relation:
For each target-adjacent relation:
先算 gap:
Compute the gap:
再算「這一對需要修多少」:
Then compute “how strongly this pair should be corrected”:
最後直接改 \(\tau\):
Then directly update \(\tau\):
因為:
Because:
所以 early neuron 變快、late neuron 變慢。
Thus the early neuron is accelerated and the late neuron is delayed.
3.2 是「loss → gradient → Adam → \(\tau\)」。3.5 是「Navigator → 固定 local rule → \(\tau\)」。test-time 不再需要 Adam。
3.2 uses “loss → gradient → Adam → \(\tau\).” 3.5 uses “Navigator → fixed local rule → \(\tau\).” Adam is no longer needed at test time.
§12 \(\eta\) 和 \(T_{\rm rule}\) 到底在哪裡Where exactly \(\eta\) and \(T_{\rm rule}\) live
LIF neuron dynamics
LIF neuron dynamics
決定「現在這顆 neuron 何時 spike」。
Determines when the neuron spikes right now.
Navigation / plasticity dynamics
Navigation / plasticity dynamics
決定「下一輪 \(\tau\) 要怎麼改」。
Determines how \(\tau\) changes for the next round.
| Symbol | 角色 | Role | 是不是 LIF physical parameter? | LIF physical parameter? |
|---|---|---|---|---|
| \(\tau\) | 膜時間常數 | membrane time constant | Yes | Yes |
| \(V_{th}\) | threshold | threshold | Yes | Yes |
| \(R\) | membrane resistance | membrane resistance | Yes | Yes |
| \(I\) | input drive | input drive | 通常視為 control/input | usually a control/input |
| \(\eta\) | 每一輪改多大步 | update step size | No | No |
| \(T_{\rm rule}\) | rule 對 gap violation 的敏感度 | sensitivity of the rule to gap violation | No | No |
之後最好分成兩類:LIF physical parameters = \(I,\tau,V_{th},R\);navigation-rule parameters = \(\eta,T_{\rm rule}\)。
Use two categories: LIF physical parameters = \(I,\tau,V_{th},R\); navigation-rule parameters = \(\eta,T_{\rm rule}\).
§13 3.5.0 — Fixed analytic rule3.5.0 — Fixed analytic rule
完全不 learn rule,直接固定:
Do not learn the rule; simply fix:
| 設定 | Setting | Result |
|---|---|---|
| targets | targets | 720 |
| starts / target | starts / target | 20 |
| episodes | episodes | 14,400 |
| hard + strict-margin | hard + strict-margin | 14,400 / 14,400 |
| median steps | median steps | 8 |
| max steps | max steps | 16 |
這一步已經證明:per-instance Adam 不是必要條件。一條固定的 shared local rule 已足以完成 M6 target ordering navigation。
This establishes that per-instance Adam is not necessary. A fixed shared local rule is sufficient for M6 target-order navigation.
§14 3.5.1 — Train once:只學兩個 global numbers3.5.1 — Train once: learn only two global numbers
這裡 training 不再為每個 target 學 6 個 \(\tau_i\)。只學整套 rule 共用的:
Training no longer learns six \(\tau_i\)'s per target. It learns only the two globally shared rule parameters:
學到:
Learned values:
然後 freeze。
Then freeze them.
「train once」只表示 \(\eta,T\) 用 training set 調一次,之後 test 不再改。它不表示系統已學會在沒有 target 的情況下自己決定 target。
“Train once” only means \(\eta,T\) are fit once on the training set and then remain fixed at test time. It does not mean the system can determine the target without being given one.
§15 3.5.2 — Unseen target 的真正含義3.5.2 — What “unseen target” really means
720 個 target permutations:
Out of 720 target permutations:
220 個 held-out target 在 training 時完全沒有用來調 \(\eta,T\)。這就是「unseen target」。
The 220 held-out targets are never used to fit \(\eta,T\). That is the meaning of “unseen target.”
Test 時仍然人工提供 target permutation。例如 test target 是 \(526143\),Navigator 就直接根據 \(526143\) 建立五個 adjacent relations。
The target permutation is still explicitly supplied at test time. If the test target is \(526143\), the Navigator directly constructs the five adjacent relations implied by \(526143\).
所以 3.5.2 證明:
Therefore 3.5.2 establishes:
它沒有證明:
It does not establish:
| Test | Episodes | Success | Median steps | Max |
|---|---|---|---|---|
| 220 held-out targets × 20 unseen starts | 4,400 | 4,400 / 4,400 | 9 | 17 |
test-time autograd = 無;test-time optimizer = 無;target-specific learned values = 0。
Test-time autograd = none; test-time optimizer = none; target-specific learned values = 0.
§16 和 next-token prediction 的真正差別The real difference from next-token prediction
目前 3.5
Current 3.5
test 時已知道正確 target \(\pi^*\)。研究問題是:
The correct target \(\pi^*\) is known at test time. The question is “HOW do I move there?”
Next-token inference
Next-token inference
test 時沒有正確 \(y\)。模型必須自己從 context \(x\) 決定應該輸出什麼。
At test time the correct \(y\) is absent. The model must infer the output from context \(x\).
例如 training 時:
For example, during training:
可以用正確 next token 算 loss。但 freeze 後 user 真的打 prompt 時,模型沒有「mat」這個答案餵進去。
The correct next token can be used to compute training loss. After freezing, however, the answer “mat” is not supplied when a real user provides the prompt.
所以現在我們已經很接近解完 HOW to navigate;還沒解的是 WHERE should the system go?
We are close to solving HOW to navigate; the unsolved part is WHERE should the system go?
真正 next-token-like 的未來版本應該是:
A truly next-token-like future version should be:
test 時不再直接提供 \(\pi^*\)。
At test time, \(\pi^*\) is no longer directly supplied.
§17 和 snnTorch LIF 的差異(更新版)Difference from snnTorch LIF (updated)
| 面向 | Aspect | Gary's current system | snnTorch Leaky | |
|---|---|---|---|---|
| 核心表示 | Representation | first-spike permutation \(\pi\) | spike / membrane state per discrete timestep | |
| 時間 | Time | continuous / exact first-spike in 3.0–3.2 | discrete recurrence | |
| 典型 gradient | Typical gradient | 3.0–3.2 可直接對 exact \(t^*\) 微分 | hard spike 通常配 surrogate gradient | 3.0–3.2 differentiate exact \(t^*\) directly |
| learnable decay | Learnable decay | \(\tau_i\) | \(\beta_i\), supported by API | |
| learnable threshold | Learnable threshold | \(V_{th,i}\) | supported by API | |
| 特殊點 | Distinctive point | 把 \(M!\) first-spike ordering 當 state substrate,並用 Navigator / local rule 導航 | library 本身不定義這種 factorial ordering-navigation objective | treats \(M!\) first-spike ordering as the state substrate and navigates it with a Navigator/local rule |
「LIF parameter 可以 learn」不是新發明。真正不同的是 first-spike permutation state + \(M-1\)-D Navigator + small reusable navigation rule 這個組合。
“LIF parameters can be learned” is not new. The distinctive contribution is the combination of first-spike permutation state, an \(M-1\)-D Navigator, and a small reusable navigation rule.
§18 目前最精確的 Claim boundaryCurrent claim boundary
已建立
Established
- M=6 nominal ordering space 為 \(6!=720\)。
- For M=6, the nominal ordering space is \(6!=720\).
- 5-D Navigator 可以 per-instance gradient-address 全部 720 targets。
- The 5-D Navigator can per-instance gradient-address all 720 targets.
- 全部 518,400 ordered source→target transitions 可達。
- All 518,400 ordered source→target transitions are reachable.
- 單獨控制 \(I,\tau,V_{th},R\) 任一 family 都可完成全部 target addressing。
- Any one of \(I,\tau,V_{th},R\) alone can support all target addressing.
- 3.4 建立 tested perturbation 下的 hard/margin survival curves 與指定 target 下的 conditional recovery。
- 3.4 establishes hard/margin survival curves and target-specified conditional recovery under the tested perturbations.
- 3.5 建立不用 per-instance Adam 的固定 local rule。
- 3.5 establishes a fixed local rule without per-instance Adam.
- 只學兩個 global rule values 後 freeze,可對 220 held-out permutation labels 與 unseen starts 完成 4,400/4,400 navigation episodes。
- After learning and freezing only two global rule values, the system succeeds on 4,400/4,400 episodes involving 220 held-out permutation labels and unseen starts.
尚未建立
Not established
- Target-free inference:test 時目前仍直接提供 \(\pi^*\)。
- Target-free inference: \(\pi^*\) is still supplied at test time.
- semantic / task generalization。
- Semantic / task generalization.
- next-token-style「只有 context,自己決定應去哪個 ordering」能力。
- Next-token-style inference where only context is given and the target ordering must be inferred.
- autonomous biological plasticity / STDP。
- Autonomous biological plasticity / STDP.
- M>6 scaling。
- Scaling beyond M=6.
- observation noise、spike jitter、joint intrinsic/coupling noise。
- Observation noise, spike jitter, and joint intrinsic/coupling noise.
「M=6 的 tau-controlled LIF ordering substrate 可由一條 shared、two-endpoint、permutation-equivariant local rule,在 test time 不使用 gradient/optimizer 的情況下,導航到明確指定的未見 target permutation;但 target 本身仍由外部提供。」
“The M=6 tau-controlled LIF ordering substrate can be navigated to an explicitly specified unseen target permutation by a shared two-endpoint permutation-equivariant local rule without test-time gradients or an optimizer; however, the target itself is still externally supplied.”
§19 下一步:現在真正分成兩條線Next step: the research now splits into two clean lines
3.6 — Scaling
3.6 — Scaling
看同一條 local rule 是否能從 M=6 擴展到 M=4,8,10。
特別重要:直接 freeze M6 的 \(\eta,T\) 去 M8/M10,測 rule 是否真的與 M 無關。
3.7 — Functional / target-free
3.7 — Functional / target-free
把「人工提供 \(\pi^*\)」拿掉。
這才真正接近 next-token prediction 類型的 inference:training 有答案,freeze 後 test 沒答案。
目前已很強地回答 HOW to move through the factorial LIF ordering space;下一個真正大的未解問題是 WHERE should the system move when the target is not supplied?
The current work strongly addresses HOW to move through the factorial LIF ordering space. The next major open problem is WHERE should the system move when the target is not supplied?