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
Multi-model NG log-likelihood is ~0.02 lower and more variable than Fortran #51
Surfaced by the #27 distributional-equivalence validation (PR #49).
Finding
Running N=20 fits per implementation on the real sample EEG (n_models=2, 100 iters), the partition distributions are statistically equivalent (NG-vs-Fortran cross-corr indistinguishable from Fortran-vs-Fortran; Mann-Whitney p=0.97, TOST equivalent within ±0.05). But the log-likelihood distributions differ:
mean LL (per sample-channel)
sd
Fortran
-3.3545
0.003
NG
-3.3738
0.040
KS p ~ 1e-5. NG is ~0.019 lower on average and ~13x more variable; one seed converged to ~-3.55 (a stuck run) which drives most of the variance. Fortran reaches essentially the same LL every run despite landing in different (near-degenerate) partitions.
See .context/issue-27/multimodel_distributional_equivalence.md and multimodel_ensemble_distributions.png.
This is optimizer quality, not a correctness bug
The per-block sufficient statistics and one M-step are bit-exact vs Fortran (~1e-15), so the M-step equations are right. The inflated variance (not a uniform mean shift) points to "some seeds settle into slightly worse local optima," i.e. a schedule/convergence issue, not a wrong term.
Candidate causes / next steps
Iteration cap: re-run the ensemble with larger max_iter and see if NG's LL distribution closes onto Fortran's (tests "stopped short").
Schedule mismatch: align NG's lrate ratchet / numdecs / Newton ramp more tightly to Fortran's, re-run ensemble.
Stuck-run tail: characterize the low-LL seeds (does Newton fall back? does a mixture component collapse?) and consider a restart-on-stall (the NumPy backend already has a restart path; NG does not).
Acceptance
NG multi-model LL distribution statistically equivalent to Fortran's (TOST on mean, and comparable variance) on the sample data ensemble. Parent: #27 / epic #9.
Activity
Add multi-model distributional-equivalence validation
Add per-model bias c update for multi-model AMICA (#27) (#49)
Return best iterate from AMICATorchNG.fit (#51)
Address #51 review: degenerate final_ll_, n_kurt_done, tests
Return best iterate from AMICATorchNG.fit (#51) (#53)
docs: consolidate dev docs into .context
docs: consolidate dev docs into .context (#58)
fix: address #68 review findings for component sharing
feat: component sharing (share_comps) in AMICATorchNG (#68)
test: cover mir_history_ vs keep_best restore and save/load
test: cover mir_history_ vs keep_best restore and save/load
Add Fortran convergence criteria to AMICATorchNG (#213)
Phase 2: MLX keep_best (#310)