Skip to content

[KDD2025] Modeling Time-evolving Causality over Data Streams (to appear).

License

Notifications You must be signed in to change notification settings

C-Naoki/ModePlait

Repository files navigation

ModePlait

Introduction

This is an official implementation of ModePlait. We focus on causal relationships that evolve over time in data streams and refer such relationships as "time-evolving causalities." We presented ModePlait, which aims to discover time-evolving causalities in multivariate co-evolving data streams, and forecast future values in a stream fashion simultaneously. The overview of our proposed model is following:

Requirements

  • Python 3.9.15
  • numpy == 1.23.5
  • pandas == 1.5.3
  • matplotlib == 3.8.2
  • scikit-learn == 1.1.3
  • scipy == 1.11.4

Usage

  1. Clone this repository.

    git clone https://github.com/C-Naoki/ModePlait.git
  2. Construct a virtual environment and install the required packages.

    make install
    • However, you are required to pyenv and poetry for above command to work.
    • If you prefer not to use pyenv or poetry, you can also use requirements.txt created based on pyproject.toml.

    Specifically, the above command performs the following steps:

    1. if necessary, install Python 3.9.15 using pyenv, and then switch to this version.
    2. tell poetry to use python 3.9.15.
    3. install packages in pyproject.toml.
    4. attach the path file (i.e., *.pth) in the site-packages/ for extending module search path.

    Please check the Makefile for more details.

  3. Run quick demos of ModePlait

    sh bin/google.sh

    If you want the command to continue running after logging out, you prepare nohup/ directory and use -n option as shown below (using nohup).

    mkdir nohup
    sh bin/google.sh -n
    • The execution log is saved in nohup/ directory.

Datasets

  1. covid19 [link]
  2. web-search [link]
  3. chicken-dance, exercise [link]

(Other than 1. covid19, everything is placed in the folder ./data)

Experiments

Baselines

We compared our algorithm with the following baselines for causal discovering, including CASPER, DARING, NoCurl, NOTEARS-MLP (NO-MLP), NOTEARS, LiNGAM, and GES. We also compared with TimesNet, PatchTST, DeepAR, OrbitMap, and ARIMA for forecasting.

Causal discovering accuracy score

We ran experiments on synthetic datasets with multiple temporal sequences to encompass various types of scenarios and ModePlait outperformed all competitors for every setting.

Forecasting accuracy score

ModePlait achieved a high forecasting accuracy for every dataset, including synthetic and real-world datasets. ModePlait† is a limited version of our proposed method.

About

[KDD2025] Modeling Time-evolving Causality over Data Streams (to appear).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published