Skip to main navigation menu Skip to main content Skip to site footer

Collaborative Dual-Branch Contrastive Learning for Resource Usage Prediction in Microservice Systems

Abstract

This paper addresses the modeling challenges in resource usage prediction for microservice systems. It proposes a collaborative modeling method that combines a dual-branch structure with a contrastive learning mechanism. The method includes a local branch to model the temporal evolution of individual services and a global branch to capture collaborative dependencies among multiple services. A feature fusion module integrates these two types of representations, improving the model's ability to represent complex service behaviors. To enhance the discriminative power of feature representations, the model introduces a contrastive loss. This guides the feature encoding process to focus on semantic consistency and temporal distinctiveness. As a result, the model achieves better performance in collaborative modeling scenarios. The proposed method is systematically evaluated on a real-world microservice dataset. It is compared with several representative prediction models from recent years. The results show clear advantages in regression metrics such as MAE, RMSE, and R². In addition, this paper conducts ablation studies across several sensitivity dimensions, including hyperparameters, system topology complexity, data scale, and the proportion of heterogeneous services. These analyses further demonstrate the model's stability and robustness under various environmental conditions. Experimental results confirm that the proposed method effectively models both the temporal and collaborative patterns of microservice resource usage. It is suitable for dynamic resource awareness and management in high-complexity distributed systems.

pdf