A conditional WGAN-GP learned to satisfy its volume-fraction loss while generating almost no pore phase at all — 47 of 50 structures had zero percolating gas channels. This page reproduces the failure inside a live voxel volume, then shows the differentiable connectivity loss that fixed it. Switch runs, drag the cube, and watch what the gas can — and can't — do.
A solid oxide cell electrode is a three-phase composite. For the cell to produce current, each phase must form an unbroken highway from its own boundary to the reaction site — one missing network and the whole electrode is dead weight.
The generator outputs a per-voxel probability over the three phases, but the actual structure is the per-voxel argmax — winner takes all. The volume-fraction loss was computed on the probabilities.
The 30% pore probability kept L_VF happy while contributing nothing to the structure.
What survived as pore was a sprinkle of isolated voxels — useless for gas transport. A second bug made it
worse: L_SSA was built on a detached tensor, so its gradient never reached the generator at all.
Connectivity itself (flood fill) isn't differentiable — so L_conn uses two smooth proxies
on the pore probabilities:
A 3D convolution with a 6-neighbor kernel scores each voxel:
pore_prob × (1 − neighbors/6). Lone pore voxels are expensive; connected clusters are cheap —
so pore mass migrates into channels.
ReLU(solid − pore + 0.05) on the z = 0 and z = 35 faces. Crucially this stays non-zero even
when pore has fully collapsed — it bootstraps pore back into existence at the boundaries, then the
isolation penalty grows it inward.
Weighted at w_conn = 50 against the existing
1000·(L_VF + L_SSA), the generator keeps its statistics — and gains a topology.
Similarity to the training distribution is scored with Yu-style S-values via the
4_CNNCT analysis module (connected-component percolation, active-TPB density, transport metrics).
| Metric (S-value) | Run A — baseline | Run B — + connectivity | |
|---|---|---|---|
| Pore connectivity | 0.480FAIL | → | 0.896OK |
| Active TPB density | 0.592FAIL | → | 0.863OK |
| Total TPB density | 0.610FAIL | → | 0.867OK |
| YSZ connectivity | 0.773MARGINAL | → | 0.889OK |
| Ni connectivity | 0.841MARGINAL | → | 0.841MARGINAL |
S-value thresholds (Yu 2025): ≥ 0.85 OK · 0.70–0.85 Marginal · < 0.70 Fail. Ni is unchanged by design — the face hinge currently targets pore only; extending it to Ni is next.