You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Phase 3: Natural-gradient EM rewrite (new module) #12
Part of epic #9. Depends on Phase 1 gate. Implements ADR 0001.
Scope
New backend torch_impl/amica_torch_ng.py: vectorized closed-form E-step (responsibilities z, v) and M-step (alpha, mu, beta, rho, A natural gradient, c) ported from NumPy pyAMICA.py:505-730.
Parameterize W directly (no pinv per forward). Broadcast over (model, mix, source, block); no Python loops in the hot path.
Block-wise sufficient-statistic accumulation (O(block) memory, streaming). float64 for parity; float32 option for speed. No Adam/autograd for updates.
Match Fortran initialization (seed, A=I+0.01*(0.5-rand), mu=linspace(-1,1)+jitter, beta, rho0=1.5) for trajectory parity.
Keep amica_torch.py until the new module passes the parity gate, then point public AMICA at it.
Done when
Component correlation vs Fortran > 0.95 on sample data; per-channel LL within tolerance; runs on CPU and MPS; memory scales with block size not recording length.
Activity
neuromechanist commentedon Jul 3, 2026
Phase 3 (natural-gradient EM rewrite, AMICATorchNG) delivered via epic #9, on main in PR #28. Closing.