Manuscript Offprint
arXiv:2609.31157Bayesian Tensor Autoencoder with Physics-informed Predictive Prior for Multi-dimensional Time Series Anomaly Detection
JIANAN LIU, Zhejiang University, China
CHUNGUANG LI , Zhejiang University, China
Multi-dimensional time series, inherently tensorial, are common in practice. Anomaly detection on such time series has a wide range of applications and the intrinsic correlations within these time series are beneficial for anomaly detection. Despite great progress in time series anomaly detection, most existing methods are confined to uni-/multi-variate time series. When handling multi-dimensional time series using these methods, reshaping operations are required, which inevitably break the intrinsic correlations and thus lead to performance degradation. In uni-/multi-variate time series anomaly detection, AutoEncoders (AEs) are widely adopted and generally categorized into reconstruction-based and prediction-based AEs. The reconstruction-based AE utilizes the current observation for reconstruction, while the prediction-based AE utilizes the historical information to predict the current observation. Thus, the two AEs utilize different information. To bridge the gap between reconstruction-based and prediction-based AEs, so as to fully leverage the available information and thus further enhance performance, we propose a predictive prior and incorporate it into the reconstruction-based AE. It may not be very difficult to conceive this idea, but designing the predictive prior so that it can work for tensor anomaly detection is non-trivial. Specifically, to avoid breaking the intrinsic correlations within the multi-dimensional time series, we use the tensor AE as the backbone. To incorporate the predictive prior into the reconstruction-based AE, we propose a Bayesian fusion approach and our analysis reveals that this approach can enhance the modeling capability of the model for normal data. To mitigate the over-generalization problem of AE, we incorporate physical laws, i.e. tensor low-rank decomposition rules, into the neural networks in the predictive prior, leading to the Physics-informed Predictive Prior Tensor AE (PPPTAE) framework. Furthermore, training and testing strategies are tailored for PPPTAE so as to introduce sufficient randomness during training and bypass complex density estimation during testing, respectively. Experimental results on real-world datasets demonstrate the effectiveness of the proposed method.
CCS Concepts: • Computing methodologies → Anomaly detection; Neural networks; Unsupervised learning; • Information systems → Data mining; • Mathematics of computing → Bayesian computation.
Additional Key Words and Phrases: Multi-dimensional time series anomaly detection, predictive prior, tensor decomposition, Bayesian fusion
ACM Reference Format:
Jianan Liu and Chunguang Li. 2026. Bayesian Tensor Autoencoder with Physics-informed Predictive Prior for Multi-dimensional Time Series Anomaly Detection. 1, 1 (September 2026), 28 pages.
1 Introduction
Multi-dimensional time series are common in practice. Take freeway traffic data as an example: A freeway has multiple lanes, and sensors capture various road metrics along the freeway, with each sensor collecting simultaneous measurements for all lanes at the corresponding location over time. Such data are inherently tensorial and can be naturally represented as a fourth-order tensor sized , where is the number of sensors placed along the freeway, is the number of lanes, denotes the number of road metrics captured by sensors such as speed and occupancy, and is the total number of timestamps. Another example is the weather data, in which
Authors' Contact Information: Jianan Liu, Zhejiang University, Hangzhou, China; Chunguang Li, Zhejiang University, Hangzhou, China, cgli@zju.edu.cn.
- ACM XXXX-XXXX/2026/9-ART https://doi.org/
Jianan Liu and Chunguang Li
and denote the number of latitude and longitude points, respectively, and is the number of weather-related physical variables, such as temperature and humidity. In these examples, and contain location-related information and using a vector of length to represent the information would destroy the original location-related structure. Therefore, these data should be represented by tensors sized so as to preserve the original structure.
Anomaly detection on multi-dimensional time series has a wide range of applications. For instance, detecting anomalies in freeway traffic data enables the prompt identification of abnormal events such as car accidents. Similarly, anomaly detection on weather data helps to timely detect extreme weather events such as tornadoes. By detecting anomalies, we can effectively minimize losses to life and property by promptly taking appropriate actions.
Different from supervised tasks such as time series classification [2, 7, 21], time series anomaly detection presents many unique challenges. On the one hand, as anomalies often correspond to rare events, normal samples often form a large portion of the data collected in practice, which leads to a highly imbalanced number of normal and abnormal samples in the real-world datasets. On the other hand, the types of anomalies are usually varied, making it extremely difficult to fully characterize abnormal events. In view of these problems, time series anomaly detection methods are often unsupervised and usually use only the normal samples to train the model so that normal patterns can be learned [35, 39, 50]. In this way, events that can not be described by the model are identified as anomalies during the testing stage.
Although time series anomaly detection is challenging, the intrinsic correlations within multi-dimensional time series can be beneficial for anomaly detection. On the one hand, by leveraging these intrinsic correlations, certain anomalies can be more effectively detected. For example, for car accidents on freeways, by integrating observation from multiple sensors located around the accident location, such abnormal events can be more effectively detected. On the other hand, leveraging the intrinsic correlations within multi-dimensional time series also helps in modeling normal data. For example, weather data present the nature that observation values at adjacent latitude and longitude points are similar though not identical. By taking the similarity into account, we can better model the normal data, thereby better distinguishing between normal and abnormal samples during the testing phase. Therefore, we should leverage the intrinsic correlations within multi-dimensional time series and not break these correlations.
Despite great progress in time series anomaly detection, most existing methods are confined to uni-/multi-variate time series [10, 16, 44]. When handling multi-dimensional time series using these methods, reshaping operations are required, which inevitably break the intrinsic correlations and thus lead to performance degradation.
In uni-/multi-variate time series anomaly detection, AutoEncoders (AEs) are widely adopted and generally categorized into reconstruction-based and prediction-based AEs. The reconstruction-based AE utilizes the current observation for reconstruction, while the prediction-based AE utilizes the historical information to predict the current observation. Thus, the two AEs utilize different information.
In order to bridge the gap between reconstruction-based and prediction-based AEs, so as to fully leverage the available information, thereby further enhancing performance, a natural idea is to concatenate the historical information and the current observation as the input of the model, and let the output be the current observation. Although this approach of concatenation is simple and intuitive, it fails to explicitly account for the interaction between historical information and current observations, and thus can not guarantee performance gains. To more effectively bridge the gap between the reconstruction-based AE and prediction-based AE, one possible way is to design a
Bayesian Tensor Autoencoder with Physics-informed Predictive Prior for Multi-dimensional Time Series Anomaly Detection
3
predictive prior using the historical information and incorporate this prior into the reconstruction-based AE, thereby effectively integrating prediction and reconstruction capabilities within a single unified model.
To the best of our knowledge, no existing work has adopted this idea. We note that the works known as the meta-analytic predictive prior [9, 18, 27, 32] have a similar name. These works assume that the parameters estimated from external studies follow the same distribution as those obtained in the current trial. Therefore, the distribution of parameters estimated from external data can be used as the prior for the parameters estimated in the current trial. However, this prior neglects temporal dependencies and uses a single global prior to model all external data. Therefore, the idea of the meta-analytic predictive prior is conceptually different from our idea and is unsuitable for time series tasks.
In this work, we propose a predictive prior and incorporate it into the reconstruction-based AE. It may not be very difficult to conceive this idea, but designing the predictive prior so that it can work for tensor anomaly detection is non-trivial. Specifically, to avoid breaking the intrinsic correlations within the multi-dimensional time series, we use the Tensor AE (TAE) as the backbone. To incorporate the predictive prior into the reconstruction-based TAE, we propose a Bayesian fusion approach and our analysis reveals that this approach can enhance the modeling capability of the model for normal data. To mitigate the over-generalization problem of AE, we incorporate physical laws, i.e. tensor low-rank decomposition rules, into the neural networks in the predictive prior, leading to the Physics-informed Predictive Prior Tensor AE (PPPTAE) framework. Furthermore, training and testing strategies are tailored for PPPTAE so as to introduce sufficient randomness during training and bypass complex density estimation during testing, respectively.
In summary, the contribution of this work is three-fold:
(1) We propose a predictive prior and incorporate it into the reconstruction-based TAE. In this way, we bridge the gap between prediction-based and reconstruction-based AEs, so as to fully leverage the available information, thereby further enhancing performance.
(2) To mitigate the over-generalization problem of AE, we incorporate physical laws, i.e. tensor low-rank decomposition rules, into the neural networks in the predictive prior, leading to the Physics-informed Predictive Prior Tensor AE (PPPTAE) framework.
(3) To incorporate the predictive prior into the reconstruction-based TAE, we propose a Bayesian fusion approach, and our analysis reveals that this approach can enhance the modeling capability of the model for normal data.
Notations: In this paper, we use lowercase boldface (e.g. a), uppercase boldface (e.g. A), and calligraphic letters (e.g. ) to denote vectors, matrices, and tensors, respectively. We use to denote the identity diagonal matrix of size . We use to denote the set of integers from 1 to , and use to denote the set of integers from to . For a tensor , we use to denote the -th element of . The inner product of two tensors is defined by and the squared Frobenius norm of a tensor is defined by .
Given multi-dimensional time series , where and correspond to certain physical meanings (e.g., corresponding to the number of longitude and latitude points in weather data), denotes the number of features, denotes the total number of timestamps. For the reconstruction-based Tensor AE (TAE), the input is the observation at timestamp ,
Jianan Liu and Chunguang Li
and the corresponding feature is extracted via the encoder. Subsequently, the decoder reconstructs the input according to the feature to obtain . During the testing stage, the deviation between the observation and its reconstruction is usually calculated to distinguish abnormal from normal samples. This is because during the training stage, only normal samples are used to train TAE, so the reconstruction error for normal samples is typically small, while the reconstruction error for abnormal samples is usually large. For the prediction-based TAE, the input is the observations from the previous timestamps . After feature extraction via the encoder, the decoder predicts the observation at timestamp and yields . Consistent with the reconstruction-based AE, during the testing stage, the deviation between and is calculated to distinguish abnormal from normal samples.
To summarize, the reconstruction-based TAE utilizes the current observation for reconstruction, while the prediction-based TAE utilizes the historical information to predict the current observation. The two AEs utilize different information.
2.1 Predictive Prior
To bridge the gap between reconstruction-based and prediction-based TAEs, so as to fully leverage the available information, thereby further enhancing performance, we propose a predictive prior that can capture the temporal dependencies among features and incorporate it into the reconstruction-based TAE.
Specifically, to simplify the analysis and without loss of generality, we formulate the predictive prior as a Gaussian distribution. Furthermore, in order to leverage historical information to predict the mean and variance of this distribution, we construct functions whose inputs are the features of the historical observations , and outputs are the mean and variance of the predictive prior, respectively. We formulate the proposed predictive prior as
where is the probability density function, is the Gaussian distribution, denotes the feature tensor at timestamp , denotes the mean of the feature tensor , the variance is element-wise, and are the features of the historical observations.
In the following, for clarity, we first introduce how to incorporate this predictive prior into the reconstruction-based TAE. Then we present the specific forms of the mappings .
2.2 Bayesian Fusion Approach
We aim to utilize both the information from the features of the historical observations , and the current observation , so as to obtain the current feature . In other words, our goal is to obtain the probability distribution . To this end, we apply the Bayes' theorem to expand this probability distribution, leading to
Since in the numerator of (4) models the conditional distribution of the observation given the features, it serves as a decoder. For the decoder of the reconstruction-based TAE, reconstructing the observation only (directly) relies on its feature . Therefore, we have
Bayesian Tensor Autoencoder with Physics-informed Predictive Prior for Multi-dimensional Time Series Anomaly Detection
5
We can thus further rewrite (4) as
(6)
Since and are fixed when evaluating the distribution with respect to , both and can be regarded as constants. We therefore have
where is a constant. is estimated by the encoder, which takes the observation as input, and is the predictive prior formulated in (1), which takes the features from the previous timestamps as input. Thus, (7) is the Bayesian fusion formula.
For analytical tractability and without loss of generality, we model both and as Gaussian distributions, that is,
For the numerator in (7), the two Gaussian terms, and , are multiplied together. Since the product of two Gaussian distributions is still Gaussian, the resulting distribution also follows a Gaussian form, whose mean and variance are given by:
where and denote the precision of the two distributions in (8) and (9), respectively.
For the denominator in (7), by the rules of probability, this density satisfies
where is the probability density of the training data.
To demonstrate the effect of the denominator in (7), we further define
Note that is already determined at timestamp , so no additional integration over is required. When substituting (7) and (12) into (13), we obtain
Jianan Liu and Chunguang Li
(14)
where denotes a training sample drawn from the training data distribution.
For the -th distribution of the numerator in (14), the product of the two distributions remains Gaussian, with mean given in (10). Besides, since the model is trained only on normal samples, which are generally predictable, and the predictive prior and the encoder should perform well after training, would be around , which is the mean of the -th component in the denominator of (14). Consequently, as illustrated in Fig. 1, the probability densities of the -th numerator and denominator exhibit an approximately positive correlation. That is, when the probability density of the numerator is large, the denominator is roughly also large, and vice versa. Consequently, the ratio of their probability densities fluctuates within a narrower range, thereby becoming more concentrated. When summing over all distributions, the same relationship between the numerator and denominator remains, so exhibits a tendency toward a uniform distribution. Under this effect, the resulting features , which are fed into the decoder for reconstruction, become more evenly distributed, thereby allowing each region in the feature space to contain sufficient training samples. As a result, the reconstruction capability corresponding to each region is well established, thereby preventing reconstruction degradation in regions with insufficient features. Thus, during the testing stage, normal samples are reconstructed consistently well. In summary, the denominator in (7) functions as a reweighting factor and can provide a beneficial contribution to modeling normal data.
So far, we have incorporated the predictive prior into the reconstruction-based TAE using the Bayesian approach. Next, we present the specific forms of the mappings .
2.3 Physics-informed Predictive Prior
For , inspired by the universal approximation theorem [8] of neural networks, a natural idea is to directly construct two neural networks to achieve prediction, that is,
where are the features of the historical observations, and are the mean and variance of the predictive prior distribution of the feature at timestamp , respectively. However, this approach cannot mitigate the over-generalization problem of reconstruction-based AE, i.e., sometimes abnormal samples may also be reconstructed well [6, 28, 54]. To this end, we introduce a Bayesian tensor decomposition module in so as to impose a low-rank constraint on the normal features.
In the following, we first introduce the details of the Bayesian tensor decomposition module, and then we carefully analyze its mechanism for mitigating the over-generalization problem of AE. Finally, we present the overall design of the physics-informed predictive prior.
2.3.1 Bayesian Tensor Decomposition Module. For the features of M historical observations, , , , , we first decompose them respectively using the Bayesian tensor decomposition module. Specifically, similar to previous tensor decomposition frameworks [38, 49, 53], we also assume that the feature can be decomposed into a low-rank component , a sparse component
Bayesian Tensor Autoencoder with Physics-informed Predictive Prior for Multi-dimensional Time Series Anomaly Detection
7

