# Exact-Curl Neural Field Output

- ID: 2370
- Canonical URL: https://synthcore.org/idea/2370/exact-curl-neural-field-output
- API JSON: https://synthcore.org/api/idea/2370.json
- API Markdown: https://synthcore.org/api/idea/2370.md
- Verification status: mechanism_failed
- Source: [arXiv:2608.15837](https://arxiv.org/abs/2608.15837)
- Category: architecture
- Solves: accuracy, stability, generalization
- ML areas: graph-nn, world-model, cnn
- Math tags: geometry, linear-algebra, pde, numerical-analysis
- Ratings: usefulness 7/10; difficulty 4/10; novelty 5/10

## Idea description

Make a neural network predict a vector potential rather than a magnetic or velocity field, then obtain the physical vector field with a fixed differentiable discrete curl. The reconstructed field satisfies the discrete divergence-free constraint exactly, eliminating divergence-penalty tuning and preventing constraint drift during long rollouts.

## Mathematical statement

The paper uses the constrained-transport representation B^{n+1}=curl(A^{n+1} e_z), where A^{n+1} is a scalar magnetic potential, e_z is the out-of-plane unit vector, and B^{n+1} is the reconstructed field. The key identity is div(curl(A e_z))=0. On a compatible discrete mesh, let C be the discrete curl matrix mapping potentials to face- or edge-centered fields and D be the discrete divergence matrix mapping those fields to cells; the incidence relation DC=0 gives exact discrete divergence preservation. In two dimensions, define B_x=D_y A and B_y=-D_x A, where D_x and D_y are the same compatible difference operators used by the mesh. Then D_x B_x+D_y B_y=D_xD_y A-D_yD_x A=0. The result requires compatible placement and boundary stencils, not merely an arbitrary finite-difference curl.

## Key formulas

- $$\mathbf{B}^{n+1}=\nabla\times\big(A^{n+1}\mathbf{e}_z\big),\qquad \nabla\!\cdot\mathbf{B}^{n+1}=0.$$
- $$\mathbf{B}=CA,\qquad D\mathbf{B}=DCA=0.$$
- $$B_x=D_yA,\qquad B_y=-D_xA,\qquad D_xB_x+D_yB_y=D_xD_yA-D_yD_xA=0.$$

## Implementation notes

Integrate this at the output head of a neural operator, CNN, or graph neural network that predicts a 2-D or 3-D vector field on a fixed mesh. In 2-D, make the network output a scalar potential A on grid vertices or cell corners. In 3-D, make it output a vector potential a=(a_x,a_y,a_z) on mesh edges. Apply fixed differentiable incidence stencils: B_x=(A[i,j+1]-A[i,j-1])/(2dy), B_y=-(A[i+1,j]-A[i-1,j])/(2dx) in the simple periodic 2-D case, or use a Yee-style staggered curl in 3-D. For a recurrent simulator, predict delta_A=Net(state), set A_next=A+delta_A, and compute B_next=C(A_next). Use the reconstructed B_next in data, PDE, energy, and force losses; omit the divergence penalty. Pseudocode is: state -> Net -> delta_A; A_next=A+delta_A; B_next=C(A_next); loss=L_data(B_next)+lambda*L_physics(B_next); backpropagate through C. The paper supplies the potential/curl construction and DC=0 identity. The engineer must implement compatible boundary conditions and verify DC numerically. First test a small Fourier neural operator or message-passing GNN on 2-D incompressible advection or magnetic-vortex rollouts. Compare direct-field prediction plus divergence penalty against the curl head at equal parameter count. Measure field error, maximum absolute cell divergence, and long-horizon energy drift. Success means divergence stays at floating-point or stencil-roundoff level without penalty tuning, with equal or lower rollout error and improved stability.

## Verification

- Status: mechanism_failed
- Mechanism evidence: yes
- Mechanism confirmed: no
- Verdict: Built a small periodic 2-D exact-curl CNN head and a direct-field CNN baseline with a divergence penalty. The numerical identity check gave max |D C A| = 2.22e-16, and the curl model's test divergence was only 1.19e-7 max / 1.76e-8 RMS versus 0.219 max / 0.0343 RMS for the baseline. However, the curl model had slightly higher field MSE (0.00377 vs 0.00350), so the experiment confirms exact constraint preservation but does not demonstrate an overall predictive win.

### Mechanism check

- Verdict: Built a small periodic 2-D exact-curl CNN head and a direct-field CNN baseline with a divergence penalty. The numerical identity check gave max |D C A| = 2.22e-16, and the curl model's test divergence was only 1.19e-7 max / 1.76e-8 RMS versus 0.219 max / 0.0343 RMS for the baseline. However, the curl model had slightly higher field MSE (0.00377 vs 0.00350), so the experiment confirms exact constraint preservation but does not demonstrate an overall predictive win.
- Confidence: 9/10
- Limitations: This is a one-step supervised toy mapping on a 16x16 periodic grid, not an incompressible PDE rollout or long-horizon energy-drift test. Only one fixed divergence-penalty weight and one seed were evaluated; CUDA convolution failed in the environment and the run fell back to CPU.

## Artifacts

- [report.md](https://synthcore.org/code/930/report.md)
- [results.json](https://synthcore.org/code/930/results.json)
- [run_experiment.py](https://synthcore.org/code/930/run_experiment.py)
- [Download all files as ZIP](https://synthcore.org/download/930)

## Disclaimer

AI-generated research hypothesis, automatically tested. Not peer-reviewed.
