CaDrift: A Time-dependent Causal Generator of Drifting Data Streams
Authors: Eduardo V. L. Barboza, Jean Paul Barddal, Robert Sabourin, Rafael M. O. Cruz
Organizations: LIVIA, École de Technologie Supérieure (ÉTS), Université du Québec, Montreal, QC, Canada · Graduate Program in Informatics (PPGIa), Pontifícia Universidade Católica do Paraná (PUCPR), Curitiba, PR, Brazil
This work presents Causal Drift Generator (CaDrift), a time-dependent synthetic data generator framework based on Structural Causal Models (SCMs). The framework produces a virtually infinite combination of data streams with controlled shift events and time-dependent data, making it a tool to evaluate methods under evolving data. CaDrift synthesizes various distributional and covariate shifts by drifting mapping functions of the SCM, which change underlying cause-and-effect relationships between features and the target. In addition, CaDrift models occasional perturbations by leveraging interventions in causal modeling. Experimental results show that, after distributional shift events, the accuracy of classifiers tends to drop, followed by a gradual retrieval, confirming the generator's effectiveness in simulating shifts. The framework has been made available on GitHub.
Figures & tables
Method
Causal
Time-dependent
Generates drift
No source
STAGGER ( Schlimmer & Granger, 1986 )
X
X
SEA ( Street & Kim, 2001 )
X
X
Sine ( Gama et al., 2004 )
X
X
RandomRBF ( Bifet et al., 2009b )
X
X
TabPFN ( Hollmann et al., 2025 )
X
X
Drift-resilient TabPFN ( Helli et al., 2024 )
X
X
X
Table 1: Concept matrix of state-of-the-art synthetic generators.
Figure 1: Representation of a node in a causal graph and how interventions are included to the feature x3 .
Figure 2: Samples generated by CaDrift using a DAG with six nodes – five features and one target. Each color refers to a different class.
Dataset
IncA-DES
TabPFN Stream
ARF
LevBag
OAUE
HT
LAST
1
86.69 ±0.17
68.83 ±0.13
87.78 ±0.18
78.08 ±1.59
62.38 ±0.00
59.08 ±0.00
86.17 ±0.00
2
70.73 ±1.17
67.18 ±0.22
73.82 ±0.43
72.94 ±0.80
45.33 ±0.00
53.00 ±0.00
67.67 ±0.00
3
87.33 ±0.11
75.44 ±0.07
84.50 ±0.23
82.23 ±0.20
75.04 ±0.00
76.92 ±0.00
78.21 ±0.00
4
67.49 ±0.27
86.00 ±0.16
66.99 ±0.09
65.06 ±2.24
67.23 ±0.00
45.51 ±0.00
66.43 ±0.00
5
91.61 ±0.12
96.85 ±0.06
94.91 ±0.03
94.47 ±0.15
88.99 ±0.00
88.08 ±0.00
91.17 ±0.00
6
73.80 ±0.30
80.26 ±0.08
76.75 ±0.13
75.17 ±0.21
72.36 ±0.00
66.23 ±0.00
69.58 ±0.00
Table 2: Average accuracy and standard deviation of baselines on datasets generated by CaDrift and popular synthetic benchmarks.
Figure 3: Prequential accuracies on tested datasets. Dashed vertical lines indicate shift points. Shaded areas refer to the length of incremental and gradual shifts. Letters refer to the distributional shifts applied to the datasets. D stands for distributional, S for severe, C for covariate, and L for local shifts.
iid
EWMA
AR
EWMA+AR
p-value
Reject H0
p-value
Reject H0
p-value
Reject H0
p-value
Reject H0
x1
0.194
N
<0.001
Y
<0.001
Y
<0.001
Y
x2
0.444
N
<0.001
Y
<0.001
Y
<0.001
Y
x3
0.716
N
<0.001
Y
<0.001
Y
<0.001
Y
x4
0.412
N
<0.001
Y
<0.001
Y
<0.001
Y
x5
0.386
N
0.612
N
<0.001
Y
<0.001
Y
Table 3: Ljung-Box test (20 lags) on synthetic data streams generated by CaDrift with different strategies for time dependence.
Table 4: Hyperparameters of mapping functions that map cause-and-effect relationships in the SCM. All mappers were implemented with scikit-learn ).
Figure 4: EWMA evolution with different α values. The lines show the raw values generated with autoregressive noise, and the impact of EWMA on the value depending on the parameter α assigned.
Dataset
IncA-DES
TabPFN Stream
ARF
LevBag
OAUE
HT
LAST
1
77.50 (9.19)
43.71(25.12)
75.54(12.24)
64.88(13.20)
27.63(34.75)
55.67(3.41)
74.25(11.92)
2
61.25(9.48)
52.33(14.85)
61.29 (12.53)
58.00(14.94)
21.75(23.58)
49.17(3.83)
54.79(12.88)
3
79.08 (8.25)
74.29(1.15)
77.29(7.21)
76.17(6.06)
75.20(-0.16)
75.96(0.96)
75.96(2.25)
4
61.75 (5.74)
29.98(56.02)
57.23(9.06)
59.05(8.01)
56.45(10.78)
42.70(2.81)
63.86(2.57)
5
90.04(1.57)
72.37(24.48)
92.63 (2.28)
91.11(3.36)
81.61(7.38)
83.49(4.59)
87.36(3.81)
6
71.11(2.69)
76.51 (3.75)
72.94(3.81)
71.19(3.98)
67.18(5.18)
64.33(1.90)
67.10(2.48)
Appendix
Table 5: Average accuracy of baselines with limited label availability. Values in parentheses refer to the difference in accuracy compared to the experiments performed in a test-then-train manner.
Figure 5: The impact of the α and ρ variables on the lagged autocorrelation function. Each row refers to a different value for α , and each column a different feature ( x1 , x3 and y ).
RandomRBF
SEAConcepts
Sine
p-value
Reject H0
p-value
Reject H0
p-value
Reject H0
x1
0.011
Y
0.299
N
0.387
N
x2
0.012
Y
0.626
N
0.324
N
x3
0.192
N
0.337
N
–
–
x4
0.612
N
–
–
–
–
y
0.723
N
0.083
N
0.547
N
Appendix
Table 6: Ljung-Box test (20 lags) on synthetic data streams generated by popular synthetic generators for data streams.
Electricity
NOAA
p-value
Reject H0
p-value
Reject H0
x1
<0.001
Y
<0.001
Y
x2
<0.001
Y
<0.001
Y
x3
<0.001
Y
<0.001
Y
x4
<0.001
Y
<0.001
Y
x5
<0.001
Y
<0.001
Y
Appendix
Table 7: Ljung-Box test (20 lags) on real-world datasets.
Figure 6: Maximum Mean Discrepancy Heatmaps on datasets.
Figure 7: Prequential mean absolute error on datasets. Letters refer to the distributional shifts applied to the datasets. D stands for distributional, and C for covariate.
Node
Mapper
Target Function
Dataset 1
x1
Normal Distribution
–
x2
Uniform Distribution
–
x3
MLP
Sine
x4
Random MLP
–
x5
Linear Reg.
Checkerboard
Appendix
Table 8: Information of Mappers and Target Functions of nodes in the sample DAG. Normal and Uniform distributions carry no target function, as well as the random MLP and the prototype-based categorical mapper.
Dataset
# dim.
# classes
# concepts
% min. class
# samples
% Missing
% Interventions
1
5
4
5
16.48%
2,500
0
0
2
5
5
5
8.76%
2,500
0
0
3
5
3
5
10.4%
2,500
0
0
4
10
10
10
1.98%
10,000
0
10%
5
25
2
10
33.53%
10,000
10%
10%
6
100
3
20
13.46%
10,000
10%
10%
Appendix
Table 9: Information on the datasets used in the experiments. Datasets were generated using α=0.05 and ρ=0.5 .
Shift
Type
Δ
Description
Dataset 1
1
Abrupt Covariate Shift
1
Mean of Normal distribution in x1 changed.
2
Abrupt Distributional Shift
1
Position of centroids changed; Target function of node x5 changed to a Sine Function.
3
Abrupt Severe Shift
1
The outcome between two classes was swapped.
4
Abrupt Distributional Shift
1
Position of centroids changed; Target function of node x3 changed to a Step Function.
Dataset 2
Appendix
Table 10: Information regarding shift events on the datasets used as examples in the paper. Δ refers to the shift length.
Figure 8: Class distribution across batches for datasets sampled by CaDrift.
Method
Source
Category
HT
Domingos & Hulten (2000)
Online Learner
LAST
Assis et al. (2025)
Online Learner
LevBag
Bifet et al. (2010b)
Ensemble
OAUE
Brzezinski & Stefanowski (2014)
Ensemble
ARF
Gomes et al. (2017)
Ensemble
IncA-DES
Barboza et al. (2025)
Dynamic Ensemble Selection
Appendix
Table 11: Baseline methods for drifting data streams.
Method
Hyperparameters
HT
grace_period=200
LAST
change_detector:ADWIN
LevBag
change_detector:ADWIN , ensemble_size=10
OAUE
ensemble_size=10 , window_size=500
ARF
change_detector:ADWIN , ensemble_size=100
IncA-DES
change_detector:RDDM , pool_size=75
Appendix
Table 12: Baselines’ hyperparameters. All ensemble methods use a HT as base classifier.
Department of Biostatistics, Vanderbilt University Medical Center, Nashville, TN, USA · Department of Biomedical Informatics, Vanderbilt University Medical Center, Nashville, TN, USA