Learning Security Classifiers with Verified Global Robustness Properties

Yizheng Chen, Shiqi Wang, Yue Qin, Xiaojing Liao, Suman Jana, David A. Wagner · DOI

Abstract

Many recent works have proposed methods to train classifiers with local robustness properties, which can provably eliminate classes of evasion attacks for most inputs, but not all inputs. Since data distribution shift is very common in security applications, e.g., often observed for malware detection, local robustness cannot guarantee that the property holds for unseen inputs at the time of deploying the classifier. Therefore, it is more desirable to enforce global robustness properties that hold for all inputs, which is strictly stronger than local robustness. In this paper, we present a framework and tools for training classifiers that satisfy global robustness properties. We define new notions of global robustness that are more suitable for security classifiers. We design a novel booster-fixer training framework to enforce global robustness properties. We structure our classifier as an ensemble of logic rules and design a new verifier to verify the properties. In our training algorithm, the booster increases the classifier's capacity, and the fixer enforces verified global robustness properties following counterexample guided inductive synthesis. We show that we can train classifiers to satisfy different global robustness properties for three security datasets, and even multiple properties at the same time, with modest impact on the classifier's performance. For example, we train a Twitter spam account classifier to satisfy five global robustness properties, with 5.4% decrease in true positive rate, and 0.1% increase in false positive rate, compared to a baseline XGBoost model that doesn't satisfy any property.

1. Introduction

Machine learning (ML) models are increasingly deployed in security-critical domains such as malware detection and spam filtering. However, these models are notoriously vulnerable to evasion attacks, where adversaries carefully manipulate inputs to bypass detection. While recent research has focused on "local robustness"—ensuring a model's prediction remains stable within a small neighborhood of specific training points—this approach is often insufficient for security. Security data is characterized by frequent distribution shifts as attackers evolve their tactics. Local robustness cannot guarantee that a property will hold for unseen inputs at deployment.

This paper proposes a shift toward global robustness properties, which are mathematically guaranteed to hold for all possible inputs in the feature space. We introduce a novel "booster-fixer" training framework that enforces these properties while maintaining high classification performance.

2. Defining Security-Centric Robustness

Standard robustness metrics, such as $\ell_p$ norms commonly used in computer vision, do not align well with the economic realities of cyberattacks. In security, attackers can often easily spoof "low-cost" features (e.g., the number of tweets) while "high-cost" features (e.g., account age) are significantly harder to manipulate. We define several global properties tailored for security:

  • Monotonicity: The classifier's output should only increase (become more suspicious) as certain features increase (e.g., following more accounts).
  • Stability: Predictions should remain consistent despite arbitrary changes to low-cost features.
  • High Confidence & Redundancy: If a model is highly confident in a malicious classification, small changes to a subset of features should not flip the result to benign.

3. The Booster-Fixer Framework

To enforce these properties, we utilize a model architecture based on ensembles of logic rules. These are expressed as a sum of logical clauses, making them highly interpretable and more amenable to formal verification than deep neural networks. Our training process follows a "booster-fixer" loop.

The CEGIS Fixer architecture integrates a verifier and a trainer to iteratively enforce properties.

The Booster functions similarly to gradient boosting (e.g., XGBoost), adding new logic rules to the ensemble to increase the model's baseline accuracy. The Fixer then ensures the resulting model satisfies the desired global properties using a paradigm called Counterexample-Guided Inductive Synthesis (CEGIS).

4. Verification and Optimization

The Fixer employs an Integer Linear Programming (ILP) verifier to search the entire input space for property violations. If the verifier finds a theoretical input that violates a property, it generates a counterexample.

An example of the Fixer loop: a counterexample to monotonicity is identified, leading to a constraint that updates the classifier's weights.

Because logic rules are discrete and non-differentiable, the Fixer temporarily "smooths" the rules into a continuous mathematical form. This allows for gradient-guided optimization to adjust the weights so the counterexample is fixed. Once the constraints are satisfied, the model is discretized back into its final, verifiable form. This cycle repeats until the verifier proves the property holds globally.

5. Evaluation and Results

We evaluated our framework on three security datasets: Cryptojacking Websites (4,000 samples), Twitter Spam Accounts (40,000 samples), and Twitter Spam URLs (422,672 samples).

Our results demonstrate that global robustness can be achieved with minimal impact on performance. For the Twitter spam account dataset, we successfully trained a classifier to satisfy five simultaneous global properties. Compared to a standard, non-robust XGBoost baseline, the robust model saw its True Positive Rate (TPR) decrease by only 5.4% and its False Positive Rate (FPR) increase by just 0.1%. Furthermore, our method outperformed existing specialized monotonic models and proved more resilient than standard adversarial training techniques like DL2, which failed to provide global guarantees.

6. Conclusion

Achieving global robustness is a critical step toward building trustworthy security classifiers. By co-designing model architectures with verification-aware training loops, we can provide mathematical guarantees that hold against evolving adversaries. While the ILP solver in the Fixer loop introduces computational overhead, the resulting models offer a level of security that local robustness cannot match. Future work will focus on scaling these techniques to even larger datasets and more complex model structures.

Summary updated

BibTeX
@inproceedings{chen2021learning,
  author = {Yizheng Chen and Shiqi Wang and Yue Qin and Xiaojing Liao and Suman Jana and David A. Wagner},
  title = {{Learning Security Classifiers with Verified Global Robustness Properties}},
  booktitle = {CCS},
  year = {2021},
  doi = {10.1145/3460120.3484776},
}
Figure