Temporal Decay Loss for Adaptive Log Anomaly Detection in Cloud Environments - Jilcha, Lelisa Adeba; Kim, Deuk Hun; Kwak, Jin (Sensors, 2025)
Log anomaly detection in cloud computing environments is essential for maintaining system reliability and security. While sequence modeling architectures such as LSTMs and Transformers have been widely employed to capture temporal dependencies in log messages, their effectiveness deteriorates in zero-shot transfer scenarios due to distributional shifts in log structures, terminology, and event frequencies, as well as minimal token overlap across datasets. To address these challenges, we propose an effective detection approach integrating a domain-specific pre-trained language model (PLM) fine-tuned on cybersecurity-adjacent data with a novel loss function, Loss with Decaying Factor (LDF). LDF introduces an exponential time decay mechanism into the training objective, ensuring a dynamic balance between historical context and real-time relevance. Unlike traditional sequence models that often overemphasize outdated information and impose high computational overhead, LDF constrains the training process by dynamically weighing log messages based on their temporal proximity, thereby aligning with the rapidly evolving nature of cloud computing environments. Additionally, the domain-specific PLM mitigates semantic discrepancies by improving the representation of log data across heterogeneous datasets. Extensive empirical evaluations on two supercomputing log datasets demonstrate that this approach substantially enhances cross-dataset anomaly detection performance. The main contributions of this study include: (1) the introduction of a Loss with Decaying Factor (LDF) to dynamically balance historical context with real-time relevance; and (2) the integration of a domain-specific PLM for enhancing generalization in zero-shot log anomaly detection across heterogeneous cloud environments.
Keywords: Adaptive detection; Anomaly detection; Cloud-computing; Language model; Log preprocessing; Loss with decaying factor; Pretrained language model; Shot detection; Temporal decay; Temporal decay loss; Temporal dependency; Zero-shot detection; adaptive detection; anomaly detection; cloud computing; LDF; log preprocessing; pretrained language model; temporal decay loss; temporal dependency; zero-shot detection