arXiv is now an independent nonprofit! Learn more
License: arXiv.org perpetual non-exclusive license
arXiv:2606.31904v1 [cs.LG] 30 Jun 2026

Sequential RC-TGAN: Generating Relational Time Series with Spectral Envelope Loss
thanks: This work was supported by Mitacs through the Mitacs Accelerate program.

Mohamed Gueye1,2, Yazid Attabi1, Manuel Morales2, and Maxime Dumas1
Abstract

The generation of synthetic relational databases often involves modeling complex temporal dynamics, such as transaction logs or event sequences. A significant challenge in this domain is the handling of categorical time series (e.g., status codes), where standard encoding methods like one-hot encoding fail to capture intrinsic frequency-domain features such as seasonality and cyclicity. In this paper, we introduce Sequential RC-TGAN (Seq. RC-TGAN), a temporal extension of the RC-TGAN framework, equipped with a novel integrated loss function based on the Spectral Envelope Theory. This differentiable loss allows the generator to directly optimize the preservation of latent periodic structures via backpropagation. While spectral envelope theory is inherently designed for categorical sequences, we extend this frequency-domain regularization to continuous time series by employing a Variational Gaussian Mixture Model (VGM) discretization strategy. To establish a mathematically rigorous evaluation standard, we simulate categorical time series governed by a parameter α\alpha, with exactly known theoretical spectral envelopes. Integrating these dynamic sequences into the child tables of a relational database yields a robust ground-truth benchmark for evaluating the frequency-domain fidelity of our generative framework. Furthermore, we address the lack of robust evaluation standards for relational time series by proposing two new metrics: Spectral Density Divergence and Spectral Envelope Divergence. Experimental results on real-world datasets, as well as our simulated benchmarks, demonstrate that our end-to-end approach significantly outperforms state-of-the-art systems in reproducing cyclic patterns and long-term seasonality across both categorical and continuous features.

I Introduction

Synthetic data generation has rapidly evolved from a niche privacy-preserving technique into a foundational pillar of modern machine learning, addressing critical bottlenecks related to data scarcity and algorithmic fairness while circumventing stringent privacy regulations. Early generative paradigms primarily focused on static, single-table tabular data [21, 5, 15]. Architectures such as TabGPT [10] and Tabular Transformer GAN (TT-GAN) [3] adapted NLP techniques to generate tabular rows via autoregressive next-token prediction.

In practice, contemporary enterprise data is predominantly structured within complex Relational Databases (RDBs), consisting of interconnected networks of tables governed by strict primary key (PK) and foreign key (FK) constraints. Consequently, multi-table generation models have emerged to address this structural complexity. Early approaches to relational data generation relied on statistical baselines, such as the Synthetic Data Vault (SDV) [12], which utilized hierarchical Gaussian copulas to model cross-table distributions. The transition to deep learning in this domain was pioneered by the Row Conditional Tabular GAN (RC-TGAN) [1], which leveraged Generative Adversarial Networks (GANs) to explicitly maintain referential integrity between parent and child tables. More recently, diverse architectures have been introduced, including transformer-based sequence-to-sequence models like REaLTabFormer [17], standard tabular diffusion models like ClavaDDPM [11], and graph-based diffusion frameworks such as RelDiff [2]. Despite their structural sophistication, these relational models are fundamentally static. They treat data as fixed snapshots and obliterate the complex longitudinal dynamics of multivariate time series (e.g., financial transaction logs) embedded within these schemas.

Synthesizing dynamic temporal sequences that are structurally embedded within a relational database requires conditioning child time series trajectories on the static parent table. Models such as TimeGAN [22] and DoppelGANger [7] pioneered this domain. However, these methods operate strictly in the time domain and are not focused on categorical time series, which are ubiquitous in real-world relational tables. Because standard representations like one-hot encoding map categories to orthogonal, equidistant vectors (where the Euclidean distance is always 2\sqrt{2}), the neural network becomes completely blind to ordinal, hierarchical, or periodic relationships, preventing the generator from understanding the cyclical nature of categorical states. Apprehending these complex cyclical patterns in the time domain is inherently difficult, often leading to models missing crucial structural amplitudes. Consequently, enriching this sequence analysis with the frequency domain provides a significantly better approach, allowing the model to explicitly uncover and optimize the latent periodic structures underlying the discrete categories.

To overcome the intersecting limitations of time-domain optimization and categorical data modeling, we propose a profound paradigm shift by directly integrating Spectral Envelope Theory [18, 19, 16] into a relational generative architecture. We introduce Sequential RC-TGAN (Seq. RC-TGAN), equipped with a novel, differentiable spectral envelope loss that explicitly exploits the frequency domain to optimize the generator’s ability to model the complex pattern of categorical time series. The principle of spectral envelope in this context is to find an optimal scalar transformation that maximizes the spectral density of categorical time series; through this principle, we successfully translate discrete categories into continuous numerical representations. While recent literature has also pivoted toward frequency-domain regularization with architectures such as the Frequency-Markov Diffusion GAN (FMD-GAN) [8], FDEDiff [23], and TIFO [13] introducing highly innovative frequency-aware denoising, these methods are primarily designed for single-table generation and continuous time series, processing categorical time series using standard one-hot encoding representations. Consequently, they fail to resolve the challenge of categorical periodicity, as they cannot natively assign spectral meaning to orthogonal vectors without extensive feature engineering.

Our main contributions are as follows:

  • We integrate spectral envelope theory into a conditional sequential GAN framework by introducing a novel spectral loss term (spec\mathcal{L}_{spec}). This loss explicitly minimizes the distance between the spectral envelopes of real and synthetic data, overcoming the orthogonality of one-hot encodings to preserve latent periodic structures in categorical time series.

  • We extend this spectral methodology to continuous numerical features by employing beforehand a discretization strategy based on Gaussian Mixture Models (GMM) [21], allowing the spectral envelope to capture and enforce frequency-domain features across mixed data types simultaneously.

  • We analytically derive the exact theoretical spectral envelope for Markov chains governed by circulant transition matrices. This provides a mathematically tractable and rigorous "gold standard" benchmark simulated dataset to evaluate the frequency-domain fidelity of sequential generative models without relying on empirical periodograms.

  • We propose a new set of evaluation metrics rooted in spectral analysis : Spectral Density Divergence (𝒟¯spec\overline{\mathcal{D}}_{spec}) and Spectral Envelope Divergence (𝒟¯env\overline{\mathcal{D}}_{env}). These metrics are designed to rigorously assess the temporal fidelity and cyclic consistency of generated continuous and categorical time series, addressing the blindspots of traditional time-domain metrics.

The remainder of this paper is organized as follows. Section II provides the necessary background on spectral analysis. Section III formulates spectral envelopes within a metric space. Section IV introduces the proposed GAN framework for multi-table time series synthesis. Section V outlines the design of simulated data for our experiments. Section VI defines the new evaluation metrics based on spectral analysis. Finally, Section VII presents the experimental setup and results, followed by concluding remarks.

II Background on Spectral Analysis

II-A Spectral Density

Let {St,t}\{S_{t},t\in\mathbb{Z}\} be a weakly stationary process with value on \mathbb{R}, with mean μ\mu\in\mathbb{R} and autocovariance function γ(h)=cov(St+h,St)\gamma(h)=\text{cov}(S_{t+h},S_{t}). The spectral density f(ω)f(\omega) describes how the variance of the process is distributed across frequencies ω[1/2,1/2]\omega\in[-1/2,1/2]. The spectral density is defined as the Fourier transform of the autocovariance:

f(ω)=h=γ(h)e2πiωh.f(\omega)=\sum_{h=-\infty}^{\infty}\gamma(h)e^{-2\pi i\omega h}. (1)

Inversely : γ(h)=1/21/2f(ω)e2πiωh𝑑ω.\gamma(h)=\int_{-1/2}^{1/2}{f(\omega)e^{2\pi i\omega h}d\omega}.

In practice, for a finite time series {s1,,sT}\{s_{1},\dots,s_{T}\}, the spectral density is estimated using the periodogram I(ωk)I(\omega_{k}), calculated at Fourier frequencies ωk=k/T\omega_{k}=k/T:

I(ωk)=|d(ωk)|2=1T|t=1Tste2πiωkt|2,I(\omega_{k})=\left|d(\omega_{k})\right|^{2}=\frac{1}{T}\left|\sum_{t=1}^{T}s_{t}e^{-2\pi i\omega_{k}t}\right|^{2},

where d(ωk)=1Tt=1ste2πiωktd(\omega_{k})=\frac{1}{\sqrt{T}}\sum_{t=1}^{\prime}s_{t}e^{-2\pi i\omega_{k}t}, the Discrete Fourier Transform (DFT).

The concept of spectral density can be extended to the multivariate case. Let {St}t\{\textbf{S}_{t}\}_{t\in\mathbb{Z}} be a weakly stationary process in q\mathbb{R}^{q} with mean μ\mu and autocovariance matrix Γ(h)=𝔼[(St+hμ)(Stμ)]\Gamma(h)=\mathbb{E}[(\textbf{S}_{t+h}-\mu)(\textbf{S}_{t}-\mu)^{\prime}]. The (j,p)(j,p)-th entry of this matrix is the cross-covariance function γjp(h)=cov(Sj,t+h,Sp,t)\gamma_{jp}(h)=\text{cov}(\textbf{S}_{j,t+h},\textbf{S}_{p,t}), which measures the covariance between component jj at time t+ht+h and component pp at time tt.
The spectral density matrix f(ω)q×q\textbf{f}(\omega)\in\mathbb{C}^{q\times q} is defined as the Fourier transform of Γ(h)\Gamma(h):

f(ω)=h=Γ(h)e2πiωh,ω[1/2,1/2].\textbf{f}(\omega)=\sum_{h=-\infty}^{\infty}\Gamma(h)e^{-2\pi i\omega h},\quad\omega\in[-1/2,1/2].

The diagonal elements fjj(ω)\textbf{f}_{jj}(\omega) represent the univariate spectral densities, while the off-diagonal elements fjp(ω)\textbf{f}_{jp}(\omega) denote the cross-spectral densities.
For a finite observation {s1,,sT}\{\textbf{s}_{1},\dots,\textbf{s}_{T}\}, the spectral density is estimated using the periodogram. Let d(ωk)q\textbf{d}(\omega_{k})\in\mathbb{C}^{q} be the Discrete Fourier Transform (DFT) at frequency ωk=k/T\omega_{k}=k/T:

d(ωk)=1Tt=1Tste2πiωkt.\textbf{d}(\omega_{k})=\frac{1}{\sqrt{T}}\sum_{t=1}^{T}\textbf{s}_{t}e^{-2\pi i\omega_{k}t}.

The multivariate periodogram matrix I(ωk)\textbf{I}(\omega_{k}) is defined as the outer product:

I(ωk)=d(ωk)d(ωk),\textbf{I}(\omega_{k})=\textbf{d}(\omega_{k})\textbf{d}(\omega_{k})^{*}, (2)

where denotes the conjugate transpose. While I(ωk)\textbf{I}(\omega_{k}) is an asymptotically unbiased estimator of f(ωk)\textbf{f}(\omega_{k}), it is not consistent; its variance does not vanish as TT\to\infty. Consequently, consistent estimation requires smoothing techniques, such as windowing or averaging over frequency bands.

II-B Spectral Envelope for Categorical Time Series

Consider a categorical time series XtX_{t} taking values in a finite set a={a0,,aK1}\textbf{a}=\{a_{0},\dots,a_{K-1}\} that is stationary. Because standard frequency-domain tools cannot be directly applied to discrete qualitative symbols, we assign a vector of numerical scaling values β=(β0,,βK1)K\beta=(\beta_{0},\dots,\beta_{K-1})^{\prime}\in\mathbb{R}^{K} to the categories in a. This transformation results in a real-valued numerical process, denoted Xt(β)X_{t}(\beta)\in\mathbb{R}, where Xt(β)=βkX_{t}(\beta)=\beta_{k} whenever the original series is in state Xt=akX_{t}=a_{k}. By explicitly mapping the qualitative categories to quantitative scalars, we convert the discrete sequence into a standard univariate continuous-state time series. This mathematical conversion is a strict prerequisite, as it enables the calculation of autocovariance functions and the subsequent computation of the spectral density via the Fourier transform.

