Skip to main content
TCMGenerator samples a temporal structural causal model (SCM): variables are connected through randomly sampled lagged edges, then the system is rolled forward with nonlinear edge functions and stochastic innovations. xi[t]=โˆ‘eโˆˆpa(i)fe(xje[tโˆ’โ„“e])+ฮตi[t]x_i[t] = \sum_{e \in \mathrm{pa}(i)} f_e\big(x_{j_e}[t - \ell_e]\big) + \varepsilon_i[t] The temporal-SCM framing follows the overview in Runge et al.ย (2023), Causal inference for time series. SynForecastโ€™s graph sampler, edge-function mixture, stability rescaling, and rollout guards are original design choices; this is not a reproduction of a generator from that paper.

Independent SCM draws

In the default univariate mode, each output series comes from a separately sampled SCM. The observed series is one node; other nodes in that SCM act as latent drivers.

Nodes from one shared SCM

Set multivariate=True to return several observed nodes from one jointly rolled-out SCM. Because the sampled edges are lagged, dependence between nodes appears in lagged cross-correlations rather than in the contemporaneous correlation matrix โ€” and its strength varies pair by pair with the sampled graph: nodes connected by a directed path co-move, nodes without one stay near the noise floor. Below we compare the maximum absolute cross-correlation over lags 0โ€“12 for every node pair against the same statistic on independent SCM draws.
Related generators
  • TSI โ€” trend/seasonal/irregular composition; KernelSynth โ€” GP kernel compositions.
  • MAR โ€” mixtures of stationary AR components with optional feature targeting.
  • VAR โ€” linear multivariate dynamics without a random causal graph.
Full parameters are in the generator reference.