Bilevel Local Operator Learning (BiLO)
- BiLO is a neural network framework that formulates PDE inverse problems as a bilevel optimization, combining data loss minimization and local operator training.
- It employs a locally trained surrogate model to accurately approximate the PDE solution operator, facilitating robust and efficient descent direction estimation.
- The Bayesian extension integrates LoRA for low-rank adaptation, enabling fast posterior sampling and calibrated uncertainty quantification in complex inverse problems.
Bilevel Local Operator Learning (BiLO) is a neural network based method for solving inverse problems for partial differential equations (PDEs) by formulating the PDE inverse problem as a bilevel optimization problem. At the upper level, it minimizes the data loss with respect to the PDE parameters. At the lower level, it trains a neural network to locally approximate the PDE solution operator in the neighborhood of a given set of PDE parameters, which enables an accurate approximation of the descent direction for the upper level optimization problem. In the second part of the series, the same framework is extended to the Bayesian inference framework: at the lower level, a network approximates the local solution operator by minimizing the local operator loss with respect to the weights of the neural network, and at the upper level, the PDE parameters are sampled from the posterior distribution (Zhang et al., 2024, Zhang et al., 22 Jul 2025).
1. Deterministic bilevel formulation
In the deterministic formulation, the spatial, or spatial-temporal, domain is denoted by , the data-collocation points by , and the observed data by at . The PDE is assumed to take the form
where are the unknown PDE parameters. BiLO introduces a neural network parameterized by weights to locally approximate the solution operator in a neighborhood of the current (Zhang et al., 2024).
The upper-level loss is the data-mismatch
0
The lower-level construction begins with the pointwise residual
1
It then penalizes both the squared residual and its sensitivity to 2:
3
4
The local operator loss is
5
where 6 is a small constant, for example 7, that controls the strength of the residual-gradient term.
The bilevel problem is
8
The stated role of the lower level is not to produce a global neural surrogate over the full parameter space, but to provide a local surrogate accurate enough to supply a descent direction for the upper-level optimization.
2. Joint gradient descent and the local-operator mechanism
BiLO solves the two levels simultaneously by gradient descent rather than an inner-outer loop because 9 need only be accurate enough to give a descent direction 0. The scalar-parameter algorithm takes as input data collocation sets 1 and 2, an initial PDE guess 3, network weights 4, a pretraining solution 5 at 6 as an optional input, and learning rates 7 and 8 (Zhang et al., 2024).
Optional pretraining minimizes
9
with
0
Fine-tuning then applies simultaneous steps for 1:
- compute 2 via autodiff through 3;
- compute 4;
- update
5
6
In practice, the reported implementation uses ADAM with 7 and 8. The implementation details further specify pretraining 9 for 0k steps on 1 and fine-tuning for 2k steps by joint GD. The explicit methodological claim is that BiLO enforces strong PDE constraints and eliminates the need to balance the residual and the data loss, which is inherent to the soft PDE constraints in many existing methods.
3. Network architecture and enforcement of boundary or initial conditions
For scalar 3, the reported architecture begins with an embedding layer
4
where 5, 6 is a fixed random matrix, 7, and 8. The hidden portion consists of 9 fully connected layers of width 0 with 1 activations, and the output layer is a single scalar 2 (Zhang et al., 2024).
Boundary-condition enforcement is handled by output transformations. For Dirichlet data 3 on 4, the construction
5
is used, where 6 vanishes on 7 and 8 enforces the boundary or initial data. The implementation notes specify enforcing BC/IC via output transformations as in Section 3.1 of the paper. For unknown functions constrained by positivity, the activation is 9 for the 0-network and softplus when enforcing 1.
The reported collocation choices illustrate the discretization used in the experiments: Fisher–KPP uses 2 on a grid in 3 and 4 points at 5; the Poisson problem uses 6 points in 7; and the heat equation uses 8 in 9 and 0 at 1.
4. Inference of unknown functions through an auxiliary variable
When the PDE depends on an unknown function 2, BiLO parametrizes 3 by another network 4, but avoids treating 5 as an input to 6 directly because it would be too high-dimensional. Instead, it introduces an auxiliary field
7
The residual is then defined with this auxiliary variable:
8
The data loss becomes
9
and regularization on 0 is
1
or any Tikhonov penalty (Zhang et al., 2024).
The lower-level loss is
2
with
3
4
The resulting bilevel problem is
5
and is again solved by joint gradient descent on 6.
The heat-equation example is the principal illustration of this mechanism: BiLO is reported to infer an unknown initial condition from the final state and to recover non-smooth 7 robustly, while PINN requires extremely large or small 8 to even converge.
5. Reported behavior on inverse problems and relation to PINNs
The central comparison in the deterministic paper is between BiLO and PINNs with soft-constraint objective 9. The stated advantage is strong PDE fidelity: unlike PINNs’ soft-constraint 0, BiLO enforces zero residual and zero residual-gradient sufficiently tightly in the lower level, eliminating delicate 1-tuning. The other principal claim is robustness to sparse and noisy data (Zhang et al., 2024).
The Fisher–KPP reaction–diffusion experiment infers 2 from single-time data with 3–4 noise; the reported result is that BiLO recovers 5 with 6 error, while PINN degrades heavily unless 7 is hand-tuned. In the 8D Poisson problem with variable diffusion 9, BiLO is reported to capture the “hat” shape and kink, whereas PINN either oversmooths or oscillates depending on 00. In the nonlinear ODE system that infers 01 in 02, BiLO is described as stable under noise 03, while PINN fails for most 04.
These experiments define the framework’s practical positioning. The paper also lists suggested extensions for new PDE inverse problems: increasing network width or depth for higher-dimensional domains, combining adaptive collocation or importance sampling for 05, leveraging multi-fidelity pretraining if a rough solver is available, and extending to time-dependent unknowns 06 by including 07 in the 08-embedding. These are presented as suggestions rather than established experimental conclusions.
6. Bayesian extension, posterior sampling, and low-rank adaptation
Part II extends BiLO to the Bayesian inference framework for PDE-constrained optimization problems. The finite-dimensional parameter is written as 09, the forward PDE is
10
and the local solution operator is approximated by
11
where 12 are the network weights. The bilevel formulation is
13
with lower-level loss
14
and posterior
15
where a prior 16 and data-misfit
17
are assumed (Zhang et al., 22 Jul 2025).
The upper-level Bayesian inference is solved using a gradient-based MCMC, for example Preconditioned Crank–Nicolson (pCN) or Hamiltonian Monte Carlo (HMC). At each proposed parameter 18, the lower-level problem in 19 is solved approximately to tolerance 20, after which 21 and 22 are computed. The gradient uses 23, obtained by automatic differentiation through the network and the PDE residual term. The combined algorithm is given as BiLO–LoRA–HMC.
To speed up repeated lower-level solves for varying 24, Part II introduces LoRA (Low-Rank Adaptation). Let 25 be the pre-trained network at some reference 26. Updates are restricted to
27
At each MCMC step, only 28 are optimized to solve the lower-level problem to tolerance 29. The number of trainable parameters per leapfrog step is therefore reduced from 30 to 31 with 32, and the paper states that this drastically cuts both memory and computation.
7. Error analysis and reported uncertainty-quantification results
Part II analyzes the effect of inexact lower-level optimization on both the sampler dynamics and the posterior distribution. Let 33 denote the exact lower-level minimizer with 34, and let 35 be an inexact solution with 36. Under mild assumptions, specifically PDE stability and Lipschitz bounds, the paper states two principal results: a dynamic error in the hypergradient,
37
and a static error in the posterior,
38
The stated implication is that solving the lower-level problem to tolerance 39 perturbs both the MCMC dynamics and the target posterior only by 40 (Zhang et al., 22 Jul 2025).
The numerical experiments are organized around three PDE inverse problems. For nonlinear Poisson, 41, BiLO recovers 42 and 43 with accuracy matching a fine-grid MH reference; LoRA reduces per-step cost by factors 44 with negligible loss in ESS or accuracy; and pCN and HMC acceptance rates are 45 with stepsizes unreachable by BPINNs. For the 46D point-process PDE, 47, inference of 48 from point data yields 49 MAP error, and BiLO-LoRA with 50 achieves MOSI comparable to full fine-tuning at 51. For 52D Darcy flow, 53, the framework infers 54 KL-expansion parameters of 55 from noisy observations of 56; BiLO + LoRA with 57 converges 58 faster than full fine-tuning for width 59k networks, with 60 61 error and accurate 62 confidence intervals.
Across these examples, the paper states that BiLO–LoRA–HMC attains high-fidelity posterior inference, large-stepsize stability unlike standard BPINNs, speedups of 63–64, and calibrated UQ. Taken together with Part I, this places BiLO as a bilevel framework whose defining feature is local operator learning at the lower level and parameter inference, deterministic or Bayesian, at the upper level.