Instead of assigning arbitrary numbers to categories, the spectral envelope framework systematically derives optimal numerical values that expose hidden periodicities within a categorical time series. The primary objective is to find a scaling vector β\beta that maximizes the spectral density relative to the total variance at each specific frequency ω\omega. Formally, the Spectral Envelope λ(ω)\lambda(\omega) is defined as:

λ(ω)=supβ∝̸𝟏{f(ω;β)σ2(β)},ω[1/2,1/2],\lambda(\omega)=\sup_{\beta\not\propto\mathbf{1}}\left\{\frac{f(\omega;\beta)}{\sigma^{2}(\beta)}\right\},\quad\forall\omega\in[-1/2,1/2], (3)

where f(ω;β)f(\omega;\beta) and σ2(β)\sigma^{2}(\beta) represent the spectral density and the variance of the transformed numerical process Xt(β)X_{t}(\beta), respectively [18]. The condition β∝̸𝟏\beta\not\propto\mathbf{1} explicitly excludes trivial scalings where every category is assigned the exact same numerical value. If β\beta is proportional to a vector of all ones (β𝟏\beta\propto\mathbf{1}), the transformed sequence Xt(β)X_{t}(\beta) would merely become a flat, constant series. This would result in a variance of zero (σ2(β)=0\sigma^{2}(\beta)=0), thereby rendering the objective ratio undefined.

This optimization problem can be solved by representing the categorical process as a multivariate point process YtKY_{t}\in\mathbb{R}^{K} (using one-hot vectors). Let fY(ω)f_{Y}(\omega) be the spectral density matrix and VYV_{Y} be the variance matrix of stationary process YtY_{t}. The optimization problem in (3) can be re-written :

λ(ω)=supβ∝̸𝟏{βfY(ω)ββVYβ},ω[1/2,1/2].\lambda(\omega)=\sup_{\beta\not\propto\mathbf{1}}\left\{\frac{\beta^{\prime}f_{Y}(\omega)\beta}{\beta^{\prime}V_{Y}\beta}\right\},\quad\forall\omega\in[-1/2,1/2]. (4)

This expression is a generalized Rayleigh quotient. The solution λ(ω)\lambda(\omega) is the largest eigenvalue of fY(ω)f_{Y}(\omega) in the metric of VYV_{Y}. The corresponding eigenvector β(ω)\beta(\omega) is called the optimal scaling at frequency ω\omega.
The value λ(ω)\lambda(\omega) is called the spectral envelope because it envelopes the normalized spectrum of any scaled process Xt(β)X_{t}(\beta). In other words, for any normalized scaling β\beta (such that σ2(β)=1\sigma^{2}(\beta)=1), we have f(ω;β)λ(ω)f(\omega;\beta)\leq\lambda(\omega), with equality achieved if and only if β\beta is proportional to the optimal scaling β(ω)\beta(\omega).

While the spectral envelope provides a robust mechanism for uncovering the latent periodicities of a single categorical time series, leveraging this concept within a deep generative framework requires systematically comparing the structural properties of real and synthesized processes. To formulate a differentiable objective that minimizes the frequency-domain discrepancy between these temporal dynamics, we cannot merely view λ(ω)\lambda(\omega) as a collection of point-wise maxima. Instead, we must formalize the spectral envelope as a distinct mathematical object residing within a well-defined functional space. This theoretical shift naturally motivates the construction of a metric space for spectral envelopes, providing the foundational distance metrics required to optimize our generative model via backpropagation.

III A Metric Space Formulation for Spectral Envelopes

Consider a stationary categorical process XtX_{t} taking values in the finite set a with spectral envelope λ(ω)\lambda(\omega). Let Xt(θ)X^{(\theta)}_{t} be a parametric stationary categorical process (e.g., a synthetic process generated by a model) with values in a, parameters θ\theta, and spectral envelope λ(θ)(ω)\lambda^{(\theta)}(\omega).

In a generative context, the goal is to ensure that the synthetic process Xt(θ)X^{(\theta)}_{t} approximates the real process XtX_{t}. A fundamental question arises: how can we quantify the discrepancy between these processes in the frequency domain? By defining a metric distance between λ(ω)\lambda(\omega) and λ(θ)��(ω)\lambda^{(\theta)}(\omega), we can formulate an optimization problem where minimizing this distance with respect to θ\theta forces the synthetic process to recover the latent periodic structures of the real data. We first formalize the space in which these spectral envelopes reside.

Definition 1.

Let 𝒮K\mathcal{S}_{K} be the set of spectral envelopes corresponding to stationary categorical processes with KK categories that possess a continuous spectral density matrix associated with their one-hot encoding representation (i.e. fY(ω)f_{Y}(\omega)).

Lemma 1.

Every element λ𝒮K\lambda\in\mathcal{S}_{K} is a continuous function on the interval [1/2,1/2][-1/2,1/2].
The proof of this lemma is in the appendix.

Consequently, 𝒮K\mathcal{S}_{K} is a subset of C0([1/2,1/2])C^{0}\left([-1/2,1/2]\right), the space of continuous functions on the fundamental frequency domain. This inclusion implies that 𝒮K\mathcal{S}_{K} resides within the Hilbert space L2([1/2,1/2])L^{2}\left([-1/2,1/2]\right).

The Hilbert space L2([1/2,1/2])L^{2}\left([-1/2,1/2]\right) consists of square-integrable functions defined on [1/2,1/2][-1/2,1/2] equipped with the inner product:

h,g=1/21/2h(ω)g(ω)𝑑ω,h,gL2.\langle h,g\rangle=\int_{-1/2}^{1/2}{h(\omega)g(\omega)d\omega},\quad\forall h,g\in L^{2}.

This induces the L2L^{2} norm, representing the total energy of the function:

h2=h,h=1/21/2h(ω)2𝑑ω.\|h\|_{2}=\sqrt{\langle h,h\rangle}=\sqrt{\int_{-1/2}^{1/2}{h(\omega)^{2}d\omega}}.

From this functional space definition, we derive metrics to measure the distance between the real spectral envelope λ\lambda and the synthetic spectral envelope λ(θ)\lambda^{(\theta)}:

λλ(θ)2=1/21/2(λ(ω)λ(θ)(ω))2𝑑ω\|\lambda-\lambda^{(\theta)}\|_{2}=\sqrt{\int_{-1/2}^{1/2}{\left(\lambda(\omega)-\lambda^{(\theta)}(\omega)\right)^{2}d\omega}} (5)

The L2L^{2} distance in (5) aggregates the error over the entire frequency domain. It is differentiable (assuming λ(θ)\lambda^{(\theta)} is differentiable with respect to θ\theta) and provides non-zero gradients for deviations across all frequencies simultaneously. This "smoothness" makes the L2L^{2} metric significantly tractable as a loss function for backpropagation in deep neural networks. Therefore, we adopt the square of the L2L^{2} distance as our objective function to minimize the divergence between the real and synthetic spectral envelopes.

Lemma 2.

For all λ𝒮K\lambda\in\mathcal{S}_{K}, the following norm properties hold:

  1. (i)

    1λ1K11\leq\|\lambda\|_{1}\leq K-1.

  2. (ii)

    1λ2<1\leq\|\lambda\|_{2}<\infty.

The proof of this lemma is in the appendix.

The L1L^{1} upper bound (λ1K1\|\lambda\|_{1}\leq K-1) reflects the dimensionality constraint of a categorical variable with KK states, where the rank of the associated variance-covariance matrix is at most K1K-1. Regarding the lower bound λ21\|\lambda\|_{2}\geq 1, this property constitutes a fundamental energy constraint for any non-trivial stationary process. Because the spectral density f(ω)f(\omega) decomposes the total variance of the process across frequencies, the integral of f(ω)f(\omega) must equal the variance γ(0)\gamma(0). Given that λ(ω)\lambda(\omega) is defined as the supremum that envelopes the normalized spectrum of any scaled process, its integral (the L1L^{1} norm) cannot be less than the variance of a standardized process (σ2=1\sigma^{2}=1). By the relationship between norms on a compact domain of length 1, we have λ2λ11\|\lambda\|_{2}\geq\|\lambda\|_{1}\geq 1. This lower bound represents the "white noise" baseline where the spectral mass is uniformly distributed. In the context of deep learning, this ensures the loss function is anchored; the generator cannot minimize the spectral distance by simply reducing the synthetic process to a trivial or zero-variance state, as it must maintain the minimum spectral energy inherent to a categorical distribution.

IV Conditional GAN for Multi-table Time Series Synthesis

IV-A Formalization and Notation

Our formulation is grounded in the Probabilistic Relational Model (PRM) framework [4]. We consider a relational schema 𝒮={W,U}\mathcal{S}=\{W,U\} containing two classes (tables) WW and UU, where WW acts as the parent entity and UU as the child entity.

Let 𝒜(U)\mathcal{A}(U) denote the set of attributes for table UU. This set is partitioned into continuous attributes 𝒜cont(U)={c1,,cI}\mathcal{A}_{cont}(U)=\{c_{1},\dots,c_{I}\} and categorical attributes 𝒜cat(U)={d1,,dJ}\mathcal{A}_{cat}(U)=\{d_{1},\dots,d_{J}\}. The attribute space (or domain) for UU is defined as the Cartesian product of the domains of its individual attributes: 𝒱(U)=A𝒜(U)𝒱(A)\mathcal{V}(U)=\bigotimes_{A\in\mathcal{A}(U)}\mathcal{V}(A). Similarly, we define 𝒱(W)\mathcal{V}(W) as the attribute space for the parent table WW.

In this relational structure, specific dependencies exist between instances of WW and UU. Let wWw\in W denote a specific row (instance) in the parent table, with feature values w.𝒜𝒱(W)w.\mathcal{A}\in\mathcal{V}(W). We define Children(w)U\text{Children}(w)\subset U as the set of child rows in table UU that reference the parent ww.

In the context of time series synthesis, the set Children(w)\text{Children}(w) is not merely a bag of rows but an ordered sequence associated with the parent entity. We denote this sequence as Children(w).𝒜=(u1,,uT)\text{Children}(w).\mathcal{A}=(u_{1},\dots,u_{T}), where each ut𝒱(U)u_{t}\in\mathcal{V}(U) represents the state of the child entity at time step tt, and TT is the sequence length. Thus, the dataset consists of tuples (w.𝒜,Children(w).𝒜)\left(w.\mathcal{A},\text{Children}(w).\mathcal{A}\right), pairing static parent features with dynamic child sequences.

IV-B Sequential RC-TGAN Architecture

To address the challenge of generating relational time series, we introduce the Sequential RC-TGAN (see Fig. 1), an extension of the Row Conditional-TGAN (RC-TGAN) [1] model enhanced by the temporal dimension modeling. The original RC-TGAN primarily focused on modeling inter-table relationships, employing a generator 𝒢\mathcal{G} to model the conditional distribution of a single child row given its parent: (u|w.𝒜)\mathbb{P}(u|w.\mathcal{A}).

The Sequential RC-TGAN adapts this paradigm to support inter-row relationships modeling inside a tabular data. Rather than mapping parent feature values w.𝒜w.\mathcal{A} and a noise vector zz to a static point in the feature space 𝒱(U)\mathcal{V}(U), our generator learns to map them to a temporal trajectory within 𝒱(U)T\mathcal{V}(U)^{T}. Formally, the model approximates the conditional joint distribution of the child sequence given the parent attributes:

(Children(w).𝒜|w.𝒜)=(u1,,uT|w.𝒜).\mathbb{P}(\text{Children}(w).\mathcal{A}|w.\mathcal{A})=\mathbb{P}(u_{1},\dots,u_{T}|w.\mathcal{A}). (6)

This formulation ensures that the generation process is explicitly conditioned on the static characteristics of the parent entity, thereby guaranteeing that the synthesized temporal dynamics remain consistent with their relational context.

IV-B1 Conditional Recurrent Generator

To capture temporal dependencies effectively, we replace the fully connected layers of the original RC-TGAN with a Recurrent Neural Network (RNN) generator [9].

