CHASE: A Causal Heterogeneous Graph based Framework for Root Cause Analysis in Multimodal Microservice Systems

Ziming Zhao, Tiehua Zhang, , Zhishu Shen, , Hai Dong, , Xingjun Ma, , Xianhui Liu, , Yun Yang Corresponding author: Tiehua ZhangZiming Zhao is with the School of Information, University of Michigan, Ann Arbor, United States (e-mail: [email protected]).Tiehua Zhang and Xianhui Liu are with the College of Electronics and Information Engineering, Tongji University, Shanghai, China (e-mail: { tiehuaz,lxh}@tongji.edu.cn).Zhishu Shen is with the School of Computer Science and Artificial Intelligence, Wuhan University of Technology, Wuhan, China (e-mail: [email protected]).Hai Dong is with the School of Computing Technologies, RMIT University, Melbourne, Australia (e-mail: [email protected]).Xingjun Ma is with the School of Computer Science, Fudan University, Shanghai, China (e-mail: [email protected]).Yun Yang is with the School of Science, Computing and Engineering Technologies, Swinburne University of Technology, Melbourne, Australia (e-mail: [email protected]).
Abstract

In recent years, the widespread adoption of distributed microservice architectures within the industry has significantly increased the demand for enhanced system availability and robustness. Due to the complex service invocation paths and dependencies at enterprise-level microservice systems, it is challenging to locate the anomalies promptly during service invocations, thus causing intractable issues for normal system operations and maintenance. In this paper, we propose a Causal Heterogeneous grAph baSed framEwork for root cause analysis, namely CHASE, for microservice systems with multimodal data, including traces, logs, and system monitoring metrics. Specifically, related information is encoded into representative embeddings and further modeled by a multimodal invocation graph. Following that, anomaly detection is performed on each instance node with attentive heterogeneous message passing from its adjacent metric and log nodes. Finally, CHASE learns from the constructed hypergraph with hyperedges representing the flow of causality and performs root cause localization. We evaluate the proposed framework on two public microservice datasets with distinct attributes and compare with the state-of-the-art methods. The results show that CHASE achieves the average performance gain up to 36.2%(A@1) and 29.4%(Percentage@1), respectively to its best counterpart.

Index Terms:
Microservice systems, root cause localization, multimodal data, graph neural network

I Introduction

Microservice architecture has recently surged in popularity due to its significant advantages for contemporary industrial service-oriented systems. This architectural design involves a collection of small, independent, and loosely coupled applications, where each application delivers a specific business function [1]. Specifically, each microservice is independently developed, deployed, and managed by a dedicated team, with communication facilitated through APIs and protocols such as REST, HTTP, and messaging systems. It is widely acknowledged that microservice architecture enhances flexibility, scalability, and fault tolerance [2, 3, 4].

However, fault localization and analysis in microservice systems often pose significant challenges due to high complexity [5]. In reality, operation engineers and developers are frequently required to utilize data such as distributed invocation histories and logging tools to quickly identify and isolate issues. In complex systems where microservices are interconnected, each method or function call might trigger multiple distributed service invocations, either synchronously or asynchronously. This complexity can overwhelm operation engineers, especially when they need to manually gather data from various sources during system failures, thereby complicating the issue identification and resolution process. Implementing trace, metric, and log functionalities, and understanding how to use these data collectively, are essential for effective management of complex microservice systems. Tracing allows for the tracking of a request’s path across various microservices, offering valuable insights into performance and identification of bottlenecks [2]. Metrics, sometime being refered as system monitoring metrics, provide quantitative data related to system performance, such as response times and error rates, which are crucial for performance optimization and capacity planning [6]. System logs, on the other hand, capture detailed information about system events and transactions, facilitating debugging and troubleshooting processes [7]. Together, traces, metrics, and logs create a comprehensive monitoring system that encompasses all necessary multimodal information, which helps enhance visibility into the system’s behavior, thereby supporting performance monitoring, debugging, and ensuring overall system reliability.

Fig. 1 illustrates the execution process of service invocations within an enterprise-level microservice system, with trace, metrics, and logs data being monitored and recorded. The microservice trace data is visualized as a directed graph where each node represents an instance of various services such as network gateways, message queues, databases, and other business-specific services. Directed edges show the flow of requests between services and application instance. Metric data, such as response times or error rates, are captured as time-series data, illustrating changes over time. Logs are typically formatted according to the configuration of the log system and provide textual insights into instance activities, which can be analyzed using natural language processing techniques to extract semantic information.

As the complexity of systems continues to grow, there is an increasing emphasis on integrating Root Cause Analysis (RCA) methods to timely uncover the underlying reasons behind issues or failures [8, 9, 10]. RCA is particularly crucial in microservice systems due to their intricate and dynamic interactions between various service instances. When failures occur in large-scale microservice systems, they can spread rapidly, leading to significant disruptions, as evidenced by the 12-hour outage experienced by Didi, a major Chinese ride-hailing platform, in November 2023, resulting in a loss of 56.43 million [11]. RCA in microservice systems involves not just identifying general error types for further investigation but also pinpointing specific instance nodes along with their problematic logs and metrics [12, 13]. For instance, as illustrated in Fig. 1, a typical RCA framework collects the runtime information from the microservice system and outputs its error diagnosis, indicating the DB instance node circled in red as the root cause of the system failure. Additionally, the RCA framework outputs several logs from the error stack and detected anomaly metrics to facilitate further manual checks. However, traditional RCA methods only offer suggestive clues, necessitating detailed manual analysis to determine the exact root cause [14]. Furthermore, with the ongoing evolution of monolithic microservice architectures, new challenges that require handling multimodal information at runtime and the demands of robust anomaly diagnosis arise, underscoring the critical importance of effective RCA as a pressing field.

Refer to caption
Figure 1: An exemplary service invocations in the microservice system with multimodal data, including trace, monitoring metrics and log data

To date, numerous models have been proposed for root cause analysis. One class of approaches explores the feasibility of building causality graphs using merely trace information, which consists of service invocation chains from various service instances. Based on such intuition, causal analysis algorithms such as PC [15] and GES [16] are employed to infer the causal relationships between service instances in the graph. Following that, a line of research [17, 18, 19, 20, 21, 22] starts to integrate root cause analysis with machine learning models and graph neural networks (GNNs), from which the graph learning techniques are leveraged to model the pairwise bivariate correlation of instances connected with directed invocation edges. In these work, multimodal data of service instances are used as supplementary features to enrich features such as node embeddings and edge weights, while the uncovering of bivariate correlation between pairs of instance nodes are treated as the homogeneous graph learning task in the trace typology, leading to the following challenges:

  1. 1.

    Information heterogeneity of microservice systems. The microservice system information composed of log, metric and trace should be considered as multimodal data. The log information contains systemically defined natural languages. The metric information collects time series data of numerical values. And the trace information is the typology of the invocation graph. With multimodal information involved, it is both reasonable and natural to explore the heterogeneity attributes of the service invocation graph.

  2. 2.

    Multivariate causal correlation between instances. Since each instance node affects all its downstream invocation, the causal information of such instance node can possibly propagate to nodes that lies multiple hops away from itself. It is challenging to capture the causality flow using graph convolution networks, which primarily focus on modeling pairwise locality correlation of directed edges. Instead, more sophisticated graph structures that can model multivariate correlations among subsets of nodes with varying cardinality should be considered.

To tackle these issues, we propose a novel causal heterogeneous graph based framework named CHASE, which is applicable to inductively learn the root cause anomaly of microservice systems with the presence of trace, log, and metric data all together. Based on multimodal data, a heterogeneous invocation graph is constructed using trace topology, with additional metric and log nodes connected to the source instance nodes where the information is gathered. Representative node embeddings are then generated using designated encoders for each multimodal data type. The procedure for instance-level anomaly detection is carried out using heterogeneous attentive message passing. By doing so, CHASE can accurately locate root cause instances with excellent performance by learning from the constructed hypergraph, with hyperedges representing causality propagation in the trace. We evaluate CHASE on two datasets with different attributes—one with static trace topology and one with dynamic trace topology. Our experimental results show that CHASE significantly improves fault localization accuracy compared to several state-of-the-art methods.

The main contributions of this paper are as follows:

  1. 1.

    We propose a novel graph learning framework named CHASE to handle multimodal data of log, metric and trace under the task of root cause analysis, in which encode trace, metrics and log information are encoded along with the construction of invocation graph-based typology. We accomplish multimodal feature fusion by solving the instance-level anomaly detection with heterogeneous message passing. Hereby, we attain the modeling of multimodal data and information heterogeneity of microservice systems.

  2. 2.

    We achieve the root cause analysis task with hypergraph learning. CHASE captures the causality flow of the anomalies in microservice systems by constructing hypergraphs on the basis of typology, from which each hyperedge represents causality propagation along the invocation path. The multivariate causality corrleation between a set of instances is modelled with hypergraph convolution.

  3. 3.

    We conduct extensive experiments using two public datasets from microservice systems and compare the performance with a number of traditional and GNN-based baselines, demonstrating that our proposal can outperform comparative methods in the root cause analysis task.

The rest of the paper is organized as follows: Section II introduces the related work including non-GNN based and GNN-based root cause analysis. Section III explains the overall framework of CHASE and the implementation details including multimodal invocation graph construction, instance level anomaly detection with heterogeneous message passing and hypergraph causality learning for root cause analysis. In Section IV, we evaluate the performance of CHASE and extensively compare it with the state-of-the-art baselines on two distinct datasets. Section V concludes the paper.

II Related Work

II-A Non-GNN based Root Cause Analysis

The complexity of the microservice system has intensified the need for effective root cause analysis techniques to diagnose and resolve issues. In recent years, a line of research has focused on develo** RCA methods for microservices systems [23]. This section overviews some of the key research studies in this area.

