Deconfounded Hierarchical Gate (DHG)
- DHG is a causal gating mechanism that decouples nuisance effects by counterfactually adjusting validator scores in physics-constrained deep generative models.
- It removes confounding through backdoor adjustments and hierarchical activation, ensuring that global constraints precede localized detail in generation.
- Empirical results in lithium-ion battery temperature extrapolation show significant RMSE reductions by enforcing coarse-to-fine physical constraints.
Deconfounded Hierarchical Gate (DHG) is a causal gating mechanism for physics-constrained deep generative modeling under confounding, introduced to address out-of-distribution extrapolation when a nuisance variable causally affects both the generated state and the apparent physics residual. In the formulation reported for lithium-ion battery temperature extrapolation, DHG acts as both a diagnostic and a control mechanism: it identifies when and how strongly temperature confounding contaminates each constraint level, removes that contamination through counterfactual estimation and backdoor adjustment, and activates hierarchical physical constraints progressively in a coarse-to-fine order during generation (Okita, 8 May 2026).
1. Problem setting and motivation
DHG is motivated by a failure mode of physics-constrained deep generative models in out-of-distribution regimes such as temperature, material, or protocol shift. The reported setting concerns diffusion or flow-matching style generators with physics penalties, where a common practice is to apply a single static regularization term uniformly across timesteps and samples. The method is introduced on the premise that this practice is inadequate for two stated reasons: physical constraints are hierarchical, and the constraint signal itself can be confounded (Okita, 8 May 2026).
The hierarchy claim is operational rather than purely conceptual. Coarse, global consistency is treated as a prerequisite for finer local detail, so a uniform penalty ignores priority structure across levels. The confounding claim is causal: a nuisance variable such as temperature affects both the generated data and the measured violation or validator score. Under such conditions, a high residual is not uniquely interpretable as intrinsic physical inconsistency.
The battery example is used to make this ambiguity explicit. Temperature affects internal resistance, producing a sharp early voltage dip at low temperature in Phase 1, and also affects degradation rate through an Arrhenius mechanism, producing an earlier terminal drop at high temperature in Phase 3. The reported interpretation is that these effects create Simpson’s paradox: correlations reverse when conditioning on temperature. A naive constraint can therefore penalize physically valid waveforms solely because their appearance changes with temperature (Okita, 8 May 2026).
A central implication is that raw validator outputs or PDE residuals are not neutral measurements in shifted environments. They may mix intrinsic inconsistency with environment-specific appearance changes, so directly optimizing them can push a generator away from valid solutions under new conditions. DHG is designed to separate these contributions.
2. Causal formulation and deconfounding
The causal formulation uses a structural causal model with as the current generative state, as the physical target or validator score, as the confounder, as the level- constraint, and as the gate modulating that constraint’s contribution. At a high level, the causal relations are , , and , with lower-level constraint signals influencing higher-level decisions.
At level 0, the observational violation is defined as
1
where 2 is either a learned validator or a residual norm. DHG seeks a counterfactual or interventional quantity that neutralizes the confounder:
3
In practice, the intervention is implemented by holding 4 fixed while replacing the temperature input to the validator. With a virtual set of temperatures 5, the approximation is
6
The causal reference point is the backdoor adjustment formula
7
The distinction emphasized in the method is that 8 averages over the spurious path 9, whereas intervention blocks that path. DHG applies this logic not by changing the generator state, but by intervening on 0 in the validator (Okita, 8 May 2026).
A second deconfounding step addresses inter-level dependence. Higher-level scores may inherit confounding through lower-level signals, so DHG regresses out lower-level counterfactual violations:
1
where 2 denotes stop-gradient. The learned coefficients 3 serve as inter-level backdoor adjustments and are interpreted as carriers of confounding strength across levels.
DHG also defines an explicit diagnostic quantity,
4
which measures how much the observational score differs from its temperature-neutral counterpart. Larger 5 indicates stronger confounding at level 6. This makes DHG not only a training mechanism but also a way to render confounding empirically visible.
3. Hierarchical gates and training objective
The hierarchical component activates constraints from global to local along continuous flow-matching generation time 7. The reported three-level design assigns Level 1 to global self-consistency, Level 2 to mid-scale patterns, and Level 3 to local consistency. The initial activation offsets are 8, 9, and 0, corresponding respectively to early, mid, and late stages of generation (Okita, 8 May 2026).
Each level uses a sigmoid time schedule
1
with learnable 2 initialized to 3. This schedule determines when each constraint becomes active along the generation trajectory.
The actual gate for level 4 is defined from lower-level deconfounded scores:
5
Its role is to suppress higher-level constraints until lower-level deconfounded violations are sufficiently small. In the stated intuition, global consistency must be achieved before more localized constraints contribute gradients. The gate is therefore hierarchical in dependency and causal in its input signal.
The loss combines data fitting, frozen-operator guidance, and deconfounded hierarchical constraints. The general form is
6
with 7. In the reported implementation,
8
and
9
with 0 and 1.
The level-specific constraint 2 can take two forms. When physical equations are not directly imposed, 3 is the learned self-consistency score 4 or a calibrated transform of 5. When PDEs are known, 6 can be a residual norm such as 7, with the same deconfounding procedure applied to counterfactual residuals. This makes DHG compatible with both learned validators and explicit PDE residuals.
4. Integration with FNO and conditional flow matching
The full reported pipeline is HPC-FNO-CFM with DHG. It combines a pretrained Fourier Neural Operator, a conditional flow-matching generator, and level-specific validators. The FNO(1) component is a Fourier Neural Operator for 1D sequences with 3 layers, 16 Fourier modes, width 64, and approximately 9.5M parameters. The generator is a conditional flow matching model with a U-Net velocity field 8. The validators 9 are two-layer MLPs with ReLU and sigmoid (Okita, 8 May 2026).
The procedure is organized into three stages. In Stage 1, FNO(1) is pretrained on multi-condition data excluding the target domain. The pretraining loss is MarginRankingLoss enforcing temperature ordering, exemplified by lower average voltage at higher temperature. The pretrained parameters 0 are then frozen. In Stage 2, the CFM is trained with a condition encoder 1, and the frozen FNO output
2
is provided as an extra input to the velocity field without updating 3. In Stage 3, the validators and CFM are trained jointly with DHG-based deconfounded hierarchical constraints.
At the per-batch level, Stage 3 computes 4, evaluates 5, forms 6 by averaging over 7, adjusts higher-level scores using learned 8, constructs gates 9, computes the time schedule 0, and accumulates 1. Only the CFM and validators are updated; the pretrained FNO remains frozen.
The temperature encoder 2 is given explicitly as a 3D encoding:
3
with 4, 5, and 6.
The reported training schedules are also explicit. Pretraining uses 7, 500 epochs, and a WSD scheduler. Downstream training uses 8, 300 epochs, and gradient clipping at 1.0. The number of DHG levels is 9, the schedule offsets are initialized to 0, and the learned inter-level coefficients 1 are clamped, for example, at 2 or 3 to ensure stability (Okita, 8 May 2026).
5. Empirical results and the target-exclusion finding
The principal benchmark is lithium-ion battery temperature extrapolation. Training uses NASA data at 4 only, specifically B0005–B0007 with 168 cycles each. Evaluation is performed at 5, 6, 7, and 8 across five groups: Near, Low1, Low2, High1, and High2. Inputs are voltage waveforms 9 resampled to 50 points and normalized, together with capacity 0 of sequence length 50 (Okita, 8 May 2026).
The reported voltage-waveform RMSE values are as follows:
| Setting | RMSE |
|---|---|
| Pure CFM | 0.397 |
| DHG + hierarchical constraints + frozen FNO(1) | 0.224 |
| DHG + hierarchical constraints + frozen FNO(1), corrected scheduler | 0.215 |
| Training from scratch | 0.480 |
The paper also reports that FID/PFD improves consistently and correlates with RMSE. For capacity extrapolation, frozen pretrained FNO(1) achieves RMSE 0.084, compared with 0.214 from scratch.
A particularly notable result concerns pretraining strategy. Excluding the target domain from FNO pretraining improves extrapolation by 39%, with RMSE 1 versus 2, and the text also notes 3 in a specific setup. After a corrected scheduler, the best RMSE is 4. The stated interpretation is that withholding NASA forces the model to learn condition-invariant physical structure, such as temperature-dependent ion transport, rather than domain-specific shortcuts tied to electrode-chemistry-specific discharge shape. The paper explicitly connects this observation to invariant risk minimization and to temperature confounding in NASA via Simpson’s paradox. A common expectation is that including target-domain data should improve transfer; the reported result shows the opposite in this setting (Okita, 8 May 2026).
DHG-specific diagnostics reinforce the confounding interpretation. Learned backdoor coefficients 5 are larger in datasets with larger temperature span, and MICH_EXP reaches the clamp upper bound, which is described as consistent with stronger confounding. Temperature discrimination accuracy from generated waveforms is above random in both reported datasets: NASA achieves 6 versus random 7, and MICH_EXP achieves 8 versus random 9. Increasing the clamp upper bound on 0 from 1 to 2 improves RMSE on MICH_EXP from 3 to 4, indicating that sufficient correction capacity can matter. The learned schedule offsets remain near 5 after training, which is presented as evidence for coarse-to-fine activation.
6. Practical use, scope, and limitations
The reported guidance for other domains begins with confounder identification. The confounder 6 should causally affect both system states and constraint signals. Examples named in the paper include temperature in fluids or transport, viscosity, Mach number, and material properties. This suggests that DHG is intended for settings where the nuisance variable is structurally entangled with what a validator measures, rather than merely correlated with the dataset (Okita, 8 May 2026).
Hierarchy design is likewise domain-aware. Level 1 is assigned to global invariants such as mass or charge balance, monotone trends, or energy bounds. Level 2 is assigned to mid-scale structure such as constitutive relations, dominant modes, or coarse PDE residuals. Level 3 is assigned to local detail such as pointwise PDE residuals, boundary conditions, or range constraints. If equations are known, the hierarchy can be instantiated with increasingly fine residuals; if equations are unknown or noisy, learned validators can score self-consistency instead.
The deconfounding procedure requires choosing a counterfactual set 7 or more generally 8 that covers the expected range, together with an empirical or uniform prior 9. Counterfactual scores are computed by replacing 00 in the validator while holding 01 fixed. The learned 02 coefficients are trained with stop-gradient on the predictors and clamped in a range such as 03 to 04. Reported hyperparameter guidance includes gate sharpness 05 typically between 5 and 20, learnable schedule offsets initialized to 06, and a small 07, for example 08, to avoid overpowering the data loss. The compute overhead is reported as approximately 09 baseline because of multiple validator passes over 10, with a recommendation to keep 11 modest, such as 3–7, or to subsample per step.
The stated limitations are causal, statistical, and operational. DHG assumes that the dominant confounder has been correctly identified; unobserved confounders can remain. Its counterfactual estimates depend on validator quality; weak validators degrade deconfounding. It also assumes the availability of a reasonable 12 and 13 set. Failure modes include over- or under-correction through the 14 clamps and brittle gates when 15 is too sharp. The method is also described as less helpful when out-of-distribution behavior is governed by feedback dynamics, such as cycle extrapolation with nonlinear degradation, where explicit modeling of feedback may be required. More broadly, the paper presents DHG as demonstrated on batteries across temperature, while noting that extension to other PDE-governed systems is promising but requires a domain-aware hierarchy (Okita, 8 May 2026).