HUMI directly estimates the dependence between a continuous time series and a discrete temporal event sequence - no discretization, no training, no learned cross-modal representation.
Paper: Estimating Mutual Information between Time Series and Temporal Event Sequences Across Diverse Analysis Tasks (KDD 2026)
git clone https://github.com/HaojiHu/HUMI.git
cd HUMI
pip install -e .Core dependencies are just numpy, scipy and
scikit-learn.
This example converts a repeated local pattern (the day/night temperature cycle) into a dependence measure between temperature and time-of-day context. DN labels each timestep as day or night, and then measures how much that context reduces uncertainty about temperature.
import pandas as pd
import humi
# Minneapolis 2023 day-high / night-low temperature
# (experiments/data/tdmi/minneapolis_2023_day_high_night_low.csv)
df = pd.read_csv("experiments/data/tdmi/minneapolis_2023_day_high_night_low.csv")
series = df[["night_low_f", "day_high_f"]].to_numpy().reshape(-1)
events = ["night", "day"] * len(df)
score = humi.humi(events=events, series=series, cluster=False) See experiments/tempurature_exp.py
for the full reproduction, including the TwoMon and DNTwoMon
contexts that push the score up to 0.96.
In practice, events is a discrete state per timestep (weekday, holiday,
promotion, medication status, ...) and series is the aligned continuous
value (traffic volume, sales, temperature, heart rate, ...):
import humi
score = humi.humi(events=promotions, series=sales)humi also accepts:
cluster(defaultTrue): merge redundant or highly correlated event states into latent clusters before estimating, recommended whenever the event vocabulary is large or overlapping.percentile(default90): distance-threshold percentile used for that clustering.normalized(defaultTrue): return a score bounded to[0, 1]instead of the raw estimate.
HUMI combines three ideas:
- A theoretical MI formulation for one discrete and one continuous variable, without forcing either side to become the other.
- A continuous-discrete duality representation of the signal, so repeated values caused by finite measurement precision are modeled directly instead of breaking nearest-neighbor entropy estimators.
- Optional clustering of redundant or highly correlated event states, so overlapping event labels don't fragment the data or bias the score.
See the paper for the full derivation and experiments.
experiments/ has the code and data behind every task in
the paper: causality/lag (TDMI), seasonality, local repeated patterns,
discrete covariate selection, and continuous feature selection.
@inproceedings{hu2026humi,
title = {Estimating Mutual Information between Time Series and Temporal Event Sequences Across Diverse Analysis Tasks},
author = {Hu, Haoji and Mao, Huaqing and Lin, Yijun and Jia, Xiaowei and Zhou, Jinwei and Jeong, Minoh and Chiang, Yao-Yi},
booktitle = {Proceedings of the 32nd ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
year = {2026}
}