A General Framework for Defending against Query-based Black-box Attacks on Neural Network Models
As Machine Learning as a Service (MLaaS) becomes increasingly prevalent, query-based black-box attacks pose a significant threat to machine learning systems. These attacks manipulate input queries to generate adversarial examples, resulting in misclassification or undesired outputs. To address these threats, researchers have developed various query moderation techniques. However, recent studies have revealed that these techniques are vulnerable to sophisticated adaptive attacks. In this paper, we propose a general framework, Query Provenance Analysis (QPA), to defend against query-based black-box attacks both robustly (against non-adaptive and adaptive attacks) and efficiently (in real-time). Our key insight is that, instead of focusing on individual queries, utilizing features from the query sequence (termed query provenance ) can distinguish malicious queries from benign queries more effectively. We construct a query provenance graph to capture the relationship between a new query and prior historical queries, and then design efficient algorithms to detect malicious queries based on the query provenance graphs. We evaluate QPA on image classification and Natural Language Processing (NLP) tasks. QPA significantly reduces the Attack Success Rate (ASR) compared to baselines, achieving up to 20 \(\times\) lower ASR for image classification and 10 \(\times\) lower ASR for NLP, while also improving throughput and latency across all tasks.
Authors
- Shaofei Li (ORCID: https://orcid.org/0009-0001-6530-5935)
- Ziqi Zhang (ORCID: https://orcid.org/0000-0001-8493-0261)
- Yao Guo (ORCID: https://orcid.org/0000-0001-5064-5286)
- Ding Li (ORCID: https://orcid.org/0000-0001-7558-9137)
- Zhenkai Liang (ORCID: https://orcid.org/0000-0001-7138-5030)
- Xiangqun Chen (ORCID: https://orcid.org/0000-0002-7366-5906)
- Ruqin Li (ORCID: https://orcid.org/0009-0007-6878-4699)
Institutions
- University of Illinois Urbana-Champaign (US)
- National University of Singapore (SG)
- Peking University (CN)
- Institute of Software (CN)
- Beihang University (CN)
Publication Details
- Journal
- ACM Transactions on Software Engineering and Methodology
- Published
- 2026-06-12
- DOI
- https://doi.org/10.1145/3820765
- Primary Topic
- Adversarial Robustness in Machine Learning
- Type
- article
- Field-Weighted Citation Impact
- 0.00