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
General queries and interest in completeness of the project #206
Hi, thank you for taking the time to implement this in torch such that it is also compatible in mne-python. As you may have seen, I have also given AI tools a go at reimplementing it in torch and have uploaded it too. However, since this is an official repository by the team who did the initial implementation, I was curious in the completeness and some other miscellaneous questions.
I am interested in using AMICA in a project in a multiverse analysis that I am writing using MNE-python. I was wondering if the current state of the repository is safe enough to use for this sort of purpose. I ask, because I can see that you have just recently started and I am unsure to what extent it is safe enough to use for publication work. I see that you have a section on validation, however I would still appreciate just the general thoughts from you personally. Otherwise, I would just write a small wrapper around using the binary (however CUDA support is just too nice!).
I am curious if you could answer me to what extent using AMICA on f32 has a disadvantage over the f64 versions. I understand the motivation to add and prominantly showcase f32 benchmarks as GPUs basically got rid of their f64 compute in favour of f32 for LLMs and such. However, I would guess that the result would be significantly worse than the f64 version? The correlation only being at 0.971 does sound quite significant difference. An answer of your views and thoughts on this would be greatly appreciated.
I have uploaded my version to pypi under pyamica. I see that you initially called it the same, but have gone through the process of changing it to pamica. However, since you are the official implementation, I would like to offer you the name on pypi if it is your preferred name. Just let me know and we can figure it out.
Thank you in advance for any responses!
EDIT:
Just went through your project and saw that you are not using compiled graphs. In my implementation this ended up giving some pretty significant speedups, especially for longer runs. Give it a go!
float32. The 0.971 in the docs is not the float32 penalty. That row compares native-Fortran-float64 against PyTorch-CUDA-float32, so it carries the cross-implementation difference and the precision difference together. The same-implementation contrast is the third row, 0.979, and the eight torch/MLX device x precision combinations agree with each other at 1.000.
Your question turned up something more fundamental than a mislabeled row, though. At k=152 the float32 arm hit the natural-gradient learning-rate floor at iteration 1735 and stopped early, while the float64 arms ran the full 2000. So those runs are not length-matched, and none of the three numbers cleanly isolates precision. The table cannot support a float32 conclusion in either direction. Re-running it with all arms pinned to a matched budget is now #209, and until that lands the honest answer to your question is that we do not have a trustworthy number. That came out of your asking, so thank you.
Publication use. Single-model, float64, do_newton=0 is the validated configuration: 0.998 Hungarian-matched component correlation against the reference binary on a well-determined recording, and score functions exact to ~1e-15 against the literal Fortran expressions. That is the path I would use for published work today. Two caveats: with Newton enabled from independent random seeds, some of the weakest under-determined components can land in a different basin of equal or higher likelihood, and multi-model is validated distributionally rather than pointwise, since a mixture of ICA models is not partition-identifiable. Both are written up in the validation guide.
torch.compile. Never tried it. Filed as #211, good call.
PyPI name. Appreciated, but keep pyamica. We are settled on pamica and a handover would just churn both sets of users.
On maintenance: pAMICA is a dependency of work we run downstream, so it gets maintained because we need it.
Publication use -- single-model, float64, do_newton=0 is the validated path (0.998 component correlation against the reference binary).
PyPI name -- staying pamica.
Since you opened this, two things you flagged have turned into real work: #211, and the rank-deficiency handling in #223 (found via a MEG user in #221, but the same class of gap you were probing at). Thanks for the careful read -- issues from outside the author group are how most of this surfaces.
Reopen if anything above is unresolved on your end.
Activity
Address independent paper review
neuromechanist commentedon Aug 9, 2026
Thanks for these.
float32. The 0.971 in the docs is not the float32 penalty. That row compares native-Fortran-float64 against PyTorch-CUDA-float32, so it carries the cross-implementation difference and the precision difference together. The same-implementation contrast is the third row, 0.979, and the eight torch/MLX device x precision combinations agree with each other at 1.000.
Your question turned up something more fundamental than a mislabeled row, though. At k=152 the float32 arm hit the natural-gradient learning-rate floor at iteration 1735 and stopped early, while the float64 arms ran the full 2000. So those runs are not length-matched, and none of the three numbers cleanly isolates precision. The table cannot support a float32 conclusion in either direction. Re-running it with all arms pinned to a matched budget is now #209, and until that lands the honest answer to your question is that we do not have a trustworthy number. That came out of your asking, so thank you.
Publication use. Single-model, float64,
do_newton=0is the validated configuration: 0.998 Hungarian-matched component correlation against the reference binary on a well-determined recording, and score functions exact to ~1e-15 against the literal Fortran expressions. That is the path I would use for published work today. Two caveats: with Newton enabled from independent random seeds, some of the weakest under-determined components can land in a different basin of equal or higher likelihood, and multi-model is validated distributionally rather than pointwise, since a mixture of ICA models is not partition-identifiable. Both are written up in the validation guide.torch.compile. Never tried it. Filed as #211, good call.PyPI name. Appreciated, but keep
pyamica. We are settled onpamicaand a handover would just churn both sets of users.On maintenance: pAMICA is a dependency of work we run downstream, so it gets maintained because we need it.
Add JOSS-required sections and address independent paper review (#210)
neuromechanist commentedon Aug 15, 2026
Closing: every question here is answered above, and the two follow-ups it produced are tracked on their own.
torch.compile-- Evaluate torch.compile for AMICATorchNG #211, still open.do_newton=0is the validated path (0.998 component correlation against the reference binary).pamica.Since you opened this, two things you flagged have turned into real work: #211, and the rank-deficiency handling in #223 (found via a MEG user in #221, but the same class of gap you were probing at). Thanks for the careful read -- issues from outside the author group are how most of this surfaces.
Reopen if anything above is unresolved on your end.