Harmonic Neural Networks

Atiyo Ghosh, Antonio Andrea Gentile, Mario Dagrada, Chul Lee, Seong-Hyok Sean Kim, Hyukgeun Cha, Yunjun Choi, Dongho Kim, Jeong-il Kye, Vincent Emanuel ElfvingICML 2023

Introduction

Many physical phenomena—from the way heat spreads across a metal plate to the electric potential surrounding a conductor—are described by harmonic functions. Mathematically, these are solutions to Laplace’s equation ($\nabla^2\phi = 0$). Beyond physics, harmonic functions are highly prized in robotics for path planning because they are guaranteed to have no local minima; a robot following the gradient of a harmonic function will never get "stuck" before reaching its destination.

While standard neural networks are universal function approximators, they possess no inherent "knowledge" of physics. The current state-of-the-art approach, Physics-Informed Neural Networks (PINNs), attempts to remedy this by adding a penalty term to the loss function. However, this "soft constraint" often struggles to perfectly satisfy the underlying differential equations, leading to unphysical solutions or requiring massive amounts of data and training time to converge.

This paper asks a fundamental question: Can we design a network that is harmonic by construction? By developing "Harmonic Neural Networks," researchers have successfully baked Laplace’s equation directly into the architecture of both classical and quantum neural networks, significantly outperforming standard PINNs.

Architectural Strategies

The authors propose three primary architectural strategies to enforce harmonicity as a hard constraint, alongside a quantum implementation:

  1. Holomorphic Networks (2D): In two dimensions, the real part of any complex-differentiable (holomorphic) function is automatically harmonic. The authors build networks that take complex inputs and use holomorphic activation functions (like sin or exp). This ensures the output satisfies Laplace’s equation perfectly, regardless of the learned weights.
  2. Multiholomorphic Networks: For complex shapes with "holes" (multiply-connected domains), a single holomorphic function is insufficient. The authors utilize domain decomposition—splitting the space into simpler pieces and "stitching" them together using a continuity loss.
  3. Curl-Driven Networks (CurlNet): Because holomorphic properties do not easily scale to 3D, the authors leverage a vector calculus identity: the divergence of a curl is always zero ($\nabla \cdot (\nabla \times A) = 0$). By representing the gradient of a potential as the curl of a secondary neural network, they create an inductive bias toward divergence-free fields, which are closely related to harmonic potentials.
  4. Quantum Implementation: These concepts are extended to Quantum Neural Networks (QNNs) using "Imaginary Feature Maps" (IQFM), demonstrating that quantum circuits can also be designed to respect these exact physical symmetries.

Experimental Setup

The researchers evaluated their models against synthetic benchmarks where the ground truth is known via Finite Element Methods (FEM) or analytical solutions. The tasks included modeling steady-state temperature in a square box and around a triangular heater, calculating the potential in a box containing different dielectric materials (electrostatics), finding a path through a pre-explored corridor (robot navigation), and modeling potential flow through a 3D square pipe.

Comparison of model predictions on a multiply-connected domain (a triangular heater). Multiholomorphic and CurlNet architectures closely match the benchmark compared to standard PINNs.

Results & Insights

By restricting the hypothesis space to only physically valid functions, Harmonic Neural Networks learn faster and more accurately than baseline methods.

  • Massive Accuracy Gains: In the electrostatics task, the Holomorphic network achieved a Root Mean Squared Error (RMSE) of 0.3, compared to 6.7 for a standard PINN—a 20x improvement. In the multiply-connected heater problem, the Multiholomorphic approach reached an RMSE of 0.2, while the standard PINN lagged at 2.4.
  • Exactness by Design: For the holomorphic models, the "Expected Absolute Laplacian" was 0.0 (within machine epsilon). The physics was satisfied perfectly by design, rather than approximated through training.
  • The Laplacian-Accuracy Paradox: The authors observed that a low Laplacian error (how well the PDE is satisfied) doesn't always guarantee a low RMSE (how close the solution is to reality). Standard PINNs often get the "physics" right internally but fail to match the boundary conditions accurately, a pitfall mitigated by hard-coding the harmonicity.
  • Quantum Expressivity: A QNN with only 4 qubits matched the performance of a classical spectral expansion with 16 terms, suggesting that quantum architectures are naturally well-suited for representing these complex physical fields.
Error maps comparing CurlNet, Holomorphic networks, and standard PINNs against the benchmark. Holomorphic networks enforce exact harmonicity, resulting in significantly lower error profiles.

Limitations and Future Directions

While Harmonic Neural Networks represent a significant leap forward, they come with constraints. The most powerful "exact" method (holomorphic functions) is largely restricted to 2D spaces. While CurlNet works in 3D, it provides an approximate rather than exact harmonic bias. Furthermore, while domain decomposition works for multiply-connected spaces, it requires manual partitioning of the space, which could be cumbersome for highly irregular 3D volumes.

Looking ahead, testing the "qHolomorphic" circuits on real, noisy intermediate-scale quantum (NISQ) hardware remains a key challenge. The authors also suggest extending this work to other types of physical biases, such as regular quaternionic functions, to tackle even more complex differential equations natively within AI architectures.

Summary updated

BibTeX
@inproceedings{ghosh2023harmonic,
  author = {Atiyo Ghosh and Antonio Andrea Gentile and Mario Dagrada and Chul Lee and Seong-Hyok Sean Kim and Hyukgeun Cha and Yunjun Choi and Dongho Kim and JEONG-IL KYE and Vincent Emanuel Elfving},
  title = {{Harmonic Neural Networks}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=qI0l2VKp7N},
}
Figure