Existing work mainly uses three categories of data sources: log-based [7], trace-based [2], and metric-based [6]. Log-based RCA is a technique that analyzes service logs from different instances in the microservice system to identify potential root causes of issues, which naturally rely on the accurate text parsing techniques in the log and are often hard to work in real time. For instance, Zhang et al. [7] propose a method for localizing operational faults that involve two steps: it first preprocesses system logs to generate high-quality features, and then uses machine learning model on these features to identify the root cause of operational faults. LogFlash [24] also integrates anomaly detection on logs as the main part of root cause analysis based on the calculation of deviation from normal log status. A common issue for log-based RCA is that these works often require offline efforts to extract key information in the log, and the performance of the log-based RCA is also largely dependent on the overall quality of the system logs. Trace-based research utilizes the information through the complete tracing of the execution paths and then identifies root causes that occur along the way. TraceRCA [2] uses a tracing tool to collect trace data among service invocations in the microservice system and employ the decision tree to detect the root cause. However, using trace data alone is insufficient as trace data only presents information at service invocation level [10]. Apart from the abovementioned two categories, the metirc-based RCA is now widely studied in the research community. Most metric-based RCA research [17] employs the monitoring data (e.g., CPU and memory usage, network latency etc.) gathered from different service instances to establish causal graphs and deduce the underlying root causes, including MicroRCA [20] and CloudRanger [19], while the former correlate application performance symptoms with the root cause, the latter conducts second-order random walk on impact graph to identify the problematic services. However, the metric-based root cause analysis method does not consider other types of information from microservice systems. TrinityRCL harness telemetry data of application-level, service-level, host-level, combined with metric-level to construct the causal graph with heterogeneity[25].

II-B GNN based Root Cause Analysis

Graph Neural Networks have demonstrated prowess in capturing intricate relationships within graph-structured data, i.e. data from non-Euclidean spaces. GNNs can be explained as low-pass filters for graph Fourier transform from the spectral perspective, and can also be regarded as a message passing mechanism from neighbor nodes under the spatial perspective. By leveraging popular GNN architectures such as Graph Convolution Network (GCN)[26], GraphSAGE[27], and Graph Attention Network (GAT)[28], tasks relating with graph structural learning have been solved in fields of social networks, biology, and recommendation systems, etc [29, 30]. Due to the intrinsic nature of microservice systems where individual services are pairwise correlated, it is intuitive to model the dependencies between microservices with a graph representation. Thus GNNs can be employed to learn the patterns of microservice systems and facilitate root cause analysis.

Recent advancement of GNNs has unleashed great potential in analyzing the root cause problems, especially for cases relying on graph structure data. Owing to the natural compatibility with generated causal graphs, researchers started to leverage GNN to learn the failure propagation patterns in the graph, thus giving a stronger generalization ability compared with random walk based RCA frameworks on causal graphs generated with Peter-Clark(PC) algoritm [22]. CausalRCA [21] designs a gradient-based causal structure learning to capture linear and non-linear causal relations in monitoring metrics and outputs a weighted causal directed acyclic graph (DAG). Diagfusion [22] reports the state-of-the-art RCA results using GNN. It combines deployment data and traces to build a dependency graph and uses GNN to generate the embeddings for each service instance, which are then used to achieve two-fold failure diagnosis, i.e., root cause fault localization and failure type determination. A hierarchical causal network framework named REASON[31] is applied to model the fault propagation of the microservice trace with both within-network and across-network causal relationships for root cause localization. Random walk on the learnt causal network is further applied to locate a system fault. It is worth noting that CausalRCA uses the encoder-decoder structure for unsupervised learning to derive the weight of edges, which is considered insufficient to represent the significance between causes and effects in the causal graph. Diagfusion, on the other hand, applies graph convolutional network for representation learning on invocation graphs in an end-to-end fashion, requiring a certain amount of labelled data.

In all, non-GNN based frameworks focus more on mining causal correlation from multimodal information, such as metrics, so as to build up causal structure graphs representing causality flow, while GNN-based frameworks apply graph learning methodologies and unravel the RCA task into a trainable optimizing problem by minimizing the traning loss. However, none of the aforementioned non-GNN based frameworks or GNN-based frameworks can tackle RCA task by capturing multimodal information, invocation typology as well as causality propagation simultaneously in an end-to-end trainable manner. Our proposed framework, CHASE, focuses on exploiting logs and metrics to generate pertinent and comprehensive embeddings, applies message passing in graph to learn the non-Euclidean data of invocation traces, models causality flow with hyperedges and presents an overall training loss making RCA task soluble in an end-to-end way.

III CHASE Framework

Refer to caption
Figure 2: Overall framework of CHASE

In this section, we elaborate the CHASE framework with three stages, including invocation graph generation, instance anomaly detection with heterogeneous message passing and root cause analysis with hypergraph learning. Fig. 2 depicts the overall architecture. We list out all necessary notations used in this paper in Table I.

TABLE I: Key Notations
Notation Description
\| Concatenation
\mid\cdot\mid∣ ⋅ ∣ Set size
σ()𝜎\sigma(\cdot)italic_σ ( ⋅ ) Activation function
𝒢(,,,E)𝒢𝐸\mathcal{G}(\mathcal{I},\mathcal{M},\mathcal{L},E)caligraphic_G ( caligraphic_I , caligraphic_M , caligraphic_L , italic_E ) Invocation graph modelling a microservice trace
N()𝑁N(\cdot)italic_N ( ⋅ ) Neighbors of a node in 𝒢𝒢\mathcal{G}caligraphic_G
\mathcal{I}caligraphic_I Set of instance nodes
\mathcal{M}caligraphic_M Set of metric nodes
\mathcal{L}caligraphic_L Set of log nodes
E𝐸Eitalic_E Set of edges
𝔼()𝔼\mathbb{E(\cdot)}blackboard_E ( ⋅ ) Encoded node embedding
𝟙subscript1\mathds{1}_{\mathcal{I}}blackboard_1 start_POSTSUBSCRIPT caligraphic_I end_POSTSUBSCRIPT One hot embedding for instance category
H𝐻Hitalic_H Number of attention heads
K(h)()superscript𝐾K^{(h)}(\cdot)italic_K start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT ( ⋅ ) Key embedding of attention head with index hhitalic_h
Q(h)()superscript𝑄Q^{(h)}(\cdot)italic_Q start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT ( ⋅ ) Query embedding of attention head with index hhitalic_h
V(h)()superscript𝑉V^{(h)}(\cdot)italic_V start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT ( ⋅ ) Anomaly information of attention head with index hhitalic_h
𝒜𝒮LI()𝒜subscript𝒮𝐿𝐼\mathcal{AS}_{L-I}(\cdot)caligraphic_A caligraphic_S start_POSTSUBSCRIPT italic_L - italic_I end_POSTSUBSCRIPT ( ⋅ ) Anomaly score between a pair of instance and log
𝒜𝒮MI()𝒜subscript𝒮𝑀𝐼\mathcal{AS}_{M-I}(\cdot)caligraphic_A caligraphic_S start_POSTSUBSCRIPT italic_M - italic_I end_POSTSUBSCRIPT ( ⋅ ) Anomaly score between a pair of instance and metric
A~()(h)~𝐴superscript\tilde{A}(\mathcal{I})^{(h)}over~ start_ARG italic_A end_ARG ( caligraphic_I ) start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT Nodewise normalized anomaly score of instance
\mathcal{H}caligraphic_H Hypergraph incidence matrix
Dvsubscript𝐷𝑣D_{v}italic_D start_POSTSUBSCRIPT italic_v end_POSTSUBSCRIPT Diagonal matrix of node degree
Desubscript𝐷𝑒D_{e}italic_D start_POSTSUBSCRIPT italic_e end_POSTSUBSCRIPT Diagonal matrix of hyperedge degree
D𝐷Ditalic_D Detection head for root cause analysis

III-A Multimodal Invocation Graph Construction

To begin with, we formally define the concept of an invocation graph within the context of microservice systems, which is derived from a directed acyclic graph (DAG). A DAG is a directed graph that contains no cycles, meaning there is no path that starts at a given node and loops back to the same node after traversing multiple edges. An invocation graph is a special form of a DAG, where the edges represent the meta-relationships between instances, logs, and metrics.

In a microservice system, as shown in Fig. 1, the process of handling a request is usually reflected with a microservice trace, which can be modeled by a DAG with instances as nodes and each directed edge e(u,v)𝑒𝑢𝑣e(u,v)italic_e ( italic_u , italic_v ) representing that instance v𝑣vitalic_v is called by instance u𝑢uitalic_u. There are multiple types of service instances, including application instances, message instances, gateway instances, database instances. The instances and invocation edges on a trace are extracted and assembled to obtain the complete microservice invocation graph to represent business processes. In general, each instance will continuously output logs during runtime, while metrics of the instance’s container and physical server, will also be recorded by the DevOps platform simultaneously.

This aforementioned multimodal trace information is modeled by the invocation graph denoted with 𝒢(,,,E)𝒢𝐸\mathcal{G}(\mathcal{I},\mathcal{M},\mathcal{L},E)caligraphic_G ( caligraphic_I , caligraphic_M , caligraphic_L , italic_E ), where \mathcal{I}caligraphic_I denotes the set of all instances in the trace, \mathcal{M}caligraphic_M denotes the set of monitored metrics of all instances, and \mathcal{L}caligraphic_L denotes all printed logs of the trace, including warnings and errors. We then apply directed edges e(,u)E𝑒𝑢𝐸e(\mathcal{L},u)\in Eitalic_e ( caligraphic_L , italic_u ) ∈ italic_E and e(n,u)E𝑒subscript𝑛𝑢𝐸e(\mathcal{M}_{n},u)\in Eitalic_e ( caligraphic_M start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT , italic_u ) ∈ italic_E to represent the runtime records of metric and logs of instance node u𝑢u\in\mathcal{I}italic_u ∈ caligraphic_I. Notice that each instance is monitored with multiple types of metrics so that there may exist multiple metric-instance edges for a single instance, while we encode all the log information into one node per instance to reduce |||\mathcal{L}|| caligraphic_L | for computational efficiency on the multimodal invocation graph.

Note that the raw feature of log nodes are natural language texts with semantic meaning, features of metric nodes are composed of real valued time series data and the instance nodes have categorical features. As a result, invocation graph with log, metric and instance nodes can be considered as a graph with multimodal information. Hence, we apply respective encoders to encode the feature of log, metric and instance nodes into embeddings denoted as 𝔼(),𝔼(),𝔼()𝔼𝔼𝔼\mathbb{E}(\mathcal{L}),\mathbb{E}(\mathcal{M}),\mathbb{E}(\mathcal{I})blackboard_E ( caligraphic_L ) , blackboard_E ( caligraphic_M ) , blackboard_E ( caligraphic_I ), respectively:

