API Sequence Representation via Stochastic Distribution Prediction
摘要
With the increasing adoption of APIs across diverse applications, API security has become one of the most critical concerns within the broader field of cybersecurity. This paper focuses on modeling API call sequences to address security challenges associated with API usage. Specifically, we model the sequential behavior of the API by predicting the probabilistic distribution of subsequent API calls, enabling the extraction of rich semantic representations of execution patterns. These pretrained representations are then utilized in downstream tasks such as bot detection and anomaly detection to identify bot-like behavior without relying on labeled data. Our method captures subtle differences in API usage between benign and malicious users, making it effective against stealthy or previously unseen bots. Experimental results demonstrate that our pretraining method consistently outperforms traditional sequence modeling paradigms in security detection tasks.