Intelligent Backend Latency Forecasting with Multi-Scale Convolution and Adaptive Attention Mechanisms
Published 2024-08-30
How to Cite

This work is licensed under a Creative Commons Attribution 4.0 International License.
Abstract
This paper addresses the problem of backend API latency prediction and proposes a prediction model based on multi-scale convolution and attention mechanisms. The latency sequence is taken as input, and a multi-scale convolution structure is used to extract local and global features at different temporal granularities, capturing both short-term fluctuations and long-term trends. On this basis, an attention mechanism is introduced to highlight the most critical patterns for latency prediction through dynamic weight allocation, effectively reducing redundancy and noise. The convolutional outputs and attention representations are then integrated by a feature fusion layer to generate more discriminative high-level features, which are passed to a regression layer for accurate latency prediction. To validate the model, experiments were conducted with multimodal features including request-level latency, system load, and network fluctuations, and several baseline methods were used for comparison across metrics such as mean squared error, mean absolute error, coefficient of determination, and mean absolute percentage error. The results show that the proposed method outperforms other baseline models in overall performance, better balances local details and global dependencies in latency signals, and significantly improves prediction accuracy and robustness. This study not only enriches modeling approaches for latency prediction but also provides new insights and references for performance assurance and intelligent operations in complex distributed systems.