𝔼()=FastTextEncoder()𝔼()=TimeSeriesEncoder(T)[:,1]𝔼()=𝟙Θe+P(k,d)𝔼FastTextEncoder𝔼TimeSeriesEncodersuperscript𝑇:1𝔼subscript1subscriptΘ𝑒𝑃𝑘𝑑\displaystyle\begin{split}\mathbb{E}(\mathcal{L})&=\textbf{FastTextEncoder}(% \mathcal{L})\\ \mathbb{E}(\mathcal{M})&=\textbf{TimeSeriesEncoder}(\mathcal{M}^{T})[:,-1]\\ \mathbb{E}(\mathcal{I})&=\mathds{1}_{\mathcal{I}}\Theta_{e}+P(k,d)\end{split}start_ROW start_CELL blackboard_E ( caligraphic_L ) end_CELL start_CELL = FastTextEncoder ( caligraphic_L ) end_CELL end_ROW start_ROW start_CELL blackboard_E ( caligraphic_M ) end_CELL start_CELL = TimeSeriesEncoder ( caligraphic_M start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT ) [ : , - 1 ] end_CELL end_ROW start_ROW start_CELL blackboard_E ( caligraphic_I ) end_CELL start_CELL = blackboard_1 start_POSTSUBSCRIPT caligraphic_I end_POSTSUBSCRIPT roman_Θ start_POSTSUBSCRIPT italic_e end_POSTSUBSCRIPT + italic_P ( italic_k , italic_d ) end_CELL end_ROW (1)

For log nodes, we follow the work from [22] which applies FastText [32] in encoding the extracted log templates into text embeddings. For metric nodes, we apply the trivial time series transformer provided by Huggingface111https://huggingface.co/blog/time-series-transformers, and take the output embedding from the last timestamp as the encoded metric embedding. For instance nodes, the one-hot embedding 𝟙subscript1\mathds{1}_{\mathcal{I}}blackboard_1 start_POSTSUBSCRIPT caligraphic_I end_POSTSUBSCRIPT, representing the category of the specific instance node, is projected with a learnable matrix ΘesubscriptΘ𝑒\Theta_{e}roman_Θ start_POSTSUBSCRIPT italic_e end_POSTSUBSCRIPT. And we combine the information of the temporal invocation order of each instance in the trace by applying positional encoding. We denote positional encoding as P(k,i)𝑃𝑘𝑖P(k,i)italic_P ( italic_k , italic_i ) where i𝑖iitalic_i denotes the index of a single feature in all feature dimensions d𝑑ditalic_d, k𝑘kitalic_k denotes the temporal order in invocation and n𝑛nitalic_n is a hyperparameter set to 20000200002000020000 in defualt, as follows:

