Modern malware detectors that work purely on static code — inspecting a file without ever running it — share a blind spot that attackers exploit routinely. A malicious app can ship its payload as an encrypted byte array, decrypt it in memory at runtime, and load it through a dynamic class loader, so the malicious logic literally does not exist in the file the scanner inspects. Reflection does the same thing more cheaply: if the target of a call is a string built at runtime, the static call graph has a broken edge where the real behavior hides. Surveys of this evasion surface (Evasion of Static Analysis via Dynamic Code Execution) and the authors of leading graph-based detectors alike concede the point: if the payload is encrypted and loaded dynamically, graph models built from decompiled code are blind (HinDroid). Running every app in a sandbox would fix this, but high-throughput pipelines — HinDroid's deployment processed roughly 15,000 apps per day within a 2.7-million-app stream — cannot afford deep multi-path execution per sample.
This proposal argues that multi-teacher knowledge distillation — training a small student model to match not one but a committee of larger or differently-informed teacher models — is the right tool for closing this gap, and that the malware setting is a unusually good fit for it. The core move: run apps in multiple heterogeneous sandboxes and analysis configurations offline, treat each resulting dynamic model as a teacher that sees privileged runtime information the student will never see, and distill their amalgamated knowledge into a student that consumes only static code. Two known failure modes of dynamic analysis make the multi-teacher structure essential rather than decorative. First, individual sandbox runs have idiosyncratic coverage gaps: environment-sensitive malware stalls in some sandboxes and unpacks in others, so a single dynamic teacher is systematically wrong on exactly the evasive samples we care about. Second, different structural views of the same static code (call graphs, raw byte sequences, API sequences) are broken by different problem-space attacks, so a single-view static student inherits one attackable surface. Multi-teacher methods have already shown that committees cancel uncorrelated teacher errors and can even lift a student above its average teacher (MACPO, Learning from All); we want to point that machinery at the static-dynamic visibility gap.
The closest existing work is Detection under Privileged Information, which distills a single teacher trained on static-plus-dynamic features into a static-only student and reports up to an 8.6% relative decrease in detection error on malware traffic and 7.3% on malware classification. That paper establishes the privileged-distillation recipe but leaves the single-teacher bottleneck untouched, never models dynamic code loading or reflection, and never tests adversarial evasion. Our proposal differs on all three axes: a committee of heterogeneous dynamic and static teachers, an evasion-aware evaluation including problem-space attacks, and a consensus mechanism designed for the specific way sandbox teachers disagree.
Core Claim
A static-input student detector, distilled from a committee of heterogeneous teachers — multiple dynamic sandbox models that observe runtime unpacking and reflection, plus static teachers over orthogonal code views — can (a) flag dynamically loaded malicious payloads that are physically absent from the static file, and (b) resist structural perturbation attacks that break single-view detectors, while retaining static-analysis throughput. The claim is specifically that amalgamation is what buys the robustness: a single privileged teacher with the same dynamic data budget should not match the committee, because sandbox coverage failures and single-view structural blind spots are precisely the errors that committee consensus filters.
Research Program
Teacher committee. For a corpus of Android apps, we run each sample in several dynamic analysis configurations differing in emulator image, API level, instrumented hooks, timeout, and anti-evasion hardening. Each configuration yields a dynamic teacher: a classifier over runtime traces (executed API sequences, decrypted memory dumps, dynamically loaded code). These teachers disagree by construction — that is the point. Alongside them we train three static teachers with deliberately different inductive biases, following the multi-architecture distillation evidence that CNN-local, Transformer-global, and sequence teachers produce balanced students (Koyama et al., Xu et al.): a call-graph teacher in the style of HinDroid's heterogeneous meta-path features (HinDroid), a raw-byte teacher in the MalConv style attacked by MalGuise, and an API-sequence teacher. Static teachers see only what the student sees; they contribute complementary structural priors, not privileged information.
Student architecture. The student takes static features only and has two heads, adapting TRMD's dual-ranker design (TRMD) to detection: a static-maliciousness head supervised by ground-truth labels and the static teachers, and a dynamic-risk head — distilled from the dynamic teachers — that predicts the probability the app executes hidden behavior (payload decryption, dynamic class loading, reflected sensitive API calls) at runtime. This decoupling matters because a dynamically loading app is a split personality: benign surface code concealing malicious runtime behavior, and forcing one head to compromise between the two stories is exactly how a single-label student underfits.
Consensus-weighted distillation. Naively averaging teacher soft labels under disagreement injects noise; Learning from All shows that treating multi-teacher consensus as positive signal and idiosyncratic deviation as negative signal resolves this, and PMD shows hypothesis reweighting handles probabilistic teacher outputs. We combine the two ideas, adapted to the sandbox setting where disagreement is informative evidence of evasion attempt or coverage failure rather than pure noise. Concretely, with teacher distributions $p_t$ over the hidden-behavior label and committee mean $\bar{p}$, the student $q$ is trained with
$$\mathcal{L} = \mathrm{CE}(y, f_S(x)) + \lambda \sum_{t} w_t \, \mathrm{KL}\big(p_t(x) \,\big\|\, q(x)\big), \qquad w_t \propto \exp\!\big(-\beta\, d(p_t, \bar{p})\big),$$
where $\mathrm{CE}$ is the ordinary cross-entropy on ground-truth labels for the static head, $d$ measures how far teacher $t$ sits from the committee consensus, and $\beta$ controls how sharply idiosyncratic teachers are downweighted. The exponential form comes from the same intuition as PMD's confidence-aware loss: agreement correlates with reliability. One design question we treat as an experiment, not an assumption: whether a sandbox that stalls should be downweighted (it saw nothing) or upweighted as a weak evasion signal. We will evaluate both against the naive uniform weights, since prior work warns that aggregation can amplify shared teacher biases (Amalgamating Diverse Perspectives from Multiple Teacher Models).
Evasion corpus. The evaluation hinge is a corpus where the privileged information actually matters. We will assemble packed and dynamically loading samples from AndroZoo and the BagAmmo corpus (44,374 APKs verified by at least five VirusTotal engines), instrument a packing harness that encrypts known-malicious payloads and loads them via DexClassLoader, and label the runtime-unpacked ground truth with multi-sandbox execution. No reported result found on Lacuna for detection accuracy on dynamically unpacked payload corpora, which is itself evidence the gap is unmeasured.
Baselines
The naive reference point is a static detector trained on static features only, with no privileged signal: HinDroid is the strongest published instantiation on our primary clean-accuracy benchmark, reporting 0.986 accuracy and 0.988 F1 on the Comodo Cloud dataset (HinDroid), against 0.944 for a standard SVM and 0.836 for naive Bayes. We will re-implement and retrain on our corpus so the comparison is same-data; the published numbers anchor expected difficulty. The second baseline is the strongest existing method on this exact question: single-teacher privileged distillation as in Detection under Privileged Information, which reported up to an 8.6% relative decrease in detection error on malware traffic via distillation and 7.3% on malware classification via model influence. This baseline gets the same dynamic training data and sandbox budget as our committee — the only difference is one teacher trained on concatenated features rather than a heterogeneous committee with consensus weighting. Beating it isolates the multi-teacher contribution from the privileged-information contribution. The third baseline is adversarial training on problem-space perturbations: augmenting static training with BagAmmo-style try-catch insertions and MalGuise-style block splits. REPLICANT's authors report that detectors hardened against their policy attack dropped attacker success below 17%, while detectors hardened against prior attacks stayed at 62.4% ASR (REPLICANT) — so adversarial training is a real competitor for perturbation robustness, though it cannot recover semantics physically absent from the file (Evasion of Static Analysis via Dynamic Code Execution). The key ablation swaps the consensus weights $w_t$ for uniform averaging over the same teacher set: if uniform matches consensus, the gain is from extra supervision, not amalgamation, and the central claim fails. A second ablation removes the dynamic-risk head and forces a single label, isolating the dual-head ingredient. All baselines and ablations receive the same training corpus, the same tuning budget (a fixed hyperparameter search allowance per model), and are evaluated at matched static-only inference cost.
Why not just…?
Why not just ensemble static and dynamic classifiers at test time? Voting across a static model and sandbox models would capture most of the information without any distillation machinery. But it fails the deployment constraint that motivates the problem: running sandboxes at test time reintroduces the throughput cost that high-volume pipelines cannot pay — HinDroid's deployment volume of over 15,000 apps per day is the scale at issue. The ensemble also cannot exceed the runtime quality of its dynamic members on samples where every sandbox stalls, whereas distillation with consensus filtering demonstrably lets a student surpass its average teacher (Learning from All, where the 7B student exceeded the mean of its seven large teachers). We will still run a test-time ensemble as a reference line, on the subset of samples where its latency is affordable, to check the distilled student is not merely matching an oracle ensemble it could have just queried.
Why not just do adversarial training? This is the most serious alternative, and we treat it as a first-class baseline rather than dismissing it. The evidence for it is real: REPLICANT-hardened detectors cut attacker success below 17% (REPLICANT). But the same paper shows hardening against one attack family leaves detectors at 62.4% ASR against a different attack strategy, and MalGuise's authors note adversarial training does not fully solve automated structural manipulation (MalGuise). More fundamentally, adversarial training operates on features present in the file; it cannot teach a detector what an encrypted payload does, because those bytes carry no static signal to augment (Evasion of Static Analysis via Dynamic Code Execution). Our packed-payload evaluation separates the two cleanly: adversarial training should help against BagAmmo and MalGuise perturbations and do nothing on the unpacking corpus, while privileged distillation should do the reverse — and we will report both curves side by side, plus a combination, since they are complementary rather than competing if our claim is right.
Why not just use single-teacher privileged distillation, as already published? Detection under Privileged Information already showed the single-teacher recipe works, with an 8.6% relative error decrease on malware traffic. If one dynamic teacher suffices, our committee is gratuitous. The honest answer is that this is an empirical question we cannot settle from the file, and the single-teacher baseline with matched dynamic data is designed precisely to settle it. Our prior is that it falls short on evasive samples for a structural reason: a single sandbox's coverage failures and a single teacher's biases transfer directly to the student (Amalgamating Diverse Perspectives from Multiple Teacher Models), and MACPO's multi-supervisor result — 69.81 HH-Helpful reward versus 38.30 for naive single-source SFT — shows uncorrelated supervisor errors do cancel in practice (MACPO). If the single-teacher baseline matches our committee on the packed corpus, we will report that as the finding and retreat to the narrower claim that dual-head decoupling alone helps.
Why not just improve static representations, like IFDroid? IFDroid already survives twelve obfuscation types at 98.4% average F1 and call indirection at 91.1% (IFDroid), with 1.78-second-per-sample throughput. But its entire feature space is centrality matrices over sensitive APIs extracted from the decompiled call graph — if those APIs sit behind DexClassLoader, the corresponding entries are zeroed and there is nothing contrastive learning can align (Evasion of Static Analysis via Dynamic Code Execution). A representation cannot be made invariant to information that is not there. We will run IFDroid on our packed corpus as the strongest static-only obfuscation-resilient baseline and expect a large gap there specifically.
Proposed Experiments
Three evaluations, each tied to a published attack or benchmark from the file. First, clean and obfuscated detection: train and test on the Android Malware Genome, Drebin, and FalDroid corpora used by IFDroid and BagAmmo, reporting F1 alongside HinDroid's Comodo Cloud numbers as context (0.988 F1 published). Second, packed-payload detection: on our instrumented unpacking corpus built from AndroZoo and the BagAmmo corpus, measure how often the student's dynamic-risk head flags apps whose malicious payload only exists at runtime, with multi-sandbox ground truth as the label; the decisive comparison is against the single-teacher privileged baseline at matched data budget. Third, adversarial robustness: apply BagAmmo's try-catch dead-code insertion (published at over 99.9% ASR across 32 detectors), MalGuise's block splitting (over 95% ASR against research models, with roughly 75% vulnerability rate against Microsoft Defender ATP and over 91% functional integrity), and REPLICANT's black-box policy attack (78.8% mean ASR) to every model, reporting detector F1 under attack and attacker ASR. The success threshold is concrete: the committee-distilled student should hold ASR materially below the 62.4% that REPLICANT found for detectors hardened against prior attacks, and below whatever our matched adversarial-training baseline achieves, while also beating the single-teacher baseline by a clear margin on the packed corpus. A throughput check closes the loop: student inference must stay in the static-only cost regime — IFDroid's 1.78 seconds per sample is the reference scale — since the entire point is never running the sandbox at test time. If the committee's advantage over single-teacher distillation appears only on clean data and vanishes on the packed and adversarial corpora, the amalgamation claim is wrong and we will say so; the ablation grid is built to make that outcome legible either way.
References
- Can LLMs Handle WebShell Detection? Overcoming Detection Challenges with Behavioral Function-Aware Framework
- Make Evasion Harder: An Intelligent Android Malware Detection System
- MACPO: Weak-to-Strong Alignment via Multi-Agent Contrastive Preference Optimization
- Learning from All: Concept Alignment for Autonomous Distillation from Multiple Drifting MLLMs
- Detection under Privileged Information.
- Comparison of Grammatical Error Correction Using Back-Translation Models
- Multi Model-Based Distillation for Sound Event Detection
- Improving Bi-encoder Document Ranking Models with Two Rankers and Multi-teacher Distillation
- Probabilistic Model Distillation for Semantic Correspondence
- ACTD: Anchor-Based Cross-Tokenizer Distillation with Residual Regularization
- AndroZoo: collecting millions of Android apps for the research community
- Black-box Adversarial Example Attack towards FCG Based Android Malware Detection under Incomplete Feature Information
- REPLICANT: Learning Policies for Evading and Hardening Malware Detectors
- A Wolf in Sheep's Clothing: Practical Black-box Adversarial Attacks for Evading Learning-based Windows Malware Detection in the Wild
- Contrastive Learning for Robust Android Malware Familial Classification