MixerCA: Causal Mixer for Online Anomaly Detection
- MixerCA is a cluster-aware causal mixer designed for online anomaly detection in multivariate time series by enforcing causality with masked temporal mixing.
- It leverages correlation-profile spectral clustering and cluster-specific linear embeddings to capture diverse inter-channel dependencies and reduce parameter complexity.
- MixerCA employs a reconstruction-based anomaly scoring with sequential evidence accumulation, achieving significant F1 improvements on benchmark datasets.
MixerCA most commonly denotes the cluster-aware causal mixer introduced for online anomaly detection in multivariate time series, where it is instantiated as CCM-TAD and designed to operate causally on streaming windows while accounting for heterogeneous inter-channel correlation structure (Murad et al., 30 May 2025). In that formulation, MixerCA combines correlation-profile spectral clustering, cluster-specific linear embeddings, a causally masked mixer, and a sequential evidence accumulation rule so that anomaly decisions at time depend only on data up to (Murad et al., 30 May 2025). The name has also been reused in later literature for a distinct hyperspectral image classification architecture based on depthwise convolution, token/channel mixing, and Coordinate Attention (Alkhatib et al., 28 Apr 2026). The term therefore requires contextual disambiguation; in the anomaly-detection literature, it refers specifically to the cluster-aware causal mixer for multivariate time-series streams (Murad et al., 30 May 2025).
1. Problem formulation and nomenclature
In the time-series setting, MixerCA addresses pointwise anomaly detection in a -channel multivariate time series with , under an online/streaming regime using a sliding window of length , (Murad et al., 30 May 2025). At each step , the model processes the current window, outputs a reconstruction of the most recent point , computes an anomaly score , and raises an alarm if a threshold is exceeded (Murad et al., 30 May 2025). The operational objective is to infer 0 for each 1 using only past and present data up to 2, with training performed on nominal data only and labels reserved for validation, testing, and reporting (Murad et al., 30 May 2025).
The term “MixerCA” is used in the source description as a concise name for the proposed Cluster-Aware Causal Mixer and its associated detection framework (Murad et al., 30 May 2025). The same string later appears as the title of a different model for high-performance hyperspectral image classification, where it denotes a lightweight spatial–spectral backbone rather than a time-series anomaly detector (Alkhatib et al., 28 Apr 2026). A plausible implication is that “MixerCA” should be treated as a polysemous model name rather than a unique architectural family.
The anomaly-detection variant is motivated by two stated deficiencies in prior MLP-based mixers: first, the lack of a causality mechanism to preserve temporal dependencies, and second, the inability of a single embedding mechanism to capture diverse inter-channel correlations in real multivariate systems (Murad et al., 30 May 2025). MixerCA addresses both by explicitly separating channels into correlation-defined clusters and by replacing unconstrained token mixing with a masked temporal operator that preserves causality (Murad et al., 30 May 2025).
2. Cluster-aware representation learning
A defining component of MixerCA is channel clustering from inter-channel correlations (Murad et al., 30 May 2025). The method computes the Pearson correlation matrix 3 over the nominal training set, takes elementwise absolute values 4, and defines for each channel 5 a correlation profile 6 (Murad et al., 30 May 2025). Channels that are constant on the training set yield NaN correlations; these are replaced by 7, and all zero-profile channels are grouped into the last cluster as a degenerate cluster (Murad et al., 30 May 2025).
For the remaining channels, MixerCA forms a cosine-similarity adjacency matrix
8
and then constructs the normalized graph Laplacian
9
where 0 (Murad et al., 30 May 2025). Spectral embedding is obtained from the first 1 nontrivial eigenvectors of 2 associated with the smallest nonzero eigenvalues, stacked into 3, followed by normalization 4 and K-Means on the rows of 5 to determine cluster labels (Murad et al., 30 May 2025). The number of clusters is shortlisted by Silhouette score and then selected by Optuna using validation F1 (Murad et al., 30 May 2025).
The embedding stage is likewise cluster-specific. If cluster 6 contains 7 channels, it is assigned embedding dimension
8
for 9, with the final cluster receiving the remainder so that 0 (Murad et al., 30 May 2025). At each time step inside the window, the cluster subvector 1 is linearly embedded as
2
where 3 and 4, and the outputs are concatenated into 5 (Murad et al., 30 May 2025).
The stated rationale is that real multivariate systems contain both strongly correlated subgroups and nearly independent channels, so a single shared embedding can spuriously entangle unrelated channels (Murad et al., 30 May 2025). The correlation-profile formulation groups channels by their full relational signatures rather than isolated pairwise similarities, and the block-wise embedding also improves parameter efficiency: a single embedding uses 6 parameters, whereas under roughly uniform cluster sizes the block-wise construction uses 7, reducing embedding parameters by about a factor of 8 (Murad et al., 30 May 2025). The paper further reports that clustering-enabled variants show consistent F1 gains and reduce spurious correlations in reconstructions on nominal segments by approximately 28–30% on average on PSM and SWaT (Murad et al., 30 May 2025).
3. Causal mixer architecture
The core mixer alternates a causal temporal mixer and an embedding mixer, with residual connections and 1D BatchNorm (Murad et al., 30 May 2025). After cluster-aware embedding, the window representation 9 is batch-normalized to 0 and permuted to 1 so that temporal mixing is applied along the window axis (Murad et al., 30 May 2025).
The temporal mixer uses a masked linear operator
2
where 3 is learnable and 4 is upper-triangular with
5
(Murad et al., 30 May 2025). The forward pass is
6
followed by GELU, a second causal linear map with the same masking structure, and permutation back to the original axis order (Murad et al., 30 May 2025). Because 7 is upper-triangular, the output at time column 8 depends only on inputs at times 9, which is the mechanism that enforces causality (Murad et al., 30 May 2025).
The embedding mixer is applied per time step across feature dimensions:
0
with 1 and 2, where the expansion factor 3 (Murad et al., 30 May 2025). Residual aggregation and batch normalization yield the layer output, and the reported experiments use one causal mixer layer (Murad et al., 30 May 2025). A final linear head maps 4, and only the last row is used as the reconstruction 5 (Murad et al., 30 May 2025).
The causal design is central to the model’s positioning. The source notes that prior Mixer-based models such as TSMixer and TimeMixer have shown strong forecasting performance but do not enforce causality during mixing, whereas online anomaly detection requires that 6 depend only on 7 (Murad et al., 30 May 2025). The paper therefore characterizes MixerCA as, to its knowledge, the first model to introduce an explicit causal mask into Mixer-style token mixing for online detection (Murad et al., 30 May 2025). It also contrasts this choice with causal Transformers: both preserve temporal order, but MixerCA retains the simplicity of MLP-style mixing while imposing causality through masked temporal linear maps rather than attention masking (Murad et al., 30 May 2025).
4. Reconstruction objective and sequential anomaly scoring
MixerCA is trained with a last-step reconstruction objective using only nominal windows (Murad et al., 30 May 2025). For minibatches of windows ending at time 8, the loss is
9
At validation and test time, the per-time residual is
0
Instead of thresholding 1 directly, MixerCA calibrates residuals against the empirical validation distribution. Let 2 denote the sorted reconstruction losses on the validation set; then for a test residual 3,
4
is an empirical p-value (Murad et al., 30 May 2025). This is converted into anomaly evidence using a significance parameter 5:
6
with 7 small (Murad et al., 30 May 2025).
Evidence is then accumulated by a one-sided CUSUM-like recursion with reset:
8
with 9 (Murad et al., 30 May 2025). An alarm is raised when 0, where 1 and 2 are validation-tuned parameters; the experiments use 3 (Murad et al., 30 May 2025). The stated purpose of this mechanism is to suppress false positives due to nominal outliers and to stabilize thresholds under online operation (Murad et al., 30 May 2025).
The framework also includes segment refinement. If an interval 4 is flagged by 5, the estimated onset and offset are adjusted as
6
which extends the detected region to cover the anomalous segment more faithfully (Murad et al., 30 May 2025). This combination of calibrated residuals and temporal evidence accumulation is presented as a mechanism for turning noisy pointwise errors into robust online decisions (Murad et al., 30 May 2025).
5. Online inference, training protocol, and computational properties
During online inference, each new time step triggers the formation of the current sliding window 7, min-max normalization using training-set scales, cluster-aware embedding with precomputed cluster labels, causal mixer inference, computation of 8, conversion to 9 and 0, update of 1, and alarm emission if 2 (Murad et al., 30 May 2025). The procedure is explicitly described as causal with one-step latency, since the entire window lies in the interval 3 (Murad et al., 30 May 2025).
The reported training configuration is concise. MixerCA minimizes MSE with Adam, tunes the learning rate in 4, uses batch size 512, 30 epochs, window length 5, 1 mixer block, embedding dimension 6, and expansion factor 7 (Murad et al., 30 May 2025). Hyperparameters, including 8, threshold 9, and cluster count 0, are selected via Optuna on validation F1 (Murad et al., 30 May 2025). Experiments are implemented in PyTorch 2.5.1, CUDA 11.8, and Python 3.10, on an RTX 4090, AMD Ryzen 9 7950X, and 128 GB RAM, with mean and standard deviation reported over 3 seeds (Murad et al., 30 May 2025).
Dataset-specific preprocessing is part of the method definition. The general pipeline applies min-max normalization and test data clipping to 1 after normalization (per NPSR) (Murad et al., 30 May 2025). Examples include SWaT downsampling by 5, setting P201 and LIT401 to zero due to inconsistencies, and moving-average denoising; WADI (2017) downsampling by 5, dropping columns with many NaNs, forward-filling remaining NaNs, and excluding the first 21,600 training points; and PSM moving average plus forward-fill of NaNs (Murad et al., 30 May 2025).
The computational profile is summarized by dominant per-window terms: cluster-aware embedding 2, causal temporal mixer 3, embedding mixer 4, and head 5, with activation memory 6 and 7 storage for the causal mask and per-layer temporal weights (Murad et al., 30 May 2025). For the six benchmark datasets, the reported forward-pass GFLOPs are SWaT 1.05, WADI 17.13, PSM 3.55, SMAP 10.47, MSL 10.60, and SMD 8.98, with variability attributed mainly to channel count 8 and chosen 9 (Murad et al., 30 May 2025). The source states that for small 00 such as 24, MixerCA is real-time capable (Murad et al., 30 May 2025).
6. Empirical results, ablations, and limitations
MixerCA is evaluated on six public benchmark datasets: SWaT (51 channels, 7 days normal + 4 days attacks), WADI (123 channels), PSM (25 channels, eBay server metrics), SMD (28 entities × 38 channels), SMAP (55 entities × 25 channels), and MSL (27 entities × 55 channels) (Murad et al., 30 May 2025). The comparison set contains 15 methods: DAGMM, LSTM-VAE, MSCRED, OmniAnomaly, MAD-GAN, MTAD-GAT, USAD, UAE, GDN, GTA, Anomaly Transformer, TranAD, NPSR, D3R, and SensitiveHUE in offline and online variants (Murad et al., 30 May 2025).
The main result is that MixerCA achieves the best F1 without point adjustment on WADI (0.733), PSM (0.716), MSL (0.619), and SMD (0.599), ties the best on SMAP (0.524), and is slightly below SensitiveHUE (Offline) on SWaT (0.883 vs 0.911) while outperforming the online SensitiveHUE result (0.874) (Murad et al., 30 May 2025). Reported improvements versus the previous best are +10.32% (PSM), +12.34% (MSL), +11.96% (SMD), and +4.71% (WADI) (Murad et al., 30 May 2025).
The ablation studies isolate the contributions of the major components. Sequential accumulation improves F1 across all datasets and improves recall notably, with examples including PSM recall 0.846 vs 0.883 for pointwise but with higher F1 overall and MSL recall 0.784 vs 0.687 (Murad et al., 30 May 2025). Enabling clustering consistently improves F1, and among temporal variants, non-causal temporal mixing behaves similarly to “no temporal mixing”, whereas the causal temporal mixer yields the best F1, supporting the claim that causality is necessary to exploit temporal structure for online anomaly detection (Murad et al., 30 May 2025). Among clustering variants, the proposed spectral clustering on full correlation profiles outperforms spectral clustering on cosine similarity of raw channels, spectral clustering on 01 directly, and K-Means on correlation profiles (Murad et al., 30 May 2025).
The limitations identified by the source are methodological rather than purely empirical. Calibration depends on the empirical validation distribution, so small nominal validation sets can destabilize 02 (Murad et al., 30 May 2025). The temporal mixer uses expansion factor 1 to maintain strict causality, and extending this to higher expansion while preserving causality is explicitly left as future work (Murad et al., 30 May 2025). Clustering is fixed from training correlations, which may be suboptimal under distribution shift; proposed extensions include adaptive or online re-clustering and causal attention-based mixers (Murad et al., 30 May 2025). Additional future directions include separate embedding mixers or heads per cluster to preserve cluster separation deeper into the network and adaptive or context-aware thresholds for 03 under nonstationarity (Murad et al., 30 May 2025).
A broader terminological complication is that “MixerCA” does not refer uniquely to this anomaly-detection framework. In the hyperspectral imaging literature, MixerCA denotes a different model that processes HSI patches without downsampling, uses a 1×1 Conv, 64 filters, stride 1, repeats 4 Mixer blocks, applies Coordinate Attention after the last block, and reports 59,889 parameters, 19,145,472 FLOPs, and 9,318,144 MACs (Alkhatib et al., 28 Apr 2026). That reuse of the name does not imply architectural continuity with the cluster-aware causal mixer; it only indicates that the label has been adopted independently in separate research subfields.