The generation process is conditioned on the static parent attributes w.𝒜w.\mathcal{A} at every time step, ensuring the generated sequence adheres to the specific constraints of the parent entity. At each time step tt, the generator receives a concatenated input consisting of a random noise vector zt𝒩(0,I)z_{t}\sim\mathcal{N}(0,I) and the parent vector w.𝒜w.\mathcal{A}:

ht\displaystyle h_{t} =RNN(ht1,[ztw.𝒜])\displaystyle=\text{RNN}(h_{t-1},[z_{t}\oplus w.\mathcal{A}]) (7)
u^t\displaystyle\hat{u}_{t} =MLP(ht)\displaystyle=\text{MLP}(h_{t}) (8)

where \oplus denotes concatenation, hth_{t} represents the hidden state, and u^t\hat{u}_{t} is the generated attribute vector at time tt. By reinjecting w.𝒜w.\mathcal{A} at each step, this architecture ensures that the static relational constraints (e.g., Store Type, Location) exert a persistent influence over the entire dynamic trajectory of the child sequence.

IV-B2 Conditional Discriminator

In contrast to the generator, the discriminator DϕD_{\phi} is implemented as a fully connected network (MLP) designed to assess the global coherence of the sequence. It models the joint probability of the entire sequence conditioned on the parent attributes.

Assuming a fixed sequence length TT during training, the input to the discriminator is constructed by flattening the sequence {u1,,uT}\{u_{1},\dots,u_{T}\} into a single vector and concatenating it with the parent attributes w.𝒜w.\mathcal{A}. The discriminator then maps this joint representation [u1uTw.𝒜][u_{1}\oplus\dots\oplus u_{T}\oplus w.\mathcal{A}] to a validity score, determining whether the complete temporal trajectory constitutes a plausible instance given the specific parent context.

Refer to caption
Figure 1: Architecture schema of the Sequential RC-TGAN with Spectral Loss. The diagram illustrates the generation process conditioned on parent attributes, and the dual optimization setup where the generator receives adversarial feedback from the discriminator and frequency-domain feedback via the spectral envelope loss (spec\mathcal{L}_{spec}).

IV-C Spectral Adaptation for Continuous Features

The spectral envelope theory in [18] is inherently designed for categorical time series. However, relational datasets frequently contain continuous numerical attributes 𝒜cont(U)={c1,,cI}\mathcal{A}_{cont}(U)=\{c_{1},\dots,c_{I}\} that exhibit significant periodic behavior (e.g., sales volume, temperature). To incorporate these attributes into our frequency-domain regularization, we first employ a discretization strategy based on Variational Gaussian Mixture Models (VGM) [21].

For each continuous attribute ci𝒜cont(U)c_{i}\in\mathcal{A}_{cont}(U), we fit a VGM to the training data to estimate the optimal number of modes KciK_{c_{i}} and their parameters. The probability distribution of a value ut,ciu_{t,c_{i}} is modeled as a mixture of Gaussians:

(ut,ci)=k=1Kciτk𝒩(ut,ci;μk,σk).  \mathbb{P}(u_{t,c_{i}})=\sum_{k=1}^{K_{c_{i}}}\tau_{k}\mathcal{N}(u_{t,c_{i}};\mu_{k},\sigma_{k}). (9)

To compute the spectral envelope for a continuous sequence 𝐮ci=(u1,ci,,uT,ci)\mathbf{u}_{c_{i}}=(u_{1,c_{i}},\dots,u_{T,c_{i}}), we transform it into a discrete sequence of mode indicators 𝐦ci=(m1,ci,,mT,ci)\mathbf{m}_{c_{i}}=(m_{1,c_{i}},\dots,m_{T,c_{i}}). At each time step tt, the value ut,ciu_{t,c_{i}} is assigned to the mode kk that maximizes the posterior probability:

mt,ci=argmaxk(τk𝒩(ut,ci;μk,σk)).  m_{t,c_{i}}=\arg\max_{k}\left(\tau_{k}\mathcal{N}(u_{t,c_{i}};\mu_{k},\sigma_{k})\right). (10)

This process effectively maps the continuous domain 𝒱(ci)\mathcal{V}(c_{i}) to a finite categorical set {1,,Kci}\{1,\dots,K_{c_{i}}\}. Consequently, we can calculate the spectral envelope λ(ω;ci)\lambda(\omega;c_{i}) on this discretized sequence, allowing the spectral loss spec\mathcal{L}_{spec} to enforce periodic consistency across both naturally categorical attributes 𝒜cat(U)\mathcal{A}_{cat}(U) and discretized continuous attributes 𝒜cont(U)\mathcal{A}_{cont}(U).

Beyond this discrete mode assignment, each continuous value is concurrently represented by a normalized scalar that captures its relative position within the assigned mode. Specifically, if the value ut,ciu_{t,c_{i}} is assigned to mode kk, we compute an intra-mode scalar vt,ci=ut,ciμk4σkv_{t,c_{i}}=\frac{u_{t,c_{i}}-\mu_{k}}{4\sigma_{k}}. By concatenating the one-hot encoded discrete mode indicator mt,cim_{t,c_{i}} with this normalized continuous scalar vt,civ_{t,c_{i}}, the model retains the complete information necessary to fully reconstruct the original continuous feature ut,ciu_{t,c_{i}}. Therefore, while the categorical mode sequence 𝐦ci\mathbf{m}_{c_{i}} explicitly drives the frequency-domain regularization via the spectral envelope, the supplementary scalar sequence vt,civ_{t,c_{i}} ensures no loss of localized continuous variance in the time domain.

Note that another way to incorporate the continuous attributes into frequency domain is to use the power spectrum of the signal. However as it will be shown in the ablation study section, we find that the discretization method is more effective.

IV-D Generator Losses

The training of the generator is guided by a hybrid objective function designed to satisfy two complementary requirements: global statistical realism (via adversarial feedback) and frequency-domain fidelity (via spectral envelope matching).

IV-D1 Adversarial Loss (adv\mathcal{L}_{adv})

The primary objective of the generator is to produce relational sequences that are indistinguishable from real data. To achieve stable training dynamics, we employ the Wasserstein GAN (WGAN) objective.

Let r\mathbb{P}_{r} denote the real data distribution and g\mathbb{P}_{g} the generator distribution conditioned on parent attributes w.𝒜w.\mathcal{A}. The discriminator DD (or critic) aims to maximize the divergence between its scoring of real and synthetic sequences. Conversely, the generator GG minimizes this divergence. The adversarial loss for the generator is defined as:

adv=𝔼zp(z),w.𝒜p(w.𝒜)[Dϕ(Gθ(z,w),w.𝒜)].\mathcal{L}_{adv}=-\mathbb{E}_{\textbf{z}\sim p(\textbf{z}),w.\mathcal{A}\sim p(w.\mathcal{A})}\left[D_{\phi}(G_{\theta}(\textbf{z},w),w.\mathcal{A})\right]. (11)

Minimizing this term encourages the generator to capture general temporal correlations and the joint distribution of the sequence conditioned on the parent ww.

IV-D2 Spectral Envelope Loss (spec\mathcal{L}_{spec})

Standard adversarial losses often fail to capture frequency patterns in categorical time series because discriminators tend to focus on local transitions rather than global frequency structures. To remedy this, we introduce a regularization term based on the spectral envelope.

Sequence-wise Spectral Estimation: Since the spectral envelope is a statistical property, we estimate it over mini-batches to ensure stability. Let ={𝐮(1),,𝐮(B)}\mathcal{B}=\{\mathbf{u}^{(1)},\dots,\mathbf{u}^{(B)}\} be a mini-batch of BB sequences. For a specific categorical feature djd_{j}, we compute the spectral envelope λ(ω;𝐮dj(b))\lambda\left(\omega;\mathbf{u}^{(b)}_{d_{j}}\right) for the bb-th sequence at frequency ω\omega (as defined in (3)).

We calculate the mean spectral envelope for the real batch, λ¯(real)\bar{\lambda}^{(real)}, and the synthetic batch, λ¯(synth)\bar{\lambda}^{(synth)}, by averaging the envelopes across the batch dimension:

λ¯(real)(ω;dj)=1Bb=1Bλ(ω;𝐮dj(b)).\bar{\lambda}^{(real)}(\omega;d_{j})=\frac{1}{B}\sum_{b=1}^{B}\lambda\left(\omega;\mathbf{u}^{(b)}_{d_{j}}\right). (12)

This batch-averaging step reduces the variance of the periodogram estimator and provides a robust target frequency profile for the generator. We adapt this estimation for the continuous numerical features cic_{i} by relying on their discrete mode indicators (as detailed in Section IV-C). Let 𝐦ci(b)\mathbf{m}^{(b)}_{c_{i}} denote the discretized sequence for the bb-th instance of feature cic_{i}. The mean spectral envelope is correspondingly calculated as:

λ¯(real)(ω;ci)=1Bb=1Bλ(ω;𝐦ci(b)).\bar{\lambda}^{(real)}(\omega;c_{i})=\frac{1}{B}\sum_{b=1}^{B}\lambda\left(\omega;\mathbf{m}^{(b)}_{c_{i}}\right). (13)

The synthetic counterparts, λ¯(synth)(ω;dj)\bar{\lambda}^{(synth)}(\omega;d_{j}) and λ¯(synth)(ω;ci)\bar{\lambda}^{(synth)}(\omega;c_{i}), are computed analogously over the generated batch.

Loss Formulation: To enforce periodic consistency across the entire relational dataset, we partition our frequency-domain objective into two components. The categorical spectral loss, spec(cat)\mathcal{L}_{spec}^{(cat)}, minimizes the average L2L_{2} distance between the real and synthetic mean spectral envelopes across all JJ categorical features:

spec(cat)=1Jj=1Jλ¯(real)(;dj)λ¯(synth)(;θ,dj)2.\mathcal{L}_{spec}^{(cat)}=\frac{1}{J}\sum_{j=1}^{J}\left\|\bar{\lambda}^{(real)}(\cdot;d_{j})-\bar{\lambda}^{(synth)}(\cdot;\theta,d_{j})\right\|_{2}. (14)

Likewise, the continuous spectral loss, spec(cont)\mathcal{L}_{spec}^{(cont)}, computes the average L2L_{2} distance across the II discretized numerical features:

spec(cont)=1Ii=1Iλ¯(real)(;ci)λ¯(synth)(;θ,ci)2.\mathcal{L}_{spec}^{(cont)}=\frac{1}{I}\sum_{i=1}^{I}\left\|\bar{\lambda}^{(real)}(\cdot;c_{i})-\bar{\lambda}^{(synth)}(\cdot;\theta,c_{i})\right\|_{2}. (15)

The total spectral envelope loss, spec\mathcal{L}_{spec}, is constructed as the weighted sum of these two terms, distributed proportionally to the number of features of each type:

spec=JJ+Ispec(cat)+IJ+Ispec(cont).\mathcal{L}_{spec}=\frac{J}{J+I}\mathcal{L}_{spec}^{(cat)}+\frac{I}{J+I}\mathcal{L}_{spec}^{(cont)}. (16)

Minimizing this unified term explicitly forces the generator to align the latent periodicities (e.g., seasonality, cyclic trends) of the synthetic sequences with the ground truth across both mixed data types (see Fig. 2).

Refer to caption
Figure 2: Detailed training flow of the generator via the Spectral Envelope Loss. Categorical sequences from both real and synthetic mini-batches undergo one-hot encoding to estimate their respective multivariate spectral density and variance matrices. The spectral envelopes are derived by solving the generalized eigenvalue problem. The loss explicitly minimizes the L2L_{2} distance between the batch-averaged envelopes, providing continuous, differentiable frequency-domain gradients (θspec\nabla_{\theta}\mathcal{L}_{spec}) to update the recurrent generator.

IV-E Training Loop

The training procedure employs an alternating optimization strategy to balance the competing objectives. In each epoch, we execute the following three distinct phases:

  1. 1.

    Discriminator Update: First, we optimize the discriminator DD to distinguish between real sequences and the current synthetic output. We perform ncriticn_{critic} updates to the discriminator for every generator update to maintain an optimal gradient approximation for the WGAN objective.

  2. 2.

    Adversarial Generator Update: Second, we update the generator GG by minimizing adv\mathcal{L}_{adv}. In this step, the generator weights are adjusted to fool the discriminator, ensuring global statistical coherence and adherence to the parent conditioning.

  3. 3.

    Spectral Generator Update: Finally, we perform a specialized refinement step focused on frequency-domain fidelity. We update the generator by minimizing spec\mathcal{L}_{spec}. This update is repeated nsteps_for_specn_{steps\_for\_spec} times per epoch.

