Scalable physical source-to-field inference with hypernetworks
Abstract: We present a generative model that amortises computation for the field around e.g. gravitational or magnetic sources. Exact numerical calculation has either computational complexity $\mathcal{O}(M\times{}N)$ in the number of sources and field evaluation points, or requires a fixed evaluation grid to exploit fast Fourier transforms. Using an architecture where a hypernetwork produces an implicit representation of the field around a source collection, our model instead performs as $\mathcal{O}(M + N)$, achieves accuracy of $\sim!4\%-6\%$, and allows evaluation at arbitrary locations for arbitrary numbers of sources, greatly increasing the speed of e.g. physics simulations. We also examine a model relating to the physical properties of the output field and develop two-dimensional examples to demonstrate its application. The code for these models and experiments is available at https://github.com/cmt-dtu-energy/hypermagnetics.
- magnum.fe: A micromagnetic finite-element simulation code based on fenics. Journal of Magnetism and Magnetic Materials, 345:29–35, 2013. ISSN 0304-8853. doi: https://doi.org/10.1016/j.jmmm.2013.05.051. URL https://www.sciencedirect.com/science/article/pii/S0304885313004022.
- Aharoni, A. Demagnetizing factors for rectangular ferromagnetic prisms. Journal of Applied Physics, 83(6):3432–3434, March 1998. ISSN 0021-8979, 1089-7550. URL https://doi.org/10.1063/1.367113.
- Accuracy of the analytical demagnetization tensor for various geometries. Journal of Magnetism and Magnetic Materials, 587:171245, 2023.
- MagTense: A micromagnetic framework using the analytical demagnetization tensor. Journal of Magnetism and Magnetic Materials, 535:168057, October 2021. URL https://www.sciencedirect.com/science/article/pii/S0304885321003334.
- JAX: composable transformations of Python+NumPy programs, 2024. URL http://github.com/google/jax.
- Lagrangian Neural Networks, July 2020. URL http://arxiv.org/abs/2003.04630. arXiv:2003.04630 [physics, stat].
- The fast multipole method (fmm) for electromagnetic scattering problems. IEEE Transactions on Antennas and Propagation, 40(6):634–641, 1992. doi: 10.1109/8.144597.
- Harmonic neural networks. In Proceedings of the 40th International Conference on Machine Learning, Icml’23. JMLR.org, 2023.
- A fast algorithm for particle simulations. Journal of Computational Physics, 73(2):325–348, 1987. ISSN 0021-9991. doi: https://doi.org/10.1016/0021-9991(87)90140-9. URL https://www.sciencedirect.com/science/article/pii/0021999187901409.
- Hamiltonian Neural Networks. In Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019. URL https://proceedings.neurips.cc/paper/2019/hash/26cd8ecadce0d4efd6cc8a8725cbd1f8-Abstract.html.
- Griffiths, D. Introduction to Electrodynamics. Pearson, 2013. ISBN 9780321856562. URL https://books.google.dk/books?id=AZx_zwEACAAJ.
- Hypernetworks. In International Conference on Learning Representations, 2017. URL https://openreview.net/forum?id=rkpACe1lx.
- Linearly Constrained Neural Networks, April 2021. URL http://arxiv.org/abs/2002.01600.
- Jackson, J. D. Classical Electrodynamics, 3rd ed. Hoboken, NJ, USA: Wiley, 1999.
- Demagnetizing Field in Nonellipsoidal Bodies. Journal of Applied Physics, 36(5):1579–1593, November 1964. ISSN 0021-8979. URL https://doi.org/10.1063/1.1703091.
- Physics-informed machine learning. Nature Reviews Physics, 3(6):422–440, May 2021. ISSN 2522-5820. doi: 10.1038/s42254-021-00314-5. URL https://www.nature.com/articles/s42254-021-00314-5.
- Equinox: neural networks in JAX via callable PyTrees and filtered transformations. Differentiable Programming workshop at Neural Information Processing Systems 2021, 2021.
- Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
- Magtetris: A simulator for fast magnetic field and force calculation for permanent magnet array designs. Journal of Magnetic Resonance, 352:107463, 2023.
- Müller, E. H. Exact conservation laws for neural network integrators of dynamical systems. Journal of Computational Physics, 488:112234, 2023. ISSN 0021-9991. doi: https://doi.org/10.1016/j.jcp.2023.112234. URL https://www.sciencedirect.com/science/article/pii/S0021999123003297.
- The magnetic field from a homogeneously magnetized cylindrical tile. Journal of Magnetism and Magnetic Materials, 507:166799, August 2020. URL https://www.sciencedirect.com/science/article/pii/S0304885319342155.
- The Stray and Demagnetizing Field of a Homogeneously Magnetized Tetrahedron. IEEE Magnetics Letters, 10:1–5, 2019.
- Magpylib: A free python package for magnetic field computation. SoftwareX, 2020. doi: 10.1016/j.softx.2020.100466.
- Magnetic Field Prediction Using Generative Adversarial Networks. Journal of Magnetism and Magnetic Materials, 571:170556, April 2023. URL http://arxiv.org/abs/2203.07897.
- Random features for large-scale kernel machines. In Platt, J., Koller, D., Singer, Y., and Roweis, S. (eds.), Advances in Neural Information Processing Systems, volume 20. Curran Associates, Inc., 2007. URL https://proceedings.neurips.cc/paper%5Ffiles/paper/2007/file/013a006f03dbc5392effeb8f18fda755-Paper.pdf.
- Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. Journal of Computational Physics, 378:686–707, February 2019. ISSN 0021-9991. doi: 10.1016/j.jcp.2018.10.045. URL https://www.sciencedirect.com/science/article/pii/S0021999118307125.
- Neural Conservation Laws: A Divergence-Free Perspective, December 2022. URL http://arxiv.org/abs/2210.01741. arXiv:2210.01741 [cs].
- Physics-informed machine learning and stray field computation with application to micromagnetic energy minimization. Journal of Magnetism and Magnetic Materials, 576:170761, June 2023. URL https://www.sciencedirect.com/science/article/pii/S0304885323004109.
- Implicit neural representations with periodic activation functions. Advances in neural information processing systems, 33:7462–7473, 2020.
- Full analytical solution for the magnetic field of uniformly magnetized cylinder tiles. Journal of Magnetism and Magnetic Materials, 559:169482, 2022.
- The demagnetizing field of a nonuniform rectangular prism. Journal of Applied Physics, 107(10):103910, May 2010. URL https://doi.org/10.1063/1.3385387.
- Hamiltonian Generative Networks. In International Conference on Learning Representations, April 2020. URL https://openreview.net/forum?id=HJenn6VFvB.
- Deep sets. In Guyon, I., Luxburg, U. V., Bengio, S., Wallach, H., Fergus, R., Vishwanathan, S., and Garnett, R. (eds.), Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc., 2017. URL https://proceedings.neurips.cc/paper%5Ffiles/paper/2017/file/f22e4747da1aa27e363d86d40ff442fe-Paper.pdf.
Paper Prompts
Sign up for free to create and run prompts on this paper using GPT-5.
Top Community Prompts
Collections
Sign up for free to add this paper to one or more collections.