P(k,i)={sinkni/d,if i mod20coskni/d,if i mod21.𝑃𝑘𝑖cases𝑘superscript𝑛𝑖𝑑if i mod20𝑘superscript𝑛𝑖𝑑if i mod21\displaystyle P(k,i)=\begin{cases}\sin{\frac{k}{n^{i/d}}},&\text{if i $\text{% mod}2\equiv 0$}\\ \cos{\frac{k}{n^{i/d}}},&\text{if i $\text{mod}2\equiv 1$}.\end{cases}italic_P ( italic_k , italic_i ) = { start_ROW start_CELL roman_sin divide start_ARG italic_k end_ARG start_ARG italic_n start_POSTSUPERSCRIPT italic_i / italic_d end_POSTSUPERSCRIPT end_ARG , end_CELL start_CELL if i mod 2 ≡ 0 end_CELL end_ROW start_ROW start_CELL roman_cos divide start_ARG italic_k end_ARG start_ARG italic_n start_POSTSUPERSCRIPT italic_i / italic_d end_POSTSUPERSCRIPT end_ARG , end_CELL start_CELL if i mod 2 ≡ 1 . end_CELL end_ROW (2)

III-B Instance Level Anomaly Detection with Heterogeneous Message Passing

After the whole encoding process where all the log node embeddings, metric node embeddings and instance node embeddings are encoded into 𝔼()𝔼\mathbb{E}(\mathcal{L})blackboard_E ( caligraphic_L ), 𝔼()𝔼\mathbb{E}(\mathcal{M})blackboard_E ( caligraphic_M ), 𝔼()𝔼\mathbb{E}(\mathcal{I})blackboard_E ( caligraphic_I ), we construct the multimodal invocation graph. The task of instance level anomaly detection is a conventional procedure in root cause analysis. In this section, we handle this task based on the intrinsic heterogeneity of the invocation graph, which is inspired by the architecture design of heterogeneous graph transformer.

III-B1 Attentive Anomaly Score

Starting with the subgraph composed of a single instance node and its related log and metric nodes, we model all the output logs with a single log node \mathcal{L}caligraphic_L, while we model different types of monitored metrics with several metric nodes n𝑛nitalic_n, denoted as nsubscript𝑛\mathcal{M}_{n}caligraphic_M start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT. We first project all the encoded embeddings into a specific vector space for anomaly detection. For log and metric nodes, we perform the following linear transformation.

K(h)()=𝔼()WLog(h)K(h)(n)=𝔼(n)WMetricn(h)Q(h)()=𝔼()WInstance(h)superscript𝐾𝔼subscriptsuperscript𝑊Logsuperscript𝐾subscript𝑛𝔼subscript𝑛subscriptsuperscript𝑊subscriptMetric𝑛superscript𝑄𝔼subscriptsuperscript𝑊Instance\displaystyle\begin{split}K^{(h)}(\mathcal{L})&=\mathbb{E}(\mathcal{L})W^{(h)}% _{\textbf{Log}}\\ K^{(h)}(\mathcal{M}_{n})&=\mathbb{E}(\mathcal{M}_{n})W^{(h)}_{\textbf{Metric}_% {n}}\\ Q^{(h)}(\mathcal{I})&=\mathbb{E}(\mathcal{I})W^{(h)}_{\textbf{Instance}}\end{split}start_ROW start_CELL italic_K start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT ( caligraphic_L ) end_CELL start_CELL = blackboard_E ( caligraphic_L ) italic_W start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT start_POSTSUBSCRIPT Log end_POSTSUBSCRIPT end_CELL end_ROW start_ROW start_CELL italic_K start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT ( caligraphic_M start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT ) end_CELL start_CELL = blackboard_E ( caligraphic_M start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT ) italic_W start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT start_POSTSUBSCRIPT Metric start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_CELL end_ROW start_ROW start_CELL italic_Q start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT ( caligraphic_I ) end_CELL start_CELL = blackboard_E ( caligraphic_I ) italic_W start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT start_POSTSUBSCRIPT Instance end_POSTSUBSCRIPT end_CELL end_ROW (3)

where WLog(h)subscriptsuperscript𝑊LogW^{(h)}_{\textbf{Log}}italic_W start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT start_POSTSUBSCRIPT Log end_POSTSUBSCRIPT, WMetricn(h)subscriptsuperscript𝑊subscriptMetric𝑛W^{(h)}_{\textbf{Metric}_{n}}italic_W start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT start_POSTSUBSCRIPT Metric start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT end_POSTSUBSCRIPT, WInstance(h)subscriptsuperscript𝑊InstanceW^{(h)}_{\textbf{Instance}}italic_W start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT start_POSTSUBSCRIPT Instance end_POSTSUBSCRIPT are learnable weight matrices of dimension d×d/H𝑑𝑑𝐻d\times d/Hitalic_d × italic_d / italic_H, where d𝑑ditalic_d is the inital embedding dimension from our multimodal encoders and H𝐻Hitalic_H is the total number of attention heads, hhitalic_h denotes the index of a specific attention head.

For each instance node in the microservice system, multiple types of runtime metrics and logs are continuously produced and monitored by the DevOps platform. It is crucial to identify which of these monitored records are the most representative for the occurrence of the detected instance-level anomaly. We quantify this anomaly score, denoted as 𝒜𝒮𝒜𝒮\mathcal{AS}caligraphic_A caligraphic_S, with the heterogeneous mutual attention weight between the instance node and all its neighbors in the invocation graph.

𝒜𝒮(h)()=K(h)()AQ(h)()T×ϕd𝒜𝒮n(h)()=K(h)(n)AnQ(h)()T×ϕnd𝒜superscriptsubscript𝒮superscript𝐾subscript𝐴superscript𝑄superscript𝑇subscriptitalic-ϕ𝑑𝒜superscriptsubscript𝒮subscript𝑛superscript𝐾subscript𝑛subscript𝐴subscript𝑛superscript𝑄superscript𝑇subscriptitalic-ϕsubscript𝑛𝑑\displaystyle\begin{split}\mathcal{AS}_{\mathcal{L}-\mathcal{I}}^{(h)}(% \mathcal{I})&=K^{(h)}(\mathcal{L})A_{\mathcal{L}-\mathcal{I}}Q^{(h)}(\mathcal{% I})^{T}\times\frac{\phi_{\mathcal{L}}}{\sqrt{d}}\\ \mathcal{AS}_{\mathcal{M}_{n}-\mathcal{I}}^{(h)}(\mathcal{I})&=K^{(h)}(% \mathcal{M}_{n})A_{\mathcal{M}_{n}-\mathcal{I}}Q^{(h)}(\mathcal{I})^{T}\times% \frac{\phi_{\mathcal{M}_{n}}}{\sqrt{d}}\end{split}start_ROW start_CELL caligraphic_A caligraphic_S start_POSTSUBSCRIPT caligraphic_L - caligraphic_I end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT ( caligraphic_I ) end_CELL start_CELL = italic_K start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT ( caligraphic_L ) italic_A start_POSTSUBSCRIPT caligraphic_L - caligraphic_I end_POSTSUBSCRIPT italic_Q start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT ( caligraphic_I ) start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT × divide start_ARG italic_ϕ start_POSTSUBSCRIPT caligraphic_L end_POSTSUBSCRIPT end_ARG start_ARG square-root start_ARG italic_d end_ARG end_ARG end_CELL end_ROW start_ROW start_CELL caligraphic_A caligraphic_S start_POSTSUBSCRIPT caligraphic_M start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT - caligraphic_I end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT ( caligraphic_I ) end_CELL start_CELL = italic_K start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT ( caligraphic_M start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT ) italic_A start_POSTSUBSCRIPT caligraphic_M start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT - caligraphic_I end_POSTSUBSCRIPT italic_Q start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT ( caligraphic_I ) start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT × divide start_ARG italic_ϕ start_POSTSUBSCRIPT caligraphic_M start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_ARG start_ARG square-root start_ARG italic_d end_ARG end_ARG end_CELL end_ROW (4)

Both Asubscript𝐴A_{\mathcal{L}-\mathcal{I}}italic_A start_POSTSUBSCRIPT caligraphic_L - caligraphic_I end_POSTSUBSCRIPT, Ansubscript𝐴subscript𝑛A_{\mathcal{M}_{n}-\mathcal{I}}italic_A start_POSTSUBSCRIPT caligraphic_M start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT - caligraphic_I end_POSTSUBSCRIPT are of dimension d/H×d/H𝑑𝐻𝑑𝐻d/H\times d/Hitalic_d / italic_H × italic_d / italic_H, which represents the projection matrix for calculating the attention weight between the instance node and its multimodal neighbors. This matrix is then to be shareable among all attention heads. ϕsubscriptitalic-ϕ\phi_{\mathcal{L}}italic_ϕ start_POSTSUBSCRIPT caligraphic_L end_POSTSUBSCRIPT and ϕnsubscriptitalic-ϕsubscript𝑛\phi_{\mathcal{M}_{n}}italic_ϕ start_POSTSUBSCRIPT caligraphic_M start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT end_POSTSUBSCRIPT are the prior significance granted to different types of metrics and logs, which can be learnable and initialized to ones, inferring our prior assumption that all kinds of logs and metrics are equally important to the instance-level anomaly.

The anomaly score is normalized for each instance node with all its neighbors.

A~(h)()=Softmax,nN{𝒜𝒮(h)()𝒜𝒮n(h)()}superscript~𝐴for-allsubscript𝑛subscript𝑁Softmax𝒜superscriptsubscript𝒮𝒜superscriptsubscript𝒮subscript𝑛\displaystyle\begin{split}\tilde{A}^{(h)}(\mathcal{I})=\underset{\forall% \mathcal{L},\mathcal{M}_{n}\in N_{\mathcal{I}}}{\text{Softmax}}\{\mathcal{AS}_% {\mathcal{L}-\mathcal{I}}^{(h)}(\mathcal{I})\mathbin{\|}\mathcal{AS}_{\mathcal% {M}_{n}-\mathcal{I}}^{(h)}(\mathcal{I})\}\end{split}start_ROW start_CELL over~ start_ARG italic_A end_ARG start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT ( caligraphic_I ) = start_UNDERACCENT ∀ caligraphic_L , caligraphic_M start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT ∈ italic_N start_POSTSUBSCRIPT caligraphic_I end_POSTSUBSCRIPT end_UNDERACCENT start_ARG Softmax end_ARG { caligraphic_A caligraphic_S start_POSTSUBSCRIPT caligraphic_L - caligraphic_I end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT ( caligraphic_I ) ∥ caligraphic_A caligraphic_S start_POSTSUBSCRIPT caligraphic_M start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT - caligraphic_I end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT ( caligraphic_I ) } end_CELL end_ROW (5)

The instance anomaly score for attention head hhitalic_h is of dimension 1×|N|1subscript𝑁1\times|N_{\mathcal{I}}|1 × | italic_N start_POSTSUBSCRIPT caligraphic_I end_POSTSUBSCRIPT |, where Nsubscript𝑁N_{\mathcal{I}}italic_N start_POSTSUBSCRIPT caligraphic_I end_POSTSUBSCRIPT denotes the set of all neighbors of node I𝐼Iitalic_I and A~(h)()=𝟏superscript~𝐴1\sum\tilde{A}^{(h)}(\mathcal{I})=\mathbf{1}∑ over~ start_ARG italic_A end_ARG start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT ( caligraphic_I ) = bold_1 in accordance with the normalized attention weight.

III-B2 Anomaly Information Passing

CHASE further on extracts the anomaly information from the metric nodes and log nodes by performing another linear transformation with their encoded embeddings.

V(h)()=𝔼()WLog(h)V(h)(n)=𝔼(n)WMetricn(h)superscript𝑉𝔼subscriptsuperscript𝑊Logsuperscript𝑉subscript𝑛𝔼subscript𝑛subscriptsuperscript𝑊subscriptMetric𝑛\displaystyle\begin{split}V^{(h)}(\mathcal{L})&=\mathbb{E}(\mathcal{L})W^{% \prime(h)}_{\textbf{Log}}\\ V^{(h)}(\mathcal{M}_{n})&=\mathbb{E}(\mathcal{M}_{n})W^{\prime(h)}_{\textbf{% Metric}_{n}}\end{split}start_ROW start_CELL italic_V start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT ( caligraphic_L ) end_CELL start_CELL = blackboard_E ( caligraphic_L ) italic_W start_POSTSUPERSCRIPT ′ ( italic_h ) end_POSTSUPERSCRIPT start_POSTSUBSCRIPT Log end_POSTSUBSCRIPT end_CELL end_ROW start_ROW start_CELL italic_V start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT ( caligraphic_M start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT ) end_CELL start_CELL = blackboard_E ( caligraphic_M start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT ) italic_W start_POSTSUPERSCRIPT ′ ( italic_h ) end_POSTSUPERSCRIPT start_POSTSUBSCRIPT Metric start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_CELL end_ROW (6)

In order to extract the anomaly detection information from all the attention heads, we concat all the embeddings together and form:

V(h)()=V(h)()nNV(h)(n)superscript𝑉superscript𝑉for-allsubscript𝑛subscript𝑁superscript𝑉subscript𝑛\displaystyle V^{(h)}(\mathcal{I})=V^{(h)}(\mathcal{L})\underset{\forall% \mathcal{M}_{n}\in N_{\mathcal{I}}}{\mathbin{\|}}V^{(h)}(\mathcal{M}_{n})italic_V start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT ( caligraphic_I ) = italic_V start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT ( caligraphic_L ) start_UNDERACCENT ∀ caligraphic_M start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT ∈ italic_N start_POSTSUBSCRIPT caligraphic_I end_POSTSUBSCRIPT end_UNDERACCENT start_ARG ∥ end_ARG italic_V start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT ( caligraphic_M start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT ) (7)

where V(h)()superscript𝑉V^{(h)}(\mathcal{I})italic_V start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT ( caligraphic_I ) represents the anomaly information of instance node \mathcal{I}caligraphic_I from all its neighbors Nsubscript𝑁N_{\mathcal{I}}italic_N start_POSTSUBSCRIPT caligraphic_I end_POSTSUBSCRIPT and with the dimension of |N|×d/Hsubscript𝑁𝑑𝐻|N_{\mathcal{I}}|\times d/H| italic_N start_POSTSUBSCRIPT caligraphic_I end_POSTSUBSCRIPT | × italic_d / italic_H. Since each attention head will extract the anomaly detection information from a separate projection field, V(h)()superscript𝑉V^{(h)}(\mathcal{I})italic_V start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT ( caligraphic_I ) will be stacked up to the size of H×|N|×d/H𝐻subscript𝑁𝑑𝐻H\times|N_{\mathcal{I}}|\times d/Hitalic_H × | italic_N start_POSTSUBSCRIPT caligraphic_I end_POSTSUBSCRIPT | × italic_d / italic_H, which will be weighted summed by A~(h)()superscript~𝐴\tilde{A}^{(h)}(\mathcal{I})over~ start_ARG italic_A end_ARG start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT ( caligraphic_I ) so as to gather all the anomaly information from the neighbors of instance node I𝐼Iitalic_I based on the significance of the attentively learnt anomaly score.

III-B3 Instance Level Anomaly Embedding Update

We aggregate all the anomaly information based on its attention weight calculated from Equation 5 by:

X^()=h[1,H]{A~(h)()V(h)()}^𝑋1𝐻superscript~𝐴superscript𝑉\displaystyle\begin{split}\hat{X}(\mathcal{I})=\underset{h\in[1,H]}{\mathbin{% \|}}&\{\tilde{A}^{(h)}(\mathcal{I})V^{(h)}(\mathcal{I})\}\end{split}start_ROW start_CELL over^ start_ARG italic_X end_ARG ( caligraphic_I ) = start_UNDERACCENT italic_h ∈ [ 1 , italic_H ] end_UNDERACCENT start_ARG ∥ end_ARG end_CELL start_CELL { over~ start_ARG italic_A end_ARG start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT ( caligraphic_I ) italic_V start_POSTSUPERSCRIPT ( italic_h ) end_POSTSUPERSCRIPT ( caligraphic_I ) } end_CELL end_ROW (8)

X^()^𝑋\hat{X}(\mathcal{I})over^ start_ARG italic_X end_ARG ( caligraphic_I ) denotes the instance level anomaly embedding learnt from the heterogeneous invocation graph. Each instance node will gather anomaly information from its monitored log and metric neighbor nodes, and the instance node embedding is updated with this learnt anomaly embedding, which reflects the procedure of anomaly detection.

X~=(1γ)W^Iσ(X^())+γ𝔼()~𝑋1𝛾subscript^𝑊𝐼𝜎^𝑋𝛾𝔼\displaystyle\tilde{X}=(1-\gamma)\hat{W}_{I}\sigma(\hat{X}(\mathcal{I}))+% \gamma\mathbb{E}(\mathcal{I})over~ start_ARG italic_X end_ARG = ( 1 - italic_γ ) over^ start_ARG italic_W end_ARG start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT italic_σ ( over^ start_ARG italic_X end_ARG ( caligraphic_I ) ) + italic_γ blackboard_E ( caligraphic_I ) (9)

W^Isubscript^𝑊𝐼\hat{W}_{I}over^ start_ARG italic_W end_ARG start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT is applied to project the anomaly information embedding back to the same vector space with the instance node features 𝔼()𝔼\mathbb{E}(\mathcal{I})blackboard_E ( caligraphic_I ) after being activated. γ𝛾\gammaitalic_γ is the hyperparameter representing our prior knowledge on how significantly an instance-level anomaly will result in the root cause of a trace-level anomaly. The whole framework of instance level anomaly detection is delineated in Fig. 2(b).

III-C Root Cause Analysis with Hypergraph Learning

Lastly, CHASE perform root cause analysis with constructed hyperedges representing causality flow on the invocation graph, where heterogeneous anomaly information is propagated to each instance node. Let 𝒢=(V,E)𝒢𝑉𝐸\mathcal{G}=(V,E)caligraphic_G = ( italic_V , italic_E ) be a hypergraph with incidence matrix \mathcal{H}caligraphic_H. V𝑉Vitalic_V denotes the vertices of the hypergraph, E𝐸Eitalic_E denotes the edges of it and |V|×|E|superscript𝑉𝐸\mathcal{H}\in\mathbb{R}^{|V|\times|E|}caligraphic_H ∈ blackboard_R start_POSTSUPERSCRIPT | italic_V | × | italic_E | end_POSTSUPERSCRIPT. Considering vertex i𝑖iitalic_i, if i𝑖iitalic_i can be reached from edge ϵitalic-ϵ\epsilonitalic_ϵ, it then can be denoted as iϵ=1subscript𝑖italic-ϵ1\mathcal{H}_{i\epsilon}=1caligraphic_H start_POSTSUBSCRIPT italic_i italic_ϵ end_POSTSUBSCRIPT = 1. Otherwise, iϵ=0subscript𝑖italic-ϵ0\mathcal{H}_{i\epsilon}=0caligraphic_H start_POSTSUBSCRIPT italic_i italic_ϵ end_POSTSUBSCRIPT = 0.

In a hypergraph, each hyperedge can encompasses more than two vertices, meaning:

nVnϵ+𝑛𝑉subscript𝑛italic-ϵsuperscript\displaystyle\underset{n\in V}{\sum}\mathcal{H}_{n\epsilon}\in\mathbb{N}^{+}start_UNDERACCENT italic_n ∈ italic_V end_UNDERACCENT start_ARG ∑ end_ARG caligraphic_H start_POSTSUBSCRIPT italic_n italic_ϵ end_POSTSUBSCRIPT ∈ blackboard_N start_POSTSUPERSCRIPT + end_POSTSUPERSCRIPT (10)

We use Wsubscript𝑊W_{\mathcal{H}}italic_W start_POSTSUBSCRIPT caligraphic_H end_POSTSUBSCRIPT to denote a diagonal matrix, the element of which represents the weight of each hyperedge. Dvsubscript𝐷𝑣D_{v}italic_D start_POSTSUBSCRIPT italic_v end_POSTSUBSCRIPT is the diagonal matrix which denotes the degree of each vertex and Desubscript𝐷𝑒D_{e}italic_D start_POSTSUBSCRIPT italic_e end_POSTSUBSCRIPT is the diagonal matrix which denotes the degree of each hyperedge as follows:

Dv,ii=ϵ=1|E|W,ϵϵiϵsubscript𝐷𝑣𝑖𝑖superscriptsubscriptitalic-ϵ1𝐸subscript𝑊italic-ϵitalic-ϵsubscript𝑖italic-ϵ\displaystyle D_{v,ii}=\sum_{\epsilon=1}^{|E|}W_{\mathcal{H},\epsilon\epsilon}% \mathcal{H}_{i\epsilon}italic_D start_POSTSUBSCRIPT italic_v , italic_i italic_i end_POSTSUBSCRIPT = ∑ start_POSTSUBSCRIPT italic_ϵ = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT | italic_E | end_POSTSUPERSCRIPT italic_W start_POSTSUBSCRIPT caligraphic_H , italic_ϵ italic_ϵ end_POSTSUBSCRIPT caligraphic_H start_POSTSUBSCRIPT italic_i italic_ϵ end_POSTSUBSCRIPT (11)
De,ϵϵ=n=1|V|nϵsubscript𝐷𝑒italic-ϵitalic-ϵsuperscriptsubscript𝑛1𝑉subscript𝑛italic-ϵ\displaystyle D_{e,\epsilon\epsilon}=\sum_{n=1}^{|V|}\mathcal{H}_{n\epsilon}italic_D start_POSTSUBSCRIPT italic_e , italic_ϵ italic_ϵ end_POSTSUBSCRIPT = ∑ start_POSTSUBSCRIPT italic_n = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT | italic_V | end_POSTSUPERSCRIPT caligraphic_H start_POSTSUBSCRIPT italic_n italic_ϵ end_POSTSUBSCRIPT (12)

Next, we introduce the algorithm to generate hyperedges for the constructed invocation graph, so as to learn the multivariate causality information for root cause analysis with hypergraph convolution. The trace typology graph illustrated in Fig. 2(c) is generated by removing all the log nodes and metric nodes from the multimodal invocation graph as the anomaly embedding are learnt at this stage from Equation 9. Suppose an extra intervention T𝑇Titalic_T, for instance, a 5-second network package loss of the server, is applied to a random instance j𝑗jitalic_j. Taking the output of instance j𝑗jitalic_j as a random variable Yjsubscript𝑌𝑗Y_{j}italic_Y start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT, then

P(Yj)=iDescendant(j)P(Yjdo(Ti))P(Yj)iAscendant(j)P(Yjdo(Ti))𝑃subscript𝑌𝑗𝑖Descendant𝑗for-all𝑃conditionalsubscript𝑌𝑗𝑑𝑜subscript𝑇𝑖𝑃subscript𝑌𝑗𝑖Ascendant𝑗for-all𝑃conditionalsubscript𝑌𝑗𝑑𝑜subscript𝑇𝑖\displaystyle\begin{split}P(Y_{j})&=\underset{i\in\textbf{Descendant}(j)}{% \forall}P(Y_{j}\mid do(T_{i}))\\ P(Y_{j})&\neq\underset{i\in\textbf{Ascendant}(j)}{\forall}P(Y_{j}\mid do(T_{i}% ))\end{split}start_ROW start_CELL italic_P ( italic_Y start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ) end_CELL start_CELL = start_UNDERACCENT italic_i ∈ Descendant ( italic_j ) end_UNDERACCENT start_ARG ∀ end_ARG italic_P ( italic_Y start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ∣ italic_d italic_o ( italic_T start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ) ) end_CELL end_ROW start_ROW start_CELL italic_P ( italic_Y start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ) end_CELL start_CELL ≠ start_UNDERACCENT italic_i ∈ Ascendant ( italic_j ) end_UNDERACCENT start_ARG ∀ end_ARG italic_P ( italic_Y start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ∣ italic_d italic_o ( italic_T start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ) ) end_CELL end_ROW (13)

Here we take instance node with index 6 as an example to consider the effect (centered with red circle in Fig 2(c)). Denoting the output of instance 6 with random variable Y6subscript𝑌6Y_{6}italic_Y start_POSTSUBSCRIPT 6 end_POSTSUBSCRIPT. Since the instances with index larger than 6, which are descendant nodes i[7,11]𝑖711i\in[7,11]italic_i ∈ [ 7 , 11 ], are called by instance 6 and their states are considered to be resulted from Y6subscript𝑌6Y_{6}italic_Y start_POSTSUBSCRIPT 6 end_POSTSUBSCRIPT, intervention on these instances will not change the cause instance output Y6subscript𝑌6Y_{6}italic_Y start_POSTSUBSCRIPT 6 end_POSTSUBSCRIPT. However, Y6subscript𝑌6Y_{6}italic_Y start_POSTSUBSCRIPT 6 end_POSTSUBSCRIPT is not independent with the intervention on its ascendant nodes including intervention directly imposed on itself, namely i[1,6]𝑖16i\in[1,6]italic_i ∈ [ 1 , 6 ]. This leads to the hyperedge construction process (See Algorithm 1).

Algorithm 1 Trace Level Causality Hyperedge Construction

INPUT: The invocation graph 𝒢(,E)𝒢𝐸\mathcal{G}(\mathcal{I},E)caligraphic_G ( caligraphic_I , italic_E )

OUTPUT: Incidence matrix \mathcal{H}caligraphic_H

1:00\mathcal{H}\leftarrow\textbf{0}caligraphic_H ← 0 \triangleright Incidence matrix initialized to zero matrix
2:for v𝑣v\in\mathcal{I}italic_v ∈ caligraphic_I do
3:     for vpParent(v)subscript𝑣𝑝Parent𝑣v_{p}\in\textbf{Parent}(v)italic_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT ∈ Parent ( italic_v ) do \triangleright For each invocation trace that reaches the specific instance, create a hyperedge connecting all upstream instances on the invocation path
4:         h𝟎1×||superscript01h\leftarrow\mathbf{0}^{1\times|\mathcal{I}|}italic_h ← bold_0 start_POSTSUPERSCRIPT 1 × | caligraphic_I | end_POSTSUPERSCRIPT
5:         h[v]1,h[vp]1formulae-sequencedelimited-[]𝑣1delimited-[]subscript𝑣𝑝1h[v]\leftarrow 1,h[v_{p}]\leftarrow 1italic_h [ italic_v ] ← 1 , italic_h [ italic_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT ] ← 1
6:         for vaAscendant(vp)subscript𝑣𝑎Ascendantsubscript𝑣𝑝v_{a}\in\textbf{Ascendant}(v_{p})italic_v start_POSTSUBSCRIPT italic_a end_POSTSUBSCRIPT ∈ Ascendant ( italic_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT ) do
7:              h[va]1delimited-[]subscript𝑣𝑎1h[v_{a}]\leftarrow 1italic_h [ italic_v start_POSTSUBSCRIPT italic_a end_POSTSUBSCRIPT ] ← 1
8:         end for
9:     end for
10:     h\mathcal{H}\leftarrow\mathcal{H}\mathbin{\|}hcaligraphic_H ← caligraphic_H ∥ italic_h
11:end for
12:h𝟎1×||superscript01h\leftarrow\mathbf{0}^{1\times|\mathcal{I}|}italic_h ← bold_0 start_POSTSUPERSCRIPT 1 × | caligraphic_I | end_POSTSUPERSCRIPT
13:h[v]1delimited-[]𝑣1h[v]\leftarrow 1italic_h [ italic_v ] ← 1
14:for vdDescendant(v)subscript𝑣𝑑Descendant𝑣v_{d}\in\textbf{Descendant}(v)italic_v start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT ∈ Descendant ( italic_v ) do \triangleright Create the hyperedge connecting all downstream instances
15:     h[vd]1delimited-[]subscript𝑣𝑑1h[v_{d}]\leftarrow 1italic_h [ italic_v start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT ] ← 1
16:end for
17:h\mathcal{H}\leftarrow\mathcal{H}\mathbin{\|}hcaligraphic_H ← caligraphic_H ∥ italic_h
18:return \mathcal{H}caligraphic_H\triangleright The incidence matrix of the constructed hypergraph is \mathcal{H}caligraphic_H

To be more specific, Algorithm 1 initializes the incidence matrix to an empty zero matrix with line 1. Line 2 loops through all the vertices of the trace invocation graph 𝒢𝒢\mathcal{G}caligraphic_G, picking a single vertex each time and constructing multiple hyperedges representing both causality and results. Lines 3-10 loop through each parent node of the target instance node, and construct a hyperedge that connects all ascendants of the parent node. Lines 12-17 construct the hyperedge that connects all the descendant nodes. Fig. 2(c) gives an illustration of the hyperedge construction for instance with index 6, which is marked in red. As instance 6 has two parent nodes, namely instances 2 and 5, a total number of three hyperedges will be generated for instance 6.

With the hypergraph that represents the invocation causality being constructed, we initialize the node embeddings with X~~𝑋\tilde{X}over~ start_ARG italic_X end_ARG learnt from Equation 9. In order to localize the trace level root cause instance, a convolution operation is performed on the hypergraph so that the causality information can propagate to each instance node from the constructed hyperedges. We consider each hyperedge as of the same significance, hence W=Isubscript𝑊𝐼W_{\mathcal{H}}=Iitalic_W start_POSTSUBSCRIPT caligraphic_H end_POSTSUBSCRIPT = italic_I. And the hypergraph convolution can be defined as follows:

X~(l)=σ(Dv12De1TDv12X~(l1)Θl)superscript~𝑋𝑙𝜎superscriptsubscript𝐷𝑣12superscriptsubscript𝐷𝑒1superscript𝑇superscriptsubscript𝐷𝑣12superscript~𝑋𝑙1superscriptΘ𝑙\displaystyle\tilde{X}^{(l)}=\sigma(D_{v}^{-\frac{1}{2}}\mathcal{H}D_{e}^{-1}% \mathcal{H}^{T}D_{v}^{-\frac{1}{2}}\tilde{X}^{(l-1)}\Theta^{l})over~ start_ARG italic_X end_ARG start_POSTSUPERSCRIPT ( italic_l ) end_POSTSUPERSCRIPT = italic_σ ( italic_D start_POSTSUBSCRIPT italic_v end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - divide start_ARG 1 end_ARG start_ARG 2 end_ARG end_POSTSUPERSCRIPT caligraphic_H italic_D start_POSTSUBSCRIPT italic_e end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT caligraphic_H start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT italic_D start_POSTSUBSCRIPT italic_v end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - divide start_ARG 1 end_ARG start_ARG 2 end_ARG end_POSTSUPERSCRIPT over~ start_ARG italic_X end_ARG start_POSTSUPERSCRIPT ( italic_l - 1 ) end_POSTSUPERSCRIPT roman_Θ start_POSTSUPERSCRIPT italic_l end_POSTSUPERSCRIPT ) (14)

We set X(0)~=X~~superscript𝑋0~𝑋\tilde{X^{(0)}}=\tilde{X}over~ start_ARG italic_X start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT end_ARG = over~ start_ARG italic_X end_ARG from Equation 9, and Θd×dΘsuperscript𝑑superscript𝑑\Theta\in\mathbb{R}^{d\times d^{\prime}}roman_Θ ∈ blackboard_R start_POSTSUPERSCRIPT italic_d × italic_d start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUPERSCRIPT is the learnable projection that captures the causality of the trace level anomaly. In all, the root cause can be localized with a detection head matrix Dd×1𝐷superscriptsuperscript𝑑1D\in\mathbb{R}^{d^{\prime}\times 1}italic_D ∈ blackboard_R start_POSTSUPERSCRIPT italic_d start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT × 1 end_POSTSUPERSCRIPT being applied to every instance node of the trace, and an end-to-end training schema can be accomplished by minimizing the overall loss:

𝕃=1Ni=1N(n=1||yn(i)log(Softmax(X~(i,l)D)n))𝕃1𝑁superscriptsubscript𝑖1𝑁superscriptsubscript𝑛1superscriptsubscript𝑦𝑛𝑖Softmaxsubscriptsuperscript~𝑋𝑖𝑙𝐷𝑛\displaystyle\mathbb{L}=-\frac{1}{N}\sum_{i=1}^{N}(\sum_{n=1}^{|\mathcal{I}|}y% _{n}^{(i)}\log(\text{Softmax}(\tilde{X}^{(i,l)}D)_{n}))blackboard_L = - divide start_ARG 1 end_ARG start_ARG italic_N end_ARG ∑ start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_N end_POSTSUPERSCRIPT ( ∑ start_POSTSUBSCRIPT italic_n = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT | caligraphic_I | end_POSTSUPERSCRIPT italic_y start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT roman_log ( Softmax ( over~ start_ARG italic_X end_ARG start_POSTSUPERSCRIPT ( italic_i , italic_l ) end_POSTSUPERSCRIPT italic_D ) start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT ) ) (15)

IV Experiments

We evaluate the performance of CHASE framework in this section. Specifically, we compare the proposed framework with several baseline frameworks for RCA, including non-GNN based ones and GNN-based ones. To provide a comprehensive evaluation, we conduct experiments on two open-source datasets.

IV-A Experimental Setting

IV-A1 DataSets

We give the details of the datasets here. The first dataset is a public dataset named Generic AIOps Atlas, provided by Cloudwise222https://github.com/CloudWise-OpenSource/GAIA-DataSet; the second dataset is a real-world dataset collected from the AIOps 2020 competition333https://github.com/NetManAIOps/AIOps-Challenge-2020-Data.

a) GAIA - The Generic AIOps Atlas dataset contains multi-modal information from the business simulation system MicroSS, including metrics, logs and traces. This dataset contains mobile service, log service, web service, database service and Redis service. It contains 10 service instances in total. The anomalies are injected into the log to simulate the malfunction of service invocation. The dataset contains four types of anomalies, including login failure, memory anomalies, access denied exceptions and missing files. This dataset includes 1099 static traces, which means the number of instance involved in each trace, the invocation order and trace typology all remain the same. Following the training and testing set split setting from DiagFusion [22], we assign 160 traces for training, and the remaining for validation and testing.

b) AIOps 2020 - This dataset is collected for the AIOps 2020 challenge hosted by Tsinghua Netman Lab. The challenge aims at testing the availability of all microservices before releasing them into the production environment. This environment encompasses hundreds of microservice instances, including network instances, kernel instances, docker instances, etc. Each microservice instance is deployed on multiple physical machines, resulting in a highly complex system environment. Moreover, since each request can be handled by a subset of components of the overall system without involving all instances, invocation traces are considered dynamic. In other words, the trace typology in the dataset differ from one another. Fig. 1 is a service invocation sample from the dataset, with both log and metric data (CPU and memory usage, etc.) recorded for each service instance. Message instances trigger asynchronous invocations, represented with red arrows in the graph, while network gateway instances, service instances and database instances trigger synchronous invocations, represented with black arrows. For data collection, the whole system had been running for 3 months, in which 68 manually injected failures occurred, and each of them lasted for 5 minutes approximately. During each failure, there are hundreds of traces continuously being deployed in the system, among which may or may not be erroneous since a single failure would not result in the collapse of the whole microservice system. In order to evidently illustrate the performance of both baseline models and the proposed CHASE, we split each anomaly duration into a five-minute span, a three-minute span and a one-minute span based on the true label which records the starting timestamp of each failure, and we infer that a better approach can detect a higher percentage of anomaly traces within these time spans. As each failure is gradually recovered after its injection, the five-minute span potentially contains a lower percentage of anomaly traces compared with the one-minute span since the failure has a higher probability of being recovered and resulting in more non-anomaly traces.

