Tomography builds an image of a sample's inside from projections taken at different angles. When only a few angles are possible, because the sample is damaged by the beam or instrument time is scarce, the image blurs exactly where it matters: at the boundary between material and empty space.
We trained a small neural network to recognize what an edge looks like in a 3×3 patch of pixels, rewrote the trained network as linear constraints with binary switches, and let an optimization solver use it to re-sharpen a standard reconstruction patch by patch, while staying close to that reconstruction and to the expected material density.
The problem
The samples in this work are made of one material with sharp interfaces: a porous zeolite particle and a copper microlattice, plus a simulated test image whose true pixel values are known. In an ideal reconstruction each pixel is either material or empty, with clean edges between them. With sparse, noisy or missing angles, standard methods smear those edges and leave grey, streaky regions where there should be none.

A neural network could sharpen these images on its own, but then nothing ties the result to the physics or to the data. The question was whether a learned notion of "edge" could be used inside an optimization model instead, as one term the solver weighs against the others.
What we built
few measured projections
- 1
Baseline reconstruction
A compressed-sensing method with smoothness and material-density terms (CSHM) produces a first image.
- 2
A small edge network, rewritten as constraints
A 9-9-9-1 ReLU network, trained to imitate the Sobel edge filter on 3×3 patches, becomes linear constraints with one binary switch per ReLU.
- 3
Re-optimize each patch
For every 3×3 patch, the solver decides between "sharp edge" and "uniform material" and adjusts the pixel values to match.
- 4
Merge the patches
Patches overlap, so each pixel gets several proposals; they are averaged into the final image.

Each patch problem maximizes one objective with three parts:
- Edge term: reward the patch for being clearly an edge or clearly uniform, as judged by the network.
- Density term: push pixels toward either empty or the material's density, not in between.
- Reference term: stay close to the baseline reconstruction, which carries the measured data.
Three decisions
Keep the network tiny. Every ReLU in the network becomes a binary variable in the optimization problem, and binary variables are what make these problems slow. The network has 28 neurons in total (9-9-9-1) and was trained on about 50,000 patches. It only has to approximate a 3×3 edge filter, so a larger network would add solver time without adding much.
Re-optimize patches, not the whole image. A 512×512 image as one mixed-integer problem is out of reach. Small patch problems can be solved independently and in parallel, and averaging their overlaps gives one image. The price is that each patch is solved on its own: this does not produce a proven optimum for the image as a whole.
Let real data stay grey. Weighting the density and reference terms equally (α = β) makes the objective linear, which solves faster and gives strongly two-tone images. That suits the simulated data. Real samples have pixels that genuinely sit between material and empty, so for them a smaller density weight (α < β) keeps that grey while still sharpening edges.
The formulation, for readers who want it
Measurements relate to the image through the projection operator :
The baseline (CSHM) balances data fit, total variation and a density penalty:
Each ReLU neuron is written with a positive and a negative part and a binary switch , using bounds :
When the negative part is forced to zero and carries the value; when the output is forced to zero.
For a patch with network output , edge indicator , threshold , material density and baseline :
The paper gives the full constraint set, bounds and parameter study.
Results
On the simulated test image the true answer is known, so error can be measured directly. With only five projections:

Baseline (CSHM)

This method
| Five projections | Baseline | This method |
|---|---|---|
| Error vs. true image (RME, lower is better) | 0.042 | 0.017 |
| Material/background separation (BMS, closer to 1 is better) | 0.974 | 0.998 |
| Runtime | 84 s | 1,388 s |
That is about 60% less error, for about 16 times the runtime. With twenty projections the error drops further, to 0.008, with separation at 0.999.
The real samples have no ground truth, so the evidence is sharper edges and fewer visible artifacts. On the zeolite, edge sharpness (the 95th percentile of edge strength) rose from 392 to 480, and pores come out cleaner:


The method deliberately does not chase the closest fit to the raw measurements. Real projections carry misalignment and contrast errors, and fitting them exactly reproduces those errors. On the zeolite the mismatch to the measurements went up, from 0.028 to 0.090, in exchange for interfaces that look like the physical sample. Not every metric favors it either: on the copper lattice, a plain compressed-sensing reconstruction scored slightly higher on edge sharpness, though with more artifacts.
What it costs, and where it stops
The main cost is time. On the zeolite the refinement took about 6,800 seconds against 136 for the baseline, and on the copper lattice about 3.5 hours. The patch problems are independent, so the work parallelizes well, but this is a post-processing step for cases where more beam time costs more than more compute.
The approach assumes a single material with sharp interfaces. Each patch is optimal on its own terms, not the image as a whole, and in the missing-wedge experiments, where a range of angles is unavailable, some artifacts remain even though edges are sharper than with the baseline.
My part
I led the software, data curation, formal analysis and investigation: the implementation that trains the network, turns it into constraints, solves the patch problems and runs the comparisons. Conceptualization, methodology, validation, visualization and writing were shared equally with my co-authors. The groundwork was my implementation of an earlier paper's network-to-MILP encoding.
High-quality tomographic image reconstruction integrating neural networks and mathematical optimization. Machine Learning: Science and Technology, Mach. Learn.: Sci. Technol. 6 (2025) 045065. doi:10.1088/2632-2153/ae25b6 ↗