V Design of Simulated Data for Experiments

Validating generative models on real-world categorical time series is inherently difficult. Because real-world data lacks a definitive "ground truth" for its underlying stochastic frequencies, evaluations often rely on noisy periodogram estimates. To rigorously evaluate whether a generative model genuinely learns complex frequency-domain features, rather than merely memorizing local transitions, it is crucial to employ benchmark time series where the spectral properties are known beforehand.

To this end, we turn to stationary Markov chains. These stochastic processes provide a controlled, "gold standard" evaluation environment for two primary reasons: first, they can be easily and exactly simulated to generate massive, customized datasets for model training; second, they allow for the exact analytical derivation of their theoretical spectral envelope. By comparing the empirical spectral envelope of the generated sequences against this mathematically known ground truth, we can accurately measure the frequency fidelity of our synthetic approximations.

We map the categorical series XtX_{t} into the multivariate point process YtY_{t} (one-hot vector). Specifically, YtY_{t} takes values in the set of standard basis vectors {e0,,eK1}K\{e_{0},\dots,e_{K-1}\}\subset\mathbb{R}^{K}. In this one-hot encoded representation, eje_{j} is a vector with a 11 at the j+1j+1-th position and 0 everywhere else, corresponding exactly to the event that XtX_{t} is in state aja_{j}. The process is characterized by the Transition Matrix Function, denoted as 𝒯(h)\mathcal{T}(h). This matrix-valued function describes the conditional probability of the process transitioning from one basis state to another over a given time lag h1h\geq 1.

For a stationary categorical process, the entry (i,j)(i,j) of the transition matrix function at lag hh, 𝒯ij(h)\mathcal{T}_{ij}(h), represents the probability of transitioning from state eie_{i} to state eje_{j} after hh steps:

𝒯ij(h)=[Yt+h=ejYt=ei].\mathcal{T}_{ij}(h)=\mathbb{P}[Y_{t+h}=e_{j}\mid Y_{t}=e_{i}]. (17)

This matrix captures the "flow" of probability mass across the state space over time.

In the context of a first-order Markov chain, the behavior of the transition matrix function 𝒯(h)\mathcal{T}(h) is strictly governed by the immediate 1-step transitions. Consequently, the transition probabilities at any lag hh are entirely determined by the hh-th power of the 1-step transition matrix P=𝒯(1)P=\mathcal{T}(1):

𝒯(h)=Ph.\mathcal{T}(h)=P^{h}.

This transition relationship is the key to computing the temporal covariance of the process. For a stationary categorical process YtY_{t} characterized by a stationary distribution vector π\pi (row vector), let Π=diag(π)\Pi=\text{diag}(\pi) denote the diagonal matrix of its marginal probabilities. The autocovariance matrix function, Γ(h)\Gamma(h), is directly related to the transition matrix function 𝒯(h)\mathcal{T}(h) by the following equation:

Γ(h)=Π𝒯(h)ππ,for h0.\Gamma(h)=\Pi\mathcal{T}(h)-\pi^{\prime}\pi,\quad\text{for }h\geq 0. (18)

By substituting the property established above for a first-order Markov chain where the multi-step transition is simply the matrix power 𝒯(h)=Ph\mathcal{T}(h)=P^{h}, this general relation simplifies significantly. The autocovariance matrix function reduces to a geometric decay governed entirely by the 1-step transition matrix PP:

Γ(h)=ΠPhππ.\Gamma(h)=\Pi P^{h}-\pi^{\prime}\pi.

Equation (18) reveals that the spectral properties of the process are entirely governed by the relaxation of the transition mechanism 𝒯(h)\mathcal{T}(h).

For the remainder of this section, we assume that the stationary categorical process XtX_{t} is a first-order Markov chain characterized by the one-step transition matrix P=𝒯(1)P=\mathcal{T}(1).

V-A Spectral Properties of Circulant Transitions

Deriving the spectral envelope for a general transition matrix requires numerically solving the eigenvalue problem at every frequency. For the class of circulant transition matrices, we can derive an exact analytical form that links the stochastic parameters directly to the spectral shape.

A transition matrix PP is circulant if every row is a cyclic right shift of the preceding row. Consequently, the entire matrix is fully characterized by its first row vector b=[b0,b1,,bK1]\textbf{b}=[b_{0},b_{1},\dots,b_{K-1}], where bj=(Yt+1=ejYt=e0)b_{j}=\mathbb{P}(Y_{t+1}=e_{j}\mid Y_{t}=e_{0}).

The general form of such a matrix is:

P=[b0b1b2bK1bK1b0b1bK2bK2bK1b0bK3b1b2b3b0].P=\begin{bmatrix}b_{0}&b_{1}&b_{2}&\dots&b_{K-1}\\ b_{K-1}&b_{0}&b_{1}&\dots&b_{K-2}\\ b_{K-2}&b_{K-1}&b_{0}&\dots&b_{K-3}\\ \vdots&\vdots&\vdots&\ddots&\vdots\\ b_{1}&b_{2}&b_{3}&\dots&b_{0}\end{bmatrix}. (19)

This structural symmetry serves as a mathematical bridge between the time domain and the frequency domain: circulant matrices are diagonalized by the Inverse Discrete Fourier Transform matrix [6], a property we leverage to derive analytical spectral envelopes. Then, the eigenvalues γk\gamma_{k} of the circulant matrix in (19) is given by:

γk=j=0K1bjei2πjkK for k=0,,K1.\gamma_{k}=\sum_{j=0}^{K-1}b_{j}e^{i\frac{2\pi jk}{K}}\text{ for }k=0,\ldots,K-1. (20)

The magnitude (|γk||\gamma_{k}|) is determined by the concentration of the probability mass in b. If b is highly concentrated (low entropy), the magnitude approaches 1 (|γk|1|\gamma_{k}|\approx 1), implying long memory, whereas a uniform b (high entropy) yields |γk|0|\gamma_{k}|\approx 0, which is characteristic of a white noise process.

Lemma 3 (Spectral Envelope of Circulant Chains).

Let XtX_{t} be a stationary categorical process with KK states governed by a circulant transition matrix PP. Let γk=rkeiϕk\gamma_{k}=r_{k}e^{i\phi_{k}} be the eigenvalues of PP expressed in polar form i.e. rk=|γk|r_{k}=|\gamma_{k}| and ϕk=arg(γk)\phi_{k}=\arg(\gamma_{k}). The spectral envelope λ(ω)\lambda(\omega) is the upper boundary of the spectral densities of the K1K-1 non-trivial eigenmodes:

λ(ω)=maxk{1,,K1}(1rk212rkcos(2πωϕk)+rk2).\lambda(\omega)=\max_{k\in\{1,\dots,K-1\}}\left(\frac{1-r_{k}^{2}}{1-2r_{k}\cos(2\pi\omega-\phi_{k})+r_{k}^{2}}\right). (21)

The proof of this lemma is in the appendix.

Using this lemma, we analyze two types of circulant chains representing distinct temporal dynamics: periodicity and inertia.

V-B The Noisy Cyclic Process (Periodicity)

This process models periodic behavior with phase noise, serving as a robust benchmark for capturing seasonality and cyclic constraints.

A Noisy Cyclic Process (NCP) is defined by the transition matrix:

