---
title: Deconfounding Factor Weighting (DFW)
url: https://www.emergentmind.com/topics/deconfounding-factor-weighting-dfw
type: topic
---

# Deconfounding Factor Weighting (DFW)

Deconfounding Factor Weighting (DFW) denotes weighting procedures designed to attenuate confounding by altering the effective training or estimation distribution so that treatment, action, or exposure assignment is less entangled with observed covariates or latent confounders. In recent arXiv literature, the term appears in multiple, non-identical formulations: as a latent-variable inverse-propensity scheme for multivariate time-series forecasting in dynamic human–robot interaction, as a bounded propensity-score transformation for observational treatment-effect estimation, and as a broader principle encompassing overlap-improving representations, independence weights for continuous treatments, mean-balancing weights, and kernel-based direct balancing [2410.20423; 2508.05215; 2104.05762; 2107.07086; 2403.03299; 2512.18069]. This suggests that DFW is best understood not as a single universally fixed estimator but as a family of deconfounding reweighting constructions organized around a common causal objective: reducing bias from confounding while controlling variance and preserving the target estimand.

## 1. Core idea and formal variants

Across the cited formulations, DFW modifies either a predictive loss or an effect-estimation objective by assigning weights to observations, time steps, or treatment coordinates. The immediate aim differs by setting. In time-series prediction, the weights are attached to per-step losses to remove hidden-confounder bias. In observational causal inference, the weights construct a pseudo-population that better approximates a randomized controlled trial. In continuous-treatment settings, the weights are chosen so that treatment and covariates become independent on the weighted sample. In direct balancing approaches, the weights are obtained by solving an optimization problem that explicitly minimizes distributional imbalance rather than inverting a parametric propensity model [2410.20423; 2508.05215; 2107.07086; 2512.18069].

| Setting | Weighting rule | Immediate objective |
|---|---|---|
| Multivariate time series | $w_{t j}=1/p(A_{t j}\mid X_t,U_t)$ | Reweight each time step’s loss to remove hidden-confounder bias |
| Binary treatment | $w_i^{\rm DFW}=1-\hat e_i$ | Bounded weights and improved covariate balance |
| Multi-treatment | $w_i^{\rm DFW}=1-\hat e_{i,t_i}$ | Extension of bounded weighting to the received treatment |
| Continuous treatment | $w^\star=\arg\min \mathcal D_n(w)$, with $w_i\ge 0$ and $\sum_i w_i=n$ | Make treatment and covariates independent on the weighted sample |
| High-dimensional direct balancing | Minimize kernel MMD objectives plus $(\lambda/2)\|w\|_2^2$ | Balance treated and control distributions using a random-forest kernel |

A recurring technical distinction concerns whether weighting is based on explicit propensity inversion. The time-series formulation uses inverse-propensity-type weights, whereas the 2025 binary-treatment DFW proposal explicitly states that it does not invert the propensity score and instead uses the shifted rule $1-\hat e_i$ [2410.20423; 2508.05215]. Related representation-based work further shifts the emphasis from direct weighting formulas to lower-dimensional deconfounding summaries that permit less extreme reduced propensities under weak overlap [2104.05762].

## 2. Latent-confounder weighting for multivariate time-series forecasting

In the time-series formulation, the observed data consist of covariates $X_t\in\mathbb R^d$, observed actions or treatments $A_t\in\mathbb R^k$, and a future outcome $Y_{t+h}$. Hidden confounders $U_t$—denoted $Z_t$ in the source paper—affect both $A_t$ and $Y_{t+h}$. DFW proceeds in two stages. Stage 1 infers a time series of latent variables $U_t$ that capture hidden confounders via a factor model such as an RNN or VAE. Stage 2 computes deconfounding weights
$$
w_{t j}=\frac{1}{p(A_{t j}\mid X_t,U_t)}
$$
for each action coordinate $j=1,\dots,k$, and uses them to reweight the downstream forecasting loss [2410.20423].

The estimation procedure is explicit. An RNN encoder updates
$$
h_t = RNN_\phi(X_t,A_t,h_{t-1}), \qquad U_t = W_h h_t,
$$
or uses the mean of a Gaussian VAE. A separate propensity model is then fit for each action coordinate,
$$
\hat\pi_{t j}=p_{\theta_j}(A_{t j}\mid X_t,U_t),
$$
and the corresponding weights are
$$
\hat w_{t j}=\frac{1}{\hat\pi_{t j}(A_{t j}\mid X_t,U_t)}.
$$
The forecasting network $f_\psi$, implemented for example as an LSTM or Transformer, is trained by minimizing
$$
L(\psi,\phi,\theta)=\sum_t\sum_j \hat w_{t j}\cdot \ell\bigl(f_\psi(X_t,A_t,U_t),Y_{t+h}\bigr)+\lambda\cdot Reg_{\rm latent}(\phi),
$$
where $\ell$ may be squared error and the latent regularizer penalizes degenerate encodings of $U_t$ [2410.20423].

The framework is explicitly model-agnostic at the forecasting stage. Once $(X_t,A_t,U_t)$ and weights $w_t$ are available, they can be fed into an LSTM, iTransformer, TimesNet, Transformer, or Nonstationary Transformer. During training, each time step’s contribution to the loss is multiplied by the corresponding weight so that the net effect of hidden confounders is removed. Under overlap and sequential ignorability, the formulation states that reweighting by $w_t$ makes the weighted distribution of $(X_t,A_t)$ unconfounded, written as $(X_t \perp Y_{t+h})$ and $(A_t \perp Y_{t+h})$ given weighting by $w_t$ [2410.20423].

Empirically, the reported gains are substantial. On simulated and real datasets, including T-Drive taxi GPS, applying DFW yields a 5–10% reduction in MSE or RMSE versus the same model trained without weights, particularly large gains of up to 15–20% in long-horizon forecasts with $pl=36,48$, and improved $R^2$-scores in latent confounder recovery. One example given is a Nonstationary Transformer with deconfounding achieving $\mathrm{MSE}=0.2647$ versus $0.2813$ without deconfounding at history $=48$ and future $=24$ [2410.20423].

## 3. Bounded DFW for binary and multi-treatment effect estimation

A distinct formulation defines DFW for observational causal inference with binary treatments. Here the central quantity is the propensity score $e(\mathbf x)=P(t=1\mid \mathbf x)$. The proposal is motivated by two standard comparators. Inverse Probability Weighting uses
$$
w_i^{\rm IPW}=\frac{t_i}{e(\mathbf x_i)}+\frac{1-t_i}{1-e(\mathbf x_i)},
$$
and Covariate Balancing Propensity Score minimizes a balance criterion over a parametric propensity model. Both can inherit the unbounded-weight problem when overlap is poor [2508.05215].

DFW introduces the deconfounding factor
$$
\mathrm{DF}_i=1-P(t_i\mid \mathbf x_i)=1-\hat e_i
$$
and sets the binary-treatment weight to
$$
w_i^{\rm DFW}=1-\hat e_i.
$$
The formulation emphasizes that it does not invert the propensity score; it simply shifts it by one. Since $\hat e_i\in(0,1)$, the weights satisfy
$$
0<w_i^{\rm DFW}<1,
$$
which rules out extreme weights. A second-order Taylor comparison is used to argue that $\mathrm{Var}(w^{\rm IPW})>\mathrm{Var}(w^{\rm DFW})$, and empirically DFW achieves lower coefficient of variation in weights than IPW for approximately 75% of sample combinations, reported more precisely as 74.8% of all 6-tuple CV comparisons [2508.05215].

The implementation is intentionally simple. A classifier $f_{\rm cla}$ estimates $\hat e_i\approx P(t_i\mid x_i)$; the weights are set to $1-\hat e_i$; an outcome model $f_{\rm reg}$ is trained or evaluated under the weighted loss
$$
L=\frac{\sum_{i=1}^n w_i\cdot \ell(f_{\rm reg}(x_i,t_i),y_i)}{\sum_{i=1}^n w_i}.
$$
The stated computational complexity is $O(np)$ when logistic regression is used for propensity estimation and linear or comparably structured weighted regression is used for outcome modeling. This is on par with IPW and Overlap Weighting and substantially cheaper than CBPS’s iterative moment solver [2508.05215].

