02 // Graph ML · Scientific Computing 2026 · Independent Project

TopoFlow GNN

A pore-network permeability system that compares GraphSAGE with Kozeny-Carman physics and selects the modeling regime from measured structural heterogeneity.

1,231Samples
5Geological Formations
46.2%Best MSE Reduction
2Modeling Regimes
Overview

Permeability is often estimated with compact physics formulas, but heterogeneous pore networks contain connectivity and topology that a bulk formula cannot represent. A GNN can learn those relationships, but adding a neural model everywhere is not automatically better.

TopoFlow asks a more useful question: when does topology add predictive value? I benchmarked a GraphSAGE model against the Kozeny-Carman baseline across five formations, then exposed the result through a FastAPI application with streaming inference, 3D pore visualization, a cloud sample library, and a methodology dashboard.

  • Individual work: ML research, graph extraction, model implementation, benchmarking, API design, and frontend integration.
  • Evidence-first result: GNN wins on heterogeneous Savonnières and Estaillades; the physics baseline remains preferable on simpler regimes.
  • Reproducibility: source, benchmark artifacts, model weights, architecture, and setup instructions are public.
Architecture

A Scientific Pipeline, Not Just an Inference Endpoint

01
Micro-CT Volume
Voxel sample · local or cloud
02
SNOW2 Extraction
Pores · throats · geometry
03
Graph Features
Nodes · edges · heterogeneity
04
Regime Selector
GraphSAGE or physics baseline
05
Prediction & Evidence
Permeability · benchmark · 3D view
Benchmark Result

Topology Helps in the Complex Regime

Scatter plot showing pore-size heterogeneity and the modeling regime for five rock formations
The measured heterogeneity split separates formations where GraphSAGE reduces error from formations where the compact physics baseline remains sufficient.
Formation Pore-size Cv Preferred model Observed result
Savonnières~2.5GraphSAGE46.2% lower MSE
Estaillades2.80GraphSAGE28.4% lower MSE
MEC Carbonate0.85PhysicsAdded model complexity not justified
ILS Limestone0.52PhysicsAdded model complexity not justified
Synthetic0.45PhysicsAdded model complexity not justified
Product Flow

From Research Artifact to Usable Tool

01

Select or upload a rock volume

The application supports local files and a Supabase-backed sample catalog, with a server-side proxy so cloud credentials stay outside the browser.

02

Extract and inspect the pore network

Large arrays are downsampled server-side for visualization while the scientific pipeline retains the full representation for graph extraction and inference.

03

Stream progress through the API

FastAPI exposes prediction and visualization routes, while Server-Sent Events keep the interface responsive during graph construction and model execution.

04

Return the model and the reason

The result includes permeability, structural statistics, and the selected regime so the user can see why graph learning or physics was used.

Engineering Challenges

Where the Work Became Interesting

Problem

GNNs did not win everywhere

A single average score hid a meaningful difference between homogeneous and heterogeneous formations.

Solution

Turned failure into a regime rule

Compared per-formation behavior and used pore-size heterogeneity to preserve the simpler physics model where topology added no measurable value.

Problem

Scientific arrays were too large for the browser

Rendering full micro-CT volumes made the UI slow and memory-heavy.

Solution

Separated inference and visualization grains

The backend keeps the scientific representation for prediction while returning a bounded, deterministic visualization payload to Plotly.js.

Problem

Long-running extraction felt broken

Graph extraction can take time before the user sees a result.

Solution

Added streaming progress

Server-Sent Events expose pipeline progress without coupling the scientific library to frontend state.