Skip to content

MerlynYang/SRNGC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shapley Regularized Neural Granger Causality (SRNGC)

Official implementation for the ICML 2026 paper Shapley Regularized Neural Granger Causality.

Overview

This repository contains the training and evaluation code for SRNGC and related baselines on synthetic and real-world Granger causality benchmarks. The main entry points are in src/, reusable model and penalty implementations are in model/, and bundled datasets/loaders are in data/.

Environment

Install dependencies with:

bash conda_env.sh

Examples

Run one synthetic VAR(3) experiment:

python3 src/simulation.py \
  --dataset VAR3 \
  --series 1 \
  --subject 1 \
  --lag 3 \
  --seed 2025 \
  --num_workers 1 \
  --exec_idx 1 \
  --penalty_type Fast_Shap

Run one real-data experiment using the tuned hyperparameters in server_results/real_data_Fast_Shap.csv:

python3 src/real_data.py \
  --dataset DREAM3 \
  --series 1 \
  --subject 1 \
  --seed 2025 \
  --num_workers 1 \
  --exec_idx 1 \
  --penalty_type Fast_Shap \
  --use_best

For the CausalTime dataset, experiments use random seeds 2025, 2026, 2027, 2028, 2029. For consistency with DREAM3/DREAM4 reporting, the provided tuned hyperparameter files list the seed-2025 hyperparameters only; the tuning procedure is otherwise the same.

Full Runs

The bash/ directory contains launch scripts for the main experiment groups:

  • bash/simulation_VAR3.sh: VAR(3) synthetic experiments.
  • bash/simulation_Lorenz96.sh: Lorenz-96 synthetic experiments.
  • bash/reproduce_real_data.sh: real-data reproduction using the saved tuned hyperparameters.
  • bash/CausalTime_Shapley.sh: example tuning script for CausalTime Shapley hyperparameter grids.
  • bash/ablation_MLP.sh and bash/ablation_LSTM.sh: architecture ablations.
  • bash/rebuttal.sh and bash/rebuttal_mamba.sh: additional model experiments.

Example:

bash bash/reproduce_real_data.sh

To run the CausalTime tuning example instead of using saved hyperparameters:

bash bash/CausalTime_Shapley.sh

Parallel Workers

Large grids can be split across workers with --num_workers and --exec_idx. Set --num_workers to the total number of shards, and run one process per 1-based --exec_idx. Each worker evaluates the grid configurations assigned to its shard and writes an intermediate CSV, which makes interrupted runs easier to resume. Note, you should dynamically set --num_workers and --exec_idx based on the number of available CPU and GPU resources.

For the exact dataset-to-series mappings, see SERIES_NAMES in data/Dataset.py. All graph matrices use the convention graph[target, source] = 1.

Outputs

Results are written under results/. Worker files are named like *_worker{exec_idx}.csv; the aggregate CSV is appended after a worker finishes.

Citation

@inproceedings{yang2026shapley,
  title = {Shapley Regularized Neural Granger Causality},
  author = {Yang, Maolin and Zhu, Zhoufan and Tian, Yuanhe and Gao, Kun and Li, Muyi},
  booktitle = {Proceedings of the 43rd International Conference on Machine Learning},
  year = {2026},
}

Contact

For questions, please contact: Maolin Yang.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors