In Section 5.4 of the paper, we investigate the sensitivity of DIV to the strength of the instrumental variable \(Z\). A key strength of DIV is that it exploits the full conditional distribution \(P(X|Z)\), whereas some other methods (like standard control functions or 2SLS) rely primarily on the conditional expectation \(E[X|Z]\).
Traditional instrumental variable methods often break down when the instrument is “weak” in the sense that \(E[X|Z] \approx 0\) (no mean shift). However, DIV remains stable because it uses a conditional generative approach that can capture signal from any distributional change, such as changes in variance or shape.
Following Section 5.4 of the paper: - \(Z \sim \text{Uniform}(-3, 3)\) - \(H, \epsilon_X, \epsilon_Y \sim \text{Uniform}(-1, 1)\) - \(g(Z, H, \epsilon_X) = Z(\alpha + 2H + \epsilon_X)\) - \(f(X, H, \epsilon_Y) = \frac{1}{1 + \exp(-(X + 2H + \epsilon_Y)/3)}\)
Note that \(E[X|Z] = \alpha Z\). Thus, \(\alpha\) directly controls the instrument strength in the traditional sense.
g_fct <- function(Z, H, eps_X, alpha) Z * (alpha + 2 * H + eps_X)
f_sigmoid <- function(X, H, eps_Y) 1 / (1 + exp(-(X + 2 * H + eps_Y) / 3))
simulate_data <- function(alpha, n = 5000) {
Z <- runif(n, -3, 3)
H <- runif(n, -1, 1)
eps_X <- runif(n, -1, 1)
eps_Y <- runif(n, -1, 1)
X <- g_fct(Z, H, eps_X, alpha)
Y <- f_sigmoid(X, H, eps_Y)
list(Z=Z, X=X, Y=Y)
}We compare the DIV estimates for two scenarios: 1. Strong Instrument (\(\alpha = 2\)): A traditional strong instrument where \(Z\) significantly shifts the mean of \(X\). 2. Weak Instrument (\(\alpha = 0\)): A traditional “useless” instrument where \(Z\) has zero effect on the mean of \(X\) (\(E[X|Z]=0\)), but still scales the variance of \(X\).
set.seed(42)
# Strong Instrument (alpha = 2)
d_strong <- simulate_data(alpha = 2)
mod_strong <- divR(Z = matrix(d_strong$Z, ncol=1),
X = matrix(d_strong$X, ncol=1),
Y = matrix(d_strong$Y, ncol=1),
num_epochs = 500, silent = TRUE)
# Weak Instrument (alpha = 0)
d_weak <- simulate_data(alpha = 0)
mod_weak <- divR(Z = matrix(d_weak$Z, ncol=1),
X = matrix(d_weak$X, ncol=1),
Y = matrix(d_weak$Y, ncol=1),
num_epochs = 500, silent = TRUE)In Table 3 of the paper, the MSE of DIV is 0.002 for both \(\alpha=0\) and \(\alpha=1\). In contrast, traditional methods like 2SLS (CF linear) see their MSE jump from 1.832 to 141.941 at \(\alpha=0\).
X_grid <- matrix(seq(-4, 4, length.out = 100), ncol = 1)
# True mean via large-scale simulation
get_true_mean <- function(x_val, n_rep = 5000) {
H_rep <- runif(n_rep, -1, 1); eps_Y_rep <- runif(n_rep, -1, 1)
mean(f_sigmoid(rep(x_val, n_rep), H_rep, eps_Y_rep))
}
true_means <- sapply(X_grid, get_true_mean)
pred_strong <- predict(mod_strong, Xtest = X_grid, type = "mean")
pred_weak <- predict(mod_weak, Xtest = X_grid, type = "mean")
plot_df <- data.frame(
X = as.vector(X_grid),
Strong = as.vector(pred_strong),
Weak = as.vector(pred_weak),
True = true_means
)
ggplot(plot_df, aes(x = X)) +
geom_line(aes(y = Strong, color = "Strong (alpha=2)"), linewidth = 1) +
geom_line(aes(y = Weak, color = "Weak (alpha=0)"), linewidth = 1) +
geom_line(aes(y = True, color = "True Causal"), linetype = "dashed", linewidth = 1) +
scale_color_manual(values = c("Strong (alpha=2)" = "darkgoldenrod1",
"Weak (alpha=0)" = "firebrick3",
"True Causal" = "black")) +
labs(title = "Section 5.4: DIV Robustness to Instrument Strength",
subtitle = "DIV performs equally well when the mean effect alpha is zero",
y = "E[Y | do(X)]",
color = "Model") +
theme_minimal()It may seem counter-intuitive that the “Weak” line is so close to the true causal function. This is exactly what the paper predicts: 1. Full Distribution vs. Mean: While \(\alpha=0\) means \(Z\) doesn’t shift the average value of \(X\), the variance of \(X\) still depends on \(Z^2\). DIV’s conditional generator successfully “learns” from this variance shift. 2. Numerical Stability: In the “Strong” case (\(\alpha=2\)), the instrument introduces much more noise and variation into \(X\). This larger range can sometimes be slightly more challenging to optimize for a fixed number of epochs. 3. Identifiability: The paper proves that the interventional distribution is identifiable even when the mean relevance is zero, provided there is enough “richness” in the conditional distribution \(P(X|Z)\).
The simulation study confirms that DIV is robustly superior to traditional methods in the face of weak instruments. While methods that rely on \(E[X|Z]\) break down completely as \(\alpha \to 0\), DIV maintains near-perfect estimation accuracy by leveraging the information contained in the higher-order moments of the treatment distribution.