Fig. 1. A schematic illustration of the distributions and , where is a training sample drawn from the data distribution. Since the mean of is close to the mean of , the probability densities of the two distributions exhibit an approximately positive correlation. That is, when the probability density of is large, is roughly also large, and vice versa.
S and a noise component , that is,
where the low-rank component captures normal features. Since the training process involves only normal samples, using as the input to the decoder is sufficient for accurate reconstruction. Therefore, our objective is to estimate from . To this end, we first specify the low-rank structure of .
Recently, many novel low-rank structures have been proposed, such as tensor train [23, 41], tensor ring [25, 43], and tensor Singular Value Decomposition (t-SVD) [17, 20]. In comparison to these low-rank structures, the Tensor Wheel (TW) model can comprehensively establish all possible mode interactions within a tensor, thereby more accurately capturing the complex interactions within the tensor [37]. Here, we choose to use the TW model to characterize the low-rank structure of the feature , that is,
where are the TW ring factors, and when , stands for ; is the TW core factor, and is defined as the TW rank.
Since we use the TW model to characterize the low-rank structure of , estimating reduces to estimating the TW ring factors and the TW core factor . In addition, to obtain an accurate estimation of , it is also necessary to model the sparse component and the noise component . Accordingly, probabilistic formulations are introduced for , , and to maintain compatibility with the proposed predictive prior and facilitate effective inference. For brevity, the detailed probabilistic formulations are provided in Appendix A, while Fig. 2 illustrates the corresponding graphical model and the resulting joint distribution is given by
(19)
Jianan Liu and Chunguang Li