The theoretical claims are framed under SUTVA, unconfoundedness, and overlap. Under these assumptions, reweighting the observed outcomes by $w_i^{\rm DFW}$ recovers an unbiased ATE. The method also extends naturally to multi-treatment settings: with a $K$-class classifier estimating $\hat e_{i,1},\dots,\hat e_{i,K}$ and observed treatment $t_i\in\{1,\dots,K\}$, the weight becomes
$$
w_i^{\rm DFW}=1-\hat e_{i,t_i}.
$$
Boundedness and variance-reduction arguments are stated to hold component-wise [2508.05215].

The empirical evaluation spans IHDP, Jobs, and synthetic linear and non-linear data. The reported results include all covariates achieving $\mathrm{SMD}<5\%$ on IHDP and Jobs, ECDF curves for treated and control nearly coinciding, K-S statistics that match or beat Overlap on most features and have narrower confidence intervals than IPW or CBPS, and the lowest $\epsilon_{ATE}$ and PEHE in both linear and non-linear outcome models. On synthetic data, DFW is reported to have the lowest ATE bias in every linear and non-linear scenario and the smallest distributional imbalance across low, moderate, and high bias settings [2508.05215].

## 4. Deconfounding scores, overlap, and reduced propensity representations

A related but conceptually distinct development is the notion of a deconfounding score. A function $d(X)$ is a deconfounding score for the ATE if
$$
\tau^{ATE}=E\bigl[E[Y\mid d(X),T=1]-E[Y\mid d(X),T=0]\bigr].
$$
The propensity score $e(X)$ and the prognostic scores $m_t(X)=E[Y\mid X,T=t]$ are special cases, but a deconfounding score need not render $T$ independent of $X$. Instead, it preserves just enough information to leave the target estimand unchanged while potentially discarding information that harms overlap [2104.05762].

The key identification result is a zero-covariance condition. Under unconfoundedness with respect to the original covariates $X$, the reduction bias induced by replacing $X$ with $d(X)$ is characterized through
$$
\Cov\bigl(m_t(X),e(X)\mid d(X)\bigr),
$$
and a necessary and sufficient identifiable condition for $d$ to be deconfounding is that these conditional covariances vanish for $t=0,1$. This shifts the design problem from estimating a high-dimensional propensity model to constructing a low-dimensional representation that preserves causal identification while improving overlap [2104.05762].

