lisuo commited on
Commit
739513e
·
verified ·
1 Parent(s): 03bc825

Upload 12 files

Browse files
DGP.md ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Two-period panel designs
2
+
3
+ Each test study draws a family uniformly, draws its parameters from the family prior, then samples 500 units. Counts vary by chance. The target is the population post-period ATT. Each row contains a treatment indicator, the observed post-minus-pre outcome change and any observed baseline covariates.
4
+
5
+ | Family | Test studies | Implementation |
6
+ |---|---:|---|
7
+ | abadie_lhour | 155 | [Sampler](https://github.com/lisuo33/DiD-PFN/tree/549d409081058309bc9eec326c427668d82ba4f6/src/pfn_did_eval/mechanisms/abadie_lhour.py) |
8
+ | cwz_iid | 158 | [Sampler](https://github.com/lisuo33/DiD-PFN/tree/549d409081058309bc9eec326c427668d82ba4f6/src/pfn_did_eval/mechanisms/cwz_iid.py) |
9
+ | ferman_iid | 142 | [Sampler](https://github.com/lisuo33/DiD-PFN/tree/549d409081058309bc9eec326c427668d82ba4f6/src/pfn_did_eval/mechanisms/ferman_iid.py) |
10
+ | karmakar_censored | 144 | [Sampler](https://github.com/lisuo33/DiD-PFN/tree/549d409081058309bc9eec326c427668d82ba4f6/src/pfn_did_eval/mechanisms/karmakar_censored.py) |
11
+ | mixture | 169 | [Sampler](https://github.com/lisuo33/DiD-PFN/tree/549d409081058309bc9eec326c427668d82ba4f6/src/pfn_did_eval/mechanisms/mixture.py) |
12
+ | qin | 134 | [Sampler](https://github.com/lisuo33/DiD-PFN/tree/549d409081058309bc9eec326c427668d82ba4f6/src/pfn_did_eval/mechanisms/qin.py) |
13
+ | race_iid | 154 | [Sampler](https://github.com/lisuo33/DiD-PFN/tree/549d409081058309bc9eec326c427668d82ba4f6/src/pfn_did_eval/mechanisms/race_iid.py) |
14
+ | santanna_zhao | 150 | [Sampler](https://github.com/lisuo33/DiD-PFN/tree/549d409081058309bc9eec326c427668d82ba4f6/src/pfn_did_eval/mechanisms/santanna_zhao.py) |
15
+ | shi_iid | 161 | [Sampler](https://github.com/lisuo33/DiD-PFN/tree/549d409081058309bc9eec326c427668d82ba4f6/src/pfn_did_eval/mechanisms/shi_iid.py) |
16
+ | truncated | 160 | [Sampler](https://github.com/lisuo33/DiD-PFN/tree/549d409081058309bc9eec326c427668d82ba4f6/src/pfn_did_eval/mechanisms/truncated.py) |
17
+ | ye | 150 | [Sampler](https://github.com/lisuo33/DiD-PFN/tree/549d409081058309bc9eec326c427668d82ba4f6/src/pfn_did_eval/mechanisms/ye.py) |
18
+ | zhao_bridge_panel | 158 | [Sampler](https://github.com/lisuo33/DiD-PFN/tree/549d409081058309bc9eec326c427668d82ba4f6/src/pfn_did_eval/mechanisms/zhao_bridge_panel.py) |
19
+ | zhou_network | 165 | [Sampler](https://github.com/lisuo33/DiD-PFN/tree/549d409081058309bc9eec326c427668d82ba4f6/src/pfn_did_eval/mechanisms/zhou_network.py) |
20
+
21
+ [Parameter distributions](https://github.com/lisuo33/DiD-PFN/tree/549d409081058309bc9eec326c427668d82ba4f6/src/pfn_did_eval/registry.json) · [ATT calculations and random streams](https://github.com/lisuo33/DiD-PFN/tree/549d409081058309bc9eec326c427668d82ba4f6/src/pfn_did_eval/prior.py)
README.md ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pretty_name: Statistical Inference Arena — Difference-in-Differences
3
+ language:
4
+ - en
5
+ tags:
6
+ - tabular
7
+ - synthetic
8
+ - causal-inference
9
+ - difference-in-differences
10
+ - benchmark
11
+ configs:
12
+ - config_name: starter_catalog
13
+ default: true
14
+ data_files:
15
+ - split: train
16
+ path: starter_train.csv
17
+ - split: validation
18
+ path: starter_dev.csv
19
+ - split: test
20
+ path: starter_test.csv
21
+ - config_name: evaluation_inputs
22
+ data_files:
23
+ - split: test
24
+ path: test_schema.csv
25
+ ---
26
+
27
+ # Statistical Inference Arena · Difference-in-Differences
28
+
29
+ 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) · [Experiment and results](https://github.com/lisuo33/DiD-PFN/tree/549d409081058309bc9eec326c427668d82ba4f6/results/merged13_parallel128)
30
+
31
+ | Purpose | Studies | Download |
32
+ |---|---:|---|
33
+ | Historical adapter fitting | 10,000 | [Training archive](https://huggingface.co/datasets/lisuo/StatsInference-Arena-DiD/resolve/main/adapter-train.zip) |
34
+ | Historical checkpoint selection | 200 | [Validation archive](https://huggingface.co/datasets/lisuo/StatsInference-Arena-DiD/resolve/main/adapter-validation.zip) |
35
+ | 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) |
36
+ | 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) |
37
+ | 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) |
38
+
39
+ ## Target and inputs
40
+
41
+ The target is the population mean of the post-treatment potential-outcome difference among treated units, conditional on the study's generating parameters. 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.
42
+
43
+ ## Run a first comparison
44
+
45
+ Extract the starter kit, install NumPy and run the following from the extracted directory.
46
+
47
+ ```sh
48
+ python baseline.py dev/tables > predictions.csv
49
+ python score.py dev/truth.csv predictions.csv
50
+ ```
51
+
52
+ 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.
53
+
54
+ ## Historical data and evaluation design
55
+
56
+ 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.
57
+
58
+ 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 definitions and realized counts](DGP.md)
59
+
60
+ ## Evaluate a method
61
+
62
+ 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.
63
+
64
+ ```csv
65
+ table_id,estimate,ci_lower,ci_upper
66
+ ```
67
+
68
+ 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.
69
+
70
+ 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. [Implementation](https://github.com/lisuo33/DiD-PFN/tree/549d409081058309bc9eec326c427668d82ba4f6/src/pfn_did_eval)
SHA256SUMS ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 5e937226d772b8a422f4f1c64c1bbf9e549fd9e447de7639852b176ae8b2ec20 adapter-train.zip
2
+ d29267116dbf790822b9722d52eaf0b48eb629056028d0f664b77ce13770b9af adapter-validation.zip
3
+ d29dbf99c8eddd55f3c97c32d66cd8dcd04a2e498d29d84413dfcb848f8463a8 did-starter-v1.zip
4
+ 28aafe63a087a681f13ef63a0d339c38c9436ad545d61b26cbeb865acfe85343 did-test-inputs-v1.zip
5
+ 42029aa3c87550f2723591e3ec555f9568847c7217217ea2869029fd5c1f0586 did-test-scoring-v1.zip
6
+ 442aa25bdf954a29ba8cabc86db0b2eeec34425491e9599ce5195204184dbe12 starter_dev.csv
7
+ fbd05daf8ff056931fdd53419317d88fabcb4129aaf3eb6b19964d31d23d2155 starter_test.csv
8
+ 92fef9229b0899f2c43ee69df114190cb112ca76345a315698d0d9816d0c9ce8 starter_train.csv
9
+ a9a6bd07d94abd7abced8dac1751cd1b24720d8ff172ce1f12cc96b8d778553c test_schema.csv
10
+ bf85c2e22aa6234ac3b9d4c0d94b1eef6494606ea78132a6c007c717a5c5477d DGP.md
11
+ e38d0ec21d6764bd67043e56ea915d52f1b5d2789677a126a6d87fcc854c7ef3 README.md
adapter-train.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5e937226d772b8a422f4f1c64c1bbf9e549fd9e447de7639852b176ae8b2ec20
3
+ size 96369827
adapter-validation.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d29267116dbf790822b9722d52eaf0b48eb629056028d0f664b77ce13770b9af
3
+ size 1923360
did-starter-v1.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d29dbf99c8eddd55f3c97c32d66cd8dcd04a2e498d29d84413dfcb848f8463a8
3
+ size 856104
did-test-inputs-v1.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:28aafe63a087a681f13ef63a0d339c38c9436ad545d61b26cbeb865acfe85343
3
+ size 19801472
did-test-scoring-v1.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:42029aa3c87550f2723591e3ec555f9568847c7217217ea2869029fd5c1f0586
3
+ size 308024
starter_dev.csv ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ table_id,family,n,n_covariates,truth,archive_path
2
+ dev_0000,mixture,500,0,0.5172367748962493,dev/tables/dev_0000.npz
3
+ dev_0001,race_iid,500,1,0.28210028243068563,dev/tables/dev_0001.npz
4
+ dev_0002,zhao_bridge_panel,500,3,-1.2935450582615144,dev/tables/dev_0002.npz
5
+ dev_0003,karmakar_censored,500,1,0.866630641835139,dev/tables/dev_0003.npz
6
+ dev_0004,truncated,500,0,0.0028692228599019043,dev/tables/dev_0004.npz
7
+ dev_0005,ye,500,0,1.4463077609130672,dev/tables/dev_0005.npz
8
+ dev_0006,qin,500,2,1.5589084613902902,dev/tables/dev_0006.npz
9
+ dev_0007,shi_iid,500,0,-0.8725219097942339,dev/tables/dev_0007.npz
10
+ dev_0008,cwz_iid,500,0,1.2229732915358538,dev/tables/dev_0008.npz
11
+ dev_0009,race_iid,500,1,1.860424312199143,dev/tables/dev_0009.npz
12
+ dev_0010,race_iid,500,1,1.173447963559262,dev/tables/dev_0010.npz
13
+ dev_0011,mixture,500,0,-0.2003138037863517,dev/tables/dev_0011.npz
14
+ dev_0012,zhou_network,500,0,-0.03300800086386149,dev/tables/dev_0012.npz
15
+ dev_0013,qin,500,2,1.7622785676458614,dev/tables/dev_0013.npz
16
+ dev_0014,qin,500,2,-0.7989604796876086,dev/tables/dev_0014.npz
17
+ dev_0015,shi_iid,500,0,-1.3284469063674689,dev/tables/dev_0015.npz
starter_test.csv ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ table_id,family,n,n_covariates,truth,archive_path
2
+ test_0000,ferman_iid,500,1,1.56549268398402,test/tables/test_0000.npz
3
+ test_0001,ferman_iid,500,1,-1.4533728097952006,test/tables/test_0001.npz
4
+ test_0002,qin,500,2,-1.0928188694667282,test/tables/test_0002.npz
5
+ test_0003,ye,500,0,-1.2727287711393354,test/tables/test_0003.npz
6
+ test_0004,cwz_iid,500,0,1.3094390785069385,test/tables/test_0004.npz
7
+ test_0005,abadie_lhour,500,4,1.0,test/tables/test_0005.npz
8
+ test_0006,shi_iid,500,0,-0.8825038228957098,test/tables/test_0006.npz
9
+ test_0007,zhao_bridge_panel,500,3,-1.851621619958187,test/tables/test_0007.npz
10
+ test_0008,abadie_lhour,500,4,1.0,test/tables/test_0008.npz
11
+ test_0009,zhou_network,500,0,-0.08382823745496594,test/tables/test_0009.npz
12
+ test_0010,shi_iid,500,0,0.7604030073938771,test/tables/test_0010.npz
13
+ test_0011,race_iid,500,1,0.809814459525269,test/tables/test_0011.npz
14
+ test_0012,abadie_lhour,500,4,-1.0,test/tables/test_0012.npz
15
+ test_0013,race_iid,500,1,0.12115828096466913,test/tables/test_0013.npz
16
+ test_0014,cwz_iid,500,0,0.754860771387257,test/tables/test_0014.npz
17
+ test_0015,ferman_iid,500,1,-0.09105872443974894,test/tables/test_0015.npz
18
+ test_0016,mixture,500,0,0.22561178457767372,test/tables/test_0016.npz
19
+ test_0017,cwz_iid,500,0,-0.6191875753668699,test/tables/test_0017.npz
20
+ test_0018,race_iid,500,1,1.84318099121961,test/tables/test_0018.npz
21
+ test_0019,abadie_lhour,500,4,0.0,test/tables/test_0019.npz
22
+ test_0020,zhou_network,500,0,0.05665003582202974,test/tables/test_0020.npz
23
+ test_0021,cwz_iid,500,0,-1.5293061124776428,test/tables/test_0021.npz
24
+ test_0022,zhao_bridge_panel,500,3,0.8091568398033145,test/tables/test_0022.npz
25
+ test_0023,abadie_lhour,500,4,1.0,test/tables/test_0023.npz
26
+ test_0024,zhao_bridge_panel,500,3,-0.6047534760816441,test/tables/test_0024.npz
27
+ test_0025,zhao_bridge_panel,500,3,-1.2100683700776382,test/tables/test_0025.npz
28
+ test_0026,karmakar_censored,500,1,0.43766455927005454,test/tables/test_0026.npz
29
+ test_0027,abadie_lhour,500,4,-1.0,test/tables/test_0027.npz
30
+ test_0028,mixture,500,0,0.29069567627345877,test/tables/test_0028.npz
31
+ test_0029,santanna_zhao,500,4,-1.0,test/tables/test_0029.npz
32
+ test_0030,zhou_network,500,0,0.02686978095526391,test/tables/test_0030.npz
33
+ test_0031,karmakar_censored,500,1,0.8736298719742637,test/tables/test_0031.npz
starter_train.csv ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ table_id,family,n,n_covariates,truth,archive_path
2
+ train_0000,abadie_lhour,500,4,-1.0,train/tables/train_0000.npz
3
+ train_0001,santanna_zhao,500,4,-1.0,train/tables/train_0001.npz
4
+ train_0002,shi_iid,500,0,-0.8375364464385994,train/tables/train_0002.npz
5
+ train_0003,truncated,500,0,-0.029686443934261092,train/tables/train_0003.npz
6
+ train_0004,cwz_iid,500,0,0.5712316750531312,train/tables/train_0004.npz
7
+ train_0005,cwz_iid,500,0,1.3824860340453191,train/tables/train_0005.npz
8
+ train_0006,truncated,500,0,0.04961214406856973,train/tables/train_0006.npz
9
+ train_0007,truncated,500,0,0.038278296571627846,train/tables/train_0007.npz
10
+ train_0008,qin,500,2,-0.7859742246947644,train/tables/train_0008.npz
11
+ train_0009,zhou_network,500,0,-0.04860531457527067,train/tables/train_0009.npz
12
+ train_0010,abadie_lhour,500,4,-2.0,train/tables/train_0010.npz
13
+ train_0011,karmakar_censored,500,1,0.9511239194000738,train/tables/train_0011.npz
14
+ train_0012,shi_iid,500,0,-1.3090673567716338,train/tables/train_0012.npz
15
+ train_0013,zhao_bridge_panel,500,3,-0.6984811036155019,train/tables/train_0013.npz
16
+ train_0014,zhou_network,500,0,0.09346225717106726,train/tables/train_0014.npz
17
+ train_0015,zhao_bridge_panel,500,3,-0.5182334497282121,train/tables/train_0015.npz
18
+ train_0016,zhou_network,500,0,-0.06619297347918951,train/tables/train_0016.npz
19
+ train_0017,zhao_bridge_panel,500,3,1.9781665769784127,train/tables/train_0017.npz
20
+ train_0018,race_iid,500,1,-1.6980519043812246,train/tables/train_0018.npz
21
+ train_0019,zhou_network,500,0,-0.29058640486079174,train/tables/train_0019.npz
22
+ train_0020,race_iid,500,1,0.4938960626301131,train/tables/train_0020.npz
23
+ train_0021,zhou_network,500,0,-0.3795975336183889,train/tables/train_0021.npz
24
+ train_0022,qin,500,2,1.5932313863840226,train/tables/train_0022.npz
25
+ train_0023,qin,500,2,1.7949613253580388,train/tables/train_0023.npz
26
+ train_0024,zhou_network,500,0,-0.22098942127236104,train/tables/train_0024.npz
27
+ train_0025,ye,500,0,-0.48163933772979073,train/tables/train_0025.npz
28
+ train_0026,race_iid,500,1,0.1359831320078046,train/tables/train_0026.npz
29
+ train_0027,santanna_zhao,500,4,0.0,train/tables/train_0027.npz
30
+ train_0028,zhou_network,500,0,0.09707402085974362,train/tables/train_0028.npz
31
+ train_0029,abadie_lhour,500,4,2.0,train/tables/train_0029.npz
32
+ train_0030,qin,500,2,-0.6959920965415182,train/tables/train_0030.npz
33
+ train_0031,santanna_zhao,500,4,-2.0,train/tables/train_0031.npz
34
+ train_0032,karmakar_censored,500,1,-1.168504023783262,train/tables/train_0032.npz
35
+ train_0033,mixture,500,0,0.0162358117643449,train/tables/train_0033.npz
36
+ train_0034,zhao_bridge_panel,500,3,1.3237735002268163,train/tables/train_0034.npz
37
+ train_0035,ferman_iid,500,1,1.7560413097550573,train/tables/train_0035.npz
38
+ train_0036,qin,500,2,0.9697093882368688,train/tables/train_0036.npz
39
+ train_0037,zhou_network,500,0,0.20775783584212637,train/tables/train_0037.npz
40
+ train_0038,qin,500,2,-0.37094030322131677,train/tables/train_0038.npz
41
+ train_0039,race_iid,500,1,-1.1810911807354587,train/tables/train_0039.npz
42
+ train_0040,cwz_iid,500,0,-1.421855124357763,train/tables/train_0040.npz
43
+ train_0041,mixture,500,0,-0.42343504131052256,train/tables/train_0041.npz
44
+ train_0042,ye,500,0,1.7313664901685444,train/tables/train_0042.npz
45
+ train_0043,karmakar_censored,500,1,1.0358336914081376,train/tables/train_0043.npz
46
+ train_0044,mixture,500,0,-0.39125052676875355,train/tables/train_0044.npz
47
+ train_0045,ferman_iid,500,1,-0.029013361356041933,train/tables/train_0045.npz
48
+ train_0046,karmakar_censored,500,1,1.043078331796695,train/tables/train_0046.npz
49
+ train_0047,ye,500,0,0.1732215902218619,train/tables/train_0047.npz
test_schema.csv ADDED
The diff for this file is too large to render. See raw diff