SF-Flow: Spectral Flow Matching with High Structural Fidelity for Hallucination-Suppressed Scientific Image Generation

Zehua Wang, Patxi Fernandez-Zelaia, Mohamed Wahib, Xiao Wang, Isaac Lyngaas, Amir Koushyar Ziabari, Ferdinando FiorettoarXiv 2026

Imagine you’re a materials scientist. You’ve spent all day looking at X-ray CT scans of concrete or 3D-printed metal, trying to measure tiny pores and cracks. To train an AI to do this for you, you need thousands of labeled images. But labeling them by hand is a nightmare, and physics simulators produce "perfect" layouts that look nothing like the noisy, grainy reality of a laboratory scan.

You might turn to generative AI to "real-ize" your simulations. But there’s a catch: standard AI models are notorious liars. They might make a pore look incredibly realistic, but they’ll move it three microns to the left because it "looks better" there according to their training data. In science, that’s not a feature; it’s a hallucination that ruins your data.

TL;DR

SF-Flow is a new generative framework that forces AI to stay honest. By combining "flow matching" with clever mathematical constraints in the frequency domain, it generates scientific images that look exactly like real experimental scans while strictly adhering to a prescribed structural layout—preventing the "hallucinations" that usually plague AI-generated data.

What Problem Does This Paper Address?

The authors tackle the structural fidelity gap in unpaired image-to-image translation.

In many scientific fields, we have two separate piles of data:

  1. Real Scans: Beautifully messy, noisy, and realistic, but unlabeled.
  2. Prescribed Layouts: Perfect maps of where every material phase (like air, cement, or metal) should be, but lacking realistic texture.

When we use AI to bridge this gap, models like CycleGAN or CUT often prioritize "looking real" over "being accurate." If the training data has mostly large pores, the AI will "hallucinate" larger pores into your synthetic image, even if your layout specifically asked for small ones. This makes the resulting images useless for quantitative science, where measuring the exact size and location of features is the whole point.

Methods

The researchers introduced SF-Flow, which stands for Spectral Flow Matching. It works in three main stages:

  • Unconditional Flow Matching: First, they train a model to learn the "velocity" of how to turn random noise into a realistic material image. Crucially, they train this only on real images, without any labels.
  • The Spectral Constraint: This is the "aha!" moment. During the generation process, the model checks the image's "low-frequency" components (the big shapes and layouts) against a template. It uses a Fourier transform to ensure the coarse structure matches your map, while letting the AI freely generate the "high-frequency" details like noise, grain, and texture.
  • MMD Fidelity Constraint: To make sure the AI doesn't drift too far into "uncanny valley" territory while trying to follow the layout, they use a "statistical vibe check" called Maximum Mean Discrepancy (MMD). This ensures the generated batch of images shares the same high-level feature statistics as the real experimental data.
Figure 2. Overview of SF-Flow. A real-image flow prior predicts clean endpoints during sampling. Joint projection seeks the smallest correction satisfying per-image low-frequency template agreement (green) and cohort MMD fidelity (orange), using active predictions, completed outputs, and real references. Corrections update the flow state before integration resumes. A final joint projection at t = 1 precedes encoding, with no further ODE steps.

Datasets

The authors didn't just test this on pictures of cats; they went straight for the hard stuff:

  • Synchrotron Tomography of Concrete: High-resolution scans where distinguishing between pores and paste is notoriously difficult.
  • Laboratory MicroCT of Powders: Images dominated by photon-limited noise and beam-hardening artifacts.
  • Industrial XCT of Additively Manufactured Metal: Scans of 3D-printed parts where "streaking" and "shadows" often confuse standard AI.

Key Insights and Ideas

  • Layouts are for Generation, Not Training: Unlike many models, SF-Flow doesn't need to see a single layout during training. It learns what "reality" looks like first, and the user imposes the "rules" (the layout) only when they want to generate a new image.
  • Frequency Splitting: By separating the image into "layout frequencies" and "texture frequencies," the authors found a way to let the AI be creative where it matters (noise/texture) and rigid where it counts (boundaries/phases).
  • Suppressing the "Popularity Bias": Standard GANs often suffer from mode collapse or bias toward common features. SF-Flow’s constraints prevent the model from "fixing" a rare layout feature just because it hasn't seen it often in the training set.

Key Results

SF-Flow significantly outperformed existing baselines like C-CUT and UNSB in keeping the "hallucinations" at bay.

  • Higher Accuracy: On concrete datasets, SF-Flow achieved much higher "template agreement" (measured by MS-SSIM) than previous methods.
  • Fewer Hallucinations: As seen in Figure 1, while other models added "extra" pores or shifted boundaries (the red and blue highlights), SF-Flow stayed remarkably true to the original map.
  • Better Trade-offs: The model achieved a superior balance between "looking real" (FID score) and "being right" (Structural score), effectively pushing the frontier of what's possible in scientific image synthesis.
Figure 1. Phase hallucinations on three concrete layouts (rows). Each material map is followed by generated images and disagree- ment overlays. Colors identify extra predicted pore (red), paste (blue), and main structure (purple) outside their prescribed re- gions.

Limitations and Future Work

While SF-Flow is a huge step forward, the authors note a few hurdles:

  • The "Seven-Pixel" Rule: Because the spectral constraint focuses on low frequencies, very tiny features (smaller than about 7 pixels) can still shift slightly. The AI's "prior" still has some influence over the smallest details.
  • Computational Cost: Running these joint projections during the sampling process adds some overhead compared to a simple "one-shot" generator.
  • Downstream Validation: While the images look better and pass statistical tests, the ultimate proof will be seeing if models trained entirely on SF-Flow data can segment real-world, never-before-seen experimental scans with 100% accuracy.

If you're interested in the nitty-gritty math of how they solved the joint projection using a primal-dual solver, check out Section 4.4 of the paper!

Summary updated

BibTeX
@misc{wang2026sf,
  author = {Zehua Wang and Patxi Fernandez-Zelaia and Mohamed Wahib and Xiao Wang and Isaac Lyngaas and Amir Koushyar Ziabari and Ferdinando Fioretto},
  title = {{SF-Flow: Spectral Flow Matching with High Structural Fidelity for Hallucination-Suppressed Scientific Image Generation}},
  year = {2026},
  eprint = {2611.30073},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.30073},
}
Figure