Separating "which neighbors" from "how many" in network causal estimators

Treatments spread through social networks. A friend's vaccination protects you, and a coworker's adoption of a product nudges you toward it. Recent estimators use graph neural networks (models that build each person's representation by combining information from their network neighbors) to split these spillovers into two parts. The first is the effect of neighbors' treatments. The second is the effect of neighbors' outcomes. The strongest of these estimators use attention, which learns a weight for each neighbor. Those weights are passed through a softmax, so they always sum to one. That normalization quietly fixes a causal assumption: your exposure depends on the fraction of your neighbors who are treated, never on their number. One vaccinated friend out of one then counts the same as a thousand out of a thousand. When the true mechanism is count-like, as with physical shielding or cumulative persuasion, an estimator trained on a network of one density gives biased answers on a network of another density.

We propose to split the neighbor-weighting step into two parts estimated separately. One is a softmax over neighbors that answers which neighbors matter. The other is a low-dimensional, shape-constrained function of neighborhood size that answers how much the total exposure grows with the number of neighbors. Each spillover channel gets its own size function. The claim is that this split, and not attention per se and not a larger network, determines whether the two peer effects can be estimated reliably when a model built on a dense network is applied to a sparse one, or the reverse. We test the claim with a factorial ablation that is matched for parameter count. The design borrows the logic clinicians use to isolate the active ingredient of a bundled therapy.

Core Claim

Telling Peer Direct Effects from Indirect Effects in Observational Network Data (gDIS) splits peer influence into a peer direct effect (PDE) and a peer indirect effect (PIE). PDE is how neighbors' treatments change your outcome. PIE is how neighbors' outcomes, which act as mediators, change yours. gDIS learns attention-weighted neighbor representations, adds an independence penalty that discourages the representations from encoding who was treated, and computes the effects with kernel density estimation. It is the method this proposal builds on. Its softmax attention, however, makes every neighborhood's weights sum to one. The research file notes the consequence: a node with a single neighbor gives it weight 1.0, while a node with 1,000 neighbors gives each about 0.001. The weights therefore confuse how many neighbors someone has with how relevant each one is.

Our claim is about how the exposure is specified, which makes it a claim about bias rather than variance. If the true spillover grows with the count of treated neighbors, any fraction-based aggregator is wrong by an amount that depends on degree. Inside a network where degrees are roughly the same, an expressive model can absorb the error. When the degree distribution shifts, the error turns into bias. We replace the aggregation step with

$$z_i^{c} = g_c(d_i)\sum_{j \in \mathcal{N}_i} \alpha^{c}_{ij}\, m^{c}_j ,$$

where $c$ indexes the spillover channel (neighbor treatment for PDE, neighbor outcome for PIE). In this expression, $d_i$ is node $i$'s degree, $\alpha^{c}_{ij}$ are softmax attention weights over $i$'s neighbors $\mathcal{N}_i$, and $m^{c}_j$ is the message from neighbor $j$. The size function $g_c$ is monotone with only a few parameters. Our default is the saturating family $g_c(d)=d^{\gamma_c}/(1+\kappa_c d^{\gamma_c})$ with $\gamma_c\ge 0$ and $\kappa_c\ge 0$. With $\gamma_c=0$ it reduces to fraction-based exposure, which is gDIS's implicit assumption. With $\kappa_c=0$ and $\gamma_c=1$ it gives pure count-based exposure, which is what sum aggregation in GDML implicitly assumes. Intermediate values give diminishing returns.

The constraint is the point of the design. A three-parameter monotone curve fitted across the observed degree range can extrapolate to degrees it has not seen. A free-form network that takes degree as an input feature cannot be expected to.

Why density is the right stress test

The routing literature supplies the intuition, in the form of a mechanism that changes character with density. In opportunistic routing, the pool of nodes that can relay a message grows with node density. Landsiedel reports roughly 50% lower duty cycles and 30–90% lower latency in dense deployments. Celik et al. show that the benefit disappears as the candidate set shrinks toward one node, at which point the protocol degenerates into ordinary single-path routing. RTGOR shows that protocols tuned for dense settings fail below a density threshold. Its QMOR baseline misses an 80% delivery target below 120 nodes and exceeds a 507-second delay at 60 nodes.

The causal analogue is direct. A spillover that comes from "at least one neighbor reaches you" or "exposure accumulates" depends on count, and it falls off sharply in sparse networks. This is exactly the regime where a softmax estimator assigns weight 1.0 to a lone neighbor. These papers motivate the regime. They supply no method.

Two causal papers constrain the design. Transportable Causal Effect Estimation across Networks under Interference (TranCE) shows that differences in network structure, including degree distribution, inflate the bias of transported spillover estimates. It corrects that bias with density-ratio reweighting and coarse exposure levels, and it needs the source and target networks to share structural contexts. Our approach targets the case where they do not share them.

Causal Inference under Networked Interference and Intervention Policy Enhancement appears to point the other way: its bounds say that dense graphs make policy optimization harder. We do not dispute that. Their penalty concerns combinatorial difficulty and variance as neighborhoods overlap, whereas our concern is misspecification bias. The two compound. A dense source network makes the effects hard to learn, and a sparse target network makes the fraction-based mistake costly. We report how the variance and bias components change across density so that the reader can see the two effects separately.

Research Program

We first build a simulation suite in which the true exposure function is known and can be varied. We use stochastic block models (random graphs with community structure and tunable edge probabilities), as in GDML's density sweeps. Mean degree ranges from about one, near the point where the graph breaks into fragments, up to dense communities. Outcomes are generated from fraction-based, count-based, and saturating exposure. The PDE and PIE channels are deliberately given different exposure shapes, for example count-based treatment shielding with fraction-based outcome contagion. This tests whether the estimator can separate the two channels.

We then apply the same exposure mechanisms semi-synthetically to BlogCatalog and Flickr, which gDIS uses. On these networks we create controlled density shift by randomly dropping edges in the test portion, and separately by training on a high-degree subgraph and testing on a low-degree one. We also use naturally occurring structural shift between Facebook-100 schools and between Twitch regions, the benchmarks TranCE uses.

The estimator itself is gDIS with the aggregation step replaced. We keep its three-stage pipeline, its independence regularizer, and its kernel density estimation step so that any difference in results comes from the aggregator. Beyond accuracy, the analysis checks whether the fitted $\gamma_c$ recovers the true exposure shape in simulation. On Coat, the real recommendation case study in which gDIS reports PIE at 21.76% against PDE at 13.04%, we ask whether that ranking survives once count-based exposure is allowed. If the fitted $\gamma$ for the outcome channel is far from zero, the original decomposition rested on a fraction-based assumption that the data do not support.

The design borrows from the trial literature in a specific way. Rinta Paul et al. match therapy dose across arms so that a technology's effect cannot be credited to extra treatment hours. the mHealth field experiment uses separate arms to show that a seemingly helpful component, personalization, actually hurt outcomes. We treat our two architectural ingredients the same way. Content-based weighting (attention against uniform weights) and size scaling (fixed sum-to-one against a learned $g_c$) are crossed in a 2×2 design. Every arm is matched on parameter count and hyperparameter search budget, so that a gain cannot be credited to model capacity or tuning effort.

Baselines

The naive reference point is an estimator that ignores the network: doubly robust estimation of the individual effect, with neighbor treatment and outcome fractions included as plain covariates. It shows how much any graph model adds. The file gives a sense of what to expect. On Wave1, Causal Inference under Networked Interference and Intervention Policy Enhancement reports that 1-GNN improves on doubly robust and propensity-score baselines by 76.7% in error on individual treatment effects. We run this baseline on identical splits.

The strongest existing method on our exact question is gDIS, because it is the only estimator in the file that separates PDE from PIE with attention. We run the authors' architecture with its original settings on the same splits and graphs, with a tuning budget equal to ours. The file reports only that gDIS achieved the lowest error on BlogCatalog and Flickr against NetEst and TNet. There is no reported numerical ε_PEHE result for gDIS on Lacuna, so we first reproduce its in-distribution numbers before comparing. Beating gDIS means two things. Our method must have lower PDE and PIE error under density shift, with confidence intervals over seeds that do not overlap gDIS's. It must also show no loss on in-distribution splits and when the true exposure is fraction-based, where gDIS's assumption is correct.

For the isotropic and count-based alternatives, we run GDML's GIN-based double machine learning estimator and 1-GNN. GIN aggregates by summation and so assumes count-based exposure. For transport across Twitch and Facebook-100 we include TranCE. The file reports that TranCE reduced spillover bias by 19% and total-effect bias by 22% on Twitch relative to a model that ignores the shift. We measure spillover bias on the same Twitch region pairs and count ours as better if it beats TranCE's spillover bias, with the largest margin expected on the region pairs that differ most in density. We also combine our aggregator with TranCE's reweighting. If the combination helps, the two methods address different sources of bias.

The key ablation is the 2×2 factorial already described. The method's central claim predicts that the main effect of size scaling is large under density shift and close to zero without shift, and that the main effect of content-based weighting is smaller and roughly constant across density.

Why not just…?

Why not just use sum aggregation, as GIN and GDML do? Summation fixes the exposure at count-based, which is the mirror image of softmax's mistake. Our simulations include fraction-based and saturating mechanisms specifically so that sum aggregation is tested where it should fail. The fitted $\gamma_c$ tells us which regime a real dataset sits in. If every real benchmark yields $\gamma\approx1$, then GDML-style summation is adequate and our contribution narrows to a diagnostic. We would report that outcome.

Why not just concatenate mean and sum aggregations and add degree as an input feature? This is the most serious threat. In principle such a model can represent every exposure shape we consider. Our argument is that it learns the degree dependence freely inside the range of degrees seen in training and has no reason to extrapolate correctly outside that range, whereas a monotone three-parameter curve does. The train-dense/test-sparse and train-sparse/test-dense splits settle this directly. We give this baseline the same parameter count and tuning budget as our method. If it matches us out of the training degree range, the shape constraint adds nothing and we would recommend the simpler model instead.

Why not just reweight for the shift in degree distribution, as TranCE does? Reweighting corrects for differences in how often structural contexts appear. It cannot create contexts that are absent from the source network, and TranCE explicitly requires overlap between source and target. When a sparse target contains degrees the dense source never had, the reweighting weights are undefined or explode. We measure performance as a function of overlap in degree support, and we expect reweighting to remain competitive only where overlap holds.

Why not just run a factorial experiment and skip modeling? Randomization does not remove interference. In the Coat case study the indirect peer effect is reported at nearly twice the direct one, so an unadjusted factorial comparison would credit peer spillover to direct response. Factorial design remains useful, but we use it on the estimator's ingredients rather than in place of the estimator.

Proposed Experiments

The decisive check is the stochastic block model sweep in which the PDE channel is count-based and the PIE channel is fraction-based, trained at mean degree around 20 and tested at mean degree between 1 and 3. The method's central claim predicts four results. gDIS's PDE bias grows as test degree falls. GIN's PIE bias grows. Our method keeps both low and recovers $\gamma_{\text{PDE}}\approx1$ and $\gamma_{\text{PIE}}\approx0$. When both channels are fraction-based, our method matches gDIS. If our fitted $\gamma$ values fail to match the true mechanisms, the size function is not identified and the claim fails.

Beyond simulation, we report PDE and PIE error on BlogCatalog and Flickr as edges are progressively dropped from the test portion. We report spillover bias on Twitch and Facebook-100 pairs, sorted by their difference in density. We report the Coat decomposition with fitted $\gamma$ values and bootstrap intervals. Metrics are separate ε_PEHE for each channel, bias of the average effect, and coverage of confidence intervals. Coverage is reported following GDML's focal-set approach, which uses subsets of nodes whose neighborhoods do not overlap. Because those subsets shrink in dense graphs, we expect intervals to widen there, and we report how they change rather than hide it.