Introduction
More than twenty years ago, Lowd and Meek showed that adversaries could evade spam filters, using bag-of-words (BoW)-based representations, by embellishing a message with a few “good words” that were associated with legitimate email. However, to this day, the use of static analysis to construct BoW-like feature representations still remains state-of-the-art in malware detection as a key first line of defence because feature extraction remains lightweight allowing for inexpensive classification at scale.
Like the BoW-based representations considered by Lowd and Meek, these abstractions record the presence or frequency of extracted features. Commonly considered features for malware detection include: imported libraries and functions for executables; keywords and structural paths for PDFs; syntax-annotated tokens for JavaScript; and permissions, API usage, and metadata for Android applications and software packages. Although individual features may also encode local structure, their aggregation is permutation invariant. We call such feature abstractions, or extractors, set-shaped.
Depending on their design, these extractors omit structural or semantic relationships, such as caller-callee dependencies. This creates a representation gap between the sample, that is, the application, executable, or document under analysis, and the information available to the detector. An attacker can exploit this gap through additive attacks: inserting benign-looking code or data, subject to validity and attack-budget constraints. Modifications are commonly restricted to additions in order to avoid removing components that the malware relies on to execute malicious behavior.
Such attacks have been studied against PDF, executable, and Android detectors, both in feature space and on the samples themselves. Liang et al. evaded Chrome’s then-deployed phishing-page classifier by inserting benign-associated features. Šrndić and Laskov reduced PDFRATE’s scores from nearly 100% to a median of approximately 33% through content insertion. Pierazzi et al. evaded Android malware detectors by transplanting code from benign applications, an attack known as APG. In each case, features associated with benign samples outweigh evidence of maliciousness that is still present. To be robust against additive attacks, a detector must retain a malicious classification under every admissible functionality-preserving addition.
Static extractors analyze samples without executing their code. While the feature categories they produce are fixed, the vocabulary may be open-ended: identifiers, domain names, and structural paths absent from the training data may continue to appear under temporal drift. Nonetheless, detectors represent each sample as a multi-hot or count vector over a vocabulary selected at training time. Alternatively, they hash feature strings into a fixed number of bins at the cost of collisions. In both cases, they learn from this feature representation rather than from the raw data. Therefore, the chosen encoding decides what the detector can actually see. Kolter and Maloof keep only 500 of more than 255 million byte 4-grams. Šrndić and Laskov retain 6,087 of more than 9 million structural PDF paths.
Set models in disguise
Since the multi-hot vector encodes an application’s feature set, every detector computes a function of that set. Linear models and Multi-Layer Perceptrons (MLPs), two of the four detector classes, share a specific structure. For an application with feature set S, the multi-hot vector is the indicator vector 1V(S) over the fixed vocabulary V. The first layer of these models computes W11V(S) = ∑s∈S∩V ws, where ws is the column of W1 assigned to feature s. This layer is therefore a lookup table of learned feature embeddings followed by implicit SUM pooling; in linear models, the embeddings reduce to scalar weights. Tree ensembles also compute a function of the set, but they split on individual coordinates instead of summing embeddings. Hence, linear and MLP-based detectors on binary representations are set models in disguise, namely SUM-pooled Deep Sets models over a vocabulary fixed at training time. This explains both weaknesses discussed above.
Blind to unseen strings
First, strings outside the training vocabulary are never encoded, so these models are blind to out-of-vocabulary (OOV) strings.
Benign features outweigh malicious ones
Second, SUM pooling allows added benign features to outweigh malicious evidence, which is exactly how additive benign attacks succeed.
We break with this tradition and embed each feature, s ∈ S, with a general text encoder instead. Since DREBIN features are set-shaped and the cardinality varies between samples, we cast detection as multiple-instance learning (MIL). MIL has modeled network traffic and spam emails as bags before. We instantiate MIL via Deep Sets with MAX pooling, which retains malicious evidence of the sample, regardless of how much benign evidence is added.
MAX-pooled Deep Sets models preserve malicious evidence in the latent representation. However, a downstream classifier head may still map a larger latent representation to a lower score, which an attacker can exploit. To retain a malware classification under any addition that maintains malicious evidence, the score must never decrease when features are added. Gimenez et al. show that this monotonicity is both sufficient and necessary for robustness to additive attacks. Monotone malware detectors exist, but so far they have come at a twofold cost. First, they operate on a fixed vocabulary, so features seen after the training period add no evidence; thus, they are blind to OOV features. Second, they lose detection performance. Since no feature may lower the score, benign features cannot count as evidence. Incer et al. report a drop of approximately 13% in detection rate, which they consider the cost of security.
Background
Set-Shaped Static Features
A static feature extractor E maps a sample z, such as an application, to a finite set of strings S = E(z) ⊂ Σ∗, where Σ∗ denotes all strings. Each string, s ∈ S, represents one feature in z, such as a requested permission or an API call. The extractor, E, may yield features of different categories. For example, the Drebin extractor considers multiple categories, where a prefix, api_permissions, denotes the category of the feature: api_permissions::android_permission_SEND_SMS. These features are set-shaped, and their order carries no information (permutation-invariant). Furthermore, the number of features, |S|, varies among samples (varying set-cardinality).
Feature categories are known in advance, but the vocabulary is open: Σ∗ is infinite, whereas the set of strings observed during the training-phase of detectors is finite. We call a feature category closed if its strings come from a finite list known in advance, such as the permissions an operating system defines, and open otherwise. During the test-phase, a sample contains out-of-vocabulary (OOV) strings whenever S includes strings never observed during training.
Multi-Hot Encoding over a Fixed Vocabulary
Detectors on set-shaped features rarely consume S directly. Instead, the canonical approach during preprocessing follows two steps. (1) During Feature selection, each detector selects a vocabulary V from the strings observed in its training data. Feature selection can be supervised or unsupervised. To preserve temporal training consistency, selection must precede the test-period. (2) During multi-hot encoding, each sample is encoded as a binary vector x ∈ {0, 1}|V| with one coordinate per string in V, set to 1 if the string occurs in S.
The encoding inherits the permutation invariance of S and maps features s ∈ S to the selected |V| coordinates. This discards features outside V, therefore, two samples that differ only by strings outside V are encoded with the same feature-vector, x. Yang et al. mention this constraint: a temporal split “means we cannot use any new features that only appear in the testing set”.
While feature-selection may differ among methods, the representation, x, and its dependence on a fixed vocabulary, V, at training time do not.
Multiple-Instance Learning
Multiple-instance learning (MIL) labels bags of instances rather than single instances, and under its standard assumption, a bag is positive if at least one of its instances is positive. Since set-shaped features are bags by construction, with the sample as the bag S and each string as an instance, neural MIL embeds every instance and aggregates the embeddings by pooling into one bag representation. Under MEAN and SUM pooling, when instance embeddings can be negative, added instances can lower every coordinate of the set representation and thereby dilute the evidence of a positive instance. MAX pooling preserves the standard assumption under which a bag’s label is the maximum of its instance labels in the embeddings. Hence, each coordinate of the bag representation is the largest value among its instances. Lowering the value is not possible; values either increase or leave the representation unchanged.
Threat Model
We assume an adversary who controls the sample (Android APKs in our evaluations) but cannot change the deployed feature extractor or the trained model. The goal is evasion: to classify a malware sample as benign. A feature-space attack that perturbs the feature vector directly provides only a theoretical upper-bound, since an arbitrary vector does not necessarily correspond to a working APK. Hence, we evaluate in the problem space following Pierazzi et al., where an attacker applies a transformation T to the APK z, subject to four constraints: (i) available transformations, (ii) preserved semantics, (iii) plausibility, and (iv) robustness to preprocessing.
We take the available-transformations constraint to be addition only, E(z) ⊆ E(T(z)), preserving the host’s malicious functionality. To this end, we adopt organ transplantation, where bytecode slices harvested from benign donor apps are grafted into a malicious host. An organ o is the self-contained bytecode slice of a harvested gadget, and an ice-box O is the bank of organs assembled ahead of the attack time. A graft is the set union S ↦ S ∪ o, where o also denotes the strings that the organ adds, including side-effect features that satisfy the problem-space constraints. Removal and obfuscation are feasible but violate E(z) ⊆ E(T(z)); we treat them as out of scope.
Why Android?
Our findings apply to set-shaped static features in general, however, we chose Android malware detection (AMD) as the domain for our evaluations because it fulfills the following four requirements:
Set-Shaped Features with an Open Vocabulary
The Drebin extractor emits strings in nine fixed categories. Their vocabulary is open.
One Representation with Many Detectors
Linear, tree-based, and neural detectors, including drift-aware ones, share the multi-hot vector x over Drebin features. Hence, the representation is the only variable we change.
Realizable Additive Attacks
Organ transplantation yields an evasive variant for each malware sample in all four configurations studied by Pierazzi et al.
Time-Aware Evaluation at Scale
Time-aware evaluation protocols are established for Android, and Hypercube provides 224,965 applications from a single market (Google Play) over four years, each dated by its upload and labeled with its number of VirusTotal detections (VTT).
From DEEPDREBIN to MALSETS
DEEPDREBIN (Ⓐ) is a feed-forward network on input x. At its first layer, it computes the vector r = W1x with the weights W1 ∈ ℝ200×|V|. The classification head ρ comprises all subsequent operations. It starts with the first-layer bias b and activation σ, which give the first hidden layer h = σ(r + b) and maps r to a malware logit, which a sigmoid converts to P(mal). We focus on these layers as x treats the first layer as a lookup table (①) that is implicitly sum-aggregated (②) over a closed vocabulary (③) while ρ is easily overwhelmed by contrary evidence (④).
DEEPSETS (panels Ⓑ–Ⓓ) is multiple-instance learning (MIL) applied to learning functions over sets, where a shared element-wise MLP φ : ℝd → ℝdφ, the element network, maps each embedded feature to a latent representation. These representations form the rows of a matrix H. The set of these representations is then aggregated into a single vector, the pooled vector r, by a pooling operator ⊕,
with r = r(S) for the application, e : Σ∗ → ℝd encoding each string, ⊕s∈S denoting the pooling operator ⊕, applied to all feature vectors φ(e(s)). The classification head ρ then maps r(S) to a malware logit. This formulation makes the individual feature representations explicit (①), allowing us to change the pooling operator (②), replace the fixed vocabulary with an encoder for unseen strings (③), and replace the unconstrained classification head ρ with a monotone head g (④).
Features as Sets
Step 1 splits x into the set U of one-hot elements;
Max Pooling
Step 2 replaces SUM by MAX, and φ is an MLP from panel C onward;
Open-Vocabulary Encoder
Step 3 maps every feature string with a frozen general text encoder e to an embedding;
Monotone Head
Step 4 classifies with a monotone head g.
Features as Sets
We show that MLPs including DEEPDREBIN on multi-hot encoded features can compute the same function as DEEPSETS models on one-hot features, following our construction. First, we convert the multi-hot encoding x, which encodes the feature strings of a sample S ∩ V = {s1, …, sk}, to a set of one-hot vectors U = {u1, …, uk} (①), encoding each feature si as ui. Second, we construct a DEEPSETS model, where we parameterize φ with a linear layer, W1. The product W1x in DEEPDREBIN then equals W1 applied to each ui ∈ U and summed:
While MLPs implicitly compute a sum over the selected row-vectors to obtain r, we explicitly select SUM pooling for our DEEPSETS model in this context.
Max Pooling
After having established DEEPDREBIN as a SUM-pooled set model, we replace the SUM pooling with a coordinate-wise MAX pooling, rj = maxi Hij (②).
We call the coordinates of DEEPDREBIN’s first hidden layer h and of the pooled vector r of DEEPSETS models channels. For each channel, we compute the gradient attribution, w̄j = E[∂f/∂rj], as the average gradient of the score over the training set. In the context of binary malware classification, we refer to its sign as the channel’s polarity: malware if w̄j > 0 and benign if w̄j < 0. As polarity is an average, it need not hold for every application.
Additive benign attacks dilute malicious evidence under SUM pooling (panels Ⓐ and Ⓑ), by: (i) lowering a malware-polarity channel or (ii) raising a benign-polarity channel.
Cancellation
First, evidence is lost due to cancellation. In DEEPDREBIN, sample features map to columns ws, aggregated by SUM pooling prior to activation. Since entries in ws can be either positive or negative, they may cancel out evidence. Specifically, when a benign organ o is grafted into a host S, malicious evidence in h may be diminished.
Accumulation
Second, the evidence is outweighed by feature accumulation. Suppose every contribution is non-negative and no cancellation occurs. A channel’s value no longer distinguishes one informative feature from many features with small contributions. Attacks can therefore raise benign-polarity channels by adding more benign features to outweigh the host’s malicious features.
In DEEPDREBIN, the attack lowers the malware-polarity channels (28 → 13% active). In DEEPSETS[MAX, e, Σ∗], it cannot lower any channel and succeeds by raising the benign-polarity channels alone (63 → 71%), while the malware-polarity channels remain unchanged. Hence, MAX-pooling narrows the attack surface; however, the non-monotone head still allows raised benign-polarity channels to outweigh malicious evidence.
In our DEEPSETS models, φ embeds features individually and independently. Hence, grafting benign organs S ↦ S ∪ o leaves the host’s rows of H unchanged. Values of the MAX pooled vector, r, therefore, can only increase,
Which requires that perturbations are additive and that φ maps every string of the host to a row of H. For each channel j, the feature that sets its value is referred to as the channel’s witness, s⋆j ∈ arg maxs∈S φj(s). At most dφ witnesses produce the pooled vector r. An added feature changes a channel only if it exceeds that channel’s witness. Therefore, the largest impact that an attack can have on a channel is bound by the organ o ∈ O, which produces the greatest value in that channel.
Eq. 3 only holds for the pooled vector r and not for the score, which the classifier ρ computes from r (C). Therefore, if the weights of the classifier ρ are not strictly positive, then raising a channel can lower the score. The classifier is thus the only part of a MAX-pooled DEEPSETS model that an additive attack can exploit. A monotone head g, whose score never falls when a channel rises, leaves the attacker with nothing to exploit.
Open-Vocabulary Encoder
MLP-based detectors trained on multi-hot representations, x = 1V(S) over a fixed vocabulary V, map input-features to columns of the weight-matrix W1; features outside of V have no input coordinates and therefore no row in H. We remove this fixed-vocabulary constraint, see ③ and Ⓓ, and replace V with a general text encoder e : Σ∗ → ℝd that embeds each feature string:
Which requires an open-vocabulary encoder, e, that is defined over all features of Σ∗. Hence, every feature that the extractor, E, emits receives an embedding. Therefore, the shared trainable instance network φ and the classifier ρ of our DEEPSETS models remain independent of the vocabulary V fixed at training time.
Monotone Head
Robustness requires that additions preserve a malicious decision. MALSETS guarantees the stronger property that additions cannot decrease the malware score by replacing ρ with a non-decreasing, monotone, head g such that f(S) = g(r(S)). Since Eq. 3 holds coordinate-wise in r:
Therefore, under monotonicity, additive benign attacks can never lower a classifier’s score. This requires that the classifier’s input never decreases under additions.
MAX pooling provides this for any φ (Eq. 3), whereas SUM pooling only suffices if H is non-negative; for example, when φ is ReLU activated. Since DEEPDREBIN implicitly SUM pools and the columns of W1 can have negative entries, it does not suffice. Our proposed DEEPDREBIN+ therefore constrains every layer, including W1, to be strictly positive.
Since any choice of a monotone head suffices, we choose a trivial linear layer with non-negative weights for MALSETS and
and θ ∈ ℝdφ are unconstrained trainable vectors.
However, monotonicity comes at the cost of all benign evidence being ignored, whether added by an attacker or not. Therefore, if malware were only differentiable from benign samples by its absence of benign evidence, then per Eq. 3, the monotone head would score benign samples equally to those of malware. Thus, this would make the resulting detector unable to flag malware without also misclassifying benign samples.
Experimental Settings
We evaluate on Hypercube as it is, to the best of our knowledge, the least biased public dataset for Android malware detection. It is compiled from a single market (Google Play) and time-stamped at upload time. Applications with at least two VirusTotal detections (VTT2) are labeled as malware, at a benign-to-malware ratio of 9:1. For a longer temporal evaluation window, we use the extended release of Hypercube spanning 2021–2024 with 224,965 applications. Regarding cardinality, all apps contain between 0 and 36,265 strings (median 199; 24 to 636 between the 1st and 99th percentiles).
Every month, each detector scores the new applications, and the 400 with the lowest Maximum Softmax Probability (MSP) are labeled, simulating a human analyst. For headline performance, we report F1, FPR, and FNR. Additionally, we report reliability via E-AURC, Cap400 and F1∗, and stability via Sen[F1]. For robustness, we report the attack success rate (ASR) as the share of detected malware that an attacker turns benign. We limit the attack-budget to at most β=100 organs per application. We average all metrics over five seeds.
Malware Detectors
All DEEPSETS-based models share a common base design, where: (i) e is OpenAI’s text-embedding-3-large with all 3,072 dimensions, with empty feature groups skipped. (ii) The element network φ is a two-layer MLP with ReLU and dropout 0.3. (iii) The classifier head is a linear layer for ρ and a linear layer with softplus for the monotone head glin.
We compare our proposed detectors against twelve state-of-the-art malware detectors: DREBIN, SEC-SVM, RANDOMFOREST, DEEPDREBIN, RAMDA, HCC, DRMD, TIF, MALCERTAIN, LSE-FOREST, LIGHTGBM, and MONOGBT. With all baselines using the same top-10,000 Drebin features, V.
Attackers
Following our threat model, we consider additive attacks that graft organs, benign code fragments, onto malware applications. The attacks in this paper are conducted using an organ ice-box, O, harvested by prior problem-space work comprising 33,280 organs alongside their pre-computed feature-space effects. We call the number of grafted organs the dose β and report the attack success rate (ASR) at β=100, using the pre-computed feature-space effects, to provide a high-dose stress test.
| Attacker | Organs selected by | Pool, V | Pool, Σ∗ |
|---|---|---|---|
| B-RND | uniform draw across all organs | 33,280 | 33,280 |
| I-RND | uniform draw across the effective pool | 3,143 | 7,694 |
| EVD | random draw, kept only if the score drops | 3,143 | 7,694 |
| ADZ | query-guided search, plus own permission and intent edits | 3,143 | 7,694 |
| APG | best-ranked organ, exact form for MAX pooled DEEPSETS models | 3,143 | 7,694 |
Adversarial Program Generation (APG) is a white-box attack proposed by Pierazzi et al. that, at each step, selects the organ that lowers a detector’s score the most. For MALSETS, parameterizing ρ with a linear layer eliminates the need for re-scoring candidates by ρ, since the score changes by Δ(o | S) = ∑j wj max(0, rj(o) − rj(S)). Hence, ranking organs in weight space reduces the cost by three orders of magnitude for MALSETS compared to the greedy procedure for MLPs, while remaining exact.
Three Settings
Setting 1: Clean AL
We report clean performance over the 30 test months (Jul 2022 to Dec 2024). Why? A robust detector is only useful if it continues to detect malware without an attacker. This experiment measures each detector’s clean performance under drift and serves as a baseline to measure the cost of security under attack.
Setting 2: Attacking over Time
We perform each of the five attacks monthly. Attackers only target malware, which was detected in that month, and the attacked samples never enter re-training. Here, we report the area-under-time of the ASR (AUT-ASR) from Jul 2022 to Dec 2024. Why? Active learning retrains the detector every month; hence, its robustness may change with every update. This experiment isolates the robustness of each deployed model from the training loop.
Setting 3: Attacked AL
From Jan 2022 onward, the attacker modifies every malware sample with APG. The adversarial samples then replace their original sample in active learning. In Setting 3 | A, the attacker stops once the sample is classified as benign. In Setting 3 | B, the attacker continues until the sample is both classified as benign and beyond the threshold for AL sampling based on a rolling average of the prior six months. Why? In deployment, attacked samples are selected for labeling and influence AL model updates. This experiment tests whether robustness holds when adversarial samples enter AL.
Results
Ablations
For ①, we show that DEEPDREBIN is an implicitly SUM-pooled DEEPSETS model in two ways. First, we convert trained DEEPDREBIN models into a DEEPSETS model by moving the activation and the bias into the classifier, ρ. Without retraining (row 1a of Table 2), it reproduces DEEPDREBIN’s results exactly. Second, we train a DEEPSETS model matching the network architecture and hyperparameters of DEEPDREBIN (row 1b): F1 37.3 ± 0.5 against 37.5 ± 1.0, E-AURC 4.33 against 4.36, which is within normal seed variance (paired per-seed differences, p ≥ 0.30). Lastly, in row 2, we move the activation function and bias from ρ into φ, which yields an improvement in F1 to 40.9 ± 1.4.
We then replace SUM- with MAX-pooling (row 3). MAX-pooling lowers evasion (AUT-ASR) under three of the five attacks: Blind Random (66.1 → 48.5%), Informed Random (97.1 → 77.4%), and EvD (95.9 → 95.5%). However, APG still evades at 99.5% and ADZ increases from 61.1 to 76.2%. Under clean AL, F1 rises by 4.8 (40.9 → 45.7) and E-AURC falls from 5.49 to 4.62.
Next, we replace the one-hot encoding with a general text encoder e on the same 10,000 strings of V (row 4). At a fixed vocabulary, the encoder does not raise clean AL F1 (45.7% → 42.9%, E-AURC 4.62 → 4.73), but it lowers evasion under all five attackers (APG 99.5 → 97.1%, ADZ 76.2 → 32.4%). We then open the vocabulary to Σ∗, eliminating the OOV problem (row 5). Using Σ∗ improves clean AL performance by 5.2 points (42.9% → 48.1%). An open vocabulary also widens the attack surface, as the effective organ pool increases from 3,143 to 7,694. However, four out of the five attackers evade row 5 less than row 4, and only Blind Random gains (45.4 → 46.9%).
Lastly, we replace the classifier ρ with a monotone head glin (see rows 8–11), providing complete robustness to additive attacks; no adversarial true positives were evaded. On DEEPDREBIN, a non-negative output layer alone (DEEPDREBIN∗, row 7) is not sufficient. Since added features can lower the channels prior to the output layer, APG still achieves an average AUT-ASR of 100.0%, while costing F1 20.0 points (37.5 → 17.5). With all weights being non-negative (DEEPDREBIN+, row 8), no attack evades, but the cost of security is higher at F1 24.4 points (37.5 → 13.1). In contrast, robustness is achieved for DEEPSETS using MAX-pooling and a monotone head, ρ = glin (row 9), while only lowering F1 by 0.6 points on average (37.5 → 36.9, relative to DEEPDREBIN). Although e on V (row 10) further increases the cost of security to 2.5 points on average (37.5 → 35.0), when combined with an open vocabulary Σ∗ (MALSETS, row 11), it increases F1 to 38.4 while improving the reliability under a monotone head (10.38 → 6.67 E-AURC).
From DEEPDREBIN (row 1) to MALSETS (row 11)
F1 (%) under clean AL (Setting 1), mean over five seeds. Higher is better.
Show every row as a table
| # | F1 | E-AURC | Sen[F1] | B-Rnd | I-Rnd | EvD | ADZ | APG |
|---|---|---|---|---|---|---|---|---|
| 1 | 37.5±1.0 | 4.4±0.0 | −1.19±0.12 | 49.5±2.6 | 76.8±1.0 | 99.4±0.1 | 30.2±3.4 | 100.0±0.0 |
| 1a | 37.5±1.0 | 4.4±0.0 | −1.19±0.12 | = | = | = | = | = |
| 1b | 37.3±0.5 | 4.3±0.0 | −1.22±0.18 | 49.3±0.8 | 76.9±0.7 | 99.4±0.2 | 29.1±1.3 | 100.0±0.0 |
| 2 | 40.9±1.4 | 5.5±0.2 | −0.96±0.09 | 66.1±5.8 | 97.1±1.2 | 95.9±1.3 | 61.1±6.8 | 99.9±0.1 |
| 3 | 45.7±0.7 | 4.6±0.1 | −0.94±0.05 | 48.5±5.4 | 77.4±9.4 | 95.5±2.6 | 76.2±18.0 | 99.5±0.4 |
| 4 | 42.9±1.0 | 4.7±0.1 | −0.85±0.11 | 45.4±8.9 | 63.7±8.7 | 86.4±3.8 | 32.4±9.2 | 97.1±2.3 |
| 5 | 48.1±0.8 | 4.2±0.2 | −0.82±0.05 | 46.9±3.2 | 54.1±4.5 | 71.0±1.9 | 31.7±8.3 | 96.5±2.1 |
| 6 | 37.8±1.3 | 6.5±0.2 | −1.05±0.16 | 91.9±3.4 | 98.3±1.7 | 98.1±0.8 | 75.1±7.2 | 100.0±0.1 |
| 7 | 17.5±1.1 | 4.5±0.1 | −1.22±0.18 | 51.3 | 70.2 | 98.9 | 37.9 | 100.0 |
| 8 | 13.1±0.6 | 8.0±0.1 | −0.69±0.05 | 0.0±0.0 | 0.0±0.0 | 0.0±0.0 | 0.0±0.0 | 0.0±0.0 |
| 9 | 36.9±1.2 | 9.8±1.4 | −0.66±0.13 | 0.0±0.0 | 0.0±0.0 | 0.0±0.0 | 0.0±0.0 | 0.0±0.0 |
| 10 | 35.0±0.8 | 10.4±0.8 | −0.76±0.10 | 0.0±0.0 | 0.0±0.0 | 0.0±0.0 | 0.0±0.0 | 0.0±0.0 |
| 11 | 38.4±1.1 | 6.7±0.1 | −0.80±0.16 | 0.0±0.0 | 0.0±0.0 | 0.0±0.0 | 0.0±0.0 | 0.0±0.0 |
| 12 | 36.3±0.9 | 8.6±0.9 | −0.76±0.07 | 0.0±0.0 | 0.0±0.0 | 0.0±0.0 | 0.0±0.0 | 0.0±0.0 |
Comparison with State-of-the-Art
We compare our models with twelve baselines from three architecture families: linear models, tree ensembles, and MLPs. Our DEEPSETS models form a fourth family, MIL.
Under clean active learning, MLPs are the strongest baselines, with DRMD (43.6) and TIF (39.6) having the highest performance. Following the top performing MLPs, are RANDOMFOREST (38.3), HCC (38.1), and LIGHTGBM (38.1). With the remaining baselines from those families, alongside linear models, trailing behind (13.1–37.5). Our non-monotone MIL model, DEEPSETS[MAX, e, Σ∗], reaches the highest F1 of all detectors (48.1), surpassing DRMD while having the best reliability (E-AURC, 4.22).
Clean against attacked active learning
F1 (%) over the 30 test months under Setting 1 and Setting 3 | B. Each label gives the percentage of malware evaded.
Show every detector as a table
| Detector | Setting 1 | Setting 2 | Setting 3 | A | Setting 3 | B | |||||
|---|---|---|---|---|---|---|---|---|---|
| F1 | E-AURC | ASR | F1 | E-AURC | ASR | F1 | E-AURC | ASR | |
| Linear | |||||||||
| DREBIN | 30.5 | 5.2 | 100.0 | 0.0 | 5.2 | 100.0 | 0.0 | 6.8 | 100.0 |
| SEC-SVM | 26.9 | 5.2 | 100.0 | 5.5 | 5.3 | 85.8 | 3.4 | 5.8 | 90.0 |
| DREBIN+ | 23.6 | 9.5 | 0.0 | 23.6 | 9.5 | 0.0 | 23.6 | 9.5 | 0.0 |
| Trees | |||||||||
| RANDOMFOREST | 38.3 | 4.9 | 100.0 | 7.5 | 4.8 | 79.6 | 7.1 | 5.0 | 72.7 |
| LSE-FOREST | 24.2 | 6.4 | 100.0 | 0.2 | 6.3 | 99.3 | 0.5 | 6.8 | 97.6 |
| LIGHTGBM | 38.1 | 4.3 | 100.0 | 9.1 | 4.3 | 80.7 | 5.4 | 4.5 | 82.9 |
| MONOGBT | 23.9 | 6.1 | 0.0 | 23.9 | 6.1 | 0.0 | 23.9 | 6.1 | 0.0 |
| MLPs | |||||||||
| MALCERTAIN | 29.9 | 6.5 | 95.7 | 2.7 | 8.2 | 90.7 | 3.8 | 9.0 | 87.9 |
| RAMDA | 36.3 | 8.4 | 64.4 | 25.2 | 9.6 | 36.2 | 25.8 | 9.2 | 34.4 |
| HCC | 38.1 | 6.4 | 100.0 | 7.2 | 7.4 | 82.9 | 2.8 | 10.4 | 90.9 |
| TIF | 39.6 | 6.4 | 100.0 | 1.9 | 7.9 | 96.7 | 0.4 | 9.7 | 99.4 |
| DRMD | 43.6 | 9.4 | 100.0 | 32.3 | 17.7 | 26.0 | 34.1 | 10.0 | 20.7 |
| DEEPDREBIN | 37.5 | 4.4 | 100.0 | 17.4 | 4.4 | 55.4 | 17.7 | 4.6 | 49.5 |
| DEEPDREBIN+ | 13.1 | 8.0 | 0.0 | 13.1 | 8.0 | 0.0 | 13.1 | 8.0 | 0.0 |
| MIL | |||||||||
| DEEPSETS[MAX, e, V, ρ] | 42.9 | 4.7 | 97.1 | 33.7 | 5.1 | 19.7 | 31.7 | 4.6 | 15.4 |
| DEEPSETS[MAX, e, V, glin] | 35.0 | 10.4 | 0.0 | 35.0 | 10.4 | 0.0 | 35.0 | 10.4 | 0.0 |
| DEEPSETS[MAX, e, Σ∗, ρ] | 48.1 | 4.2 | 96.5 | 36.7 | 4.4 | 24.5 | 30.3 | 4.3 | 24.5 |
| MALSETS | 38.4 | 6.7 | 0.0 | 38.4 | 6.7 | 0.0 | 38.4 | 6.7 | 0.0 |
On all non-monotone baselines, APG achieves an AUT-ASR of at least 95.7%, with the exception of RAMDA at 64.4%. For our DEEPSETS-based approaches, APG also evades (96.5-97.1%) only against the non-monotone models.
While all monotone models are unevaded, AL on attacked malware recovers evasion for some detectors across both Setting 3 | A and Setting 3 | B. While DREBIN still remains fully evaded, SEC-SVM’s evasion decreases by an average of 12.1 points. For tree-based detectors, only RANDOMFOREST and LIGHTGBM meaningfully decrease evasion by 23.9 and 18.2 points on average. AL has the largest improvement on DRMD, DEEPSETS[MAX, e, V, ρ], and DEEPSETS[MAX, e, Σ∗, ρ] as they similarly recover 74.5 points on average under Setting 3 | A. Notably, our DEEPSETS[MAX, e, V, ρ] model is the least evaded under both Setting 3 | A and Setting 3 | B.
All monotone models remain unevaded, and MALSETS retains the highest performance under both settings. DEEPSETS[MAX, e, V, glin] trails by 3.4 F1 points, and the monotone baselines follow by a wide margin. Here, MONOGBT trails by 14.5, and DREBIN+ by 14.8 F1 points, respectively. DEEPDREBIN+ ranks last with 13.1 F1 points.
Why MALSETS Pays Less
With DEEPSETS models, we match the architecture to the set-shaped structure of the Drebin feature space, achieving the highest performance of any detector in our benchmark (row 5). While MALSETS loses 20.2% of its F1 (row 11 versus row 5 of Table 2), it pays the smallest cost of security compared to the other monotone detectors, which lose 22.8% for DREBIN+, 37.2% for MONOGBT, and 64.9% for DEEPDREBIN+. Therefore, MALSETS remains 14.5 points F1 above the best monotone baseline.
The cost of security under clean AL
F1 (%) of each monotone detector against the non-monotone detector it constrains. Higher is better.
Monotonicity. Linear models and MLPs are only robust if all weights are constrained. For example, APG still fully evades DEEPDREBIN∗ with a monotone output layer (row 7 in Table 2), and DEEPDREBIN+ costs a 64.9% reduction in F1 to completely eliminate APG evasions (row 8 in Table 2). In contrast, MALSETS only requires the classifier ρ to be monotone, since adding features can only raise channels by construction.
Pooling Operator. Compared to MAX pooling, SUM pooling leads to feature accumulation, reducing F1 by 2.1 points while decreasing reliability by 1.92 (row 12, Table 2). A monotone head for MALSETS is not a performance bottleneck.
Open Vocabulary. Feature selection is an explicit design choice for MALSETS. If all malware-features of a malignant sample were transplanted to a benign application, monotone detectors would score this sample at least as high. This holds for 32% of malware under V, for 14% under V100k, and reduces to 3% under Σ∗.
In summary, DEEPSETS models match the architecture to the set-shaped problem, MALSETS constrains only the head, MAX pooling prevents features from accumulating, while feature selection becomes an optional design-choice.
Limitations
In our design and evaluation of MALSETS, we made a concerted effort to ablate every step of the process; however, there remain the following natural limitations to this work.
- First, our experiments were conducted only on the Hypercube dataset; however, this choice was deliberate, as it constitutes the current standard for unbiased dataset construction with no comparable standards for other marketplaces.
- Second, all our baselines share the same top-10,000 vocabulary, V, for consistency. Although this selection is in line with prior work, there have been other proposed approaches for the selection of Drebin features; however, as MALSETS uses Σ∗, it is independent of feature selection.
- Third, we focus on additive benign attacks, as they are the predominant threat in the literature. Due to monotonicity, MALSETS is robust to the removal of benign features; whereas the removal of malware features in the problem-space, without breaking malicious functionality, remains an open problem.
- Fourth, we focus on the threat model of an attacker aiming to evade a target system; however, monotonicity does not prevent data poisoning. Therefore, the addition of malicious features to benign samples could facilitate the poisoning of MALSETS, which we believe would be a natural direction for future work aiming to improve the resilience of MALSETS-based detectors.
Contributions
- Problem Aligned Design through MIL. We cast static malware detection as MIL and operationalize it via DEEPSETS. A general text encoder embeds every feature string, which eliminates the out-of-vocabulary (OOV) problem by design. MAX pooling retains the malicious evidence of the sample, regardless of how many benign features an attacker adds.
- Functional Monotonicity. We devise MALSETS by equipping MAX-pooled DEEPSETS models with a monotone head, over an open vocabulary representation. Since MAX pooling never decreases under benign addition, neither does the malware score. MALSETS thereby addresses the cost of security paid by prior monotone detectors, as it jointly maximizes both clean and attacked AL performance.
- Adversarial Robustness. For MALSETS, more is never less as it is never evaded by any of the five attack families in our benchmark, ranging from black-box to white-box attacks. Under attack, MALSETS also retains the highest F1 of all detectors.
Altogether, these produce MALSETS, which pays the smallest relative cost of security for remaining completely unevaded by state-of-the-art black-box and white-box additive attacks.
Cite
@misc{herzog2026lessaffordablerobustnessadditive,
title={More Is Never Less: Affordable Robustness to Additive Attacks via Monotone Multiple-Instance Learning},
author={Alexander Herzog and Shae McFadden and Lorenzo Cavallaro},
year={2026},
eprint={2611.28825},
archivePrefix={arXiv},
primaryClass={cs.CR}
}