Spectral Evaluation of 2D Chernoff--Remizov Trajectories: Resolving Interpolation Diffusion in 2D Darcy Inverse Problems
Sergey V. Shpital
This repository contains the code accompanying the paper:
S. V. Shpital. Spectral Evaluation of 2D Chernoff--Remizov Trajectories: Resolving Interpolation Diffusion in 2D Darcy Inverse Problems. Zenodo, April 20, 2026. doi:10.5281/zenodo.19664767
It is the 2D follow-up to the SpectralNet v4 study of differentiable Chernoff--Remizov trajectories for inverse problems. Where v4 established the constructive trajectory as a viable differentiable forward model on a 1D Darcy testbed and exposed three mechanistic regimes, v5 carries the programme into 2D and asks two questions:
- Does the 1D diagnostic framework transport to 2D?
- If a direct grid-based 2D extension underperforms, why does it underperform, and can the bottleneck be removed without abandoning the constructive trajectory?
We study the 2D Darcy inverse problem
with Dirichlet boundary conditions, recovering
Main findings:
-
Direct 2D extension is forward-bias-limited on coarse grids. A grid-based 2D Lie--Trotter composition of the 1D Chernoff--Remizov step retains differentiability but is dominated by interpolation diffusion — repeated bilinear resampling at coefficient-dependent shift locations — yielding
$10$ –$26%$ inverse error and a non-monotonic$K$ -dependence on$32 \times 32$ grids. -
A spectral variant removes the bottleneck. Representing the state in a truncated discrete sine basis and evaluating the Chernoff--Remizov shift analytically on that basis (instead of through grid interpolation) lowers inverse error to
$1$ –$13%$ across four representative coefficient families ($2.0$ –$9.2 \times$ improvement), restores strictly monotonic$K$ -convergence on broadband fields, and is no slower than the grid variant on a modern GPU. -
Two of three 1D regimes transport cleanly. Once interpolation diffusion is subtracted, the spectral variant exhibits a forward-limited regime (sub-$1%$ residual on smooth families, traced to a
$\tau$ -dependent pseudo-time fixed-point bias via a Strang-splitting diagnostic) and a parameterization-limited regime that is refined into an identifiability limit on localized features (M-ablation + closed-form basis-capacity baseline). The 1D approximation-limited regime does not separate into a distinct empirical signature on the families studied here. - Decomposition machine. What transports cleanly is the decomposition framework itself: failure modes separate into solver bias, basis capacity, and information-theoretic limits, and each component is directly measurable.
git clone https://github.com/shpital/spectralnet_v5.git
cd spectralnet_v5
pip install -r requirements.txtAlternatively, with conda:
conda create -n spectralnet_310 python=3.10
conda activate spectralnet_310
pip install -r requirements.txt├── src/
│ ├── inverse_2d/ # Grid-based 2D Chernoff--Remizov pipeline
│ │ ├── remizov_2d.py # Differentiable grid 2D step (Lie--Trotter)
│ │ ├── fd_solver_2d.py # Reference 2D FD forward solver (u_obs only)
│ │ ├── coefficient_zoo_2d.py # Four families: smooth_lowfreq / smooth_highfreq /
│ │ │ # anisotropic / localized
│ │ ├── probe_2d_inverse.py # Phase A inverse pilot (Adam → L-BFGS)
│ │ ├── probe_2d_k_sweep.py # Single-family K-sweep
│ │ ├── probe_2d_k_sweep_multi.py # Four-family K-sweep
│ │ ├── probe_2d_noise.py # Noise robustness (1% / 5%)
│ │ ├── probe_2d_basis_ablation.py # M-ablation on localized_2d
│ │ ├── probe_2d_nx_sweep.py # Resolution-disambiguation study (Phase C)
│ │ └── smoke_test_2d.py # Differentiability sanity check
│ └── spectral_remizov/ # Spectral 2D variant + diagnostics
│ ├── remizov_spectral_2d.py # Differentiable spectral 2D step (DST-I evaluation)
│ ├── remizov_spectral_1d.py # 1D companion / unit-test reference
│ ├── probe_spectral_vs_grid_2d.py # Forward-error spectral vs. grid (paired)
│ ├── probe_spectral_vs_grid_1d.py # 1D check
│ ├── probe_inverse_spectral_vs_grid_2d.py # Inverse benchmark, four families (Sec. 6)
│ ├── probe_week4_benchmark_2d.py # Full benchmark (K-sweep + noise) for spectral variant
│ ├── probe_fourier_truncation_2d.py # Closed-form basis-capacity baseline (Sec. 7)
│ └── probe_pre_paper_2d.py # Pre-paper diagnostics (Strang vs. Lie--Trotter, M-ablation)
├── scripts/ # Bash drivers — one per paper result
│ ├── run_phase_a_2d_inverse.sh # Phase A inverse pilot (Sec. 5)
│ ├── run_phase_a_2d_k_sweep.sh # K-sweep on a single family (Sec. 5)
│ ├── run_phase_a_2d_noise.sh # Noise robustness (Sec. 6)
│ ├── run_phase_b_2d_basis_ablation.sh # M-ablation (Sec. 7)
│ ├── run_phase_b_2d_k_sweep_multi.sh # Four-family K-sweep (Sec. 5 / Sec. 6)
│ ├── run_phase_c_2d_nx_sweep.sh # Resolution disambiguation (Sec. 5)
│ ├── run_spectral_vs_grid_1d.sh # 1D paired check (Sec. 6)
│ ├── run_spectral_vs_grid_2d.sh # Spectral vs. grid forward (Sec. 6)
│ ├── run_inverse_spectral_vs_grid_2d.sh # Spectral vs. grid inverse, four families (Sec. 6)
│ ├── run_fourier_truncation.sh # Basis-capacity baseline (Sec. 7)
│ ├── run_pre_paper.sh # Strang vs. Lie--Trotter, M-ablation (Sec. 7)
│ ├── run_week4_benchmark.sh # Full spectral benchmark
│ └── smoke_test_2d.sh # End-to-end differentiability smoke test
├── requirements.txt
├── LICENSE
└── README.md
Reproducibility rule. Every experiment, smoke test and sanity check is driven by a committed
.py/.shfile; no one-off inline terminal runs. Any reported number can be regenerated from the frozen scripts above.
bash scripts/smoke_test_2d.shDifferentiability sanity check on both the grid and the spectral 2D Chernoff--Remizov step.
bash scripts/run_phase_a_2d_inverse.sh
bash scripts/run_phase_b_2d_k_sweep_multi.shReproduces the four-family inverse benchmark and joint forward/inverse
bash scripts/run_phase_c_2d_nx_sweep.shConfirms that the grid-side failure is driven by interpolation-diffusion mechanics rather than under-resolution: the failure pattern transports across
bash scripts/run_inverse_spectral_vs_grid_2d.sh
bash scripts/run_week4_benchmark.shPaired grid-vs-spectral inverse runs on the four families plus the full
bash scripts/run_phase_b_2d_basis_ablation.sh # M-ablation: more parameters worsen the inverse on localized_2d
bash scripts/run_fourier_truncation.sh # Closed-form basis-capacity baseline (0.12 % reachability)
bash scripts/run_pre_paper.sh # Strang vs. Lie--Trotter (isolates τ-bias on smooth fields)Reproduces the decomposition of Table 7.5 and the supporting Tables 7.1, 7.3.
bash scripts/run_spectral_vs_grid_1d.shSanity check that the spectral evaluation reduces to the 1D Chernoff--Remizov of v4 when restricted to one axis.
Note: Scripts invoke Python through the
$PYTHONenvironment variable, which defaults to plainpython. To use a specific interpreter or conda/mamba environment, export it before running, e.g.PYTHON="mamba run -n myenv python" bash scripts/run_week4_benchmark.sh
For the 1D Darcy generator
$$S(\tau)u = \tfrac{1}{4},u(x + \sigma(x)) + \tfrac{1}{4},u(x - \sigma(x)) + \tfrac{1}{2},u(x + \gamma(x)),$$
with diffusion shift
The 2D step composes two per-axis 1D steps via Lie--Trotter splitting:
Two evaluation strategies, one operator. Because the per-axis step requires evaluating
-
Grid variant (
src/inverse_2d/remizov_2d.py): bilinear interpolation on the grid. Six per-step gathers, fully differentiable throughtorch.grid_sampleautograd. This is the direct 2D analogue of the v4 implementation. -
Spectral variant (
src/spectral_remizov/remizov_spectral_2d.py): represent the state in a truncated discrete sine basis (DST-I); evaluate the shifted state analytically as$\sum_k \hat u_k,\sin(k\pi(x+s)/L)$ . No interpolation, no per-step low-pass. Differentiable throughtorch.einsum.
Both variants share the same Lie--Trotter splitting, the same pseudo-time relaxation, the same coefficient parameterization, and the same Adam → L-BFGS optimizer stack; they differ only in the off-grid evaluation step. Differences in inverse error therefore reflect the forward model, not the optimizer.
| Family | Grid inverse err. | Spectral inverse err. | Improvement |
|---|---|---|---|
smooth_lowfreq_2d |
9.87 % | 1.07 % | |
smooth_highfreq_2d |
12.39 % | 3.18 % | |
anisotropic_2d |
12.35 % | 3.50 % | |
localized_2d |
25.58 % | 13.00 % |
All numbers at
| 1D regime (v4) | 2D analogue | Diagnosed by |
|---|---|---|
| I. Forward-limited | Sub-$1%$ residual on smooth families, isolated as a |
Strang vs. Lie--Trotter splitting (Sec. 7.3) |
| II. Approximation-limited | Not separated into a distinct empirical signature on the four families studied | — (open) |
| III. Parameterization-limited | Refined into an identifiability limit on localized_2d: more parameters worsen the inverse |
M-ablation + closed-form basis-capacity baseline (Sec. 7.2, 7.4) |
What transports cleanly is the decomposition itself (Sec. 7.5): every entry of the residual error budget — forward bias, splitting error,
Code layout. The experiments in the paper are reproduced from the modules src/inverse_2d/ (grid-based 2D Chernoff--Remizov, coefficient families, inverse probes) and src/spectral_remizov/ (spectral 2D variant, 2D and 1D sine-evaluation kernels, pre-paper diagnostics), driven by the bash scripts in scripts/.
Compute. Reported wall-clock numbers were obtained on a single NVIDIA RTX 5070 Ti, PyTorch 2.x with CUDA, float32 throughout. All runs fit comfortably in single-GPU memory.
Optimizer protocol. The inverse loop uses the same two-stage stack across all four families and across both variants:
- Adam warmup: 50 iterations, learning rate 0.05, on the coefficient parameter vector.
-
L-BFGS refinement: up to 30 outer steps of PyTorch L-BFGS with strong Wolfe line search,
max_iter=10inner iterations per outer step,history_size=20,lr=1.0. Early stopping triggers when the relative loss change stays below$10^{-6}$ for 4 consecutive outer steps.
This gives a worst-case budget of
Seeds and determinism. Paired grid/spectral runs within a family use the same random seed (observation-noise sampling, coefficient initialization). The reported numbers are from the same seed as the pre-paper diagnostics and the Week 4 benchmark; seed sensitivity on these problems is within a fraction of a percentage point on the inverse-error axis for all four families and does not change the grid-vs-spectral ordering.
Reporting convention. All error numbers in the paper are relative
Role of the FD solver. A second-order finite-difference forward solver (src/inverse_2d/fd_solver_2d.py) is used in this work only to generate the synthetic observation
This project is licensed under the MIT License.
If you find this work useful, please cite:
@misc{shpital2026spectralnetv5,
title={Spectral Evaluation of 2D Chernoff--Remizov Trajectories:
Resolving Interpolation Diffusion in 2D Darcy Inverse Problems},
author={Sergey V. Shpital},
year={2026},
month=apr,
doi={10.5281/zenodo.19664767},
url={https://doi.org/10.5281/zenodo.19664767},
publisher={Zenodo}
}- SpectralNet v1 — resolvent-inspired architecture, classification
- SpectralNet v2 — operator learning with spectral-spatial blocks
- SpectralNet v3 — Chernoff--Remizov preprocessing for neural operators
- SpectralNet v4 — differentiable Chernoff--Remizov trajectories for 1D Darcy inverse problems (this paper's direct predecessor)