SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2502.05295 · NeurIPS · 2025

GST-UNet: A Neural Framework for Spatiotemporal Causal Inference with Time-Varying Confounding

Miruna Oprescu, Nathan Kallus, Shinjae Yoo, David Park, Xihaier Luo

arXiv · PDF · Open in the Atlas

Code that ran

3 of 3 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 1 failure of our instrument; 0 no recorded run); 2 of them were also run on the host, not in the jail, by the peer-agreement lane that set their level, measured 2026-11-23; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2502.05295.json · badge: /api/ran/2502.05295.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
moprescu/gstunet canonical (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
FunctionStatusWhere it lives
count_parameters Ran
ran, honoured the contract we drafted
moprescu/gstunet/train/train_gstunet.py
code served (permissive licence) · get_code("72d1da8e0197ae5f")
How it ran

Ran in Syntology's jail on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-05T00:23:38Z). If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Build a small model with trainable parameters
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

model = SimpleModel()

ARGS = {
    "model": model
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
pad_func Ran
ran; our contract draft was wrong, not the code
moprescu/gstunet/train/wildfire_experiment.py
code served (permissive licence) · get_code("ad1cc25d79162864")
How it ran

Ran in Syntology's jail on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 4, dtype family float, shape (2, 4, 48, 48) as a later run recorded it. The image it ran in was not recorded. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-05T01:26:29Z). If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# Create a tensor of shape [B, C, 40, 44]
# B=2 (batch), C=4 (channels), H=40, W=44
x = torch.randn(2, 4, 40, 44)

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 4, 48, 48) — shape (2, 4, 48, 48) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
crop_func Ran
ran, violated the contract we drafted
moprescu/gstunet/train/wildfire_experiment.py
code served (permissive licence) · get_code("e506ff823b315c79")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 4, dtype family float, shape (0, 0, 48, 48) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a tensor of shape [B, C, 48, 48]
# B=2 (batch), C=4 (channels), 48x48 spatial dimensions
x = torch.randn(2, 4, 48, 48)

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (0, 0, 48, 48) — shape (0, 0, 48, 48) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 3 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 3 later) and 0 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
count_parameters 180 other papers
158 dated earlier, 20 later, 2 same year, order not determinable · 8 only as an assembly brick
1705.08415 (2017-05)
Supervised Community Detection with Line Graph Neural Networks
1707.01926 (2017-07)
Diffusion Convolutional Recurrent Neural Network: Data-Driven Traffic Forecasting
1808.09367 (2018-08)
Deriving Machine Attention from Human Rationales
and 177 more not named here
crop_func 1 other paper
1 later
2608.01352 (2026-08)
Spatiotemporal Proximal Causal Inference under Hidden Confounding and Interference
pad_func 1 other paper
1 later
2608.01352 (2026-08)
Spatiotemporal Proximal Causal Inference under Hidden Confounding and Interference

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Estimating causal effects from spatiotemporal observational data is essential in public health, environmental science, and policy evaluation, where randomized experiments are often infeasible. Existing approaches, however, either rely on strong structural assumptions or fail to handle key challenges such as interference, spatial confounding, temporal carryover, and time-varying confounding-where covariates are influenced by past treatments and, in turn, affect future ones. We introduce the GST-UNet (G-computation Spatio-Temporal UNet), a theoretically grounded neural framework that combines a U-Net-based spatiotemporal encoder with regression-based iterative G-computation to estimate location-specific potential outcomes under complex intervention sequences. GST-UNet explicitly adjusts for time-varying confounders and captures non-linear spatial and temporal dependencies, enabling valid causal inference from a single observed trajectory in data-scarce settings. We validate its effectiveness in synthetic experiments and in a real-world analysis of wildfire smoke exposure and respiratory hospitalizations during the 2018 California Camp Fire. Together, these results position GST-UNet as a principled and ready-to-use framework for spatiotemporal causal inference, advancing reliable estimation in policy-relevant and scientific domains. We summarize the most relevant prior work here, with a more detailed discussion in Section A. Classical Spatiotemporal Causal Inference. Early approaches (e.g., spatial econometrics [2], difference-in-differences [20], synthetic controls [4]) rely on strong assumptions such as parallel trends and no interference. More recent methods incorporate time-varying confounding using inverse propensity weighting (IPW) and marginal structural models [31,49], but cannot address interference unless via user-specified exposure mappings or hyper-local assumptions [11,44,48]. As noted by Zhou et al. [49], the literature remains sparse, particularly in settings with rich feedback dynamics. Machine Learning for Spatiotemporal Modeling. Deep learning models for prediction-e.g., CNNs and RNNs [40,47], graph-based methods [25,46], and video transformers [6, 27]-capture complex spatial-temporal patterns but do not incorporate causal adjustments, and thus cannot estimate counterfactuals or adjust for time-varying confounders. Time Series Causal Inference. Causal methods for longitudinal data include marginal structural models [36], iterative G-computation [35], and recent ML-based extensions using recurrent networks, transformers, or meta-learners [7,16,18,24,28,39]. However, these assume access to independent time series (e.g. across patients) and cannot model cross-unit interactions in spatiotemporal settings. Neural-Based Spatiotemporal Causal Inference. Tec et al. [42] propose a UNet-based model that adjusts for non-local spatial confounding but focuses on static exposures and does not address interference or time-varying effects. Most similar to our work, [1] presents a climate-focused model that shares certain architectural similarities but emphasizes prediction rather than causal adjustment, leaving causal identification under time-varying confounding largely unaddressed. Positioning of Our Work. Our work bridges these threads by uniting a theoretically grounded G-computation framework with a neural architecture for spatiotemporal data. Unlike prior time-series methods that assume independent units or spatial models that overlook confounding feedback, GST-UNet is the first end-to-end approach that (i) establishes identification and consistency under explicit assumptions for a single spatiotemporal trajectory, and (ii) implements this theory in a practical neural model capable of handling interference, spatial confounding, and time-varying dynamics.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2502.05295")
get_code_for_paper("2502.05295")
have("2502.05295")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2502.05295.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2502.05295.svg)](https://syntology.ai/paper/2502.05295)

Connect an agent — have() is free.