## 3 Methods
Our loss combines penalties on both the first- and second-order differences of the latent time series:  
\[\mathcal{L}_{\text{smooth}}=\mathcal{L}_{\text{smooth}}^{(1)}+\alpha\cdot \mathcal{L}_{\text{smooth}}^{(2)} \tag{4}\]  
where \(\alpha\) is a weighting factor. The first-order loss \(\mathcal{L}_{\text{smooth}}^{(1)}\) penalizes the velocity of the trend, encouraging gradual changes:  
\[\mathcal{L}_{\text{smooth}}^{(1)}=\frac{1}{B}\sum_{i=1}^{B}\left[\frac{1}{d_ {\text{trend}}\times(L-1)}\sum_{j=1}^{d_{\text{trend}}}\sum_{t=1}^{L-1}\|z_{ \text{trend}}^{(ij,t)}-z_{\text{trend}}^{(i,j,t-1)}\|_{2}^{2}\right] \tag{5}\]  
The second-order loss \(\mathcal{L}_{\text{smooth}}^{(2)}\) penalizes the acceleration of the trend, promoting a constant rate of change:  
\[\mathcal{L}_{\text{smooth}}^{(2)}=\frac{1}{B}\sum_{i=1}^{B}\left[\frac{1}{d_{ \text{trend}}\times(L-2)}\sum_{j=1}^{d_{\text{trend}}}\sum_{t=2}^{L-1}\|z_{ \text{trend}}^{(ij,t)}-2z_{\text{trend}}^{(i,j,t-1)}+z_{\text{trend}}^{(i,j,t -2)}\|_{2}^{2}\right] \tag{6}\]  
In these equations, \(z_{\text{trend}}^{(i,j,t)}\) represents the latent value for the \(i\)-th sample, \(j\)-th trend dimension, at time step \(t\). \(B\), \(d_{\text{trend}}\), and \(L\) are the batch size, trend latent dimension, and sequence length, respectively. This combined penalty ensures that \(z_{\text{trend}}\) represents a robust and smooth underlying signal. Event Sparsity Loss (\(\mathcal{L}_{\text{sparse}}\)). To guide the event latent variable, \(z_{\text{event}}\), to capture sparse, bursty, and significant short-term patterns, we designed a composite sparsity loss function, \(\mathcal{L}_{\text{sparse}}\). While the specific combination of these losses is tailored for our disentanglement objective, its constituent parts are based on well-established principles of sparsity measurement from machine learning and signal processing. The loss function is composed of three distinct terms:  
\[\mathcal{L}_{\text{sparse}}=\mathcal{L}_{1}+\gamma_{c}\cdot\mathcal{L}_{ \text{contrast}}+\gamma_{c}\cdot\mathcal{L}_{\text{peak}} \tag{7}\]  
Here, \(\mathcal{L}_{1}\) is the standard L1 regularization loss, \(\mathcal{L}_{\text{contrast}}\) is a contrastive sparsity loss, and \(\mathcal{L}_{\text{peak}}\) is a peak activation loss. The key weighting hyperparameters, \(\gamma_{c}\) and \(\gamma_{p}\) here and \(\alpha\) in the smoothness loss, were determined empirically through multiple experiments and set to 0.2, 0.2, and 0.5, respectively, to optimize performance on the downstream task. Let the event latent tensor be denoted as \(z_{\text{event}}\in\mathbb{R}^{B\times d_{\text{event}}\times L}\), where \(B\) is the batch size, \(d_{\text{event}}\) is the dimensionality of the event latent space, and \(L\) is the sequence length. L1 Regularization Loss (\(\mathcal{L}_{1}\)): This loss, derived from the classical LASSO regression [47], promotes overall sparsity by penalizing all non-zero activations in the latent space. \[\mathcal{L}_{1}=\frac{1}{B\cdot d_{\text{event}}\cdot L}\sum_{i=1}^{B}\sum_{j=1} ^{d_{\text{event}}}\sum_{t=1}^{L}\Bigl{|}z_{\text{event}}^{(i,j,t)}\Bigr{|} \tag{8}\]  
Contrastive Sparsity Loss (\(\mathcal{L}_{\text{contrast}}\)): This loss aims to enforce sparsity across the feature dimension, encouraging energy concentration in a few feature dimensions. This principle is explored in sparse coding [48], and our implementation achieves this by maximizing the standard deviation of the feature activation vector. We define the loss as the negative of the mean standard deviation:  
\[\mathcal{L}_{\text{contrast}}=-\frac{1}{B\cdot L}\sum_{i=1}^{B}\sum_{t=1}^{L} \text{Std}\Bigl{(}\mathbf{z}_{\text{event}}^{(i,\cdot)}\Bigr{)} \tag{9}\]  
where \(\mathbf{z}_{\text{event}}^{(i,\cdot)}\in\mathbb{R}^{d_{\text{event}}}\) is the feature vector for the \(i\)-th sample at time step \(t\), and \(\text{Std}(\cdot)\) is the standard deviation function.