Prior Enhanced Representation Learning and Adaptive Recognition Method for Backend Anomaly Detection under Weakly Labeled and Few-Shot Conditions
Abstract
To address the challenges of insufficient supervision under weakly labeled conditions, difficulties in learning anomaly patterns in low-sample scenarios, and susceptibility of log sequence representations to noise interference in backend anomaly detection tasks, this paper proposes a prior-enhanced representation learning and adaptive recognition method for weakly labeled and low-sample conditions. This method focuses on backend log sequences, modeling key issues such as insufficient anomaly semantic extraction, inadequate utilization of structural information, and unclear discrimination boundaries. First, heterogeneous input embedding maps the original log sequence to a unified representation space to reduce semantic bias caused by diverse log patterns. Then, a prior-guided encoding mechanism is introduced to integrate prior memory information into the latent representation learning process, enhancing the model's ability to characterize normal operation patterns and anomaly deviation features. Building upon this, a gating fusion strategy is used to adaptively integrate prior information with current sample features, thereby improving the effectiveness of anomaly-related information retention. Furthermore, neighborhood structure modeling and prototype-level metric calibration are combined to constrain the category distribution relationships in the recognition space, enabling the model to form more compact and discriminative anomaly representations even under weak supervision. Finally, an adaptive anomaly recognition mechanism is constructed to achieve stable discrimination of anomaly samples in complex backend log scenarios. Related research shows that the method presented in this paper can effectively improve the representation quality and recognition ability in backend log anomaly detection tasks, and provides a targeted methodological framework for backend anomaly detection under weak labeling and few sample conditions.