IV-A2 Baseline Methods

We compare our proposed framework with seven baseline methods described as follows. The compared baselines can be divided into three categories: causality-based RCA approaches (i.e., PC and GES), correlation learning based approaches (i.e., CloudRanger and MicroRCA), and GNN based approaches (i.e., CausalRCA, TrinityRCL and Diagfusion).

  • PC [15] is widely used for causal relationship inference and proven effective in identifying the root causes of system failures, process deviations, sensor failures, and insurance claims. It has been adopted in root cause analysis across various domains, such as system failure diagnosis, semiconductor manufacturing, wind turbines, and insurance.

  • GES [16] stands for Greedy Equivalence Search algorithm, which is mainly applied for casual relationship inference. Different from PC which relies on test of independence, GES applies optimal structure identification with greedy search to generate the causal graph.

  • CloudRanger is a root cause identification tool first introduced in [19]. It collects and analyzes system logs, metrics, and other data sources to build a machine learning model for root cause prediction.

  • MicroRCA [20] is an automated, fine-grained root cause localization framework to analyze monitoring data and localizes faulty services in the microservice architecture. It designs a gradient-based causal structure learning to capture linear and non-linear causal relations in monitoring metrics.

  • TrinityRCL [25] localizes the root causes of anomalies at multiple levels of granularity by harnessing all types of telemetry data to construct a causal graph representing the intricate, dynamic, and nondeterministic relationships among the various entities related to the anomalies.

  • CausalRCA [21] uses causal inference to automatically identify the root cause of performance issues in microservices. Specifically, it constructs a directed acyclic graph (DAG) that represents the causal relationships between services and their performance metrics, from which the root cause can be identified by inferring the causal relationships with the trained graph neural network.

  • Diagfusion [22] is a robust failure diagnosis method that leverages multimodal data. It combines deployment data and traces to build a dependency graph, applies GNN to generate learnt representation for each service instance and achieve two-fold failure diagnosis, i.e., root cause instance localization and failure type determination.