In the Gaussian-linear specialization, with $X\sim N(0,\Sigma)$ and linear score $d_\gamma(X)=\gamma'X$, the zero-covariance condition reduces to a bilinear constraint
$$
\alpha'\beta=(\alpha'\gamma)(\gamma'\beta),
$$
whose solution set is characterized by a hyperbola. The two extreme points correspond to the propensity score and the prognostic score. Intermediate choices interpolate between them and are described as improving overlap without introducing bias. Weighting estimators then use the reduced propensity
$$
e_d(X)=P(T=1\mid d(X))
$$
inside IPW or AIPW, for example in ATT estimation [2104.05762].

The simulation evidence is explicitly oriented toward weak-overlap regimes. In low-overlap settings, the prognostic-score extreme AIPW-$d(-1)$ attains the lowest RMSE among the compared methods. The paper’s bias-variance analysis further reports that classical regularization of $e(X)$ reduces variance at the cost of large bias, whereas deconfounding scores reduce variance with negligible bias. The source also identifies open questions, including theory beyond the Gaussian-linear setting and semiparametric efficiency [2104.05762].

## 5. Continuous treatments and independence-based weighting

For continuous treatments, the adjacent DFW principle is to choose weights so that, on the re-weighted sample, the treatment $A$ is approximately independent of the covariates $\mathbf X$. This principle is operationalized through a criterion based on weighted distance covariance and energy distances. With nonnegative weights summing to $n$, the objective is
$$
\mathcal D_n(w)=V^2_{n,w}(\mathbf X,A)+E(F_{n,w}^{\mathbf X},F_n^{\mathbf X})+E(F_{n,w}^A,F_n^A),
$$
where $V^2_{n,w}$ is the weighted distance covariance and the $E(\cdot,\cdot)$ terms are energy distances between weighted and empirical marginals. The criterion is nonnegative and equals zero if and only if the weighted empirical joint CDF factorizes and the marginals match exactly [2107.07086].

The resulting estimator, DCOW, solves
$$
w^\star=\arg\min_{w\in\mathbb R^n}\mathcal D_n(w)
\quad\text{subject to}\quad
w_i\ge 0,\ \sum_{i=1}^n w_i=n,
$$
or the penalized version
$$
w^\star_\lambda=\arg\min_{w\ge 0,\ \sum w_i=n}
\left\{\mathcal D_n(w)+\lambda\,\frac{1}{n^2}\sum_{i=1}^n w_i^2\right\}.
$$
The optimization is a convex quadratic program in $n$ variables, with precomputation of pairwise distances taking $O(n^2)$ and worst-case QP solution cost roughly $O(n^3)$, though modern solvers can exploit structure [2107.07086].

The theoretical guarantees are stronger than mere finite-sample balancing heuristics. Under finite-moment conditions, asymptotic independence is established in the sense that the weighted empirical joint CDF factorizes. Under standard smoothness and kernel conditions, the weighted Nadaraya–Watson estimator is consistent for the mean potential outcome $\mu(a_0)$. With an additional outcome regression, the doubly robust estimator is asymptotically normal at the usual $n^{-1/2}h^{-1/2}$ rate with efficient variance [2107.07086].

The numerical experiments include NMES simulations with continuous smoking exposure and MIMIC data on mechanical power in mechanically ventilated ICU patients. In the NMES study, DCOW gives the lowest mean absolute bias and integrated RMSE among all non-doubly-robust estimators at all reported sample sizes, and its doubly robust version is uniformly the best. In the MIMIC application, DCOW and DCOW(dm) achieve the best independence-and-effective-sample-size trade-off, and the estimated ADRF under DCOW has tight confidence intervals and shows a monotone increasing mortality risk in the upper range of mechanical power [2107.07086].

## 6. Direct balancing, regression-based formulations, and high-dimensional adaptivity

Another strand of the literature connects DFW-style weighting to the problem that OLS with covariate adjustment can produce a conditional-variance-weighted average of stratum-specific effects rather than the ATE. Grouping the Frisch–Waugh–Lovell weights by covariate strata yields
$$
w_x\propto \hat P(X=x)\,\widehat{\Var}(D\mid X=x)=\hat P(X=x)\,\hat d(x)\bigl[1-\hat d(x)\bigr],
$$
rather than the natural ATE weights $\hat P(X=x)$. The proposed remedy is to relax “single linearity” to “separate linearity,” meaning that each potential outcome is linear in $X$ without requiring constant treatment effects. Under separate linearity, mean-balancing weights that satisfy
$$
\sum_{D_i=1}w_iX_i=\sum_{D_i=0}w_iX_i=\bar X,
\qquad
\sum_{D_i=1}w_i=\sum_{D_i=0}w_i=1
$$
yield the ATE through
$$
\widehat\tau_{DFW}
=
\sum_{i:D_i=1}w_iY_i-\sum_{i:D_i=0}w_iY_i.
$$
A standard construction solves an entropy-minimization problem, producing strictly positive smooth weights and a low-dimensional dual optimization over Lagrange multipliers [2403.03299].

High-dimensional nonparametric direct balancing pushes this logic further by replacing parametric moment balance with kernel balance derived from a multivariate random forest. The procedure first standardizes treatment and outcome, fits a forest to the bivariate response $(\tilde A_i,\tilde Y_i)$, constructs the similarity kernel
$$
K_{m,n}(X_i,X_j)=\frac{1}{m}\sum_{t=1}^m 1\{\ell_t(X_i)=\ell_t(X_j)\},
$$
and then solves a quadratic program minimizing the treated and control MMD objectives plus $(\lambda/2)\|w\|_2^2$, subject to nonnegativity and within-arm normalization. Under SUTVA, strong unconfoundedness, positivity, continuity of $\pi(\cdot)$, a universal positive-definite kernel, and a $P$-Donsker RKHS unit ball, the resulting weights converge in $L_2$ norm to normalized inverse-propensity weights, and the corresponding ATE estimator is consistent and asymptotically unbiased [2512.18069].

The simulation study for the random-forest-kernel method uses $n\in\{500,1000\}$, $p\in\{50,100,200\}$, and three confounding designs, with 200 repetitions per design. The reported result is that RF Kernel MMD is uniformly lowest-bias across all settings, with especially large gains when $p\gg n$ or nonlinear or discontinuous confounding is present, while remaining on par with outcome-adaptive lasso and logistic IPW under the purely linear model. In a real-data application to right-heart catheterization in 5,735 critically ill ICU patients with approximately 70 baseline covariates, the RF-kernel MMD estimate is $\hat\tau=0.0484$ with bootstrap $\mathrm{SE}=0.0129$, compared with $0.0498$ for Gaussian Kernel MMD, $0.0528$ for Logistic IPW, $0.0548$ for OutLasso, and $0.0564$ for RF IPW [2512.18069].

## 7. Assumptions, diagnostics, misconceptions, and limitations

Despite their formal differences, DFW formulations share a common dependency on causal identifiability conditions. The recurring assumptions are consistency or SUTVA, unconfoundedness or strong unconfoundedness, overlap or positivity, and, in sequential settings, sequential ignorability. Where latent confounders are inferred rather than observed, the quality of the encoder becomes part of the identification-and-estimation problem rather than a purely computational detail [2410.20423; 2508.05215; 2107.07086; 2512.18069].

A common misconception is to treat DFW as synonymous with inverse propensity weighting. The literature does not support that equivalence. One formulation explicitly uses inverse-propensity-type weights $1/p(A_{t j}\mid X_t,U_t)$ over time-series action coordinates; another explicitly avoids inversion and sets $w_i^{\rm DFW}=1-\hat e_i$; continuous-treatment approaches optimize an independence criterion directly; and direct balancing approaches optimize moment or kernel discrepancy subject to balance constraints [2410.20423; 2508.05215; 2107.07086; 2403.03299; 2512.18069].

The principal technical failure mode remains poor overlap. In inverse-propensity time-series DFW, if the model predicts zero probability, weights explode. In the bounded binary-treatment DFW formulation, weights may approach zero under very limited overlap, effectively dropping units and reducing effective sample size. In continuous-treatment weighting, positivity is required and large-scale implementations may need incomplete-$U$-statistic approximations or subsampling because of the $O(n^2)$ distance computations. In mean-balancing approaches, high-dimensional covariates can induce instability, motivating regularization or richer balancing moments [2410.20423; 2508.05215; 2107.07086; 2403.03299].

Diagnostics therefore play a central role. Reported diagnostics include standardized mean difference, K-S statistics with confidence intervals, ECDF plots, coefficient of variation of weights, effective sample size, weighted marginal absolute correlations, explicit independence criteria such as $\mathcal D_n(w)$, and direct inspection of weight histograms or balance residuals. In the time-series HRI setting, a further systems-level constraint appears: the latent encoder and propensity networks must be sufficiently lightweight for online, robot-time inference [2410.20423; 2508.05215; 2107.07086; 2403.03299].

Taken together, these formulations position DFW as a technically heterogeneous but causally unified family of methods. Some versions seek to recover latent confounders and reweight losses, some use bounded transforms of estimated treatment probabilities, some compress covariates into overlap-improving deconfounding scores, and others compute weights by directly minimizing dependence or distributional discrepancy. The unifying principle is deconfounding through reweighting; the substantive differences lie in what is weighted, how the weights are constructed, and which assumptions are needed for the resulting estimator or predictor to be unbiased, stable, and practically usable [2410.20423; 2508.05215; 2104.05762; 2107.07086; 2403.03299; 2512.18069].

Source: https://www.emergentmind.com/topics/deconfounding-factor-weighting-dfw