MACE-PINN @Arizona State University

See the full portfolio →

Built with

  • JAX
  • Flax
  • NumPy
  • Random Fourier Features

Links

  • github↗
  • link to thesis paper↗

A physics-informed neural network for coupled reaction-diffusion systems, with a dedicated subnetwork per variable, Fourier input features, and self-balancing loss weights, matching reference solutions within a few percent and cutting error 40 to 60 percent against a standard PINN.

The problem

Reaction-diffusion equations describe how patterns organize themselves out of nothing much: chemical fronts, spots that split and replicate, spiral waves in excitable media. Solving them normally means stepping a fine grid forward in time, and the grid has to stay fine wherever the solution is sharp, which is exactly where the interesting behavior is. Physics-informed neural networks offer a mesh-free alternative that learns a solution from the governing equations themselves, but the standard formulation is demonstrated mostly on single-field, well-behaved problems. On genuinely coupled, stiff systems (Gray-Scott, Ginzburg-Landau) the standard formulation breaks down, and that gap is what the thesis went after.

Why it is hard

Three failure modes stack on top of each other. One network predicting both fields shares every weight between two objectives, so gradients from one field's residual drag the shared representation away from what the other field needs, and the coupling that makes the system worth solving is also what makes it fight itself. Separately, an MLP fed raw (x, y, t) has a spectral bias: it fits the smooth, low-frequency part of the solution first, and the sharp spot boundaries and stripe edges are precisely the high-frequency content it learns last or not at all. Then the loss itself is unbalanced, because the initial-condition, residual and data terms do not arrive with comparable gradient magnitudes, so a fixed hand-tuned weighting is a knob you have to rediscover for every system you touch.

The design

The answer was one jointly trained block that gives each coupled field its own network instead of splitting one network's capacity between them. The cheaper obvious alternative, a single wider MLP with two output heads, was rejected on purpose: shared weights are where the gradient interference lives, so widening the network buys capacity without removing the actual conflict. Three decisions do the work.

  • A subnetwork per field. The u and v networks are trained together under one physics-informed loss with an iterative coupling between them, so the fields stay linked without sharing parameters.
  • A 64-dimensional random Fourier lift. The (x, y, t) inputs are embedded before they reach either subnetwork, which sidesteps spectral bias and lets the model resolve sharp structure instead of smoothing it away.
  • Gradient-norm adaptive loss weights. Per-term weights are set from running gradient magnitudes and fed back into the block, so the initial-condition, residual and data objectives balance themselves rather than being tuned by hand per system.
System architecture. Tap to enlarge.

What it cost

Two subnetworks plus a coupling term is more parameters and more compute per training step than one shared network, and it adds another moving part that has to stay stable. The two are also not symmetric (u is 3 layers of 64 units, v is 4 of 128) because the fields do not have equal complexity, and those shapes were picked empirically rather than derived. The structural limit is the one every vanilla PINN has: a trained model solves one parameter setting, not a family, so changing the coefficients means training again rather than re-running a solver.

Where it stands

Across four benchmark variations spanning both systems, relative L2 error against a reference numerical solution landed between 2.3 and 3.5 percent, 40 to 60 percent below single-network PINN baselines on the same problems. The model reproduces the behavior that defeats a standard PINN here, including spot splitting, stripe formation and the chaotic Gray-Scott regime shown below. Everything was implemented from scratch in JAX and Flax, and every run fit on a single GPU in under two and a half hours.

SystemVariationRel. L2TrainPattern
Gray-ScottBenchmark2.3%1.8 hrSpots
Gray-ScottSelf-replicating2.7%2.1 hrReplicating
Ginzburg-LandauForcing3.1%2.4 hrWaves
Ginzburg-LandauBoundary3.5%2.3 hrOscillations

Trained on a single NVIDIA H100 (80 GB).

Gray-Scott spot splitting (mitosis): predicted solution vs. reference.

In numbers

2.3-3.5%
relative L2 error
40-60%
lower than a single-network PINN
1x H100
whole thesis, one GPU
4
benchmark variations

None of the three pieces here is exotic on its own — separate subnetworks, Fourier features and adaptive weighting are all known moves individually. What the 40 to 60 percent gap actually measures is that on a genuinely coupled system, using all three together is not optional: drop any one of them and the interference that motivated the thesis comes back.