Memory-Enhanced Transformer for Backend Microservice Anomaly Detection

Main Article Content

Yun Yang

Abstract

With the widespread adoption of cloud-native architecture and service-oriented deployment, backend microservice systems, while enhancing business flexibility, also exhibit characteristics such as cross-service propagation, enhanced contextual coupling, and complex temporal evolution of abnormal behavior, posing higher demands on anomaly detection. Addressing the shortcomings of existing methods, such as insufficient utilization of historical states, inadequate characterization of long-distance dependencies, and limited ability to fuse multi-source runtime information, this paper proposes a backend microservice anomaly detection method based on memory-enhanced Transformers. This method, based on logs, monitoring metrics, and link observation data, first constructs continuous temporal input through a unified representation. Then, an external memory unit is introduced to store and retrieve key historical patterns, enabling the model to continuously incorporate anomaly-related contextual clues during current state discrimination. Subsequently, a gating fusion mechanism and Transformer encoding structure are combined to collaboratively model current observation features and historical memory information, thereby enhancing the ability to express complex anomaly semantics and long-term correlations. To achieve anomaly detection, this paper further utilizes reconstruction bias to construct an anomaly scoring method, enabling the model to characterize normal behavioral structures and anomaly deviations from the latent representation space. A comparative study was conducted on anomaly data of open-source microservices. The results show that the proposed method has good recognition ability and stable performance in backend microservice anomaly detection tasks. It can more effectively characterize the anomaly features in complex operating environments and provide a feasible methodological support for anomaly monitoring in intelligent operation and maintenance scenarios.

Article Details

Section

Articles