Binary foundation model improves API prediction and low-FPR malware detection
MalwarePT’s pretrained encoder transfers across malware analysis tasks and outperforms existing baselines
Security & privacy arXiv 15 May 2026 Method Prototype evidence
Published as “MalwarePT: A Binary-Level Foundation Model for Malware Analysis”
Why it matters
The model provides a reusable binary representation that can improve multiple malware-analysis tasks, but its modest low-FPR detection rates mean it is not yet a drop-in replacement for production detectors.
Summary
MalwarePT’s malware-specific pretraining and BPE tokenization boost downstream performance, achieving 86.55% weighted F1 on API-call prediction and 91.80% top-1 accuracy on function-level behavior classification, and it outperforms all neural baselines on low-FPR malware detection (e.g., 39.23% TPR at 0.1% FPR) while still lagging behind feature-engineered models. The evidence comes from multiple tables showing absolute gains over non-pretrained variants and prior foundation models, though detection TPR remains modest, highlighting the difficulty of strict low-FPR operation.
What they found 2
- Pretraining substantially improves API-call prediction over training from scratch.
“Our MalwarePT-1024 model achieves a weighted F1 Score of 86.55% and a Top-1 Accuracy of 87.83%, outperforming MalwarePT-N 1024, which reaches only 64.54% Weighted F1 Score and 64.33% Top-1 Accuracy.”
- MalwarePT outperforms all neural baselines on low-FPR malware detection across temporal drift settings.
“MalwarePT1024 achieves the second-highest across all settings, outperforming every neural baseline: it reaches 39.23% on D1→D1, 72.28% on D1→D2, and 40.80% on D1+D2+D3→D3.”
Caveats 4
- Even the best model only attains 39.23% true-positive rate at a strict 0.1% false-positive rate, indicating detection remains challenging under low-FPR constraints.
- Custom and proprietary packing techniques remain undetectable through static signatures, so the dataset may still include custom-packed malware samples.
- Code-section features and PE-structure features capture complementary signals; neither consistently dominates the other, suggesting ensembles may be needed for strict low-FPR operation.
- Detection remains challenging even for models with strong overall ranking performance.
What’s new here 4
- Pretrains a binary foundation model on malicious Windows PE code sections rather than benign benchmarks.
- Introduces a byte-pair encoding tokenizer to compress frequent multi-byte patterns, improving context efficiency.
- Demonstrates a single pretrained encoder that transfers across token-level API prediction, function-level behavior classification, and document-level malware detection.
- Provides a systematic empirical study of BPE vocabulary size, identifying 1,024 tokens as optimal.