Paper reading: A neural network approach for solving the Monge–Ampère equation with transport boundary condition
Abstract. A close reading of Hacking et al. (2025), who solve the Monge–Ampère equation with the transport boundary condition by an MLP trained with L-BFGS and compare it with a least-squares finite-difference solver. On three problems with exact solutions the network is two to three orders of magnitude more accurate; on the two problems evaluated by ray tracing the gain is only a factor of 1.4 and 3.8.
Keywords: PDE, Monge–Ampère, PINN
1 Introduction
A classical problem in illumination optics is to design a mirror that turns a given light source into a prescribed light distribution. The problem is an instance of optimal transport, with energy playing the role of mass and optical path length the role of cost [1], and it leads to the Monge–Ampère equation with the transport boundary condition. On the one hand, the established solvers for this problem (finite differences [2], finite elements, and the least-squares method of Prins et al. [3]) are tailored to it, and, as the paper argues, each new optical system needs new update rules. On the other hand, neural solvers that minimize the residual of the equation (the PINN family) are generic: a new equation only needs a new loss. Nyström and Vestberg [4] used this approach for the Dirichlet problem of the Monge–Ampère equation; according to the authors of the paper discussed here, no neural method had handled the transport boundary condition before.
The paper of Hacking, Kusch, Mitra, Anthonissen and IJzerman [1] fills this gap. The reflector surface is a multilayer perceptron (MLP), the loss combines the residual, a boundary term and a convexity penalty, the optimizer is L-BFGS, and the method is compared with the least-squares solver on five test problems. This post goes through the paper in detail. Section 2 derives the equation from the optics and explains why it is hard. Section 3 collects the relevant theory; the paper itself has no theorems, so we state the classical results that its formulation relies on and point out which test problems fall outside them. Section 4 describes the loss, the network, the sampling and the optimizer. Section 5 goes through every experiment and its numbers, and Section 6 discusses what the results do and do not show.
2 The parallel-to-far-field reflector problem
2.1 Geometry and the law of reflection
The paper considers one optical configuration, the parallel-to-far-field reflector [1]. A planar source occupies a region
where
The paper states without derivation that, by the law of reflection, the gradient of
Stereographic projection from
The gradient of the mirror tells each ray where to go, which is why the paper calls
2.2 The Monge–Ampère equation and the transport boundary condition
Energy conservation says that for every subset
which is Eq. (2a) of the paper. The paper's argument is that since
the transport boundary condition [2]. The paper also notes that the parallel-to-parallel reflector and the parallel-to-far-field lens lead to the same mathematical problem, so the method covers them as well [1].
Integrating
2.3 Why the problem is hard
Compared with the Dirichlet problem for the Poisson equation, the problem
3 Theoretical background
The paper is a numerical paper: it states no theorem and gives no convergence analysis. Its formulation does rest on two classical results of optimal transport. We state them here because two of the five test problems turn out to violate their assumptions.
The first is Brenier's theorem [5, Theorem 4.22]: if
Theorem 3.1 (Regularity of the optimal transport map). ([5, Theorem 4.23, Remark 4.25]) Let
- there is
such that ; - if in addition
and , then ; - if moreover
and are smooth and both and are smooth and uniformly convex, then is a smooth diffeomorphism.
Remark 4.25 states (3) as a condition on the domains, right after the Hölder assumption on
Against the five test problems of Section 5: in Problems A–C both domains are the unit disk, which satisfies the geometric condition of (3). In Problem D the source is a square, convex but with corners, so (3) does not apply while (1) and (2) still hold. In Problem E the target is a "flower". We computed the curvature of its boundary curve as given in the paper: the curvature is negative on about 39% of the boundary, measured in polar angle (Figure 3), so the target is not convex, the assumption of Theorem 3.1 fails, and the classical theory no longer guarantees that
4 Method
4.1 The loss
The reflector is represented by an MLP
where
The paper uses
The boundary term is easy to read. When the target is the unit circle, the distance from a point
with
4.2 Why the trace is enough for convexity
Proposition 4.1 (Trace criterion in two dimensions). Let
Proof. The eigenvalues
The eigenvalue formula in the paper is missing the factor
4.3 Network, sampling and optimizer
The network is a fully connected MLP with
The collocation points come from Poisson disk sampling, which keeps every pair of points at least a fixed distance apart. The points are therefore more evenly spread than independent uniform samples, without lying on a grid. Problem A uses
The optimizer is L-BFGS with the Moré–Thuente line search. The authors' reasons are that the loss is deterministic, so stochastic gradients are not needed; that Adam, which uses gradients only, struggles on this loss to reach the accuracy one expects from a classical PDE solver in reasonable time; and that L-BFGS approximates the Hessian with little extra cost in time and memory. Training stops when the line search fails to find an acceptable step within
4.4 The baseline: a least-squares solver
The baseline is the least-squares solver of Prins et al. [3], called LSS in the paper. It does not compute
The final
5 Experiments
5.1 Setup and error metric
All experiments ran on one desktop with an AMD Ryzen 5 3600 CPU, an NVIDIA GTX 1060 6 GB GPU and 24 GB of RAM. The LSS is an existing MATLAB implementation run in MATLAB R2023b; the MLP method is written in Python with JAX and runs on the GPU [1]. The paper does not say whether the LSS used the GPU. For Problem A, and with the same settings for B and C, the LSS works on a
For Problems A–C, which have exact solutions, the error metric is the normalized mean absolute error (NMAE)
evaluated on the same
5.2 Three problems with exact solutions
Problems A–C are built backwards: choose a convex
- Problem A (symmetric circle-to-circle):
and . - Problem B (asymmetric circle-to-circle 1):
, with the same as Problem A. - Problem C (asymmetric circle-to-circle 2):
and .
To understand these problems we evaluated a few quantities from the formulas (the script only evaluates closed-form expressions; nothing is trained). All three reflectors are uniformly convex on the disk: the smallest eigenvalue of
The final errors are in Table 1. On all three problems the MLP reaches an NMAE of order
| LSS | MLP-L-BFGS | Ratio LSS / MLP | |
|---|---|---|---|
| Problem A | |||
| Problem B | |||
| Problem C | |||
| Problem D (ray tracing) | |||
| Problem E (ray tracing) |
5.3 Two problems evaluated by ray tracing
- Problem D (square-to-circle): the source is a square, the target the unit disk, both with uniform densities.
- Problem E (circle-to-flower): the source is the unit disk and the target is
, again both with uniform densities.
Neither problem has a known exact solution, so both are evaluated by ray tracing. For D the paper states that the training setup is the same as for A–C; for E it gives no separate setup. Figure 3 shows the domains.
The results are in the last two rows of Table 1 and in Figure 4. On Problem D the two methods end at similar accuracy (
Taken together, the MLP gains two to three orders of magnitude on the smooth problems with exact solutions, but only a factor of
We also noticed that two formulas for Problem E disagree. The target region is defined by
5.4 Hyperparameter study
On Problems A–C the paper varies four hyperparameters: the number of interior points, the number of boundary points, the depth and the width of the network. Each setting uses
- Interior points: more points give smaller errors at slightly higher cost, and reaching the accuracy of the LSS takes considerably fewer points than the LSS grid has. The trend is the same on all three problems.
- Boundary points: the effect is small. A few boundary points suffice to enforce the transport condition, and more do not help. The authors note that all three problems use circular domains, and expect that more complex boundaries, or a larger difference between source and target boundaries, need more points.
- Depth: one hidden layer fails to give an accurate solution; a little more depth already gives acceptable accuracy, after which the accuracy saturates and the cost grows only mildly.
- Width: very narrow networks are inaccurate, and the accuracy saturates quickly as the width grows, but the cost grows markedly. With
neurons per layer, near-optimal accuracy takes less than seconds; with it takes more than seconds, for little gain. The authors explain this by the quadratic growth of the weight matrices between hidden layers, which raises the cost of both the loss and the L-BFGS vector products.
Given the earlier observation, the small effect of the boundary points may also reflect that the boundary map in A–C is the identity.
Finally, the paper compares L-BFGS with Adam on Problem A, both on the same deterministic loss (Figure 17 of the paper). L-BFGS converges much faster and ends several orders of magnitude more accurate [1]. The paper gives only the curves of Figure 17: no final NMAE for Adam, and no learning rate or other settings.
6 Discussion
6.1 What the paper shows
On problems with smooth convex domains and smooth exact solutions, an MLP with about
6.2 Limitations stated by the authors
In their discussion the authors admit that L-BFGS sometimes stops early and then gives poor accuracy; falling back to a first-order method such as Adam helps but slows convergence [1]. How often this happens is not reported. They also do not know whether the method works for reflectors with many high-frequency components, such as the "Girl with a Pearl Earring" problem studied by Prins et al., and suggest that Fourier features or sinusoidal activations may be needed. They note that five test problems is a small set and call for a larger, more representative test set, and they only treat the parallel-to-far-field configuration. Besides, they mention replacing the deterministic optimization on a fixed point set by stochastic optimization with resampling, which would need a stochastic variant of L-BFGS.
6.3 Further limitations we see
Beyond the points the authors raise, we noticed the following while reading the paper.
- Table 1 has no error bars. Section 5 of the paper uses
random seeds, but Section 4 states neither the number of runs behind Table 1 nor any variance. The caption speaks of a "mean Normalized Mean Absolute Error", which may or may not mean an average over runs. Since the authors admit that L-BFGS sometimes stops early, the reader cannot tell from Table 1 how much the result varies between runs. - The LSS is compared at one resolution only. On A–C its error stops decreasing before the time limit, so more time would not help. We suspect that its error is dominated by the discretization error of the
grid, but the paper does not refine the grid, so this cannot be confirmed. The two methods also differ in size: the LSS computes the mapping at grid points, while the MLP trains parameters on collocation points. - The fixed-time comparison mixes implementation and hardware. One side is MATLAB, the other JAX on a GPU, and the comparison is accuracy within the same
seconds. The paper does not discuss this. - The NMAE depends on an unstated constant.
is determined only up to an additive constant (Section 2), and the loss as well as the last step of the LSS only see . Eq. compares values of directly and divides by the mean of , so the result depends on how the constant is fixed. The paper does not say. - The boundary condition in Problems A–C is easy. Source and target are the same circle and the exact boundary map is the identity, so no boundary point has to move along the boundary. The problems that really test it are D and E, and on those the MLP gains only a factor of
and . - The evaluation of D and E includes errors that do not come from the solver. The ray-traced NMAE contains binning and sampling error, and the paper does not report its floor (for example, the same ray tracing applied to a very accurate map). Moreover, the LSS map goes through cubic-spline interpolation while the MLP map comes from automatic differentiation, so the two evaluation pipelines differ. How much of the gap between
and is due to the solvers themselves cannot be told. - Convexity is not checked after training. The penalty acts only at the collocation points, and the paper does not report whether the trained network is convex between them. With errors as small as in A–C this is not a concern, but on D and E, which have no exact solution, the check matters more. The experiment in the previous post shows that the loss alone does not reveal which branch a solution is on.
- Problem E lies outside the classical theory. As discussed in Section 3, its target is not convex, and it is exactly the problem on which both methods struggle most, with errors concentrated at the boundary. The paper does not discuss the convexity of the target. We cannot claim that this is the cause of the difficulty, but it suggests that the difficulty of E may not be purely numerical.
- There is no comparison with other solvers. The paper cites the finite-difference method of Froese [2] and the finite-element method of Kawecki et al., but compares only with the LSS.
7 Conclusion
Hacking et al. [1] extend the residual loss of Nyström and Vestberg to the Monge–Ampère equation with the transport boundary condition: a residual term, a distance-to-target-boundary term and the two-dimensional trace penalty, all with weight
References
- Hacking, Roel, Kusch, Lisa, Mitra, Koondanibha, Anthonissen, Martijn, and IJzerman, Wilbert, A neural network approach for solving the Monge–Ampère equation with transport boundary condition, Journal of Computational Mathematics and Data Science 15 (2025) 100119.
- Froese, Brittany D., A Numerical Method for the Elliptic Monge–Ampère Equation with Transport Boundary Conditions, SIAM Journal on Scientific Computing 34 no. 3 (2012) A1432–A1459.
- Prins, C. R., Beltman, R., Thije Boonkkamp, J. H. M. ten, IJzerman, W. L., and Tukker, T. W., A Least-Squares Method for Optimal Transport Using the Monge–Ampère Equation, SIAM Journal on Scientific Computing 37 no. 6 (2015) B937–B961.
- Nyström, Kaj, and Vestberg, Matias, Solving the Dirichlet problem for the Monge–Ampère equation using neural networks, Journal of Computational Mathematics and Data Science 8 (2023) 100080.
- Figalli, Alessio, The Monge–Ampère Equation and Its Applications, Zurich Lectures in Advanced Mathematics, European Mathematical Society, Zürich, 2017.
Cite this post
Chengrui Zhang. Paper reading: A neural network approach for solving the Monge–Ampère equation with transport boundary condition. 2026. https://chengrui.dev/en/posts/nn-mae-reflector/
@misc{zhang2026nn-mae-reflector,
author = {Zhang, Chengrui},
title = {{Paper reading: A neural network approach for solving the Monge–Ampère equation with transport boundary condition}},
year = {2026},
url = {https://chengrui.dev/en/posts/nn-mae-reflector/},
note = {Blog post},
}