Pij={αif j(i+1)(modK)1αif j=iP_{ij}=\begin{cases}\alpha&\text{if }j\equiv(i+1)\pmod{K}\\ 1-\alpha&\text{if }j=i\end{cases}

where α(0.5,1)\alpha\in(0.5,1) is the switching state parameter. An NCP is a circulant chain where b=[1α,α,0,]\textbf{b}=[1-\alpha,\alpha,0,\dots]. Its spectral envelope is given by equation (21) where :

rk\displaystyle r_{k} =12α(1α)[1cos(2πkK)],\displaystyle=\sqrt{1-2\alpha(1-\alpha)\left[1-\cos\left(\frac{2\pi k}{K}\right)\right]},
ϕk\displaystyle\phi_{k} =arctan(αsin(2πk/K)(1α)+αcos(2πk/K)).\displaystyle=\arctan\left(\frac{\alpha\sin(2\pi k/K)}{(1-\alpha)+\alpha\cos(2\pi k/K)}\right).

The NCP serves as a robust benchmark for modeling periodic behavior and cyclic constraints under varying degrees of phase noise. Its temporal dynamics are primarily controlled by the switching state parameter α(0.5,1)\alpha\in(0.5,1), which dictates the strictness of the cycle. Figure 3 visualizes the spectral envelope of the NCP with a state space of K=7K=7 for different values of α\alpha. As shown, the process naturally exhibits distinct resonant peaks clustered around the fundamental frequency of 1/70.141/7\approx 0.14 and its associated harmonics. When the cycle strength α\alpha approaches 1 (represented by the darker lines), the system mimics a deterministic cycle, concentrating the spectral energy into very sharp, Dirac-like peaks. Conversely, as α\alpha decreases toward its lower bound, the process introduces greater phase noise, which progressively broadens these sharp harmonic peaks into wide spectral hills, reflecting a more stochastic and relaxed periodic progression.

V-C The Symmetric Sticky Process (Inertia)

This process models systems with inertia, where the state tends to persist over time with no preferred direction of change.

A Symmetric Sticky Process (SSP) is defined by the transition matrix:

Pij={αif i=j1αK1if i��jP_{ij}=\begin{cases}\alpha&\text{if }i=j\\ \frac{1-\alpha}{K-1}&\text{if }i\neq j\end{cases}

where α(1/K,1)\alpha\in(1/K,1) is the switching state parameter. We can remark that the transition matrix of the SSP is circulant such that the first row b=[α,1αK1,]\textbf{b}=[\alpha,\frac{1-\alpha}{K-1},\dots]. We can derive the spectral envelope of the SSP from equation (21):

λ(ω)=1γ212γcos(2πω)+γ2,\lambda(\omega)=\frac{1-\gamma^{2}}{1-2\gamma\cos(2\pi\omega)+\gamma^{2}},

where γ=αK1K1\gamma=\frac{\alpha K-1}{K-1}. The non-trivial eigenvalues are identical and real corresponding to γ\gamma.

The asymptotic behavior of the process is highly sensitive to the switching state parameter α\alpha. As α1\alpha\to 1, the eigenvalue γ1\gamma\to 1, causing the process to become extremely "sticky" and rarely switch states. In this regime, the spectral envelope forms a sharp peak at ω=0\omega=0, ultimately approaching a Dirac delta. Conversely, as α1/K\alpha\to 1/K, the eigenvalue γ0\gamma\to 0, which reduces the process to pure random noise (see Figure 3). Consequently, the spectral energy becomes uniformly distributed, and the envelope flattens to a constant line where λ(ω)1\lambda(\omega)\approx 1.

Refer to caption
Figure 3: Spectral envelopes of the benchmark Markov chains (K=7K=7) on a logarithmic scale. Upper: The NCP exhibits peaks close to the fundamental frequency (1/70.141/7\approx 0.14) and its harmonics. As the cycle strength α1\alpha\to 1 (darker lines), the process approaches a deterministic clock with Dirac-like peaks. Lower α\alpha values introduce phase noise, broadening the peaks into wide spectral hills. The log scale is used to visualize the large dynamic range between stochastic and near-deterministic regimes. Bottom: The SSP acts as a low-pass filter. As the persistence α1\alpha\to 1 (darker lines), the spectral energy concentrates strictly at ω=0\omega=0, representing system inertia. Lower α\alpha values result in a flat, white-noise-like spectrum.

V-D Bayesian Hierarchical Sampling for generating simulated relational databases

To rigorously evaluate the conditional generation capabilities of our model, we elaborate a method for building a synthetic relational database using a Bayesian hierarchical framework. Unlike using a single fixed parameter for the entire dataset, we model the switching parameter α\alpha as a random variable associated with each parent entity. This setup forces the generative model to learn the mapping αSpectral Envelope(α)\alpha\mapsto\text{Spectral Envelope}(\alpha) rather than memorizing a static distribution.

Following the relational schema 𝒮\mathcal{S} introduced in Section IV, we construct a framework where the parent table WW governs the stochastic dynamics of the child time series in table UU. Note that for any single simulated database, we select only one of these two types of circulant chains (either the Symmetric Sticky or the NCP) and fix the total number of categorical states KK to drive the temporal dynamics. Because both processes are fully parameterized by the switching parameter α\alpha for a given KK, we apply a Bayesian hierarchical modeling to each choice: first, we sample and store NN values of α\alpha in the parent table; second, we generate a corresponding categorical time series for each of these NN values using the chosen Markov process.

For the NCP, where α\alpha represents the probability of advancing the cycle, we use a uniform prior over the valid range of directed cycles:

αi𝒰(0.5,1.0),\alpha_{i}\sim\mathcal{U}(0.5,1.0),

where αi\alpha_{i} is the random variable illustrating the value of α\alpha for the ii-th row in the parent table. For the Symmetric Sticky, we simply replace 𝒰(0.5,1.0)\mathcal{U}(0.5,1.0) distribution by 𝒰(1/K,1.0)\mathcal{U}(1/K,1.0).

For each parent row ii, we generate a categorical time series u(i)={u1(i),,uT(i)}\textbf{u}^{(i)}=\{u^{(i)}_{1},\dots,u^{(i)}_{T}\} of length TT, which acts as part of the child table XX. The dynamics of this series are conditioned strictly on the parent’s parameter αi\alpha_{i}.

The sequence is generated via the transition matrix PαiP_{\alpha_{i}} specific to the chosen type of circulant chain (Symmetric Sticky or Noisy Cyclic):

(ut+1(i)|ut(i),αi)=[Pαi]ut(i),ut+1(i).\mathbb{P}(u^{(i)}_{t+1}|u^{(i)}_{t},\alpha_{i})=[P_{\alpha_{i}}]_{u^{(i)}_{t},u^{(i)}_{t+1}}. (22)

This hierarchical construction provides a "gold standard" dataset for conditional generative modeling. Since the true spectral envelope λ(ω;αi)\lambda(\omega;\alpha_{i}) is analytically known for every parent ii (via Lemma 3), we can compute the exact expected spectral error. A successful generative model must produce synthetic children u^(i)\hat{\textbf{u}}^{(i)} such that their empirical spectral envelopes match the theoretical envelopes dictated by their sampled parent attributes α^i\hat{\alpha}_{i}.

VI New Metrics Based on Spectral Analysis

Evaluating the fidelity of synthetic relational time series requires going beyond simple marginal distributions or static correlations. Standard metrics often fail to accurately detect if the synthetic data preserves the specific frequency-domain characteristics (such as seasonality and cyclic constraints) inherent to the real process. To address this, we propose two metrics rooted in spectral analysis.

Let {w1,,wM}\{w_{1},\dots,w_{M}\} be the set of parent instances in the real database, and {w^1,,w^M}\{\hat{w}_{1},\dots,\hat{w}_{M^{\prime}}\} be the set of parent instances in the synthetic database. Each parent wmw_{m} (or w^m\hat{w}_{m^{\prime}}) identifies a specific sub-population of children rows forming a multivariate time series.

For a numerical attribute cic_{i}, let f(ω;ci,wm)f(\omega;c_{i},w_{m}) denote the spectral density of the series associated with parent wmw_{m}. For a categorical attribute djd_{j}, let λ(ω;dj,wm)\lambda(\omega;d_{j},w_{m}) denote its spectral envelope. We define the mean spectral densities and mean spectral envelopes for the real data as:

f¯(real)(ω;ci)\displaystyle\bar{f}^{(real)}(\omega;c_{i}) =1Mm=1Mf(ω;ci,wm),\displaystyle=\frac{1}{M}\sum_{m=1}^{M}f(\omega;c_{i},w_{m}), (23)
λ¯(real)(ω;dj)\displaystyle\bar{\lambda}^{(real)}(\omega;d_{j}) =1Mm=1Mλ(ω;dj,wm).\displaystyle=\frac{1}{M}\sum_{m=1}^{M}\lambda(\omega;d_{j},w_{m}). (24)

The synthetic counterparts, f¯(synth)\bar{f}^{(synth)} and λ¯(synth)\bar{\lambda}^{(synth)}, are defined analogously over the MM^{\prime} synthetic parents.

VI-A Spectral Density Divergence (𝒟¯spec\overline{\mathcal{D}}_{spec})

To evaluate the temporal fidelity of continuous features, we measure the divergence between the average power spectrums. We first normalize the spectral densities so that 1/21/2f(ω)𝑑ω=1\int_{-1/2}^{1/2}f(\omega)d\omega=1, considering them as probability distributions over the frequency domain.

The individual divergence div(,)div(\cdot,\cdot) for an attribute cic_{i} is defined as the divergence (e.g., Wasserstein or Kullback-Leibler) between the real and synthetic mean densities. The global Spectral Density Divergence (SDD) is the average over all continuous attributes:

𝒟¯spec=1Ii=1I𝒟spec(ci),\overline{\mathcal{D}}_{spec}=\frac{1}{I}\sum_{i=1}^{I}{\mathcal{D}_{spec}(c_{i})}, (25)

where 𝒟spec(ci)=div(f¯(real)(;ci),f¯(synth)(;ci))\mathcal{D}_{spec}(c_{i})=div\left(\bar{f}^{(real)}(\cdot;c_{i}),\bar{f}^{(synth)}(\cdot;c_{i})\right). It is worth noting that the aggregated quantities f¯(real)(;ci)\bar{f}^{(real)}(\cdot;c_{i}) and f¯(synth)(;ci)\bar{f}^{(synth)}(\cdot;c_{i}) constitute well-defined normalized spectral densities. Mathematically, the set of valid normalized spectral densities is closed under convex combinations; since each individual f(ω;ci,wm)f(\omega;c_{i},w_{m}) is a non-negative, real-valued, its integral under interval [1/2,1/2][-1/2,1/2] is equal to one, and even function (for real-valued processes), their arithmetic mean preserves these fundamental properties. Consequently, f¯(real)\bar{f}^{(real)} effectively represents the spectral density of a "representative" process for the class UU, averaging out local idiosyncrasies to reveal the global frequency structure of the population. This validity allows us to treat these patterns as probability distributions and rigorously apply divergence metrics divdiv such as Kullback-Leibler (KL) or Wasserstein distance.

VI-B Spectral Envelope Divergence (𝒟¯env\overline{\mathcal{D}}_{env})

For categorical attributes, we assess the preservation of latent periodicities using the spectral envelope. The divergence for a single attribute djd_{j} is calculated as the L2L^{2} distance between the mean envelopes:

𝒟env(dj)=λ¯(real)(;dj)λ¯(synth)(;dj)2K1.\mathcal{D}_{env}(d_{j})=\frac{\big\|\bar{\lambda}^{(real)}(\cdot;d_{j})-\bar{\lambda}^{(synth)}(\cdot;d_{j})\big\|_{2}}{K-1}. (26)

The global Spectral Envelope Divergence (SED) is the mean over all categorical attributes:

𝒟¯env=1Jj=1J𝒟env(dj).\overline{\mathcal{D}}_{env}=\frac{1}{J}\sum_{j=1}^{J}\mathcal{D}_{env}(d_{j}). (27)

The aggregated spectral envelope λ¯(real)(ω;dj)\bar{\lambda}^{(real)}(\omega;d_{j}) inherits the fundamental algebraic properties of its constituents. Since λ¯(real)\bar{\lambda}^{(real)} is constructed as a finite linear combination of individual envelopes, and given that each component λ(;dj,wm)\lambda(\cdot;d_{j},w_{m}) is continuous on the compact interval [1/2,1/2][-1/2,1/2] (Lemma 1), the mean envelope itself is necessarily a continuous function in C0([1/2,1/2])C^{0}([-1/2,1/2]). Furthermore, the fundamental norm constraints established in Lemma 2 are preserved under this averaging operation. Specifically, by the convexity of the norm, the mean envelope satisfies the dimensionality constraint 1λ¯(real)(;dj)1K11\leq\|\bar{\lambda}^{(real)}(\cdot;d_{j})\|_{1}\leq K-1 (If KK is the number of categories of djd_{j}) and maintains finite energy 1λ¯(real)(;dj)2<1\leq\|\bar{\lambda}^{(real)}(\cdot;d_{j})\|_{2}<\infty. These properties ensure that λ¯(real)\bar{\lambda}^{(real)} remains a well-defined term within the functional L2([1/2,1/2])L^{2}\left([-1/2,1/2]\right) and verify important properties of spectral envelopes, guaranteeing that the divergence metric 𝒟¯env\overline{\mathcal{D}}_{env} is both bounded and mathematically stable.

VII Experiments

In this section, we empirically evaluate the performance of our proposed generative framework. The primary objective is to demonstrate that integrating the spectral envelope loss into a sequential GAN architecture significantly improves the preservation of latent periodicities and temporal dynamics in both continuous and categorical time series conveyed by rows of child tables of relational databases. To this end, we conduct comprehensive experiments on both simulated data and real-world transactional datasets. We compare our model against several state-of-the-art generative approaches, followed by an ablation study to evaluate the contribution of specific components within our proposed model.

VII-A Experimental setup

VII-A1 Simulated Data (Bayesian Hierarchical Benchmarks)

We first evaluate our models on simulated relational databases generated via our Bayesian Hierarchical Benchmarking framework. We simulate two distinct categorical Markov processes:

  • NCP: Tests the model’s ability to capture periodic behaviors of categorical time series. The transition parameter is sampled from the prior α𝒰(0.5,1.0)\alpha\sim\mathcal{U}(0.5,1.0).

  • SSP: Tests the model’s ability to capture low-frequency, high-inertia dynamics (low-pass filter behavior). The transition parameter is sampled from the prior α𝒰(1/K,1.0)\alpha\sim\mathcal{U}(1/K,1.0).

Specifically, we synthesize a parent table comprising 100 independent entities (rows), where each entity’s attribute α\alpha is drawn from the corresponding uniform prior. For each parent row, we simulate a sequence of 10,000 child rows, generated using the Markov transition matrix governed by that specific α\alpha. This hierarchical construction dictates the exact theoretical spectral envelope of the generated child sequences, providing a rigorous "gold standard" to isolate and evaluate frequency-domain fidelity across varying state space sizes (K=7,12,21K=7,12,21).

VII-A2 Real-World Datasets

We also evaluate our method on two real-world relational databases containing complex temporal dynamics: Rossmann [14] and Walmart [20]. Each database adheres to a two-level hierarchical relational schema. The parent table contains static metadata representing the set of individual stores (e.g., store type, location), while the child table contains the multivariate time series for each store, encompassing both continuous numerical features (e.g., daily or weekly sales volume) and highly periodic categorical features (e.g., day of the week, promotional events).

VII-A3 Baseline models

We compare our proposed method (Seq. RC-TGAN) against state-of-the-art systems spanning standard relational generation and dedicated time series generative adversarial networks:

  • SDV [12]: A standard probabilistic relational model that builds generative models of relational databases by computing statistics at the intersection of related tables.

  • ClavaDDPM [11]: A recent diffusion-based approach for multi-relational data synthesis.

  • DoppelGANger [7]: A state-of-the-art GAN designed for networked time series that tackles mode collapse and long-term dependencies.

  • TimeGAN [22]: A time series GAN that combines the unsupervised adversarial paradigm with the control of supervised training through a jointly optimized latent embedding space.

VII-A4 Metrics

To rigorously assess both temporal fidelity and the preservation of complex temporal patterns conveyed by child tables rows structures, we employ the following metrics:

  • MSE (ACF): The Mean Squared Error between the autocorrelation of the real and synthetic data. This measures the model’s ability to preserve time-domain dependencies and localized temporal structures.

  • SDD (𝒟¯spec\overline{\mathcal{D}}_{spec}): Defined in (25), we specifically use the KL divergence as divdiv function to evaluate categorical time series.

  • SED (𝒟¯env\overline{\mathcal{D}}_{env}): Defined in (27), used to evaluate numerical time series.

VII-B Experimental Results

The results are summarized in Tables II and I, alongside visual analyses in Figures 5 and 4. To assess model performance, we highlight relative improvements over the second-best baselines and evaluate statistical significance using a two-sample t-test (p<0.05p<0.05).

VII-B1 Performance on Simulated Data

Table I demonstrates that Seq. RC-TGAN achieves statistically significant reductions in SED (𝒟¯env\overline{\mathcal{D}}_{env}) across all tested state space sizes (K=7,12,21K=7,12,21). For the NCP, our proposed method yields relative improvements of 45.8%, 43.3%, and 28.2% over the next best baselines at K=7,12,K=7,12, and 2121, respectively. This trend holds for the SSP, where Seq. RC-TGAN significantly outperforms the second-best models by 32.7% (K=7K=7), 52.8% (K=12K=12) and 37.48% (K=21K=21).

Figure 4 provides a qualitative spectral analysis of the generated sequences against the mathematical ground truth (black dashed line). A rigorous visual evaluation of synthetic categorical time series in the frequency domain necessitates assessing two critical criteria: (1) frequency localization, ensuring the synthetic envelope successfully exhibits peaks at all theoretical fundamental and harmonic frequencies; (2) spectral purity, verifying that every peak in the synthetic envelope corresponds to a true theoretical peak without introducing spurious periodic artifacts.

Our proposed model consistently satisfies both criteria. For the SSP (top row), it accurately captures the theoretical low-pass filter behavior, concentrating the precise magnitude of spectral mass exactly at ω=0\omega=0 without hallucinating higher-frequency artifacts as the persistence parameter α\alpha approaches 1. For the NCP (bottom row), the model successfully isolates the true fundamental harmonic peaks (e.g., near ω0.14\omega\approx 0.14 for K=7K=7), maintains strict spectral purity by avoiding false peaks, and faithfully reproduces the theoretical amplitudes to accurately model the phase noise. In stark contrast, competing baselines universally fail these criteria, failing to detect true periodicities and typically collapsing into flat, white-noise-like representations.

VII-B2 Performance on Real-World Data

Table II details the performance of the generative models on the Rossmann and Walmart databases. The proposed framework establishes state-of-the-art performance across multiple facets of temporal generation. Most notably, it demonstrates a unique ability to model complex categorical time series, yielding statistically significant divergence reductions in SED (𝒟¯env\overline{\mathcal{D}}_{env}) compared to the second-best baselines: 37.8% and 59.3% relative gain on the Rossmann and Walmart databases, respectively (p<0.05p<0.05).

Furthermore, although the spectral envelope theory described in section II is inherently designed for categorical sequences, our framework extends this frequency-domain regularization to continuous numerical attributes by employing a Variational Gaussian Mixture Model (VGM) discretization strategy. By mapping continuous values to discrete mode indicators, the spectral loss successfully enforces periodic consistency across all feature types. This adaptation directly contributes to our model achieving a statistically significant 33.7% relative improvement in continuous SDD (𝒟¯spec\overline{\mathcal{D}}_{spec}) on the Rossmann dataset, as well as a relative gain of 24.8% over DoppelGANger on the Walmart dataset (p<0.05p<0.05 for both).

SDV, ClavaDDPM, and TimeGAN consistently demonstrate the weakest performance, struggling to capture both local time-domain structures and global frequency distributions. In contrast, DoppelGANger proves to be a highly competitive state-of-the-art baseline for numerical data. On the Walmart dataset, DoppelGANger and our proposed model are statistically tied for the best time-domain performance (MSE ACF of 0.012 vs. 0.013, respectively; p>0.05p>0.05). However, despite DoppelGANger’s proficiency with continuous variables, it struggles significantly when tasked with modeling the periodic dynamics of categorical time series. Our proposed method overcomes this important limitation via our unified spectral envelope regularization.

This dynamic is visually corroborated by the Autocorrelation Function (ACF) analysis of numerical time series presented in Figure 5. As seen in the top row (a, b), static tabular models like SDV and ClavaDDPM completely fail to capture temporal dependencies, resulting in flat ACF curves. This visual analysis highlights a critical limitation of the commonly used MSE (ACF) metric. On the Rossmann dataset, the static SDV model achieves a nominally better MSE (ACF) compared to the sequential DoppelGANger model (0.0700 vs. 0.0868). However, visual inspection reveals that SDV merely produces a flat line near zero; this mathematically minimizes the mean squared error across all lags by "playing it safe," but fails entirely to capture underlying temporal dynamics. DoppelGANger successfully reproduces the oscillating shape of the sales autocorrelation but misses the exact amplitude of certain peaks, resulting in a harsher point-wise MSE penalty.

The spectral metrics (𝒟¯spec\overline{\mathcal{D}}_{spec} and 𝒟¯env\overline{\mathcal{D}}_{env}) correct this incompleteness by evaluating the global frequency structure rather than local point-wise errors. Ultimately, our proposed Seq. RC-TGAN framework bridges all these gaps, demonstrating the ability to accurately capture local point-wise dependencies, global continuous periodicities via VGM adaptation, and crucially, the complex structural harmonics inherent to categorical time series.

TABLE I: Perfomance on simulated datasets: Comparison of 𝒟¯env\overline{\mathcal{D}}_{env} between our proposed method and baselines across different state space sizes (KK). Lower is better.
State Space Size (KK)
Model K=7 K=12 K=21
Noisy Cyclic
SDV 0.7830±0.0582¯\underline{0.7830\pm 0.0582} 0.9459±0.18040.9459\pm 0.1804 0.8418±0.07940.8418\pm 0.0794
ClavaDDPM 0.8729±0.06600.8729\pm 0.0660 0.8922±0.10360.8922\pm 0.1036 0.9101±0.17970.9101\pm 0.1797
DoppelGANger 0.9467±0.05790.9467\pm 0.0579 0.8786±0.1071¯\underline{0.8786\pm 0.1071} 0.8336±0.0452¯\underline{0.8336\pm 0.0452}
TimeGAN 0.9100±0.13020.9100\pm 0.1302 0.9135±0.14270.9135\pm 0.1427 0.9076±0.08600.9076\pm 0.0860
Seq. RC-TGAN 0.4246±0.0117\mathbf{0.4246\pm 0.0117} 0.4984±0.0319\mathbf{0.4984\pm 0.0319} 0.5988±0.0202\mathbf{0.5988\pm 0.0202}
Symmetric Sticky
SDV 0.2182±0.02970.2182\pm 0.0297 0.1012±0.01440.1012\pm 0.0144 0.0661±0.01120.0661\pm 0.0112
ClavaDDPM 0.1873±0.02660.1873\pm 0.0266 0.0949±0.0050¯\underline{0.0949\pm 0.0050} 0.0569±0.00650.0569\pm 0.0065
DoppelGANger 0.7691±0.14040.7691\pm 0.1404 0.2123±0.02400.2123\pm 0.0240 0.1258±0.01730.1258\pm 0.0173
TimeGAN 0.1813±0.0208¯\underline{0.1813\pm 0.0208} 0.1007±0.00690.1007\pm 0.0069 0.0555±0.0074¯\underline{0.0555\pm 0.0074}
Seq. RC-TGAN 0.1221±0.0023\mathbf{0.1221\pm 0.0023} 0.0448±0.0018\mathbf{0.0448\pm 0.0018} 0.0347±0.0009\mathbf{0.0347\pm 0.0009}
TABLE II: Performance Metrics on real-world datasets: MSE (ACF), 𝒟¯spec\overline{\mathcal{D}}_{spec}, and 𝒟¯env\overline{\mathcal{D}}_{env}
Dataset Model MSE (ACF) 𝒟¯spec\overline{\mathcal{D}}_{spec} 𝒟¯env\overline{\mathcal{D}}_{env}
Rossmann SDV 0.0700±0.0000¯\underline{0.0700\pm 0.0000} 50.00%±0.00%50.00\%\pm 0.00\% 0.7359±0.0000¯\underline{0.7359\pm 0.0000}
ClavaDDPM 0.0702±0.00010.0702\pm 0.0001 50.30%±0.08%50.30\%\pm 0.08\% 0.7407±0.00060.7407\pm 0.0006
DoppelGANger 0.0868±0.02930.0868\pm 0.0293 46.22%±4.34%¯\underline{46.22\%\pm 4.34\%} 0.7792±0.56400.7792\pm 0.5640
TimeGAN 0.0951±0.03170.0951\pm 0.0317 57.20%±5.21%57.20\%\pm 5.21\% 1.2507±0.36001.2507\pm 0.3600
Seq. RC-TGAN 0.0340±0.0072\mathbf{0.0340\pm 0.0072} 30.66%±3.86%\mathbf{30.66\%\pm 3.86\%} 0.4578±0.1630\mathbf{0.4578\pm 0.1630}
Walmart SDV 0.1223±0.00000.1223\pm 0.0000 50.99%±0.00%50.99\%\pm 0.00\% 0.0757±0.00000.0757\pm 0.0000
ClavaDDPM 0.1195±0.00150.1195\pm 0.0015 45.04%±0.40%45.04\%\pm 0.40\% 0.0727±0.00080.0727\pm 0.0008
DoppelGANger 0.0120±0.0052\mathbf{0.0120\pm 0.0052} 6.88%±0.89%¯\underline{6.88\%\pm 0.89\%} 0.0118±0.0028¯\underline{0.0118\pm 0.0028}
TimeGAN 0.1250±0.02080.1250\pm 0.0208 16.32%±2.90%16.32\%\pm 2.90\% 0.1446±0.01080.1446\pm 0.0108
Seq. RC-TGAN 0.0130±0.0112¯\underline{0.0130\pm 0.0112} 5.17%±0.58%\mathbf{5.17\%\pm 0.58\%} 0.0048±0.0023\mathbf{0.0048\pm 0.0023}
Refer to caption
(a) Symmetric Sticky (α=0.9\alpha=0.9)
Refer to caption
(b) Symmetric Sticky (α=0.98\alpha=0.98)
Refer to caption
(c) Noisy Cyclic (α=0.9\alpha=0.9)
Refer to caption
(d) Noisy Cyclic (α=0.98\alpha=0.98)
Figure 4: Spectral Envelope Evaluation on Simulated Data (K=7K=7). The black dashed line represents the theoretical ground truth. Top Row (Sticky): The proposed Seq. RC-TGAN (blue) accurately captures the low-pass behavior, with spectral mass concentrating at ω=0\omega=0 as persistence (α\alpha) increases. Bottom Row (Cyclic): Seq. RC-TGAN successfully aligns with the fundamental harmonic peaks (e.g., ω0.14\omega\approx 0.14) and their sharpening as cycle strength (α\alpha) increases. Conversely, sequential baselines—including DoppelGANger (purple), TimeGAN (brown), and the unregularized Seq. RC-TGAN (no spec\mathcal{L}_{spec}) (red)—fail to capture these periodic structures, collapsing into flat or erratic noise.
Refer to caption
(a) Rossmann Store Sales: Baseline comparison
Refer to caption
(b) Walmart Fuel Price: Baseline comparison
Refer to caption
(c) Rossmann Store Sales: Ablation Study
Refer to caption
(d) Walmart Fuel Price: Ablation Study
Figure 5: Autocorrelation Function (ACF) Analysis. The dashed black line represents the ground truth. Top Row (a, b): Comparison against baselines. Static models like SDV (pink) and ClavaDDPM (green) fail to capture seasonality (recurring peaks at lag 7 for Rossman and lag 12 for Walmart). Bottom Row (c, d): Ablation study. The static RC-TGAN (orange) produces a flat line, and the unregularized Seq. RC-TGAN (no spec\mathcal{L}_{spec}) (red) captures local transitions but underestimates global amplitudes. The proposed Seq. RC-TGAN (blue) accurately reproduces the overarching seasonal correlation structure.

VII-C Ablation Study

To rigorously isolate the contributions of our architectural design choices, specifically the recurrent temporal generation and the proposed frequency-domain loss, we conducted an ablation study. We compared four variants of our framework: RC-TGAN [1] (no temporal dimension modeling), the Seq. RC-TGAN (w\o spec\mathcal{L}_{spec}) that is the recurrent baseline without any spectral loss, the Seq. RC-TGAN (psd) which models based on the spectral density loss for the numerical columns instead of the spectral envelope loss (based on VGM), and our proposed full model, Seq. RC-TGAN.

The necessity of the defined spectral loss is most starkly evident in our highly controlled simulated environments (Table III). While the model Seq. RC-TGAN (w\o spec\mathcal{L}_{spec}) demonstrates improvements on empirical real-world data, it completely fails to reproduce pure mathematical periodicities. The results show that without explicit frequency-domain guidance, the recurrent baseline performs almost identically to the static RC-TGAN model on both the NCP and SSP across all state space sizes.

This reveals that standard adversarial training in the time domain, even with an RNN-based architecture, is insufficient to prevent white-noise-like spectra when faced with periodic constraints. By incorporating the spectral envelope loss, the divergence (𝒟¯env\overline{\mathcal{D}}_{env}) is reduced by approximately 50% across almost all configurations (e.g., a statistically significant divergence drop from 0.8483 to 0.4246 for the NCP at K=7K=7). These results confirm that the proposed spectral loss is not merely an incremental tuning parameter for real-world data, but a fundamentally essential component for generative models to successfully reconstruct latent harmonics and system inertia in categorical time series.

Table IV details the performance of these variants on the Rossmann and Walmart datasets. Transitioning from a static generator (RC-TGAN) to a recurrent architecture (Seq. RC-TGAN (w/o spec\mathcal{L}_{spec})) yields statistically significant improvements (p<0.05p<0.05) across both time and frequency domains on real-world data. For instance, on the Walmart dataset, introducing the recurrent structure reduces the time-domain MSE (ACF) by 54.6% (from 0.1200 to 0.0545) and drastically reduces the continuous frequency divergence (𝒟¯spec\overline{\mathcal{D}}_{spec}) by 81.8% (from 45.26% to 8.22%).

Evaluating the progression of our ablation study highlights the fundamental necessity of the spectral envelope loss for mixed-type columns in relational databases. First, comparing the unregularized recurrent baseline (Seq. RC-TGAN (w\o spec\mathcal{L}_{spec})) to the Seq. RC-TGAN (psd) variant demonstrates the advantage of the latter, as applying a standard spectral density loss successfully provides frequency-domain guidance for continuous numerical columns. However, this approach remains fundamentally insufficient for reliably capturing the complex periodic dynamics inherent to categorical data. Subsequently, comparing the Seq. RC-TGAN (psd) variant to our full model (Seq. RC-TGAN) illustrates the critical impact of our proposed approach. Implementing the full Spectral Envelope loss forces the generator to comprehensively learn overarching periodic patterns across all data types natively. This yields a statistically significant 23.9% relative reduction in categorical SED (𝒟¯env\overline{\mathcal{D}}_{env}) compared to the psd variant on the Rossmann dataset (dropping from 0.6014 to 0.4578). Furthermore, on the Walmart dataset, the full model drives the SED down to 0.0048, outperforming the PSD-only variant and achieving a massive 93.4% overall improvement compared to the initial recurrent baseline (dropping from 0.0732 to 0.0048).

These findings are visually confirmed by the Autocorrelation Function (ACF) analysis (Figure 5, bottom row). The static RC-TGAN completely fails to capture temporal dependencies, resulting in a flat ACF line. While the Seq. RC-TGAN (w\o spec\mathcal{L}_{spec}) successfully begins to capture localized temporal transitions, it still misses the global structural amplitudes. The integration of the full spectral loss acts as the definitive catalyst, enabling the generator to accurately reproduce long-range seasonal correlations rather than just step-by-step localized transitions.

TABLE III: Ablation study on simulated datasets: Comparison of 𝒟¯env\overline{\mathcal{D}}_{env} between RC-TGAN variants across different state space sizes (KK). Lower is better.
State Space Size (KK)
Model K=7 K=12 K=21
Benchmark: Noisy Cyclic
RC-TGAN 0.8215±0.0864¯\underline{0.8215\pm 0.0864} 0.9719±0.1127¯\underline{0.9719\pm 0.1127} 0.9652±0.30880.9652\pm 0.3088
Seq. RC-TGAN (w\o spec\mathcal{L}_{spec}) 0.8483±0.10940.8483\pm 0.1094 0.9775±0.11550.9775\pm 0.1155 0.8260±0.0261¯\underline{0.8260\pm 0.0261}
Seq. RC-TGAN 0.4246±0.0117\mathbf{0.4246\pm 0.0117} 0.4984±0.0319\mathbf{0.4984\pm 0.0319} 0.5988±0.0202\mathbf{0.5988\pm 0.0202}
Benchmark: Symmetric Sticky
RC-TGAN 0.1962±0.0159¯\underline{0.1962\pm 0.0159} 0.0957±0.00490.0957\pm 0.0049 0.0546±0.0065¯\underline{0.0546\pm 0.0065}
Seq. RC-TGAN (w\o spec\mathcal{L}_{spec}) 0.1988±0.01690.1988\pm 0.0169 0.0926±0.0086¯\underline{0.0926\pm 0.0086} 0.0588±0.00290.0588\pm 0.0029
Seq. RC-TGAN 0.1221±0.0023\mathbf{0.1221\pm 0.0023} 0.0448±0.0018\mathbf{0.0448\pm 0.0018} 0.0347±0.0009\mathbf{0.0347\pm 0.0009}
TABLE IV: Ablation study on real-world datasets: MSE (ACF), 𝒟¯spec\overline{\mathcal{D}}_{spec}, and 𝒟¯env\overline{\mathcal{D}}_{env}
Dataset Model MSE (ACF) 𝒟¯spec\overline{\mathcal{D}}_{spec} 𝒟¯env\overline{\mathcal{D}}_{env}
Rossmann RC-TGAN 0.0703±0.00020.0703\pm 0.0002 50.29%±0.06%50.29\%\pm 0.06\% 0.7404±0.00030.7404\pm 0.0003
Seq. RC-TGAN (w\o spec\mathcal{L}_{spec}) 0.0687±0.00370.0687\pm 0.0037 43.72%±2.54%¯\underline{43.72\%\pm 2.54\%} 0.5790±0.1574¯\underline{0.5790\pm 0.1574}
Seq. RC-TGAN (psd) 0.0681±0.0322¯\underline{0.0681\pm 0.0322} 43.99%±4.78%43.99\%\pm 4.78\% 0.6014±0.17710.6014\pm 0.1771
Seq. RC-TGAN 0.0340±0.0072\mathbf{0.0340\pm 0.0072} 30.66%±3.86%\mathbf{30.66\%\pm 3.86\%} 0.4578±0.1630\mathbf{0.4578\pm 0.1630}
Walmart RC-TGAN 0.1200±0.00120.1200\pm 0.0012 45.26%±0.58%45.26\%\pm 0.58\% 0.0833±0.00170.0833\pm 0.0017
Seq. RC-TGAN (w\o spec\mathcal{L}_{spec}) 0.0545±0.02270.0545\pm 0.0227 8.22%±0.96%¯\underline{8.22\%\pm 0.96\%} 0.0732±0.00160.0732\pm 0.0016
Seq. RC-TGAN (psd) 0.0389±0.0212¯\underline{0.0389\pm 0.0212} 16.23%±8.16%16.23\%\pm 8.16\% 0.0067±0.0102¯\underline{0.0067\pm 0.0102}
Seq. RC-TGAN 0.0130±0.0112\mathbf{0.0130\pm 0.0112} 5.17%±0.58%\mathbf{5.17\%\pm 0.58\%} 0.0048±0.0023\mathbf{0.0048\pm 0.0023}

VIII Conclusion

In this paper, we addressed the critical challenge of generating high-fidelity time series within relational databases by introducing Seq. RC-TGAN, a sequential generative adversarial network enhanced with a novel, integrated spectral envelope loss. Rather than relying solely on static encodings, our framework explicitly optimizes the network to preserve the complex frequency-domain features of both categorical and continuous time series during training. Furthermore, we established a mathematically rigorous evaluation paradigm by analytically deriving the spectral envelope for circulant Markov chains, providing a "gold standard" for categorical time series alongside two novel spectral divergence metrics. Extensive experiments on these simulated data and real-world datasets (Rossmann and Walmart) demonstrate that our approach significantly outperforms state-of-the-art baselines in capturing latent periodicities, strict cyclic constraints, and long-term seasonality.

References

  • [1] M. Gueye, Y. Attabi, and M. Dumas (2023) Row conditional-TGAN for generating synthetic relational databases. In ICASSP 2023-2023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 1–5. Cited by: §I, §IV-B, §VII-C.
  • [2] V. Hudovernik, M. Xu, J. Shi, L. Šubelj, S. Ermon, E. Štrumbelj, and J. Leskovec (2025) RelDiff: relational data generative modeling with graph-based diffusion models. arXiv preprint arXiv:2506.00710. Cited by: §I.
  • [3] H. Y. J. Kang, M. Ko, and K. S. Ryu (2025) Tabular transformer generative adversarial network for heterogeneous distribution in healthcare. Scientific Reports 15 (1), pp. 10254. Cited by: §I.
  • [4] D. Koller (1999) Probabilistic relational models. In International Conference on Inductive Logic Programming, pp. 3–13. Cited by: §IV-A.
  • [5] A. Kotelnikov, D. Baranchuk, I. Rubachev, and A. Babenko (2024-10) TabDDPM: Modelling Tabular Data with Diffusion Models. arXiv. Note: arXiv:2209.15421 External Links: Link, Document Cited by: §I.
  • [6] I. Kra and S. R. Simanca (2012) On circulant matrices. Notices of the AMS 59 (3), pp. 368–377. Cited by: §V-A.
  • [7] Z. Lin, A. Jain, C. Wang, G. Fanti, and V. Sekar (2020) Using gans for sharing networked time series data: challenges, initial promise, and open questions. In Proceedings of the ACM internet measurement conference, pp. 464–483. Cited by: §I, 3rd item.
  • [8] Y. Ma, D. Qu, and Y. Wang (2026) Dynamic community detection using class preserving time series generation with fourier markov diffusion. Scientific Reports. Cited by: §I.
  • [9] L. R. Medsker, L. Jain, et al. (2001) Recurrent neural networks. Design and applications 5 (64-67), pp. 2. Cited by: §IV-B1.
  • [10] I. Padhi, Y. Schiff, I. Melnyk, M. Rigotti, Y. Mroueh, P. Dognin, J. Ross, R. Nair, and E. Altman (2021) Tabular transformers for modeling multivariate time series. In ICASSP 2021-2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 3565–3569. Cited by: §I.
  • [11] W. Pang, M. Shafieinejad, L. Liu, S. Hazlewood, and X. He (2024-11) ClavaDDPM: Multi-relational Data Synthesis with Cluster-guided Diffusion Models. arXiv. Note: arXiv:2405.17724 External Links: Link, Document Cited by: §I, 2nd item.
  • [12] N. Patki, R. Wedge, and K. Veeramachaneni (2016-10) The Synthetic Data Vault. 2016 IEEE International Conference on Data Science and Advanced Analytics (DSAA) 2016, pp. 399–410 (en). External Links: Document Cited by: §I, 1st item.
  • [13] X. Piao, Z. Chen, L. Zhu, Y. Dong, Y. Matsubara, and Y. Sakurai (2026) TIFO: time-invariant frequency operator for stationarity-aware representation learning in time series. arXiv preprint arXiv:2602.17122. Cited by: §I.
  • [14] Rossmann Store Sales. External Links: Link Cited by: §VII-A2.
  • [15] R. Shi, Y. Wang, M. Du, X. Shen, and X. Wang (2025) A Comprehensive Survey of Synthetic Tabular Data Generation. arXiv preprint arXiv:2504.16506. Cited by: §I.
  • [16] R. H. Shumway and D. S. Stoffer (2006) Time series analysis and its applications: with r examples. Springer. Cited by: §I.
  • [17] A. V. Solatorio and O. Dupriez (2023-02) REaLTabFormer: Generating Realistic Relational and Tabular Data using Transformers. arXiv. Note: arXiv:2302.02041 External Links: Link, Document Cited by: §I.
  • [18] D. S. Stoffer, D. E. Tyler, and A. J. McDougall (1993) Spectral analysis for categorical time series: scaling and the spectral envelope. Biometrika 80 (3), pp. 611–622. Cited by: §I, §II-B, §IV-C.
  • [19] D. S. Stoffer, D. E. Tyler, and D. A. Wendt (2000) The spectral envelope and its applications. Statistical Science, pp. 224–253. Cited by: §I.
  • [20] T. Wilczek Walmart. External Links: Link Cited by: §VII-A2.
  • [21] L. Xu, M. Skoularidou, A. Cuesta-Infante, and K. Veeramachaneni (2019-10) Modeling Tabular data using Conditional GAN. arXiv:1907.00503 [cs, stat] (en). Note: arXiv: 1907.00503 External Links: Link Cited by: 2nd item, §I, §IV-C.
  • [22] J. Yoon, D. Jarrett, and M. Van der Schaar (2019) Time-series generative adversarial networks. Advances in neural information processing systems 32. Cited by: §I, 4th item.
  • [23] Z. Zhang, Q. Ouyang, Z. Yu, D. Pei, and T. Xiao Frequency decomposition and enhancement for time series generation using diffusion models. Cited by: §I.

Proof of Lemma 1

By assumption, the spectral density matrix of the one-hot encoded process, fY(ω)f_{Y}(\omega), is continuous. Because the categories are mutually exclusive and exhaustive, the covariance matrix VV has rank K1K-1. We can apply any K×(K1)-dimK\times(K-1)\text{-dim} projection matrix QQ to obtain a full-rank covariance matrix V¯=QVQ\overline{V}=Q^{\prime}VQ and a projected spectral density matrix f¯Y(ω)=QfY(ω)Q\overline{f}_{Y}(\omega)=Q^{\prime}f_{Y}(\omega)Q.

The spectral envelope λ(ω)\lambda(\omega) is given by the largest eigenvalue of the matrix C(ω)=V¯1/2f¯Y(ω)V¯1/2C(\omega)=\overline{V}^{-1/2}\overline{f}_{Y}(\omega)\overline{V}^{-1/2}. Since fY(ω)f_{Y}(\omega) is continuous with respect to ω\omega, the matrix C(ω)C(\omega) is also continuous.

The eigenvalues of C(ω)C(\omega) are the roots of its characteristic polynomial, which can be defined as P(x,ω)=det(xIC(ω))P(x,\omega)=\det(xI-C(\omega)). The coefficients of this polynomial are continuous functions of the entries of C(ω)C(\omega) which are continuous functions of ω\omega. Then, polynomial P(x,ω)P(x,\omega) is continuous function of ω\omega.

According to standard mathematical theorem in [ross2022yet] regarding the roots of polynomials, the roots of a polynomial are continuous functions of its coefficients. Consequently, the largest root, λ(ω)\lambda(\omega), is a continuous function on the fundamental frequency domain [1/2,1/2][-1/2,1/2].

Proof of Lemma 2

We prove the two properties sequentially based on the definitions of the spectral envelope and the norms.

Let f¯Y(ω)\overline{f}_{Y}(\omega) be the projected spectral density matrix of dimension (K1)×(K1)(K-1)\times(K-1), and let V¯\overline{V} be the corresponding full-rank covariance matrix. The integral of the spectral density matrix over the fundamental frequency domain yields the covariance matrix:

1/21/2f¯Y(ω)𝑑ω=V¯.\int_{-1/2}^{1/2}\overline{f}_{Y}(\omega)d\omega=\overline{V}.

Recall that the spectral envelope is defined as λ(ω)=μmax(C(ω))\lambda(\omega)=\mu_{\max}(C(\omega)), where μmax()\mu_{\max}(\cdot) is the highest eigenvalue function and C(ω)=V¯1/2f¯Y(ω)V¯1/2C(\omega)=\overline{V}^{-1/2}\overline{f}_{Y}(\omega)\overline{V}^{-1/2}.

Upper Bound: Integrating C(ω)C(\omega) over the frequency domain yields:

1/21/2C(ω)𝑑ω\displaystyle\int_{-1/2}^{1/2}C(\omega)d\omega =V¯1/2(1/21/2f¯Y(ω)𝑑ω)V¯1/2\displaystyle=\overline{V}^{-1/2}\left(\int_{-1/2}^{1/2}\overline{f}_{Y}(\omega)d\omega\right)\overline{V}^{-1/2}
=IK1.\displaystyle=I_{K-1}.

Taking the trace of both sides, we get:

1/21/2tr(C(ω))𝑑ω\displaystyle\int_{-1/2}^{1/2}\text{tr}(C(\omega))d\omega =tr(1/21/2C(ω)𝑑ω)\displaystyle=\text{tr}\left(\int_{-1/2}^{1/2}C(\omega)d\omega\right)
=tr(IK1)=K1.\displaystyle=\text{tr}(I_{K-1})=K-1.

Since C(ω)C(\omega) is positive semi-definite, its maximum eigenvalue is bounded by its trace, μmax(C(ω))tr(C(ω))\mu_{\max}(C(\omega))\leq\text{tr}(C(\omega)) for all ω\omega. Therefore:

λ1=1/21/2λ(ω)𝑑ω1/21/2tr(C(ω))𝑑ω=K1.\|\lambda\|_{1}=\int_{-1/2}^{1/2}\lambda(\omega)d\omega\leq\int_{-1/2}^{1/2}\text{tr}(C(\omega))d\omega=K-1.

Lower Bound: Using the variational characterization of the spectral envelope, for any non-zero vector β¯0K1\bar{\beta}_{0}\in\mathbb{R}^{K-1}, we have:

λ(ω)=supβ¯K1β¯f¯Y(ω)β¯β¯V¯β¯β¯0f¯Y(ω)β¯0β¯0V¯β¯0.\lambda(\omega)=\sup_{\bar{\beta}\in\mathbb{R}^{K-1}}\frac{\bar{\beta}^{\prime}\overline{f}_{Y}(\omega)\bar{\beta}}{\bar{\beta}^{\prime}\overline{V}\bar{\beta}}\geq\frac{\bar{\beta}_{0}^{\prime}\overline{f}_{Y}(\omega)\bar{\beta}_{0}}{\bar{\beta}_{0}^{\prime}\overline{V}\bar{\beta}_{0}}.

Integrating this inequality over the frequency domain gives:

λ1\displaystyle\|\lambda\|_{1} =1/21/2λ(ω)𝑑ω\displaystyle=\int_{-1/2}^{1/2}\lambda(\omega)d\omega
1/21/2β¯0f¯Y(ω)β¯0β¯0V¯β¯0𝑑ω\displaystyle\geq\int_{-1/2}^{1/2}\frac{\bar{\beta}_{0}^{\prime}\overline{f}_{Y}(\omega)\bar{\beta}_{0}}{\bar{\beta}_{0}^{\prime}\overline{V}\bar{\beta}_{0}}d\omega
=β¯0(1/21/2f¯Y(ω)𝑑ω)β¯0β¯0V¯β¯0\displaystyle=\frac{\bar{\beta}_{0}^{\prime}\left(\int_{-1/2}^{1/2}\overline{f}_{Y}(\omega)d\omega\right)\bar{\beta}_{0}}{\bar{\beta}_{0}^{\prime}\overline{V}\bar{\beta}_{0}}
=β¯0V¯β¯0β¯0V¯β¯0=1.\displaystyle=\frac{\bar{\beta}_{0}^{\prime}\overline{V}\bar{\beta}_{0}}{\bar{\beta}_{0}^{\prime}\overline{V}\bar{\beta}_{0}}=1.

Thus, 1λ1K11\leq\|\lambda\|_{1}\leq K-1.

From Lemma 1, λ(ω)\lambda(\omega) is a continuous function on the compact interval [1/2,1/2][-1/2,1/2]. Therefore, it is bounded, which implies λL([1/2,1/2])\lambda\in L^{\infty}([-1/2,1/2]) and consequently λL2([1/2,1/2])\lambda\in L^{2}([-1/2,1/2]), meaning λ2<\|\lambda\|_{2}<\infty.

For the lower bound, we apply Jensen’s inequality (or the Cauchy-Schwarz inequality) on the probability space defined by the interval [1/2,1/2][-1/2,1/2] with length 1:

λ22=1/21/2λ(ω)2𝑑ω(1/21/2λ(ω)𝑑ω)2=λ12.\|\lambda\|_{2}^{2}=\int_{-1/2}^{1/2}\lambda(\omega)^{2}d\omega\geq\left(\int_{-1/2}^{1/2}\lambda(\omega)d\omega\right)^{2}=\|\lambda\|_{1}^{2}.

Since we established in Part (i) that λ11\|\lambda\|_{1}\geq 1, it strictly follows that λ21\|\lambda\|_{2}\geq 1.

Proof of Lemma 3

Because PP is a circulant matrix, it is a normal matrix (PP=PPPP^{\prime}=P^{\prime}P). A fundamental property of circulant matrices is that they are diagonalized by the Discrete Fourier Transform (DFT) matrix. Therefore, the eigenvectors vkv_{k} are the fixed, orthogonal Fourier basis vectors. This orthogonality allows us to project the multivariate one-hot encoded categorical process YtY_{t} into KK uncorrelated scalar processes, defined as Zt(k)=vkYtZ_{t}^{(k)}=v_{k}^{*}Y_{t}.

The conditional expectation of each projected scalar process is exactly governed by its corresponding eigenvalue: 𝔼[Zt+1(k)Zt(k)]=γkZt(k)\mathbb{E}[Z_{t+1}^{(k)}\mid Z_{t}^{(k)}]=\gamma_{k}Z_{t}^{(k)}. This equation defines a complex Autoregressive Process of order 1 (AR(1)). For such an AR(1) process, the temporal dependence decays geometrically. Consequently, the normalized autocorrelation function at lag hh is given exactly by the corresponding eigenvalue raised to the absolute lag: Rk(h)=γk|h|R_{k}(h)=\gamma_{k}^{|h|}.

By the Wiener-Khinchin theorem, the spectral density fk(ω)f_{k}(\omega) of a stationary discrete-time process is the Discrete-Time Fourier Transform (DTFT) of its autocorrelation sequence. Substituting the geometric autocorrelation Rk(h)=γk|h|R_{k}(h)=\gamma_{k}^{|h|} into the Fourier sum yields an explicitly solvable infinite geometric series:

fk(ω)\displaystyle f_{k}(\omega) =h=Rk(h)e2πiωh\displaystyle=\sum_{h=-\infty}^{\infty}R_{k}(h)e^{-2\pi i\omega h}
=h=γk|h|e2πiωh=1|γk|2|1γke2πiω|2.\displaystyle=\sum_{h=-\infty}^{\infty}\gamma_{k}^{|h|}e^{-2\pi i\omega h}=\frac{1-|\gamma_{k}|^{2}}{|1-\gamma_{k}e^{-2\pi i\omega}|^{2}}.

Using the polar representation of the eigenvalue γk=rkeiϕk\gamma_{k}=r_{k}e^{i\phi_{k}}, we can expand the squared norm in the denominator:

|1rkei(ϕk2πω)|2=12rkcos(2πωϕk)+rk2|1-r_{k}e^{i(\phi_{k}-2\pi\omega)}|^{2}=1-2r_{k}\cos(2\pi\omega-\phi_{k})+r_{k}^{2}

This yields the explicit polar form for the spectral density: fk(ω)=1rk212rkcos(2πωϕk)+rk2f_{k}(\omega)=\frac{1-r_{k}^{2}}{1-2r_{k}\cos(2\pi\omega-\phi_{k})+r_{k}^{2}}.

The spectral envelope is defined as the supremum of the normalized spectral density over all possible projection vectors β\beta: λ(ω)=supβfZ(ω;β)Var(Z)\lambda(\omega)=\sup_{\beta}\frac{f_{Z}(\omega;\beta)}{\text{Var}(Z)}. Because the scalar modes Zt(k)Z_{t}^{(k)} are mutually uncorrelated (their cross-covariance is zero for all lags), the total spectral density of any linear combination is simply the sum of the individual mode densities.

To maximize a weighted average of independent components at any specific frequency ω\omega, the optimal strategy is to assign all weight to the single component with the largest value. Thus, evaluating the envelope simplifies to finding the point-wise maximum of the individual harmonic densities (excluding the trivial stationary DC component k=0k=0):

λ(ω)=maxk{1,,K1}fk(ω)\lambda(\omega)=\max_{k\in\{1,\dots,K-1\}}f_{k}(\omega)