Introduction
Principal Component Analysis (PCA) is a cornerstone of anomaly detection, widely used in network security and industrial monitoring. By projecting data into a "normal" subspace (capturing major variance) and an "abnormal" subspace (capturing residual variance), PCA identifies anomalies via high Squared Prediction Error (SPE). However, a significant drawback persists: standard PCA loading vectors are dense. Every principal component (PC) is a linear combination of all original features, creating a "black box" that obscures which specific features triggered an anomaly.
The ASPCA Framework
To address this interpretability gap, we introduce Abnormal Subspace Sparse PCA (ASPCA). This model enforces two critical constraints on the abnormal subspace loading vectors:
- Sparsity: Each PC involves only a small subset of features, allowing for direct mapping of anomalies to specific sensors or attributes.
- Orthogonality: This ensures the total SPE can be mathematically decomposed into independent contributions from individual PCs, facilitating clear "signatures" for different types of anomalies.
The authors propose two algorithmic variants: ASPCA-F (Forward), which extracts normal PCs first, and ASPCA-B (Backward), which prioritizes the abnormal subspace to optimize interpretability where it matters most.
Experimental Evaluation
The model was tested across three domains:
- Synthetic Data: A 7-feature dataset with known linear relationships.
- Breast Cancer Wisconsin: A diagnostic dataset where malignant cases are treated as anomalies.
- KDD 99 Intrusion Dataset: A network security benchmark with 41 features and diverse attack types.
Key Results and Interpretability
ASPCA achieves a "best of both worlds" outcome: maintaining the high detection accuracy of standard PCA while drastically improving interpretability.
Sparsity and Feature Mapping
As illustrated in the loading matrix comparisons, ASPCA significantly reduces the density of the abnormal subspace. In the Breast Cancer dataset, the $L_{1,1}$ norm dropped from 34.22 (PCA) to 12.31 (ASPCA-BG). This sparsity allows for clear qualitative interpretation. For instance, in the KDD99 dataset, ASPCA correctly linked "smurf" attacks to specific network traffic features like srv_count, providing a clear diagnostic signature that dense PCA cannot offer.
Detection Performance
Despite the added constraints, ASPCA-F and ASPCA-B maintain competitive Area Under the Curve (AUC) scores, matching or exceeding standard PCA performance on the Breast Cancer and KDD99 datasets. This confirms that introducing sparsity does not come at the cost of detection reliability.
Conclusion and Future Directions
ASPCA provides a robust framework for interpretable anomaly detection. By making the abnormal subspace sparse and orthogonal, it transforms a detection signal into an actionable explanation. Future work will focus on improving computational efficiency for high-dimensional data and extending the framework to non-linear models via Kernel PCA.
Summary updated