Fig. 2. The graphical model of the Bayesian tensor decomposition model.
where and are the precision parameters associated with the TW ring factors and the TW core factor, respectively; is the precision parameter associated with the sparse component; is the precision parameter associated with the noise component; is the set of all variables.
To infer the posterior distribution of the variables given the feature , i.e., , according to the Bayesian rule, we theoretically have
However, as some of the variables are conditionally dependent, the marginal distribution in the denominator is analytically intractable, impeding the computation of the posterior distribution. Therefore, we resort to the Variational Inference (VI) method [15, 46] to approximate the posterior distribution. Specifically, under the commonly used mean-field assumption, we assume the variational posterior to be
and our objective is to minimize the KL divergence between the variational posterior and the true posterior, i.e.
According to the VI theory, as all variables are assigned conjugate priors, the optimal variational posterior distributions admit closed-form expressions, which are provided in Appendix B.
Although the VI algorithm can effectively solve the optimization problem (22) so that the variational posterior can approximate the true posterior distribution well, the VI algorithm requires many steps of iterations, resulting in high computational complexity. To mitigate this issue, inspired by the strengths of neural networks in learning complex nonlinear mapping, we design neural networks to achieve Bayesian tensor decomposition, thereby reducing the computational complexity. Specifically, we design neural networks to learn the nonlinear mapping between the feature and the variational posterior parameters of the TW ring factors , the TW core factor , and the sparse component , i.e.,
Bayesian Tensor Autoencoder with Physics-informed Predictive Prior for Multi-dimensional Time Series Anomaly Detection
9
Table 1. The expressions and interpretations for items in the VB loss function (36)
| Item | Expression and Interpretation |
|---|---|
| Ensure the consistency between feature and the tensor decomposition results, and . | |
| Adapt to the corresponding elements of the TW rank. | |
| Prevent the variance from shrinking to zero, so as to prevent from degenerating into a one-point distribution. | |
| Adapt to the corresponding elements of the TW rank. | |
| Prevent the variance from shrinking to zero, so as to prevent from degenerating into a one-point distribution. | |
| Encourage to be sparse. | |
| Prevent the variance from shrinking to zero, so as to prevent from degenerating into a one-point distribution. |
where the nonlinear functions are all parameterized by neural networks.
At first glance, the design of these networks seems straightforward. However, since their outputs are parameters of probabilistic distributions, formulating appropriate objective functions to effectively train them is non-trivial. In the following, we present the design of the objective function.
To design an objective function to train these neural networks, we first convert the KL divergence in (22) as follows:
where all expectations are with respect to , and the variable to be optimized is .
Since is independent to the variable , can be viewed as a constant when optimizing the variable , that is,
Next, we derive the two terms on the right-hand side of (27) to obtain the objective function. For clarity, we begin with the second term. According to the conditional distribution of the feature (see (59) in Appendix A), the second term on the right-hand side of (27) can be written as:
Due to the presence of quadratic terms, the calculation of the expectation becomes complicated. To this end, we adopt the reparameterization trick [12, 13] to circumvent the direct calculation of the
Jianan Liu and Chunguang Li
complicated expectation terms. Specifically, let denote a random noise variable drawn from the standard normal distribution, i.e., . Then, we have
where denotes the element-wise multiplication. Therefore, (28) can be further converted to
(32)
where are the reparameterized samples. In practice, is typically set to 1, so that
(33)
Consequently, the optimization problem in (27) can be further approximated as
and we denote the objective function in this optimization problem as for clarity.
Next, we proceed to calculate the first term. According to the variational posterior (21) and the prior distribution of the variables (see Appendix A for more details), the first term in (26) can be expressed as:
(35)
When given the network outputs , , and , as in (23)-(25), the KL divergence in (35) can be minimized in closed form with respect to , , , via VI theory, and the expressions can be found in (70), (72), (77), and (81) in Appendix C, respectively.
Then, the overall Variational Bayes (VB) loss function in (34) for the Bayesian tensor decomposition module can be further derived as (see Appendix D for detailed derivations)
For clarity, the expressions and interpretations for items in (36) are summarized in Table 1.
Different from traditional approaches that add regularization terms to the loss function to prevent overfitting, with the Bayesian method, the loss terms in (36) are automatically traded off.
Bayesian Tensor Autoencoder with Physics-informed Predictive Prior for Multi-dimensional Time Series Anomaly Detection
11

Fig. 3. The architecture of the Bayesian tensor decomposition module. Given a feature , we first use networks to estimate the mean and variance of the TW ring factors , the mean and variance of the TW core factor , and the mean and variance of the sparse component . Then, we apply the reparameterization trick to draw samples from these distributions. Subsequently, we compute the low-rank component w.r.t the sampled ring factors and the sampled core factor via the TW operation (18). Meanwhile, we can compute , , and , in closed-form via (70), (72), (77), and (81) in Appendix C, respectively. Then, the VB loss function (36) can be computed, so as to train the neural networks , and . This training process can be jointly performed with that of the reconstruction-based AE (see Section 3.1).
By integrating our designed networks (23)-(25), the adopted reparameterization trick (29)-(31), and the closed-form solutions (70), (72), (77), and (81) in Appendix C, the overall Bayesian tensor decomposition module is illustrated in Fig. 3. Given a feature , we use networks to estimate the mean and variance of the TW ring factors , the mean and variance of the TW core factor , and the mean and variance of the sparse component . Then, we apply the reparameterization trick to draw samples from these distributions. Subsequently, we compute the low-rank component w.r.t the sampled ring factors and the sampled core factor via the TW operation (18). Besides, , and can be computed in closed-form via (70), (72), (77), and (81) in Appendix C, respectively. Then, the VB loss function (36) can be computed, so as to train the neural networks , and . This training process can be jointly performed with that of the reconstruction-based AE (see Section 3.1).
So far, we have completed the design of the Bayesian tensor decomposition module. In the following, we introduce the mechanism by which the Bayesian tensor decomposition module mitigates the over-generalization problem of AE.
2.3.2 The Mechanism for Mitigating the Over-generalization Problem. We interpret the mechanism of the Bayesian tensor decomposition module in mitigating the over-generalization problem of AE in this subsection.
Since the model is trained only on normal samples and the loss function in (36) encourages the component S in (17) to be as sparse as possible during training, after training we have for normal data. In this manner, we impose a low-rank constraint on the features. This constraint compresses the normal features into a “smaller” space, thereby effectively constraining the reconstruction capability of the AE. To illustrate this effect, the schematic feature distribution after applying the low-rank constraint is depicted in Fig. 4.
Jianan Liu and Chunguang Li

Fig. 4. The schematic feature distribution of normal and abnormal samples after applying the low-rank constraint. A key function of TW decomposition is its ability to perform dimensionality reduction for each tensor order, which compresses the normal features into a “smaller” space. For illustrative purposes, the figure presents a simplified scenario where the tensor order is 1. In this scenario, 3-dimensional normal features are compressed into a 2-dimensional plane. Abnormal features, which are typically non-low-rank (or sparse), do not conform to this low-rank subspace and thus deviate from the normal features.
Alternatively, from the perspective of coding length in information theory, we can also intuitively interpret the role of rank in the low-rank constraint. We know that normal data tends to be regular and thus easy to describe, allowing for short coding lengths. In contrast, anomalies are diverse and difficult to describe, leading to longer coding lengths. The rank in the low-rank constraint can be regarded as the coding length, and the role of the Bayesian tensor decomposition module is analogous to limiting the coding length of features, so as to mitigate the over-generalization problem of AE.
In the following, we present the overall design of the physics-informed predictive prior.
2.3.3 Overall Design of the Physics-informed Predictive Prior. The objective of the predictive prior is to predict the mean and variance of the feature at timestamp as shown in (2) and (3), respectively. According to the tensor decomposition framework (17) and are independent (see Appendix A for details), we have
Since the model is trained only on normal samples and the normal features are captured by the low-rank components , the sparse components can be neglected. Moreover, the mean of the noise component is zero and the variance is denoted by . Consequently, (37) and (38) can be further rewritten as
Furthermore, as the TW model is employed to characterize the low-rank structure of the feature tensor , as shown in (18), and the variational posterior distributions of both the TW ring factors and the TW core factor follow Gaussian distributions (see Appendix B for details), (39)
Bayesian Tensor Autoencoder with Physics-informed Predictive Prior for Multi-dimensional Time Series Anomaly Detection
13

