Learning Unified System Representations for Microservice Tail Latency Prediction

Wenzhuo Qian, Hailiang Zhao, Tianlv Chen, Jiayi Chen, Ziqi Wang, Kingsum Chow, Shuiguang DengarXiv 2025 · DOI

Abstract

Predicting tail latency in microservices is challenging due to the complex interplay between traffic patterns and resource constraints. Traditional models often conflate these distinct signals, leading to suboptimal performance. This paper introduces USRFNet (Unified System Representation Fusion Network), a dual-stream architecture that separately encodes traffic-side features using Graph Neural Networks and resource-side features using gated MLPs. By fusing these representations through a novel Cross-Diffusion Attention mechanism, USRFNet effectively captures system-wide dependencies and localized bottlenecks. Experimental results on industry-standard benchmarks show that USRFNet significantly outperforms existing baselines, reducing prediction error by up to 17.3%.

Introduction

In modern cloud-native environments, microservice performance is highly dynamic. Engineers prioritize tail latency, such as the 95th percentile (P95), to ensure a consistent user experience for the vast majority of requests. However, predicting these metrics over specific time windows is notoriously difficult.

A fundamental issue identified in current research is the "conflation" of system signals. Microservice performance is driven by two distinct categories of data:

  1. Traffic-side features: Request volumes and call latencies that follow the system's logical topology.
  2. Resource-side features: Local metrics like CPU and memory usage, which may be influenced by physical hardware sharing rather than logical dependencies.

Existing models often apply uniform graph-based logic to both, leading to "signal interference" where the model fails to distinguish between a global traffic surge and a localized hardware bottleneck.

Methods: The USRFNet Architecture

To address signal interference, the authors propose USRFNet (Unified System Representation Fusion Network), which utilizes a "divide and conquer" strategy to model system state.

The USRFNet architecture separates traffic and resource encoding before fusing them into a unified representation.
  • Traffic-Side Encoder: Uses a Graph Neural Network (GNN) with Transformer-based Graph Convolution layers to model how requests propagate through the service dependency graph.
  • Resource-Side Encoder: Employs a gated MLP (gMLP) to learn complex, non-local interactions between services (like resource contention) without being constrained by the logical call graph.
  • HIDAC Fusion Module: Merges the two streams using Cross-Diffusion Attention, allowing the traffic stream to "query" the resource stream and vice versa. It then uses Low-Rank Tensor Fusion to capture the non-linear interactions between demand and capacity.
  • Asymmetric Loss Function: The model uses an Asymmetric Percentage Huber Loss to penalize under-prediction more heavily than over-prediction, aligning the model with production requirements where missing a latency spike is more costly than slight over-provisioning.

Experimental Evaluation

The researchers evaluated USRFNet on two industry-standard benchmarks: Online Boutique (11 services) and Sockshop (13 services). They collected a dataset of over 140,000 data points across 60,000 30-second windows. Traffic was simulated using "Locust" to include realistic patterns like ramps, flash crowds, and varied user behaviors.

Key Results

USRFNet consistently outperformed traditional machine learning models (GBDT, MLP) and state-of-the-art GNN baselines.

Comparison of actual latency versus predicted latency for dual-stream and single-stream models, highlighting the accuracy of USRFNet.
  • Accuracy: On the Online Boutique benchmark, USRFNet achieved a Mean Absolute Percentage Error (MAPE) of 9.85%, a 17.3% reduction compared to the best GNN baseline.
  • Robustness: On the more complex Sockshop benchmark, it maintained a superior margin with an 8.20% MAPE.
  • Ablation Success: The HIDAC fusion module proved significantly more effective than simple element-wise addition, demonstrating that the method of combining traffic and resource data is critical.

Discussion and Insights

A major finding of this work is the "Graph Bias" Trap. Applying GNNs to resource metrics can actually decrease performance by forcing data into structural assumptions that don't exist in the physical layer. By treating latency as the emergent result of the interaction between Demand (Traffic) and Capacity (Resources), USRFNet captures the holistic state of the system more faithfully. Furthermore, focusing on 30-second window P95 latency provides a stable signal suitable for automated systems like Kubernetes autoscalers.

Conclusion

USRFNet provides a robust foundation for microservice performance modeling by explicitly separating traffic and resource representations. While the current model assumes a static topology, future work will explore dynamic environments and the application of these unified embeddings to proactive anomaly detection and automated root cause localization.

Summary updated

BibTeX
@misc{qian2025learning,
  author = {Wenzhuo Qian and Hailiang Zhao and Tianlv Chen and Jiayi Chen and Ziqi Wang and Kingsum Chow and Shuiguang Deng},
  title = {{Learning Unified System Representations for Microservice Tail Latency Prediction}},
  year = {2025},
  eprint = {2508.01635},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.01635},
}
Figure