Note that we apply the same hyperparameters of all the baseline RCA frameworks according to the best performance reported in their papers and source code. Both datasets are split into training/validation/testing sets, avoiding the possible overfitting issue. For baseline methods that require a PageRank to infer the root cause instance, we employ the dam** factor as 0.85, maximum iteration as 100 and maximum error tolerance as 0.01. For CHASE, we apply 3 attention layers for heterogeneous message passing, each layer with 8 attention heads. We set LeakyReLU as the activation function with a negative slope coefficient being 0.3. We apply a single hypergraph convolution layer for causality learning, with embedding dimensionality equal to 128. The weight hyperparameter γ𝛾\gammaitalic_γ in Equation. 9 is set to 0.5 by default.

IV-A3 Evaluation Metrics

Our framework aims to infer the root cause instance of each anomaly case accurately. We adopt the widely used evaluation metrics in the root cause inference task [22] while slightly modifying these metrics to suit real-world scenarios. We choose Top-1 accuracy (A@1𝐴@1A@1italic_A @ 1), Top-3 accuracy (A@3𝐴@3A@3italic_A @ 3) and Top-5 average accuracy (Avg@5𝐴𝑣𝑔@5Avg@5italic_A italic_v italic_g @ 5) as three different evaluation metrics. Since often only the top three predicted results would be manually examined in real-world cases, we thus include A@1𝐴@1A@1italic_A @ 1, A@3𝐴@3A@3italic_A @ 3 and Avg@5𝐴𝑣𝑔@5Avg@5italic_A italic_v italic_g @ 5 to evaluate the robustness of the root cause analysis methods.