Fig. 5. The architecture of PPPTAE, which consists of an encoder, a decoder, and a physics-informed predictive prior. For an observation at a specific timestamp , the overall forward process begins with the encoder, which infers the distribution as defined in (8). Meanwhile, the physics-informed predictive prior predicts the distribution as defined in (9). These two outputs are then fused using the Bayesian fusion approach detailed in Section 2.2 to produce . Following this, feature samples are approximately drawn from (as presented in Section 3.1). These samples are subsequently processed by the Bayesian Tensor Decomposition (TD) module to estimate the TW ring factors and the TW core factor . Finally, the low-rank component is calculated through the TW operation and then passed to the decoder for reconstruction.
and (40) can be further rewritten as
where and are tensor operations, and the specific forms can be found in the Appendix.
To estimate the mean and variance of the TW ring factors ( ), the mean and variance of the TW core factor , as well as the variance of the noise component at timestamp , we design predictive networks that leverage historical values for prediction, that is,
where , , and are the predictive networks with convolutional layers.
With the physics-informed predictive prior integrated into the reconstruction-based TAE, the overall PPPTAE framework is illustrated in Fig. 5. Given an observation at timestamp , the encoder first infers the distribution as formulated in (8). Then, based on the outputs of both the physics-informed predictive prior and the encoder, the conditional distribution
Jianan Liu and Chunguang Li
is obtained via the Bayesian fusion approach described in Section 2.2. Subsequently, samples are approximately drawn from (see Section 3.1 for details) and are fed into the Bayesian Tensor Decomposition (TD) module within the predictive prior to estimate the TW ring factors and the TW core factor . Finally, the low-rank component is computed via the TW operation and is fed to the decoder for reconstruction.
Remark: One may think to employ neural networks to directly predict the mean and variance of using the historical features, as it may simplify the design of the predictive prior. However, since we expect to possess the low-rank property so as to mitigate the over-generalization problem of AE, the corresponding low-rank structure is difficult to be directly learned by neural networks, and it is nontrivial for their outputs to directly have such a structure. In contrast, as shown in (18), the TW model imposes no structural constraints on the ring factors and the core factor . This means that, regardless of the specific forms of and , the corresponding tensor obtained via the TW operation is always a low-TW-rank tensor. Therefore, our predictive networks are designed to utilize the decomposition results from the Bayesian tensor decomposition module for prediction.
3 Training and Testing Strategies
In this section, we introduce the strategies for training and testing PPPTAE.
3.1 Training Strategy
We only use normal data to train PPPTAE and all training data can be represented as a tensor with a size of , where and correspond to certain physical meanings (e.g., corresponding to the number of longitude and latitude points in weather data), denotes the number of features, denotes the total number of timestamps.
Since PPPTAE can utilize both the observations from the previous M timestamps and the current observation, a natural idea to train PPPTAE is to scan the training dataset sequentially, from start to end, thereby completing a training epoch. However, this approach introduces insufficient randomness during training, potentially leading to the problem of catastrophic forgetting or overfitting in the model. Specifically, the model may learn the later parts of the training sequences well but forget the earlier ones, resulting in inferior performance.
To address this issue, we randomly sample the training data with a window length of , resulting in a training sample sized . The first tensors in this training sample are fed into the encoder individually, and then we directly sample their features, which are used as the input for the physics-informed predictive prior. Next, the last tensor in this training sample is fed into the encoder. Based on the results of the physics-informed predictive prior and the encoder, we can obtain using the Bayesian fusion approach described in Section 2.2.
Subsequently, to simplify analysis and for computational tractability, we sample from , i.e., , and then use the Bayesian tensor decomposition module described in Section 2.3.1 to obtain the corresponding low-rank component . This low-rank component is then fed into the decoder to obtain the reconstruction , where denotes the operation for estimating the low-rank component via the Bayesian tensor decomposition module, and denotes the reconstruction operation performed by the decoder. Based on the reconstruction and the corresponding original observation , the objective function is designed as:
Bayesian Tensor Autoencoder with Physics-informed Predictive Prior for Multi-dimensional Time Series Anomaly Detection
15
Algorithm 1 Training of PPPTAE
Input: Training datasets. Output: Parameters of PPPTAE.
1: for do 2: Sample training data with window length . 3: Feed the first tensors into the encoder individually to obtain (see (8)). 4: Sample from to get features and use them as input to the physics-informed predictive prior to obtain (see (9)). 5: Feed the last tensor into the encoder to obtain . 6: Compute and via (10) and (11). 7: Update the parameters of PPPTAE via (50). 8: end for 9: return Parameters of PPPTAE.
Algorithm 2 Testing of PPPTAE
Input: Testing datasets. Output: Anomaly scores of the testing datasets.
1: for do 2: if Cold-start ( ) then 3: Estimate mean of (see (8)) via the encoder. 4: Obtain low-rank component of via the BayesTD module. 5: else 6: Compute via (10). 7: Obtain low-rank component of via the BayesTD module. 8: end if 9: Cache in the time-delay module. 10: Feed to the decoder to obtain reconstruction . 11: Compute the anomaly score via (51). 12: end for 13: return Anomaly scores.
To sample from , a natural idea is to try to employ the reparameterization trick similar to that used in (29)-(31) for sampling. However, due to the presence of the constant term and the probabilistic distribution in the denominator as shown in (7), the reparameterization trick is not feasible. To solve this problem, inspired by the importance resampling method [4, 24, 29], we choose as the proposal distribution, where and can be computed via (10) and (11), respectively. Next, we sample directly from the proposal distribution, and the loss function (46) can be equivalently transformed into
(47)
Jianan Liu and Chunguang Li
where
When substituting (7) into (48), we have
which means that samples located in sparse regions receive greater weight in the loss function (47). This property enables the model to reconstruct the normal samples well in sparse regions.
To estimate , (12) shows that this probability density, in theory, requires integrating over all possible inputs , which is computationally intractable in practice. Therefore, we adopt an approximate approach by using the features from the previous timestamps within a training mini-batch as reference points. We then estimate the probability density value of the feature using KDE with the Gaussian kernel.
By integrating the loss function of the Bayesian tensor decomposition module, as defined in (36), the overall training objective of PPPTAE is formulated as
where serves as a trade-off hyperparameter. The training algorithm of PPPTAE is shown in Algorithm 1.
3.2 Testing Strategy
During the testing stage, we scan the testing dataset sequentially, from start to end, so as to obtain the testing results. At the initial cold-start stage, where the number of samples already tested is less than M, the predictive prior does not work. Instead, we directly feed the observation into the encoder, and the mean of the feature is further processed by the Bayesian tensor decomposition module for reconstruction. In this process, the time-delay module would cache the results of the Bayesian tensor decomposition module.
Once the cache size of the time-delay module in the predictive prior reaches M, the predictive prior begins to work. At this time, we fuse the results of the predictive prior and the encoder via (10), and the mean is then further processed by the Bayesian tensor decomposition module for reconstruction. In this process, the time-delay module would append the newest results of the Bayesian tensor decomposition module, and pop the oldest results to maintain a constant perception length.
For the anomaly score, we use the deviation between the reconstruction and the observation , and quantify this deviation using the squared Frobenius norm, i.e.,
The testing algorithm of PPPTAE is shown in Algorithm 2.
4 Experiments
In this section, we conduct experiments to demonstrate the effectiveness of PPPTAE.
Bayesian Tensor Autoencoder with Physics-informed Predictive Prior for Multi-dimensional Time Series Anomaly Detection
17
Table 2. The Architecture of the Encoder and Decoder of PPPTAE
| Encoder | Decoder | ||||
|---|---|---|---|---|---|
| Stage | Layer | Output Size | Stage | Layer | Output Size |
| Input | - | Input | Sampled | ||
| Stage 1 | Stage 1 | ||||
| MaxPool () | Bilinear() | ||||
| Stage 2 | Conv , ReLU | ||||
| MaxPool () | Stage 2 | ||||
| Stage 3 | Bilinear() | ||||
| Latent | Conv , BN | Conv , ReLU | |||
| Conv , BN | Output | Conv , ReLU | |||
| Conv , ReLU | |||||
| Conv , Sigmoid | |||||
Note: and .
4.1 Datasets
We conduct experiments on three representative multi-dimensional time series anomaly detection datasets, i.e., the Freeway dataset [3], the HR-Extreme dataset [26], and the Milan [1] dataset, to evaluate the proposed PPPTAE.
The Freeway dataset is a large-scale lane-level freeway traffic dataset. This dataset consists of a month of weekday traffic data recorded by 49 radar detection sensors. The traffic speed, occupancy, and volume data are collected for the 4 interstate lanes every 30 seconds. This dataset can be represented by a multi-dimensional time series sized . Abnormal events, such as crashes, are recorded in this dataset.
The HR-Extreme dataset is a high-resolution weather dataset. This dataset consists of a year of weather feature maps sized in the U.S., with each entry corresponding to a 3km by 3km area. 69 physical variables, such as temperature and humidity, are collected as the channels of the feature maps every hour. This dataset can be represented by a multi-dimensional time series sized . Seventeen abnormal extreme weather events, such as hurricanes, tornadoes, and severe storms, are recorded in this dataset.
The Milan dataset records the telecommunication activities of the city of Milan from November 1st, 2013, to January 1st, 2014. The data are aggregated in a grid with geographical square cells, with each cell corresponding to a 235m by 235m area. 5 activities including received Short Message Service (SMS), sent SMS, incoming call, outgoing call, and internet connection, are recorded with a temporal aggregation of time slots of one hour. This dataset can be represented by a multi-dimensional time series sized . Abnormal patterns, such as the increase in network activities and the number of calls on New Year's Eve, are recorded in this dataset.
4.2 Implementation Details
4.2.1 Network Architecture. We construct a 2D convolutional network backbone to preserve the multi-dimensional structure of the tensor data at each timestamp and the architecture of the encoder and decoder of PPPTAE is shown in Table I. In this table, for brevity, we use to denote a basic convolutional block consisting of two stacked , stride 1, and padding 1 convolutional layers, each followed by a ReLU activation. Moreover, to handle arbitrary input size robustly, we employ an adaptive downsampling strategy. We define the spatial reduction function for a
Jianan Liu and Chunguang Li
Table 3. The Architecture of the Networks in the Bayesian Tensor Decomposition Module
| Layer | Output Size | Layer | Output Size |
| Trilinear(8, 8, 256) | Trilinear(8, 8, ) | ||
| Conv , BN, LReLU | Conv , BN, LReLU | ||
| Conv , BN | Conv , BN | ||
| Trilinear(8, 8, ) | Bilinear(8, 8) | ||
| Conv , BN, LReLU | Conv , BN, LReLU | ||
| Conv , BN | Conv , BN | ||
| Conv , BN, LReLU | |||
| Conv , BN | |||
Table 4. The Architecture of the Networks in the Neural Network (NN) Module
| Layer | Output Size | Layer | Output Size |
| Conv , BN, LReLU | Conv , BN, LReLU | ||
| Conv , BN | Conv , BN | ||
| Conv , BN, LReLU | Conv , BN, LReLU | ||
| Conv , BN | Conv , BN | ||
| Linear, ReLU | |||
| Linear | |||
dimension as:
The encoder utilizes adaptive max-pooling operations that map input spatial dimensions to . The decoder mirrors this process using adaptive bilinear upsampling to strictly recover the recorded spatial resolutions from the encoder.
We then construct the networks in the Bayesian tensor decomposition module (see Fig. 3), and the architecture is shown in Table 3. With such an architecture, the initial TW rank is set as . Before training, we initialize the weights of to zeros as is a sparse tensor. Moreover, we construct the networks in the NN module (see Fig. 5), and the architecture is shown in Table 4.
4.2.2 Parameter Settings. We use the Adam optimizer [11] to train the model with a batch size of 64, and set the learning rate to 1e-4. We set the trade-off hyperparameter in the training loss (50) to 0.001, so that the two loss terms are of roughly the same magnitude. Without loss of generality, we set the number of previous timestamps , the number of importance samples in (47), and the KDE bandwidth to 1. The training epochs are set to 400.
Bayesian Tensor Autoencoder with Physics-informed Predictive Prior for Multi-dimensional Time Series Anomaly Detection
19
Table 5. AUC of Time Series Anomaly Detection Methods
| Method | Venue | Freeway | HR-Extreme_S1 | HR-Extreme_S2 | HR-Extreme_S3 | HR-Extreme_Y | Milan |
|---|---|---|---|---|---|---|---|
| Reformer [14] | ICLR-20 | 75.24% | 69.92% | 84.52% | 72.79% | 78.86% | 69.40% |
| AnoTrans [40] | ICLR-21 | 72.71% | 71.51% | 72.81% | 76.46% | 71.75% | 68.43% |
| Autoformer [34] | NeurIPS-21 | 69.15% | 72.66% | 70.70% | 70.23% | 70.53% | 83.87% |
| Informer [51] | AAAI-21 | 75.22% | 71.90% | 84.00% | 78.98% | 80.88% | 79.01% |
| TFAD [47] | CIKM-22 | 71.74% | 70.19% | 70.21% | 80.44% | 71.48% | 80.36% |
| Fedformer [52] | ICML-22 | 69.44% | 78.80% | 74.04% | 84.79% | 78.72% | 74.05% |
| Pyraformer [19] | ICLR-22 | 82.95% | 85.41% | 79.94% | 87.82% | 79.47% | |
| MICN [31] | ICLR-23 | 77.52% | 69.76% | 83.85% | 82.53% | 80.59% | 88.85% |
| DCdetector [42] | KDD-23 | 84.55% | 70.59% | 72.35% | 81.77% | 76.78% | 86.80% |
| PatchTST [22] | ICLR-23 | 88.72% | 86.82% | 89.47% | 82.40% | 84.20% | |
| Crossformer [48] | ICLR-23 | 71.55% | 82.85% | 87.22% | 86.84% | 88.69% | |
| NLinear [45] | AAAI-23 | 76.94% | 82.11% | 79.37% | 88.57% | 83.15% | 61.63% |
| TimesNet [33] | ICLR-23 | 88.85% | 90.85% | 89.24% | 89.64% | 83.85% | |
| ModernTCN [5] | ICLR-24 | OOM | OOM | OOM | OOM | OOM | |
| CATCH [36] | ICLR-25 | 90.01% | OOM | OOM | OOM | OOM | OOM |
| PPPTAE | This work | 95.39% | 98.82% | 92.21% | 95.28% | 94.65% | 98.90% |
The entities in bold denote the best results, and those with an underline are the second-best results. OOM is an abbreviation of out of memory.
Table 6. Ablation Results of PPPTAE
| Index | AE_r | AE_p | BayesLRM | Predictive Prior | Freeway | HR-Extreme_S1 | HR-Extreme_S2 | HR-Extreme_S3 | HR-Extreme_Y | Milan |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | ✓ | 75.09% | 96.63% | 85.58% | 87.93% | 91.09% | 90.12% | |||
| 2 | ✓ | ✓ | 88.80% | 96.92% | 89.58% | 90.23% | 91.33% | 95.12% | ||
| 3 | ✓ | ✓ | 86.20% | 97.41% | 86.35% | 91.45% | 92.03% | 94.28% | ||
| 4 | ✓ | 83.37% | 86.31% | 87.35% | 92.87% | 90.58% | 93.83% | |||
| ✓ | ✓ | ✓ | 95.39% | 98.82% | 92.21% | 95.28% | 94.65% | 98.90% |
The models AE_r and AE_p are the reconstruction-based and prediction-based TAE baselines of PPPTAE, respectively. BayesLRM is an abbreviation of Bayesian low-rank module. The index with * denotes the best-performing model and the best results are highlighted in bold.
4.3 Comparison with State-of-the-art
We then show the comparison results between PPPTAE and State-Of-The-Art (SOTA) methods.
4.3.1 Evaluation Metric. We utilize the widely adopted Area Under the Curve (AUC) as the evaluation metric. By varying the threshold values for anomaly scores to generate the ROC curve, we compute the AUC. A higher AUC indicates superior anomaly detection performance.
4.3.2 Experiments Settings. We normalized the data of the datasets to (0, 1). For the HR-Extreme dataset, we further crop the spatial dimensions of the feature maps to to ensure computational tractability. In addition, to demonstrate the anomaly detection performance of models in different periods of the year, we further divide the HR-Extreme dataset into three subsets covering January to April, May to August, and September to December, respectively denoted as HR-Extreme_S1, HR-Extreme_S2, and HR-Extreme_S3. We denote the dataset covering the entire year as HR-Extreme_Y.
4.3.3 Results. We compare the performance of PPPTAE with 15 SOTA methods on six benchmark datasets, and summarize the results in Table 5. We see that PPPTAE achieves the best AUC performance compared to the SOTA methods on each dataset. Note that the existing methods are confined to multi-variate time series and cannot directly handle multi-dimensional time series. In this experiment, to apply these methods for multi-dimensional time series anomaly detection, we merge , , C. However, this operation inevitably breaks the intrinsic correlations and thus leads
Jianan Liu and Chunguang Li

