Modern cellular networks, such as 5G, generate complex operational logs that challenge traditional anomaly detection techniques. Existing deep learning approaches, including standard transformer models, treat logs as monolithic text streams and lack the specialization to reason about procedural correctness and semantic integrity, a key requirement for telecommunications software. We tackle this problem in our system Janus, a log-based anomaly detection system featuring a novel Single-Pass Dual-Mask (SPDM) attention mechanism. Janus introduces a domain-specific inductive bias by partitioning attention heads into two groups. Global heads learn the valid temporal grammar of 5G procedures using a causal mask, and local heads perform fine-grained audits on the consistency of critical data fields using a tag-based semantic mask. A multi-stage curriculum learning framework progressively adapts Janus from domain pre-training to discriminative fine-tuning and learns to detect complex, real-world software failures. Experimental evaluation with several 5G log datasets demonstrates that Janus consistently outperforms prior systems, achieving on average a 3× performance improvement over a DNN-based baseline and an 80% gain over a transformer-based system.
Kulkarni et al. (Thu,) studied this question.