Soliton Profiles in 1D: Enhanced Neural-Network Solvers and Constrained Deep Ritz Methods
Abstract
We develop and compare enhanced neural-network solvers for one-dimensional ground-state profiles, which are solutions of the stationary profile equation for the nonlinear Schrödinger, generalized Korteweg-de Vries, and nonlinear Klein-Gordon equations. Its explicit sech-type solutions serve as exact reference for error computation and benchmark hyperparameter selection. We improve on the standard Adam-trained physics-informed neural network (PINN) baseline by introducing higher-order optimization via Gauss-Newton/Levenberg-Marquardt and L-BFGS refinements, as well as Fourier-feature PINNs, and constrained Deep Ritz (DR) formulations. In DR approaches we introduce two new neural-network formulations, which implement two classical variational characterizations: a Nehari-constrained Deep Ritz method, in which the height is learned by projecting onto the Nehari/Pokhozhaev manifold, and a Weinstein Deep Ritz method, in which a normalized profile minimizes the Weinstein quotient. The Deep Ritz formulations perform best overall, in particular, the Weinstein variant gives the best error-runtime balance. The neural-network based solvers remain less accurate and efficient than classical Petviashvili iteration in 1D, however, the current study provides a proof of concept: the mesh-free formulation, non-reliance on exact profiles or the related features make them promising in higher dimensions and for more complicated nonlinearities and dispersive operators.
Figures & tables
| Parameter | Values tested / description |
|---|---|
| Domain length | |
| Pure L–BFGS runs | L–BFGS initialized directly from the network initialization |
| Adam–L–BFGS runs | Adam warm-up followed by L–BFGS refinement |
| Activation functions | , , , , , and |
| Number of hidden layers | , , or |
| Neurons per layer | , , or |
| Optimizer | Activation | Hidden Layer | Neurons per Layer | Adam Warm-up | L–BFGS Steps | History size | Max Iters per Step | L–BFGS LR | ||
|---|---|---|---|---|---|---|---|---|---|---|
| L–BFGS | – | |||||||||
| Adam–L–BFGS |
| PINN with L–BFGS optimization | PINN with Adam–L–BFGS optimization | |||||||
|---|---|---|---|---|---|---|---|---|
| CPU time | error | error | CPU time | error | error | |||
| 3 | 1.314525e-08 | 15.328056 | 7.162973e-03 | 5.864162e-03 | 5.917457e-08 | 353.818283 | 7.896724e-03 | 6.463914e-03 |
| 5 | 1.679169e-07 | 14.411380 | 8.026411e-03 | 7.032712e-03 | 2.705050e-07 | 338.015580 | 5.668667e-03 | 4.915231e-03 |
| 7 | 9.080274e-08 | 10.815290 | 2.407888e-03 | 2.187603e-03 | 2.613929e-07 | 326.965276 | 2.374574e-03 | 2.225127e-03 |
| Parameter | Values tested / description |
|---|---|
| Domain length | |
| Pure GN/LM runs | GN/LM initialized directly from the network initialization |
| Adam–GN/LM runs | Adam warm-up followed by GN/LM refinement |
| Activation functions | , , , , , and |
| Number of hidden layers | , , or |
| Neurons per layer | , , or |
| Optimizer | Activation | Hidden Layer | Neurons per Layer | Adam Warm-up | GN/LM Steps | Max Backtracks | Damping Shrink | Damping Growth | Initial Damping | ||
|---|---|---|---|---|---|---|---|---|---|---|---|
| GN/LM | – | ||||||||||
| Adam–GN/LM |
| PINN with GN/LM optimization | PINN with Adam–GN/LM optimization | |||||||
|---|---|---|---|---|---|---|---|---|
| CPU time | error | error | CPU time | error | error | |||
| 3 | 2.763789e-11 | 4532.584975 | 1.193728e-04 | 9.808560e-05 | 6.763931e-13 | 1639.024311 | 1.417711e-04 | 1.158408e-04 |
| 5 | 1.015142e-10 | 4940.055658 | 6.839973e-05 | 5.982481e-05 | 1.328934e-10 | 1872.362646 | 5.831789e-04 | 5.065382e-04 |
| 7 | 3.184690e-08 | 5205.814115 | 2.681668e-03 | 2.388390e-03 | 4.723684e-10 | 1812.308855 | 9.558302e-04 | 8.583382e-04 |
| PINN with L–BFGS optimization | PINN with Adam–L–BFGS optimization | |||||||
|---|---|---|---|---|---|---|---|---|
| GPU+CPU time | error | error | GPU+CPU time | error | error | |||
| 3 | 5.329101e-08 | 7.505031 | 6.583645e-03 | 5.421850e-03 | 3.593178e-08 | 62.361742 | 3.780430e-03 | 3.079454e-03 |
| 5 | 7.202707e-08 | 6.157369 | 5.845897e-03 | 5.090068e-03 | 1.164522e-07 | 63.238091 | 2.992726e-03 | 2.691600e-03 |
| 7 | 4.067500e-08 | 6.788750 | 1.609846e-03 | 1.493517e-03 | 2.353134e-07 | 61.959399 | 9.146505e-04 | 1.052700e-03 |
| PINN with GN/LM optimization | PINN with Adam–GN/LM optimization | |||||||
|---|---|---|---|---|---|---|---|---|
| GPU+CPU time | error | error | GPU+CPU time | error | error | |||
| 3 | 4.025347e-11 | 538.109242 | 9.699502e-05 | 7.902533e-05 | 1.294946e-12 | 506.161066 | 5.594483e-05 | 4.555836e-05 |
| 5 | 4.330355e-11 | 534.144825 | 2.525764e-04 | 2.192186e-04 | 1.701413e-10 | 511.624151 | 5.432745e-04 | 4.717845e-04 |
| 7 | 5.115845e-06 | 538.628306 | 1.256511 | 1.411610 | 1.485399e-10 | 531.554408 | 6.169997e-04 | 5.539982e-04 |
| PINN with GN/LM optimization | ||||
|---|---|---|---|---|
| GPU+CPU time | error | error | ||
| 3 | 2.483710e-08 | 591.697312 | 1.413589e+00 | 1.414096e+00 |
| 5 | 1.058034e-06 | 586.388381 | 1.318001e+00 | 1.417144e+00 |
| 7 | 1.221674e-09 | 574.305437 | 6.810766e-04 | 6.118432e-04 |
| Parameter | Values tested / Description |
|---|---|
| Domain length | |
| Boundary condition | Dirichlet |
| Activation functions | , , , , , and |
| Number of hidden layers | , , or |
| Neurons per layer | , , or |
| Optimizer | Adam, L–BFGS, GN/LM, Adam–L–BFGS, or Adam–GN/LM |
| Optimizer | Activation | Hidden Layers | Neurons per Layer | Adam Warm-up | Train | Include Raw | L–BFGS Steps | History Size | Internal Iteration | L–BFGS LR | |||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Adam–L–BFGS | yes | no |
| FF–PINN with Dirichlet boundary conditions | ||||
|---|---|---|---|---|
| CPU time | error | error | ||
| 3 | 1.756630e-07 | 219.333194 | 5.093381e-04 | 6.852868e-04 |
| 5 | 1.004573e-07 | 200.046171 | 4.623447e-04 | 7.603941e-04 |
| 7 | 5.792016e-08 | 234.282703 | 3.989951e-04 | 7.267693e-04 |
| FF–PINN with Dirichlet boundary conditions | ||||
|---|---|---|---|---|
| GPU+CPU time | error | error | ||
| 3 | 1.284711e-07 | 67.670952 | 7.727327e-04 | 1.107474e-03 |
| 5 | 1.017865e-07 | 67.329122 | 4.419572e-04 | 7.254083e-04 |
| 7 | 6.116914e-08 | 72.062521 | 2.975830e-04 | 5.681980e-04 |
| Parameter | Values tested / Description |
|---|---|
| Domain length | |
| Boundary condition | Dirichlet |
| Trial function | Soft penalty trial, hard or decaying Dirichlet ansatz |
| Optimizer | Adam, L–BFGS, or Adam–L–BFGS |
| Refinement strategy | GN/LM or Adam–GN/LM |
| Activation functions | , , , , , and |
| Constraint | Optimization | Refinement | Activation | Hidden Layers | Neurons per Layer | Adam Warm-up | GN/LM Steps | Max Backtracks | Damping Shrink | Damping Growth | Initial Damping | Residual Points | Quotient Points | ||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Hard | Adam | GN/LM |
| CPU time | error | error | |||
|---|---|---|---|---|---|
| 3 | 6.666667e-01 | 9.620502e-11 | 264.092212 | 4.302695e-06 | 9.264227e-06 |
| 5 | 6.801746e-01 | 2.375216e-14 | 252.688689 | 1.224911e-05 | 6.049316e-06 |
| 7 | 6.679167e-01 | 4.063798e-16 | 246.570857 | 3.198027e-03 | 2.417198e-03 |
| GPU+CPU time | error | error | |||
|---|---|---|---|---|---|
| 3 | 6.666667e-01 | 7.300457e-11 | 41.048747 | 3.697873e-06 | 7.913867e-06 |
| 5 | 6.801749e-01 | 1.826449e-12 | 38.984522 | 2.828127e-05 | 1.107741e-05 |
| 7 | 6.677846e-01 | 1.326228e-09 | 42.222312 | 1.397995e-03 | 1.007490e-03 |
| Parameter | Values tested / Description |
|---|---|
| Domain length | |
| Boundary condition | mixed |
| Trial function | Soft penalty trial, hard or decaying Dirichlet ansatz |
| Optimizer | Adam, L–BFGS, or Adam–L–BFGS |
| Refinement strategy | GN/LM or Adam–GN/LM |
| Activation functions | , , , , , and |
| Optimization | Refinement | Activation | Hidden Layers | Neurons per Layer | Adam Warm-up | GN/LM Steps | Max Backtracks | Damping Shrink | Damping Growth | Initial Damping | Residual Points | Quotient Points | ||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Adam | GN/LM |
| CPU time | error | error | |||
|---|---|---|---|---|---|
| 3 | 6.666667e-01 | 2.141298e-13 | 313.008810 | 1.690701e-07 | 2.733932e-07 |
| 5 | 6.801748e-01 | 1.853534e-11 | 315.139802 | 5.223740e-06 | 4.561398e-06 |
| 7 | 6.677478e-01 | 1.803535e-09 | 300.718944 | 2.275145e-04 | 1.384767e-04 |
| GPU+CPU time | error | error | |||
|---|---|---|---|---|---|
| 3 | 6.666667e-01 | 5.934479e-13 | 96.631522 | 3.255530e-07 | 5.289161e-07 |
| 5 | 6.801748e-01 | 1.871966e-11 | 94.922791 | 5.221092e-06 | 4.573099e-06 |
| 7 | 6.677480e-01 | 2.051331e-09 | 96.848960 | 2.730569e-04 | 1.542854e-04 |
| Parameter | Values tested / Description |
|---|---|
| Domain length | |
| Boundary condition | mixed |
| Trial function | Soft penalty trial, hard or decaying Dirichlet ansatz |
| Optimizer | Adam, L–BFGS, or Adam–L–BFGS |
| Refinement strategy | GN/LM or Adam–GN/LM |
| Activation functions | , , , , , and |
| Optimization | Refinement | Activation | Hidden Layers | Neurons per Layer | Adam Warm-up | GN/LM Steps | GN/LM Max Backtracks | Damping Shrink | Damping Growth | Initial Damping | Residual Points | Quotient Points | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Adam | GN/LM |
| CPU time | error | error | |||
|---|---|---|---|---|---|
| 3 | 2.309401e+00 | 5.781202e-15 | 148.970724 | 4.832268e-08 | 6.092994e-08 |
| 5 | 2.553766e+00 | 3.953484e-14 | 150.616751 | 5.235757e-06 | 2.322385e-06 |
| 7 | 2.592439e+00 | 1.687038e-09 | 145.797130 | 2.802301e-04 | 1.451584e-04 |
| GPU+CPU time | error | error | |||
|---|---|---|---|---|---|
| 3 | 2.309401e+00 | 1.934108e-14 | 40.420787 | 9.883258e-08 | 1.186556e-07 |
| 5 | 2.553766e+00 | 5.054238e-14 | 44.468209 | 5.204065e-06 | 2.321890e-06 |
| 7 | 2.592439e+00 | 1.258231e-09 | 44.377295 | 3.016073e-04 | 1.542014e-04 |
Neural PDE Solvers
Neural PDE solvers use trainable models to approximate solutions or solution operators for partial differential equations, often with physical constraints.
See all 272 papers