Fig. 6. The MSE loss of AE_r, AE_p, and PPPTAE on the Freeway dataset.
to performance degradation. In contrast, PPPTAE can directly handle multi-dimensional time series and better performance is achieved. These results demonstrate the effectiveness of PPPTAE for multi-dimensional time series anomaly detection.
4.4 Ablation Studies
In this subsection, we conduct ablation studies on the proposed PPPTAE. We analyze the effectiveness of the model components, including the Bayesian low-rank module and the predictive prior. We also compare PPPTAE with the baseline reconstruction-based and prediction-based TAE, which are denoted by AE_r and AE_p, respectively. The results are presented in Table 6. We see from Table 6 that AE_r with the Bayesian low-rank module outperforms AE_r, as the Bayesian low-rank module imposes a low-rank constraint on the features, thereby compressing the features of normal samples into a “smaller” space, thus mitigating the over-generalization problem of AE_r. Besides, AE_r with the predictive prior performs better than AE_r, as the predictive prior can capture the temporal dependencies among features and provide historical information for AE_r, so that the performance can be enhanced. With both the Bayesian low-rank module and the predictive prior, the performance is further enhanced. In addition, we note that AE_r and AE_p demonstrate complementary strengths, with neither consistently outperforming the other. This is because AE_r is more effective at detecting abrupt anomalies, whereas AE_p is better suited for identifying temporally correlated anomalies. Moreover, PPPTAE achieves better performance than both AE_r and AE_p, demonstrating that PPPTAE can effectively integrate the prediction and reconstruction capabilities.
4.5 Qualitative Studies
In this subsection, we conduct qualitative studies on the proposed PPPTAE.
4.5.1 MSE Loss Comparison. To further intuitively demonstrate the modeling capability of PPPTAE for normal data, we compare the Mean Squared Error (MSE) training loss of PPPTAE with AE_r and AE_p. We present the results on the Freeway dataset for brevity, as results on other datasets are similar. The results are shown in Fig. 6, where the loss value corresponding to each epoch is the average of the losses from all mini-batches in the training set. On one hand, for AE_r, a smaller reconstruction error typically indicates an improvement in the learned feature. As mentioned earlier, the predictive prior has an effect of adjusting the features, so that the features of PPPTAE are better than AE_r. Consequently, PPPTAE exhibits lower reconstruction error compared to AE_r.
Bayesian Tensor Autoencoder with Physics-informed Predictive Prior for Multi-dimensional Time Series Anomaly Detection
21

