MGL-log: Multi-modal Gated Linear Transformer for Log Anomaly Detection
Abstract
Log files record computational events that reflect system states and behaviors, and serve as a key data source for obtaining operational insights and diagnosing faults in modern distributed systems. Therefore, automated log anomaly detection is of great importance. However, most existing methods rely on log parsers to map raw logs into discrete template identifiers. This not only weakens the deep semantic relationships among logs, but also causes the loss of continuous numerical parameters that contain important dynamic system states. To address these problems, this paper proposes a self-supervised log anomaly detection model based on a multimodal gated linear Transformer, named MGL-log. The model adopts a parser-free feature learning framework and designs a dual-branch semantic-numerical log encoder to separately extract features from unstructured text and continuous physical indicators. In addition, a gated cross-modal fusion module is used to adaptively adjust feature weights along the channel dimension. For sequence modeling, MGL-Log introduces a linear temporal sequence encoder to efficiently capture global contextual dependencies in log sequences. The model is jointly trained in an end-to-end manner by combining masked language modeling on continuous embeddings with InfoNCE-based cross-modal contrastive learning, which helps prevent representation degradation in high-dimensional vector spaces. Experiments on public datasets show that MGL-Log can accurately model the dynamic geometric topology of normal system behavior without parser-based preprocessing, and significantly improves the accuracy and robustness of log anomaly detection. Further efficiency comparison, hyperparameter sensitivity analysis, and generalization experiments on diverse log formats demonstrate the practical applicability, stability, and generalization ability of the proposed method.