File size: 5,143 Bytes
739513e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f745ba1
739513e
 
 
 
 
 
 
 
 
f745ba1
739513e
f745ba1
 
 
 
 
 
ac97ca4
f745ba1
 
739513e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f745ba1
739513e
 
 
 
 
 
 
 
 
 
 
f745ba1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---
pretty_name: Statistical Inference Arena — Difference-in-Differences
language:
- en
tags:
- tabular
- synthetic
- causal-inference
- difference-in-differences
- benchmark
configs:
- config_name: starter_catalog
  default: true
  data_files:
  - split: train
    path: starter_train.csv
  - split: validation
    path: starter_dev.csv
  - split: test
    path: starter_test.csv
- config_name: evaluation_inputs
  data_files:
  - split: test
    path: test_schema.csv
---

# Statistical Inference Arena · Difference-in-Differences

Estimate the average treatment effect on the treated (ATT) in a two-period panel and return a two-sided 95% confidence interval. Each study contains 500 units and contributes one estimate. The benchmark compares a frozen PFN-DiD checkpoint and a cross-fitted random forest on the same 2,000 studies. [Model](https://huggingface.co/lisuo/PFN-DiD)

| Purpose | Studies | Download |
|---|---:|---|
| Historical adapter fitting | 10,000 | [Training archive](https://huggingface.co/datasets/lisuo/StatsInference-Arena-DiD/resolve/main/adapter-train.zip) |
| Historical checkpoint selection | 200 | [Validation archive](https://huggingface.co/datasets/lisuo/StatsInference-Arena-DiD/resolve/main/adapter-validation.zip) |
| Try estimation and scoring | 48 train, 16 dev, 32 test | [Starter kit](https://huggingface.co/datasets/lisuo/StatsInference-Arena-DiD/resolve/main/did-starter-v1.zip) |
| Evaluate a fixed method | 2,000 | [Observed inputs, folds and prediction template](https://huggingface.co/datasets/lisuo/StatsInference-Arena-DiD/resolve/main/did-test-inputs-v1.zip) |
| Reproduce the comparison | Same 2,000 | [Population ATT labels and scorer](https://huggingface.co/datasets/lisuo/StatsInference-Arena-DiD/resolve/main/did-test-scoring-v1.zip) |

## Target and observations

For each study, hold its data-generating mechanism and parameters fixed. The target is the average post-period effect of treatment among units that receive treatment.

$$
\mathrm{ATT} = \mathbb{E}\!\left[Y_1(1)-Y_1(0)\mid D=1\right].
$$

Here Y₁(1) and Y₁(0) are the same unit's potential outcomes in the post period under treatment and under control. The expectation averages over treated units in the population that generated the study. Report one estimate in outcome units and one two-sided 95% confidence interval per study.

Each NPZ in the evaluation archive holds baseline covariates `X`, a binary treatment indicator `D`, and the post-minus-pre outcome change `delta_y`, in matching row order. An array with shape (500, 0) denotes a study with no observed covariates. Supply only these three arrays to an estimator.

## Run a first comparison

Extract the starter kit, install NumPy and run the following from the extracted directory.

```sh
python baseline.py dev/tables > predictions.csv
python score.py dev/truth.csv predictions.csv
```

The example computes the treated-minus-control difference in mean changes and uses a normal interval. Designs that require covariate adjustment can bias this simple estimate. The starter draws 96 separate studies from the 13-family prior with seed 20261119. Its three viewer splits describe the files inside the starter ZIP.

## Historical data and evaluation design

The historical files contain the original adapter training and validation studies from ten families. Each archive preserves the original NPZs and manifest, and provides a table-ID-to-ATT CSV. The NPZs also contain simulation labels and metadata. Use only the observed arrays as model inputs.

The evaluation uses one pooled split. For each study the generator draws one of 13 families uniformly, draws its parameters, then samples 500 units. Seed 20261116 selects the exact tables used for the published comparison. The input archive preserves the observed NPZ bytes and row order. The viewer's evaluation_inputs configuration lists one row per study. Its SHA-256 column identifies the original input file. [DGP families and realized counts](DGP.md)

## Evaluate a method

Freeze the estimator before opening the scoring archive. The evaluation labels are public for reproducibility. Keep the supplied five treatment-stratified folds for the original fit. Row indices start at 0 and fold labels run from 1 to 5. Write one row per table using the template columns below.

```csv
table_id,estimate,ci_lower,ci_upper
```

Run `python score.py truth.csv predictions.csv` after extracting the scoring archive. Each study has equal weight. Bias and RMSE use estimate minus population ATT. Error variance uses the sample variance of those errors (denominator 1,999). Coverage counts intervals containing the truth, including either endpoint. Mean interval length averages upper minus lower. Measure elapsed seconds per study during estimation and record the hardware if reporting runtime.

PFN-DiD and the RF comparator estimate the treatment propensity and the control-group mean outcome change, then apply the same doubly robust DiD score. PFN-DiD uses an influence-function interval. RF uses 50 whole-row bootstrap resamples with refitting and a normal interval based on the bootstrap standard deviation.