CTD: Fast, accurate, and interpretable method for static and dynamic tensor decompositions

Jungwoo Lee, Dongjin Choi, Lee Sael

Abstract

How can we find patterns and anomalies in a tensor, i.e., multi-dimensional array, in an efficient and directly interpretable way? How can we do this in an online environment, where a new tensor arrives at each time step? Finding patterns and anomalies in multi-dimensional data have many important applications, including building safety monitoring, health monitoring, cyber security, terrorist detection, and fake user detection in social networks. Standard tensor decomposition results are not directly interpretable and few methods that propose to increase interpretability need to be made faster, more memory efficient, and more accurate for large and quickly generated data in the online environment. We propose two versions of a fast, accurate, and directly interpretable tensor decomposition method we call CTD that is based on efficient sampling method. First is the static version of CTD, i.e., CTD-S, that provably guarantees up to 11× higher accuracy than that of the state-of-the-art method. Also, CTD-S is made up to 2.3× faster and up to 24× more memory-efficient than the state-of-the-art method by removing redundancy. Second is the dynamic version of CTD, i.e. CTD-D, which is the first interpretable dynamic tensor decomposition method ever proposed. It is also made up to 82× faster than the already fast CTD-S by exploiting factors at previous time step and by reordering operations. With CTD, we demonstrate how the results can be effectively interpreted in online distributed denial of service (DDoS) attack detection and online troll detection.

Introduction

Tensors, or multi-dimensional arrays, have become the standard mathematical structure for modeling complex, high-dimensional data across various domains, such as network traffic (source IP × destination IP × time) or social media interactions. To extract meaningful patterns or detect anomalies within these structures, researchers typically rely on tensor decomposition. However, traditional methods like PARAFAC or Tucker decomposition produce abstract mathematical factors that are often difficult for human analysts to map back to the original data.

Sampling-based methods, such as TENSOR-CUR, were developed to address this by using actual "fibers" (rows or columns across dimensions) from the original tensor, thereby preserving the physical meaning of the data. Despite this advantage, existing sampling methods are frequently slow and memory-intensive due to the inclusion of redundant or linearly dependent fibers. Furthermore, they struggle with dynamic data streams, often requiring a full re-calculation of the decomposition at every new time step. This paper introduces CTD (Compact Tensor Decomposition), a framework designed to provide both speed and interpretability in both static and streaming environments.

Methodology: Compact Tensor Decomposition (CTD)

The CTD framework addresses the limitations of previous sampling methods by focusing on redundancy removal and incremental updates.

CTD-S (Static)

CTD-S employs "biased sampling," where fibers with higher norms—representing more significant data points—are prioritized for selection. Its core innovation is a redundancy-removal step that identifies and discards linearly dependent fibers. This results in a "compact" decomposition that maintains mathematical optimality while significantly reducing the computational footprint. The authors provide a mathematical proof showing that CTD-S achieves the minimum possible reconstruction error for a given set of sampled fibers, explaining its superior accuracy over TENSOR-CUR.

CTD-D (Dynamic)

CTD-D represents the first sampling-based method specifically designed for streaming data. Rather than re-processing the entire historical dataset, CTD-D updates existing factors using only the newly arrived data. It achieves substantial performance gains by exploiting factors from the previous time step and optimizing the order of matrix operations (parenthesization) to minimize floating-point operations. This approach allows for real-time monitoring of evolving tensors.

Experimental Evaluation

The researchers evaluated the CTD framework across several real-world and synthetic datasets to test its robustness and efficiency:

  • Cybersecurity: CAIDA network traffic data was used for DDoS injection experiments to test anomaly detection capabilities.
  • Social Networks: Facebook-wall posts (interactions between users) and human contact networks (Infectious, Haggle) were used to identify community structures and "trolls."
  • Sensor Data: Hyperspectral imaging (3D spatial/spectral data) provided a testbed for reconstruction accuracy.
  • Communication: Hypertext 2009 interaction data was used to evaluate performance on temporal communication patterns.

Key Results and Insights

Performance and Efficiency

CTD-S demonstrates a significant leap over the state-of-the-art TENSOR-CUR method. In comparative tests, CTD-S achieved up to 11x higher accuracy (lower relative reconstruction error) for the same computational budget. By eliminating redundancy, CTD-S is also up to 2.3x faster and 24x more memory-efficient.

In dynamic scenarios, CTD-D proves its utility for real-time applications by running up to 82x faster than the already optimized CTD-S when handling streaming updates. This speedup is primarily attributed to the efficient reuse of previous factors and the optimization of matrix multiplication order.

Real-World Anomaly Detection

The practical utility of CTD was demonstrated through two primary use cases:

  • DDoS Detection: In network traffic monitoring, CTD-D achieved an F1 score of 1.0, indicating perfect detection of attackers while maintaining high precision as attack complexity scaled.
  • Troll Detection: On the Facebook dataset, the method maintained 1.0 recall, successfully identifying all synthetic trolls injected into the data stream.

Interpretability through Sparsity

Because CTD samples actual fibers from the original (often sparse) tensor, the resulting factors remain sparse and meaningful. This allows analysts to trace anomalies directly back to specific entities, such as a particular User ID or IP address. This "direct interpretability" is a major advantage over abstract decomposition methods where factors are dense and lack a clear physical mapping.

Conclusion and Future Work

CTD provides a fast, accurate, and interpretable solution for both static and dynamic tensor analysis. By focusing on redundancy removal and incremental updates, it overcomes the primary bottlenecks of previous sampling-based methods. While the current work focuses on "mode-α" decomposition, future research may explore multi-mode sampling to further enhance compression in dynamic environments. Additionally, the authors note that the interpretability of the method is most effective when the raw data dimensions have inherent physical meaning, such as time, location, or identity.

Summary updated

BibTeX
@inproceedings{lee2018ctd,
  author = {Jungwoo Lee and Dongjin Choi and Lee Sael},
  title = {{CTD: Fast, accurate, and interpretable method for static and dynamic tensor decompositions}},
  booktitle = {PLoS},
  year = {2018},
  doi = {10.1371/journal.pone.0200579},
}
Figure