Top-k accuracy (A@k𝐴@𝑘A@kitalic_A @ italic_k) is calculated in the following way, with RCa𝑅subscript𝐶𝑎RC_{a}italic_R italic_C start_POSTSUBSCRIPT italic_a end_POSTSUBSCRIPT as the ground truth root cause instance of anomaly trace a𝑎aitalic_a, RCa^[k]𝑅subscript𝐶^𝑎delimited-[]𝑘RC_{\hat{a}}[k]italic_R italic_C start_POSTSUBSCRIPT over^ start_ARG italic_a end_ARG end_POSTSUBSCRIPT [ italic_k ] as the Top-k root cause instances set generated by the root cause inference system based on the information of anomaly trace a𝑎aitalic_a, |D|𝐷|D|| italic_D | as the size of the dataset:

A@k=1|D|aD{1, if RCaRCa^[k]0, otherwise 𝐴@𝑘1𝐷subscript𝑎𝐷cases1 if 𝑅subscript𝐶𝑎𝑅subscript𝐶^𝑎delimited-[]𝑘0 otherwise A@k=\frac{1}{|D|}\sum_{a\in D}\begin{cases}1,&\text{ if }RC_{a}\in RC_{\hat{a}% }[k]\\ 0,&\text{ otherwise }\end{cases}italic_A @ italic_k = divide start_ARG 1 end_ARG start_ARG | italic_D | end_ARG ∑ start_POSTSUBSCRIPT italic_a ∈ italic_D end_POSTSUBSCRIPT { start_ROW start_CELL 1 , end_CELL start_CELL if italic_R italic_C start_POSTSUBSCRIPT italic_a end_POSTSUBSCRIPT ∈ italic_R italic_C start_POSTSUBSCRIPT over^ start_ARG italic_a end_ARG end_POSTSUBSCRIPT [ italic_k ] end_CELL end_ROW start_ROW start_CELL 0 , end_CELL start_CELL otherwise end_CELL end_ROW (16)

Avg@5𝐴𝑣𝑔@5Avg@5italic_A italic_v italic_g @ 5 is calculated based on the Top-k accuracy with k ranging from 1 to 5:

Avg@5=151k5A@k𝐴𝑣𝑔@515subscript1𝑘5𝐴@𝑘Avg@5=\frac{1}{5}\sum_{1\leq k\leq 5}A@kitalic_A italic_v italic_g @ 5 = divide start_ARG 1 end_ARG start_ARG 5 end_ARG ∑ start_POSTSUBSCRIPT 1 ≤ italic_k ≤ 5 end_POSTSUBSCRIPT italic_A @ italic_k (17)

Percentage of erroneous traces occurred in n𝑛nitalic_n-minute span (Percentage@n𝑛nitalic_n) is calculated with the number of traces with being detected as anomalous divided by the total number of traces occurred within n𝑛nitalic_n minutes after the labelled timestamp T𝑇Titalic_T, where f()𝑓f(\cdot)italic_f ( ⋅ ) denotes the binary prediction result:

Percentage@n=xt,t[T,T+n]𝟙{f(xt)=1}|{xt,t[T,T+n]}|Percentage@𝑛subscript𝑥𝑡𝑡𝑇𝑇𝑛1𝑓subscript𝑥𝑡1subscript𝑥𝑡𝑡𝑇𝑇𝑛\text{Percentage@}n=\frac{\underset{{x_{t},t\in[T,T+n]}}{\sum}\mathds{1}\{f(x_% {t})=1\}}{|\{x_{t},t\in[T,T+n]\}|}Percentage@ italic_n = divide start_ARG start_UNDERACCENT italic_x start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT , italic_t ∈ [ italic_T , italic_T + italic_n ] end_UNDERACCENT start_ARG ∑ end_ARG blackboard_1 { italic_f ( italic_x start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ) = 1 } end_ARG start_ARG | { italic_x start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT , italic_t ∈ [ italic_T , italic_T + italic_n ] } | end_ARG (18)
TABLE II: Overall Performance Comparison
DataSet Evaluation Metric Causality-based Correlation-based GNN-based
PC GES CloudRanger MicroRCA TrinityRCL CausalRCA DiagFusion Proposed Method
GAIA A@1 0.2960 0.3003 0.3290 0.3421 0.4503 0.3652 0.4121 0.6135
A@3 0.6368 0.5399 0.4771 0.5528 0.8244 0.4973 0.8157 0.8823
Avg@5 0.5953 0.5154 0.4883 0.5712 0.7651 0.5966 0.7478 0.8276
AIOps 2020 Percentage@5 - 0.11 - 0.08 0.12 - 0.12 0.15
Percentage@3 - 0.08 - 0.13 0.14 - 0.14 0.16
Percentage@1 - 0.14 - 0.17 0.15 - 0.14 0.22
  • -- indicates baseline frameworks being inapplicable to certain dataset due to dynamic trace typology.

IV-B Evaluation Results

To demonstrate the effectiveness of our proposed method, we compare CHASE with the baseline frameworks from different categories. The evaluation results are shown in Table II.

The causality-based methods extract the causal graph from history traces, and both PC and GES apply PageRank on the causal graph with all edge weights equal to the out-degree of nodes. It can be observed clearly that the performance of PC and GES is worse than correlations-based methods, which generate the edge weights in the causal graph by calculating the correlations through monitored metrics. Specifically, MicroRCA integrates service invocation graphs with causal graphs and applies customized random walks, which outperforms CloudRanger that only considers the attributed graph with anomalous propagation edges, indicating the necessity of leveraging the causal relationships. Regarding GNN-based methods, CausalRCA calculates edge weights through DAG-GNN with variational inference, requiring no training data labels. Due to the limitations of unsupervised learning, it reports worse performance to DiagFusion across all evaluation metrics as DiagFusion takes advantage of multi-modal data to generate the node features in the graph and trains end-to-end supervised RCA tasks. In general, our proposed method, which integrates microservice invocation graphs, anomaly heterogeneous graph and adaptively learnt causality with hypergraph, can obtain better performance compared with all baselines. On GAIA dataset, our proposed method can achieve 36.2%, 7.2%, 8.1% higher than the best baseline on A@1, A@3, Avg@5, respectively.

When it comes to the more complex AIOps 2020 dataset, the invocation typology of traces in training and testing set varies. As a result, the PC, CouldRanger and CausalRCA, which require static trace typology and are not inductive on traces with unseen typology from the training set, are not applicable to perform root cause analysis under such condition. Therefore, evaluation results of the aforementioned methods on AIOps 2020 dataset are left blank in Table II. Our proposed method can still retain a significant performance gain of 25.0%, 14.3%, 29.4% compared with the best baseline on the percentage of erroneous traces detected in 5-min span, 3-min span and 1-min span.

Refer to caption
Figure 3: Sensitivity analysis: (a) number of attention layers; (b) different positional encoding; (c) hidden dimension; (d) number of causality layers

IV-C Sensitivity Analysis

We conduct the sensitivity analysis in this part on both datasets. Specifically, Fig. 3 (a1) and (a2) shows how the number of attention layers affects the performance on GAIA and AIOps 2020 dataset, respectively. When the number of attention layers increases up to 3, there is typically an improvement in the performance of our model. The performance starts to drop afterwards, indicating the potential overfitting problem. Regarding different types of positional encoding, depicted in Fig. 3 (b1) and (b2), traditional embedding and learnable embedding demonstrate superior performances. We apply tradition embedding as it is simply composed of constants calculated from Equation.2, which reduce the total amount of learnable parameters and result in lower computational cost. The effect of hidden state dimension for heterogeneous message passing and hypergraph convolution is depicted in Fig. 3 (c1) and (c2), the performance of the model evidently surges until the dimension reaches 128, then the performance is only slightly improved when hidden state dimension is doubled to 256. Thus, considering the trade-off between computational efficiency and performance, we apply a hidden state dimension of 128. For the number of hypergraph convolution layers demonstrated in Fig. 3 (d1) and (d2), the performance of the model continues to drop as the number of layer increases. Hence, we apply a single hypergraph convolution layer. Intuitively, as a single hypergraph layer is already capable of capturing high-order multivariate correlation, stacking up hypergraph layers brings in extra redundancies in the training process, thus causing undesirable performance drops.

IV-D Ablation Study

Refer to caption
Figure 4: Causal weights analysis
TABLE III: Ablation study results
Ablation Strategy A@1 A@3 Avg@5
Default Method 0.6135 0.8823 0.8276
V1: w/o instance embedding 0.5927 0.8554 0.7852
V2: w/o heterogeneous message passing 0.3845 0.5403 0.6581
V3: w/o causal hyperedge 0.4679 0.8106 0.7598

To evaluate the effectiveness of the main components of CHASE, we conducted an ablation study on the GAIA dataset using the following three variations: V1: remove the instance embedding layer while kee** the non-learnable positional embedding layer. V2: remove the heterogeneous message passing from the graph convolution layer. V3: remove the final hypergraph layer which learns the propagation of causality. Table III lists the change of performance of each variant.

Since the instance embedding layer captures the difference between instances, reducing these features in V1 will result in missing information of the whole trace typology and invocation structure, leading to a subtle drop of performance of 3.3% in A@1@1@1@ 1, clearly shown in Table III.

Considering the V2 variant of CHASE, we replace the heterogeneous message passing layer with a homogeneous graph attention layer, which results in a 37% performance drop in A@1@1@1@ 1. This emphasizes the significance to model the heterogeneous correlation of the invocation graph. To provide a clearer illustration of the impact of learning the heterogeneity attributes among metrics, logs, and instances through message passing in CHASE, Fig. 4 plots a comparison between the homogeneous edge weight and the heterogeneous edge weight on the 160thsuperscript160𝑡160^{th}160 start_POSTSUPERSCRIPT italic_t italic_h end_POSTSUPERSCRIPT trace in GAIA dataset (webservice2 as the root cause instance). As the edges related to webservice2 (last columns in both figures) are granted with higher weights, it indicates that heterogeneous message passing layer is able to enhance the root cause inference’s performance, which is achieved by directing more attention towards the edges related to the instance of the root cause.

In the context of causality inference, it has been observed that directly adding the detection head to the output of the heterogeneous message passing layer in the V3 variant causes the causal hypergraph to degrade into a heterogeneous graph neural network. In this scenario, information propagates only through K hops (where K represents the number of layers), which contradicts the nature of anomaly causality that may propagate across an arbitrary number of hops depending on the invocation. This leads to a performance drop of 23.7% in A@@@@1.

In comparison to the performance of V2, V3 which retains the heterogeneity is considerably more critical. As a result, V3 exhibits higher accuracy of 21.6% in A@@@@1 than V2, since causal edges provide less topological information than actual invocation edges. Nevertheless, V3 demonstrates superior robustness (33.3% higher in A@@@@3 and 13.3% higher in Avg@@@@5) than V2, as causal edges denote stronger causality than actual invocation edges.

V Conclusion

For complex microservice systems, conducting a root cause analysis is essential in identifying and addressing the underlying issues that hinder the optimal performance of the system. To tackle this challenge, we propose a causal heterogeneous graph based framework named CHASE to accurately locate the root cause instances of failures, facilitating effective troubleshooting and system maintenance. Starting with modeling microservice systems with graph representations, we apply encoders and embedding layers combined with positional encoding to encode the multimodal data of trace, log and metrics into an invocation graph. CHASE leverages heterogeneous message passing on invocation graphs to tackle instance-level anomaly detection. Next, it constructs a hypergraph with each hyperedge capturing the causality flow for each instance. Finally, the designated hypergraph module locates the root cause anomaly with a detection head applied to each updated node embedding after hypergraph convolution. We comprehensively evaluate CHASE using two real-world datasets, and the evaluation results confirm the superiority of our proposed framework. For the future work, hypergraph learning techniques on modelling spatiotemporal graphs can be applied to capture the causality structure of the trace, which is dynamically evolving since the whole trace typology is gradually formed by sequential invocations ranging in a certain time interval. Additionally, a single powerful autoregressive encoder that is intrinsically trained on multimodal data, such as the large language model, can substitute the dedicated log and metric encoders of CHASE, in order to enhance the quality of embeddings, as well as robustly unify the information of metrics and log.

References

  • [1] T. Zhang, Z. Shen, J. **, A. Tagami, X. Zheng, and Y. Yang, “ESDA: an energy-saving data analytics fog service platform,” in International Conference on Service-Oriented Computing.   Springer, 2019, pp. 171–185.
  • [2] Z. Li, J. Chen, R. Jiao, N. Zhao, Z. Wang, S. Zhang, Y. Wu, L. Jiang, L. Yan, Z. Wang, Z. Chen, W. Zhang, X. Nie, K. Sui, and D. Pei, “Practical root cause localization for microservice systems via trace analysis,” in International Symposium on Quality of Service.   IEEE, 2021, pp. 1–10.
  • [3] M. Baboi, A. Iftene, and D. Gîfu, “Dynamic microservices to create scalable and fault tolerance architecture,” Procedia Computer Science, vol. 159, pp. 1035–1044, 2019.
  • [4] V. Ramu, “Performance impact of microservices architecture,” The Review of Contemporary Scientific and Academic Studies, vol. 3, 2023.
  • [5] X. Peng, “Large-scale trace analysis for microservice anomaly detection and root cause localization,” in Proceedings of the Federated Africa and Middle East Conference on Software Engineering, 2022, pp. 93–94.
  • [6] M. Ma, W. Lin, D. Pan, and P. Wang, “Self-adaptive root cause diagnosis for large-scale microservice architecture,” IEEE Transactions on Services Computing, vol. 15, pp. 1399–1410, 2020.
  • [7] Y. Zhang, Z. Guan, H. Qian, L. Xu, H. Liu, Q. Wen, L. Sun, J. Jiang, L. Fan, and M. Ke, “CloudRCA: a root cause analysis framework for cloud computing platforms,” in Proceedings of the ACM International Conference on Information & Knowledge Management, 2021, pp. 4373–4382.
  • [8] A. Ikram, S. Chakraborty, S. Mitra, S. Saini, S. Bagchi, and M. Kocaoglu, “Root cause analysis of failures in microservices through causal discovery,” Advances in Neural Information Processing Systems, vol. 35, pp. 31 158–31 170, 2022.
  • [9] Á. Brandón, M. Solé, A. Huélamo, D. Solans, M. S. Pérez, and V. Muntés-Mulero, “Graph-based root cause analysis for service-oriented and microservice architectures,” Journal of Systems and Software, vol. 159, p. 110432, 2020.
  • [10] M. Kim, R. Sumbaly, and S. Shah, “Root cause detection in a service-oriented architecture,” ACM SIGMETRICS Performance Evaluation Review, vol. 41, pp. 93–104, 2013.
  • [11] Global Times. (2023) Didi system glitch lasts 12 hours, with company apologizing for service breakdown. [Online]. Available: https://www.globaltimes.cn/page/202311/1302630.shtml
  • [12] G. Rong, H. Wang, S. Gu, Y. Xu, J. Sun, D. Shao, and H. Zhang, “Locating anomaly clues for atypical anomalous services: An industrial exploration,” IEEE Transactions on Dependable and Secure Computing, pp. 2746–2761, 2023.
  • [13] G. P. Bhandari and R. Gupta, “Fault analysis of service-oriented systems: A systematic literature review,” IET Software, vol. 12, no. 6, pp. 446–460, 2018.
  • [14] J. Soldani and A. Brogi, “Anomaly detection and failure root cause analysis in (micro) service-based cloud applications: A survey,” ACM Computing Surveys, vol. 55, no. 3, pp. 1–39, 2022.
  • [15] M. Solé, V. Muntés-Mulero, A. I. Rana, and G. Estrada, “Survey on models and techniques for root-cause analysis,” arXiv:1701.08546, 2017.
  • [16] D. M. Chickering, “Optimal structure identification with greedy search,” Journal of Machine Learning Research, vol. 3, pp. 507–554, 2002.
  • [17] J. Lin, P. Chen, and Z. Zheng, “Microscope: Pinpoint performance issues with causal graphs in micro-service environments,” in International Conference on Service-Oriented Computing.   Springer, 2018, pp. 3–20.
  • [18] B. Sharma, P. Jayachandran, A. Verma, and C. R. Das, “CloudPD: Problem determination and diagnosis in shared dynamic clouds,” in International Conference on Dependable Systems and Networks.   IEEE, 2013, pp. 1–12.
  • [19] P. Wang, J. Xu, M. Ma, W. Lin, D. Pan, Y. Wang, and P. Chen, “CloudRanger: Root cause identification for cloud native systems,” in International Symposium on Cluster, Cloud and Grid Computing.   IEEE, 2018, pp. 492–502.
  • [20] L. Wu, J. Tordsson, E. Elmroth, and O. Kao, “MicroRCA: Root cause localization of performance issues in microservices,” in Network Operations and Management Symposium.   IEEE, 2020, pp. 1–9.
  • [21] R. Xin, P. Chen, and Z. Zhao, “CausalRCA: Causal inference based precise fine-grained root cause localization for microservice applications,” Journal of Systems and Software, vol. 203, 2023.
  • [22] S. Zhang, P. **, Z. Lin, Y. Sun, B. Zhang, S. Xia, Z. Li, Z. Zhong, M. Ma, W. **, D. Zhang, Z. Zhu, and D. Pei, “Robust failure diagnosis of microservice system through multimodal data,” arXiv:2302.10512, 2023.
  • [23] A. Gholami and A. K. Srivastava, “Comparative analysis of ML techniques for data-driven anomaly detection, classification and localization in distribution system,” in North American Power Symposium.   IEEE, 2021, pp. 1–6.
  • [24] T. Jia, Y. Wu, C. Hou, and Y. Li, “LogFlash: Real-time streaming anomaly detection and diagnosis from system logs for large-scale software systems,” in International Symposium on Software Reliability Engineering.   IEEE, 2021, pp. 80–90.
  • [25] S. Gu, G. Rong, T. Ren, H. Zhang, H. Shen, Y. Yu, X. Li, J. Ouyang, and C. Chen, “TrinityRCL: Multi-granular and code-level root cause localization using multiple types of telemetry data in microservice systems,” IEEE Transactions on Software Engineering, vol. 49, no. 5, pp. 3071–3088, 2023.
  • [26] T. N. Kipf and M. Welling, “Semi-supervised classification with graph convolutional networks,” arXiv preprint arXiv:1609.02907, 2016.
  • [27] W. Hamilton, Z. Ying, and J. Leskovec, “Inductive representation learning on large graphs,” Advances in Neural Information Processing Systems, vol. 30, 2017.
  • [28] P. Velickovic, G. Cucurull, A. Casanova, A. Romero, P. Lio, and Y. Bengio, “Graph attention networks,” Statistics, vol. 1050, no. 20, pp. 10–48 550, 2017.
  • [29] T. Zhang, Y. Liu, Z. Shen, R. Xu, X. Chen, X. Huang, and X. Zheng, “An adaptive federated relevance framework for spatial temporal graph learning,” IEEE Transactions on Artificial Intelligence, vol. 5, pp. 2227–2240, 2024.
  • [30] Y. Liu, Z. Zhao, T. Zhang, K. Wang, X. Chen, X. Huang, J. Yin, and Z. Shen, “Exploiting spatial-temporal data for sleep stage classification via hypergraph learning,” in IEEE International Conference on Acoustics, Speech and Signal Processing.   IEEE, 2024, pp. 5430–5434.
  • [31] D. Wang, Z. Chen, J. Ni, L. Tong, Z. Wang, Y. Fu, and H. Chen, “Hierarchical graph neural networks for causal discovery and root cause localization,” arXiv preprint arXiv:2302.01987, 2023.
  • [32] A. Joulin, E. Grave, P. Bojanowski, and T. Mikolov, “Bag of tricks for efficient text classification,” arXiv:1607.01759, 2016.