Fast neural Poincare maps for toroidal magnetic fields

J. W. Burby, Qi Tang2020 · DOI

TL;DR

This paper introduces "HénonNets," a novel neural network architecture designed to accurately and efficiently learn Poincaré maps for toroidal magnetic fields. By leveraging the symplectic nature of these maps, HénonNets can significantly accelerate simulations of plasma confinement, offering a new avenue for designing magnetic field configurations.

What Problem Does This Paper Address?

Accurately simulating the behavior of magnetic fields, particularly in fusion energy devices, is crucial for understanding plasma confinement. A key tool for this is the Poincaré map, which visualizes the intersections of magnetic field lines. However, generating these maps traditionally involves numerically integrating field lines, a computationally intensive process that is slow and difficult to parallelize. This bottleneck hinders rapid exploration of magnetic field designs. The paper addresses this by proposing a neural network approach that can learn these complex maps much faster than traditional methods while preserving essential physical properties.

Methods

The core innovation is the HénonNet, a neural network architecture built from Hénon layers. Each Hénon layer is based on the Hénon map, a fundamental building block in dynamical systems theory known for its symplectic properties. The paper leverages a theoretical result showing that any symplectic map can be approximated by compositions of Hénon maps.

Key aspects of the method include:

  • Symplectic Architecture: The HénonNet is designed to be inherently symplectic, meaning it preserves the magnetic flux, a critical physical constraint for Poincaré maps. This is achieved by ensuring each layer is a symplectic map.
  • Feed-Forward Neural Networks (FNNs): The "potentials" within the Hénon layers are implemented as FNNs, allowing for flexible function approximation.
  • Supervised Learning: The networks are trained using a supervised learning approach. Ground truth Poincaré maps are generated using a high-order Runge-Kutta (RK4) method, and the HénonNet learns to replicate these maps.
  • Mean Squared Error (MSE) Loss: The training objective is to minimize the MSE between the network's predicted map and the ground truth map.

Datasets

The paper uses synthetic datasets generated from well-defined Hamiltonian systems to train and evaluate the HénonNets. These include:

  • Pendulum Hamiltonian: A simple, integrable system used to test the network's ability to learn Poincaré maps, including those with separatrices.
  • Perturbed Pendulum Hamiltonian: A more complex, potentially integrable system with regular phase portraits.
  • Prototypical Resonant Magnetic Perturbation (RMP) Hamiltonian: A non-integrable Hamiltonian mimicking magnetic fields in fusion devices, designed to test the network's performance on realistic, chaotic systems.

For training, points are sampled within specific regions (disks, ellipses) of the phase space. The ground truth labels are generated by RK4 integration over a specified number of time steps (e.g., 2π for Poincaré maps).

Key Insights and Ideas

  • "Physics-Informed" Neural Networks: HénonNets are "physics-informed" because their architecture inherently enforces the symplectic (flux-preserving) property, a crucial physical constraint. This leads to more robust and accurate learning.
  • Faster Evaluation: Once trained, HénonNets can evaluate Poincaré maps orders of magnitude faster than traditional numerical integration methods. This is a significant advantage for tasks requiring many map evaluations, such as optimization or design exploration.
  • Learning Complex Dynamics: The HénonNet demonstrated an ability to learn intricate structures, including island chains and chaotic regions, in complex magnetic field configurations.
  • "Engineered Confinement": In one experiment, the HénonNet learned to mimic confinement properties by "coiling hyperbolic invariant manifolds." This suggests a novel approach to designing magnetic fields for confinement, potentially by engineering these structures rather than solely relying on KAM tori. This is a remarkable emergent behavior from the training process.
  • Easier Training than SympNets: The paper suggests HénonNets are easier to train and require less layer depth than existing symplectic neural network architectures (SympNets), despite having fewer trainable parameters in some comparisons.

Key Results

  • Speedup: HénonNets achieved speedups of up to an order of magnitude in evaluating Poincaré maps compared to vectorized RK integrators. For example, generating a Poincaré plot took 2.6 seconds with a HénonNet versus 7.8 seconds with RK4 for a simple ODE, and 4.26 seconds versus 34.2 seconds for a more complex RMP case.
  • Accuracy: The learned Poincaré maps from HénonNets closely matched reference RK4 solutions, preserving total energy well. For the pendulum, the training loss was on the order of $10^{-7}$, and test loss was similar.
  • Performance Comparison: In a comparison with SympNets on a pendulum flow map task, HénonNets achieved significantly lower training and test losses (e.g., $2.8 \times 10^{-7}$ vs. $1.9 \times 10^{-5}$ for HénonNet vs. SympNet, respectively) with fewer epochs.
  • Capturing Fine Structures: The HénonNet successfully captured intricate details like 13 island chains in the RMP case, demonstrating its ability to learn complex, non-linear dynamics.

Limitations and Future Work

  • Training Time: While evaluation is fast, the initial training phase for HénonNets can be time-consuming, especially for complex systems. This makes them most beneficial when a large number of predictions are needed.
  • Hyperparameter Optimization: The paper notes that hyperparameters were chosen based on heuristics, and further optimization could improve performance.
  • Understanding Emergent Behavior: The "engineered confinement" observed in the RMP case is a fascinating emergent property. Further investigation into the mechanism behind this phenomenon is warranted to harness its potential for magnetic field design.
  • Multi-grid Training Strategies: The authors suggest exploring multi-grid-like strategies for training network layers to improve efficiency.
  • Learning Discrepancy: An alternative approach proposed is to use HénonNets to learn the discrepancy between a ground truth Poincaré map and a simpler, explicit map like the "tokamap," effectively learning the "missing physics."
  • Automatic Architecture Discovery: Exploring automated methods for architecture selection could lead to more optimal HénonNet designs.
  • Derivatives and Dynamical Properties: The paper highlights that computing derivatives of HénonNets is straightforward, enabling efficient calculation of dynamical properties like Lyapunov exponents, which is computationally expensive for traditional methods. This is a promising area for future analysis.

Summary updated

Abstract

We demonstrate how to build symplectic neural networks to approximate Hamiltonian and Poincare maps in this notebook. Two examples are given: a simple pendulum and a pertubed pendulum.
BibTeX
@misc{burby2020fast,
  author = {J. W. Burby and Qi Tang},
  title = {{Fast neural Poincare maps for toroidal magnetic fields}},
  year = {2020},
  doi = {10.2172/1637687},
}
Figure