Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Transfer Learning for Treatment Effect Estimation in Small Samples

Data

  • Simulation (Data/Datasets/Simulation):
    Includes simulated source datasets. Using the functions in the Generation file, target datasets (randomized or non randomized) can be created.

  • Empirical Example (Data/Datasets/Empirical):
    Datasets from the IHDS-II household survey dataset for empirical analysis. Code under Generation file can be used to create datasets.

  • Generation (Data/Generation): Includes functions to create empirical or simulation datasets.

Functions (Model & Training Procedure)

  • TARNet Model (TARNet.py):
    Defines the shared representation and two potential outcome heads.

  • Phase 1 – Distribution Alignment (Optimize_IPM.py):
    Trains the representation to align source and target treatment/control distributions using an Integral Probability Metric (IPM).

  • Phase 2 – Factual Loss Training (Optimize_Loss.py):
    Trains the treatment and control outcome heads on the target dataset.

Distance Measures

  • Distribution Distances (Distances/Distance.py):
    Implements IPM-based metrics for quantifying dataset distribution differences.

Repository Structure

TL_TARNet/
├── Data/
│   ├── Datasets/
│   │   ├── Empirical/          # empirical datasets (IHDS subsamples, Punjab, Uttar Pradesh)
│   │   │   ├── biased_subsample.csv
│   │   │   ├── punjab.csv
│   │   │   ├── random_subsample.csv
│   │   │   └── uttar_pradesh.csv
│   │   ├── Simulation_1/       # source datasets at varying sample sizes
│   │   │   ├── source_1000.csv
│   │   │   ├── source_5000.csv
│   │   │   ├── source_10000.csv
│   │   │   ├── source_20000.csv
│   │   │   └── source_30000.csv
│   │   └── Simulation_2/       # 93 simulated datasets (.csv)
│   └── Generation/             # data-generation scripts
│       ├── IHDS.R
│       ├── Simulation_1.R
│       └── Simulation_2.py
├── Distances/
│   └── Distance.py
├── Functions/                  # TARNet model + optimization code
│   ├── Optimize_IPM.py
│   ├── Optimize_loss.py
│   └── TARNet.py
├── Results/
│   ├── Empirical/              # empirical results, with/without transfer learning
│   │   ├── biased_and_source_w_TL.csv
│   │   ├── biased_wo_TL.csv
│   │   ├── random_and_source_w_TL.csv
│   │   └── random_wo_TL.csv
│   ├── Plots/
│   │   ├── Empirical/          # 8 plot images (.png)
│   │   ├── Simulation_1/       # 30 plot images (.png)
│   │   └── Simulation_2/       # 74 plot images (.png)
│   ├── Simulation_1/
│   │   ├── with_TL.csv
│   │   └── without_TL.csv
│   └── Simulation_2/
│       ├── results_all/        # 200 per-run result files (.csv)
│       ├── results.csv
│       └── summary.csv
└── README.md

About

This repository contains the code for the submitted paper: Seyda Aydin and Holger Brandt (2025). Advantages and Limitations in the Use of Transfer Learning for Individual Treatment Effects in Causal Machine Learning, available at https://arxiv.org/abs/2512.16489.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages