FiMoNet: Neural Model for Multiphase Flow
- FiMoNet is a neural architecture that decouples scalar and spatial inputs via FiLM to accurately predict multiphase flow in porous media.
- It integrates a Fourier Neural Operator branch with a UNet encoder–decoder, using spectral convolutions and skip connections to capture critical spatial details.
- The model employs a spatially weighted L1 loss to focus on regions of high physical relevance, significantly reducing prediction errors in CO₂–water systems.
FiMoNet, also referred to as UFNO-FiLM, is a neural architecture designed for improved prediction of multiphase flow in porous media, particularly targeting subsurface CO₂–water systems. Building on the UNet-enhanced Fourier Neural Operator (UFNO) framework, FiMoNet introduces two principal innovations: (1) the decoupling of scalar and spatial input modalities via Feature-wise Linear Modulation (FiLM), and (2) a spatially weighted loss function that prioritizes prediction accuracy in regions of high physical relevance. These modifications yield substantial improvements in predictive performance, as measured by gas saturation accuracy and structural similarity, while ensuring computational efficiency and principled error allocation (Abdellatif et al., 25 Nov 2025).
1. Architectural Overview
FiMoNet integrates parallel processing of spatial and scalar inputs, followed by feature fusion and affine conditioning. The architecture processes:
- Spatial fields : Inputs such as permeability, porosity, and initial saturation, represented over an spatial grid.
- Scalar controls : Nonspatial physical parameters (e.g., injection rate, reservoir thickness).
The network comprises two parallel branches:
- FNO branch: Executes layers of spectral convolutions. Each layer computes a 2D Fast Fourier Transform (FFT), linearly transforms the lowest Fourier modes, and reconstructs the spatial output via inverse FFT plus a pointwise mapping.
- UNet branch: Implements a standard encoder–decoder with skip connections, capturing high-frequency spatial details.
After concatenating the outputs from all FNO and UNet levels, the combined feature map is modulated by the FiLM layer, which injects scalar information directly into the spatial features through feature-wise affine transformations. The final prediction , representing the gas saturation field, is computed via a convolution.
2. FiLM Layer: Mathematical Formalism and Implementation
The FiLM layer enables conditional modulation of spatial features using global scalar controls without introducing redundant signals into FNO’s frequency domain. Formally, given:
- Feature map
- Scalars
A two-layer MLP produces per-channel scaling and bias :
The modulated output is:
and are broadcast across the spatial dimensions, ensuring spatially uniform but channel-specific modulation. This approach circumvents the inefficiency of duplicating scalar controls as spatial fields, which in standard UFNO resulted in unnecessary constant signals in the Fourier domain. The MLP uses a hidden layer of dimension 128 (ReLU activation), outputting $2C$ values without activation.
3. Spatially Weighted Loss Function
FiMoNet employs a spatially weighted loss, allocating higher error sensitivity to grid locations with more significant plume migration activity. The weighting map is computed as the per-pixel mean of gas saturations in the training set, yielding a fixed (across samples) 2D mask over the grid. The objective function for a batch of samples is:
Inactive regions (as determined via masking) are excluded from the loss calculation, further focusing the model on physically meaningful regions. This selective weighting improves the model’s focus and yields tangible accuracy benefits in the modeling of active CO₂ plume dynamics.
4. Training Protocol and Dataset
FiMoNet was evaluated on 5,000 simulated two-phase CO₂–water flows generated on a 2D radial grid, following established precedent from Wen et al. (2022). The dataset comprises:
- 4,000 training samples
- 500 validation samples
- 500 test samples
Each sample contains 24 time-step gas-saturation snapshots, bounded within . Training employed the Adam optimizer (learning rate: ), batch size 16, and 200 epochs on a single NVIDIA V100 GPU (16 GB). Model performance utilized standard metrics: Mean Absolute Error (MAE), Structural Similarity Index Measure (SSIM), and Relative Error.
5. Quantitative Performance Analysis
FiMoNet demonstrates consistent improvements over both FNO and the original UFNO. The table below summarizes test-set performance, averaged over 500 hold-out samples:
| Model | MAE | SSIM | Relative Error |
|---|---|---|---|
| FNO | 0.00410 | 0.9780 | 0.2120 |
| UFNO | 0.00280 | 0.9879 | 0.1598 |
| UFNO-FiLM | 0.00250 | 0.9895 | 0.1451 |
| UFNO-WLoss | 0.00230 | 0.9906 | 0.1583 |
| FiMoNet | 0.00220 | 0.9904 | 0.1510 |
FiMoNet (UFNO-FiLM + weighted loss) achieves a 21% reduction in gas-saturation MAE compared to UFNO, with modest improvements in SSIM and relative error. Ablation studies show that both the FiLM layer and spatially weighted loss independently yield improvements, but their combination produces the largest accuracy gain.
6. Comparative Analysis and Ablation
Removing both FiLM and spatial weighting (plain UFNO) yields an MAE of 0.00280. Introducing only the FiLM layer reduces MAE to 0.00250; only the weighted loss, to 0.00230. Combining both (FiMoNet) achieves the lowest MAE of 0.00220. Validation curves demonstrate accelerated convergence and enhanced generalization with FiLM conditioning, especially in data-scarce regimes (as low as 10% of the available data). This suggests FiMoNet is robust to limited data availability, offering efficient learning in high-stakes physical regions.
7. Significance and Implications
FiMoNet resolves two critical shortcomings in previous UFNO variants: it prevents the FFT-domain inefficiency introduced by spatially replicated scalar inputs, and it aligns the training objective with domain-specific priorities through spatial weighting. By combining FiLM-based feature modulation and spatially aware loss design, FiMoNet delivers more accurate and physically relevant predictions of multiphase flow in porous systems, as evidenced by substantial reductions in MAE and improvements in structural metrics.
A plausible implication is that this approach—decoupling scalar and spatial modalities and emphasizing loss in policy-relevant domains—may be extensible to other operator learning and scientific machine learning applications where global physical parameters modulate local fields and error costs are heterogeneous. However, these claims pertain solely to the supported evidence in the evaluation of CO₂ plume migration in heterogeneous media (Abdellatif et al., 25 Nov 2025).