(a)
(b)
Fig. 7. The feature visualization of (a) AE_r and (b) PPPTAE on the training set of the Freeway dataset.
On the other hand, compared to AE_p, PPPTAE also achieves smaller MSE loss. This is because, compared to AE_p, PPPTAE can further leverage the observation at timestamp t, allowing PPPTAE to integrate more comprehensive information to extract better features and resulting in relatively smaller output errors.
4.5.2 Feature Visualization. To further intuitively demonstrate the effect of the predictive prior and the Bayesian fusion approach incorporated in PPPTAE, we use t-SNE [30] to visualize the distribution of the features of PPPTAE on the training set of the Freeway dataset, and compare with that of AE_r. We also visualized the reconstruction error using colors. The results are shown in Fig. 7. We see from the results that AE_r exhibits feature clustering, and normal samples are poorly reconstructed in sparse regions, such as that in the lower right side. In contrast, with the predictive prior and the Bayesian fusion approach, the features of PPPTAE have a tendency to be evenly distributed (see Section 2.2 for details), allowing each region in the feature space to contain sufficient training samples. Consequently, the reconstruction capability corresponding to each region is well established.
5 Conclusion
In this work, a Physics-informed Predictive Prior Tensor AE (PPPTAE) framework is proposed for multi-dimensional time series anomaly detection. By incorporating the predictive prior and the Bayesian fusion approach into the reconstruction-based TAE, we bridge the gap between reconstruction-based and prediction-based TAEs, so as to fully leverage the available information and thus the performance is further enhanced. Moreover, by introducing the Bayesian tensor decomposition module, we mitigate the over-generalization problem of AE. In addition, training and testing strategies are proposed for PPPTAE so as to introduce sufficient randomness during training and bypass complex density estimation during testing, respectively. Experimental results demonstrate the effectiveness and superiority of the proposed method.
References
[1] Gianni Barlacchi, Marco De Nadai, Roberto Larcher, Antonio Casella, Cristiana Chitic, Giovanni Torrisi, Fabrizio Antonelli, Alessandro Vespignani, Alex Pentland, and Bruno Lepri. 2015. A multi-source dataset of urban life in the city of Milan and the Province of Trentino. Scientific data 2, 1 (2015), 1–15.
[2] Andrea Campagner, Marília Barandas, Duarte Folgado, Hugo Gamboa, and Federico Cabitza. 2024. Ensemble Predictors: Possibilistic Combination of Conformal Predictors for Multivariate Time Series Classification. IEEE Transactions on Pattern Analysis and Machine Intelligence 46, 11 (2024), 7205–7216. doi:10.1109/TPAMI.2024.3388097
[3] Austin Coursey, Junyi Ji, Marcos Quinones-Grueiro, William Barbour, Yuhang Zhang, Tyler Derr, Gautam Biswas, and Daniel B. Work. 2024. FT-AED: Benchmark Dataset for Early Freeway Traffic Anomalous Event Detection. In Advances
Jianan Liu and Chunguang Li
in Neural Information Processing Systems, A. Globerson, L. Mackey, D. Belgrave, A. Fan, U. Paquet, J. Tomczak, and C. Zhang (Eds.), Vol. 37. Curran Associates, Inc., 15526–15549. doi:10.52202/079017-0496
[4] Dominik Csiba and Peter Richtárik. 2018. Importance Sampling for Minibatches. Journal of Machine Learning Research 19, 27 (2018), 1–21. http://jmlr.org/papers/v19/16-241.html
[5] Luo donghao and wang xue. 2024. ModernTCN: A Modern Pure Convolution Structure for General Time Series Analysis. In The Twelfth International Conference on Learning Representations. https://openreview.net/forum?id=vpJMJerXHU
[6] Dong Gong, Lingqiao Liu, Vuong Le, Budhaditya Saha, Moussa Reda Mansour, Svetha Venkatesh, and Anton Van Den Hengel. 2019. Memorizing Normality to Detect Anomaly: Memory-Augmented Deep Autoencoder for Unsupervised Anomaly Detection. In 2019 IEEE/CVF International Conference on Computer Vision. 1705–1714. doi:10.1109/ICCV.2019.00179
[7] Fang He, Tao-Yang Fu, and Wang-Chien Lee. 2023. Rel-CNN: Learning Relationship Features in Time Series for Classification. IEEE Transactions on Knowledge and Data Engineering 35, 7 (2023), 7412–7426. doi:10.1109/TKDE.2022.3186963
[8] Kurt Hornik, Maxwell Stinchcombe, and Halbert White. 1989. Multilayer feedforward networks are universal approximators. Neural Networks 2, 5 (1989), 359–366. doi:10.1016/0893-6080(89)90020-8
[9] Bradley Hupf, Veronica Bunn, Jianchang Lin, and Cheng Dong. 2021. Bayesian semiparametric meta-analytic-predictive prior for historical control borrowing in clinical trials. Statistics in Medicine 40, 14 (2021), 3385–3399. arXiv:https://onlinelibrary.wiley.com/doi/pdf/10.1002/sim.8970 doi:10.1002/sim.8970
[10] HyunGi Kim, Siwon Kim, Seonwoo Min, and Byunghan Lee. 2024. Contrastive Time-Series Anomaly Detection. IEEE Transactions on Knowledge and Data Engineering 36, 10 (2024), 5053–5065. doi:10.1109/TKDE.2023.3335317
[11] Diederik P Kingma and Jimmy Ba. 2015. Adam: A method for stochastic optimization. In The Third International Conference on Learning Representations. OpenReview.net, San Diego.
[12] Diederik P. Kingma and Max Welling. 2014. Auto-encoding variational Bayes. In The second International Conference on Learning Representations. OpenReview.net, Banff.
[13] Diederik P. Kingma and Max Welling. 2019. An Introduction to Variational Autoencoders. Foundations and Trends in Machine Learning 12, 4 (Nov. 2019), 307–392. doi:10.1561/2200000056
[14] Nikita Kitaev, Lukasz Kaiser, and Anselm Levskaya. 2020. Reformer: The Efficient Transformer. In The Eighth International Conference on Learning Representations. https://openreview.net/forum?id=rkgNKkHtvB
[15] Jeremias Knoblauch, Jack Jewson, and Theodoros Damoulas. 2022. An Optimization-centric View on Bayes' Rule: Reviewing and Generalizing Variational Inference. Journal of Machine Learning Research 23, 132 (2022), 1–109. http://jmlr.org/papers/v23/19-1047.html
[16] Chun-Guo Li. 2025. Learn hybrid prototypes for multivariate time series anomaly detection. In The Thirteenth International Conference on Learning Representations. https://openreview.net/forum?id=8TBGdH3t6a
[17] Jie Lin, Ting-Zhu Huang, Xi-Le Zhao, Teng-Yu Ji, and Qibin Zhao. 2025. Tensor Robust Kernel PCA for Multidimensional Data. IEEE Transactions on Neural Networks and Learning Systems 36, 2 (2025), 2662–2674. doi:10.1109/TNNLS.2024.3356228
[18] Meizi Liu, Veronica Bunn, Bradley Hupf, Junjing Lin, and Jianchang Lin. 2021. Propensity-score-based meta-analytic predictive prior for incorporating real-world and historical data. Statistics in Medicine 40, 22 (2021), 4794–4808. arXiv:https://onlinelibrary.wiley.com/doi/pdf/10.1002/sim.9095 doi:10.1002/sim.9095
[19] Shizhan Liu, Hang Yu, Cong Liao, Jianguo Li, Weiyao Lin, Alex X. Liu, and Schahram Dustdar. 2022. Pyraformer: Low-Complexity Pyramidal Attention for Long-Range Time Series Modeling and Forecasting. In The Tenth International Conference on Learning Representations. https://openreview.net/forum?id=0EXmFzUn5I
[20] Canyi Lu, Jiashi Feng, Yudong Chen, Wei Liu, Zhouchen Lin, and Shuicheng Yan. 2020. Tensor Robust Principal Component Analysis with a New Tensor Nuclear Norm. IEEE Transactions on Pattern Analysis and Machine Intelligence 42, 4 (2020), 925–938. doi:10.1109/TPAMI.2019.2891760
[21] Qianli Ma, Sen Li, and Garrison W. Cottrell. 2022. Adversarial Joint-Learning Recurrent Neural Network for Incomplete Time Series Classification. IEEE Transactions on Pattern Analysis and Machine Intelligence 44, 4 (2022), 1765–1776. doi:10.1109/TPAMI.2020.3027975
[22] Yuqi Nie, Nam H Nguyen, Phanwadee Sinthong, and Jayant Kalagnanam. 2023. A Time Series is Worth 64 Words: Long-term Forecasting with Transformers. In The Eleventh International Conference on Learning Representations. https://openreview.net/forum?id=Jbdc0vTOcol
[23] I. V. Oseledets. 2011. Tensor-Train Decomposition. SIAM Journal on Scientific Computing 33, 5 (2011), 2295–2317. arXiv:https://doi.org/10.1137/090752286 doi:10.1137/090752286
[24] Art Owen and Yi Zhou Associate. 2000. Safe and Effective Importance Sampling. J. Amer. Statist. Assoc. 95, 449 (2000), 135–143. arXiv:https://doi.org/10.1080/01621459.2000.10473909 doi:10.1080/01621459.2000.10473909
[25] Yuning Qiu, Guoxu Zhou, Qibin Zhao, and Shengli Xie. 2024. Noisy Tensor Completion via Low-Rank Tensor Ring. IEEE Transactions on Neural Networks and Learning Systems 35, 1 (2024), 1127–1141. doi:10.1109/TNNLS.2022.3181378
Bayesian Tensor Autoencoder with Physics-informed Predictive Prior for Multi-dimensional Time Series Anomaly Detection
23
[26] Nian Ran, Peng Xiao, Yue Wang, Wesley Shi, Jianxin Lin, Qi Meng, and Richard Allmendinger. 2025. HR-Extreme: A High-Resolution Dataset for Extreme Weather Forecasting. In The Thirteenth International Conference on Learning Representations. https://openreview.net/forum?id=5AtlfHYCPa
[27] Heinz Schmidli, Sandro Gsteiger, Satrajit Roychoudhury, Anthony O'Hagan, David Spiegelhalter, and Beat Neuenschwander. 2014. Robust meta-analytic-predictive priors in clinical trials with historical control information. Biometrics 70, 4 (2014), 1023–1032. arXiv:https://onlinelibrary.wiley.com/doi/pdf/10.1111/biom.12242 doi:10.1111/biom.12242
[28] Daniel Stanley Tan, Yi-Chun Chen, Trista Pei-Chun Chen, and Wei-Chao Chen. 2021. TrustMAE: A Noise-Resilient Defect Classification Framework using Memory-Augmented Auto-Encoders with Trust Regions. In 2021 IEEE Winter Conference on Applications of Computer Vision. 276–285. doi:10.1109/WACV48630.2021.00032
[29] Surya T. Tokdar and Robert E. Kass. 2010. Importance sampling: a review. WIREs Computational Statistics 2, 1 (2010), 54–60. arXiv:https://wires.onlinelibrary.wiley.com/doi/pdf/10.1002/wics.56 doi:10.1002/wics.56
[30] Laurens Van der Maaten and Geoffrey Hinton. 2008. Visualizing data using t-SNE. Journal of machine learning research 9, 11 (2008).
[31] Huiqiang Wang, Jian Peng, Feihu Huang, Jince Wang, Junhui Chen, and Yifei Xiao. 2023. MICN: Multi-scale Local and Global Context Modeling for Long-term Series Forecasting. In The Eleventh International Conference on Learning Representations. https://openreview.net/forum?id=zt53IDUR1U
[32] Sebastian Weber, Yue Li, John W. Seaman III, Tomoyuki Kakizume, and Heinz Schmidli. 2021. Applying Meta-Analytic-Predictive Priors with the R Bayesian Evidence Synthesis Tools. Journal of Statistical Software 100, 19 (2021), 1–32. doi:10.18637/jss.v100.i19
[33] Haixu Wu, Tengge Hu, Yong Liu, Hang Zhou, Jianmin Wang, and Mingsheng Long. 2023. TimesNet: Temporal 2D-Variation Modeling for General Time Series Analysis. In The Eleventh International Conference on Learning Representations. https://openreview.net/forum?id=ju_Uqw384Oq
[34] Haixu Wu, Jiehui Xu, Jianmin Wang, and Mingsheng Long. 2021. Autoformer: Decomposition Transformers with Auto-Correlation for Long-Term Series Forecasting. In Advances in Neural Information Processing Systems, A. Beygelzimer, Y. Dauphin, P. Liang, and J. Wortman Vaughan (Eds.). https://openreview.net/forum?id=J4gRj6d5Qm
[35] Xingjian Wu, Xiangfei Qiu, Zhengyu Li, Yihang Wang, Jilin Hu, Chenjuan Guo, Hui Xiong, and Bin Yang. 2025. CATCH: Channel-Aware Multivariate Time Series Anomaly Detection via Frequency Patching. In The Thirteenth International Conference on Learning Representations. https://openreview.net/forum?id=m08aK3xxdJ
[36] Xingjian Wu, Xiangfei Qiu, Zhengyu Li, Yihang Wang, Jilin Hu, Chenjuan Guo, Hui Xiong, and Bin Yang. 2025. CATCH: Channel-Aware Multivariate Time Series Anomaly Detection via Frequency Patching. In The Thirteenth International Conference on Learning Representations, Y. Yue, A. Garg, N. Peng, F. Sha, and R. Yu (Eds.), Vol. 2025. 17017–17045. https://proceedings.iclr.cc/paper_files/paper/2025/file/2b25c39788e5cf11d3541de433ebf4c0-Paper-Conference.pdf
[37] Zhong-Cheng Wu, Ting-Zhu Huang, Liang-Jian Deng, Hong-Xia Dou, and Deyu Meng. 2022. Tensor Wheel Decomposition and Its Tensor Completion Application. In Advances in Neural Information Processing Systems, S. Koyejo, S. Mohamed, A. Agarwal, D. Belgrave, K. Cho, and A. Oh (Eds.), Vol. 35. Curran Associates, Inc., 27008–27020. https://proceedings.neurips.cc/paper_files/paper/2022/file/acbfe708197ff78ad04cc1beb1710979-Paper-Conference.pdf
[38] Qi Xie, Qian Zhao, Deyu Meng, and Zongben Xu. 2018. Kronecker-Basis-Representation Based Tensor Sparsity and Its Applications to Tensor Recovery. IEEE Transactions on Pattern Analysis and Machine Intelligence 40, 8 (2018), 1888–1902. doi:10.1109/TPAMI.2017.2734888
[39] Jiehui Xu, Haixu Wu, Jianmin Wang, and Mingsheng Long. 2022. Anomaly Transformer: Time Series Anomaly Detection with Association Discrepancy. In International Conference on Learning Representations. https://openreview.net/forum?id=LzQQ89U1qm_
[40] Jiehui Xu, Haixu Wu, Jianmin Wang, and Mingsheng Long. 2022. Anomaly Transformer: Time Series Anomaly Detection with Association Discrepancy. In The Tenth International Conference on Learning Representations. https://openreview.net/forum?id=LzQQ89U1qm_
[41] Le Xu, Lei Cheng, Ngai Wong, and Yik-Chung Wu. 2023. Tensor train factorization under noisy and incomplete data with automatic rank estimation. Pattern Recognition 141 (2023), 109650. doi:10.1016/j.patcog.2023.109650
[42] Yiyuan Yang, Chaoli Zhang, Tian Zhou, Qingsong Wen, and Liang Sun. 2023. DCdetector: Dual Attention Contrastive Representation Learning for Time Series Anomaly Detection. In Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining (Long Beach, CA, USA) (KDD '23). Association for Computing Machinery, New York, NY, USA, 3033–3045. doi:10.1145/3580305.3599295
[43] Yuyuan Yu, Guoxu Zhou, Ning Zheng, Yuning Qiu, Shengli Xie, and Qibin Zhao. 2023. Graph-Regularized Non-Negative Tensor-Ring Decomposition for Multiway Representation Learning. IEEE Transactions on Cybernetics 53, 5 (2023), 3114–3127. doi:10.1109/TCYB.2022.3157133
[44] Zahra Zamanzadeh Darban, Geoffrey I. Webb, Shirui Pan, Charu Aggarwal, and Mahsa Salehi. 2024. Deep Learning for Time Series Anomaly Detection: A Survey. Comput. Surveys 57, 1, Article 15 (Oct. 2024), 42 pages. doi:10.1145/3691338
Jianan Liu and Chunguang Li
[45] Ailing Zeng, Muxi Chen, Lei Zhang, and Qiang Xu. 2023. Are transformers effective for time series forecasting?. In Proceedings of the AAAI conference on artificial intelligence, Vol. 37. 11121–11128.
[46] Cheng Zhang, Judith Bütepage, Hedvig Kjellström, and Stephan Mandt. 2019. Advances in Variational Inference. IEEE Transactions on Pattern Analysis and Machine Intelligence 41, 8 (2019), 2008–2026. doi:10.1109/TPAMI.2018.2889774
[47] Chaoli Zhang, Tian Zhou, Qingsong Wen, and Liang Sun. 2022. TFAD: A Decomposition Time Series Anomaly Detection Architecture with Time-Frequency Analysis (CIKM '22). Association for Computing Machinery, New York, NY, USA, 2497–2507. doi:10.1145/3511808.3557470
[48] Yunhao Zhang and Junchi Yan. 2023. Crossformer: Transformer Utilizing Cross-Dimension Dependency for Multivariate Time Series Forecasting. In The Eleventh International Conference on Learning Representations. https://openreview.net/forum?id=vSVLM2j9eie
[49] Qibin Zhao, Guoxu Zhou, Liqing Zhang, Andrzej Cichocki, and Shun-Ichi Amari. 2016. Bayesian Robust Tensor Factorization for Incomplete Multiway Data. IEEE Transactions on Neural Networks and Learning Systems 27, 4 (2016), 736–748. doi:10.1109/TNNLS.2015.2423694
[50] Guojin Zhong, pan wang, Jin Yuan, Zhiyong Li, and Long Chen. 2025. Multi-Resolution Decomposable Diffusion Model for Non-Stationary Time Series Anomaly Detection. In The Thirteenth International Conference on Learning Representations. https://openreview.net/forum?id=eWocmTQn7H
[51] Haoyi Zhou, Shanghang Zhang, Jieqi Peng, Shuai Zhang, Jianxin Li, Hui Xiong, and Wancai Zhang. 2021. Informer: Beyond efficient transformer for long sequence time-series forecasting. In Proceedings of the AAAI conference on artificial intelligence, Vol. 35. 11106–11115.
[52] Tian Zhou, Ziqing Ma, Qingsong Wen, Xue Wang, Liang Sun, and Rong Jin. 2022. FEDformer: Frequency Enhanced Decomposed Transformer for Long-term Series Forecasting. In Proceedings of the 39th International Conference on Machine Learning (Proceedings of Machine Learning Research, Vol. 162), Kamalika Chaudhuri, Stefanie Jegelka, Le Song, Csaba Szepesvari, Gang Niu, and Sivan Sabato (Eds.). PMLR, 27268–27286. https://proceedings.mlr.press/v162/zhou22g.html
[53] Yang Zhou and Yiu-Ming Cheung. 2021. Bayesian Low-Tubal-Rank Robust Tensor Factorization with Multi-Rank Determination. IEEE Transactions on Pattern Analysis and Machine Intelligence 43, 1 (2021), 62–76. doi:10.1109/TPAMI.2019.2923240
[54] Bo Zong, Qi Song, Martin Renqiang Min, Wei Cheng, Cristian Lumezanu, Daeki Cho, and Haifeng Chen. 2018. Deep Autoencoding Gaussian Mixture Model for Unsupervised Anomaly Detection. In The Sixth International Conference on Learning Representations. https://openreview.net/forum?id=BJJLHbb0-
Appendices
A Probabilistic Modeling
For , which is one of the elements in , we model it using the Gaussian distribution for simplicity and without the loss of generality, i.e.,
where the precisions control the corresponding elements of the TW rank, respectively, , and stands for . Therefore, we have
where denotes the vector composed of all , and is defined similarly.
Besides, for , which is one of the elements in C, we similarly model it using the Gaussian distribution, that is,
Bayesian Tensor Autoencoder with Physics-informed Predictive Prior for Multi-dimensional Time Series Anomaly Detection
25
where the precisions respectively control the corresponding elements of the TW rank. Hence, we have
Further, to simplify the analysis, we use the conjugate distribution of the Gaussian distribution, namely the Gamma distribution, to model the precision parameters , that is,
where with being the Gamma function, and and being the hyper-parameters.
For the sparse component S, considering that it captures the sparse noise and most elements are zero with only a few having large magnitudes, we model it using the independent Gaussian distribution, that is,
where is the vector composed of all , and is the precision corresponding to the -th element in S. Further, we use the conjugate distribution of the Gaussian distribution, i.e. the Gamma distribution, to model the precision , that is,
For the noise component , considering that it absorbs the noises except the sparse noise, we model it using the Gaussian distribution and assume that each element in shares the same noise precision, i.e.,
where is the noise precision. Similar to (53), (54) and (56), we also use the conjugate distribution of the Gaussian distribution, i.e. the Gamma distribution, to model the noise precision , that is,
Based on Eq.(17) and the modeling above, given the model parameters, the conditional distribution of the feature F is
Therefore, the joint distribution is
Jianan Liu and Chunguang Li
where is the set of all variables.
B Optimal Variational Posterior Distributions
The optimal variational posterior distributions of all the latent variables are given as follows:
C Close Form Expressions
For the variable , it appears only in the first KL divergence term of Eq.(35). According to the variational inference theory, we know that
where is the -th element of . Therefore, we have
Similarly, for , with being the -th elements of , we have
thus we know that
Bayesian Tensor Autoencoder with Physics-informed Predictive Prior for Multi-dimensional Time Series Anomaly Detection
27
Similarly, for , we can minimize
(73)
so as to obtain the parameters of . Therefore, we have
and thus
For , with being the -th element of , we have
so that
D Variational Bayes Loss Function
Given , according to the second term in Eq.(34), we can obtain in Table 1.
Besides, given , we can further derive the last KL divergence term in Eq.(35), that is,
(82)
Thus, we can obtain and in Table 1.
Jianan Liu and Chunguang Li
Next, given and , we can further derive the first KL divergence term in Eq.(35). Also, with
we can obtain the , , , and in Table 1.
So far, we have obtained all the loss functions listed in Table 1.