TL;DR
This paper introduces RETROFIT, a novel continual learning method designed for security applications where historical data is inaccessible. It achieves robust performance by merging models with controlled forgetting, significantly improving malware detection and binary analysis compared to existing methods.
What Problem Does This Paper Address?
Modern security systems heavily rely on deep learning for tasks like malware detection and binary analysis. However, these models struggle to keep up with evolving threats (temporal drift) and changing data formats (representation shift). Traditional continual learning (CL) methods often require access to past data (e.g., through replay) or full retraining, which are impractical and often prohibited in security contexts due to data sensitivity and privacy concerns. This leads to two major issues: catastrophic forgetting (losing knowledge of old threats) and poor generalization to new data or representations.
Methods
RETROFIT tackles these challenges with a "retrospective-free" approach, meaning it doesn't need historical data. Its core idea is model consolidation through parameter merging. Instead of replaying old data, it uses the previous model as a "teacher" for past knowledge.
Key techniques include:
- Low-Rank Adaptation: Updates are confined to a low-rank subspace of the model's parameters. This limits the "surface area" for interference with existing knowledge.
- Confidence-Guided Knowledge Arbitration: A novel mechanism that dynamically decides how much to trust the old model versus the new model for a given data point. It prioritizes the old model when it's confident about the correct prediction, thus preserving learned knowledge. When the old model is uncertain, it leans more on the new model to learn new information.
- Sparse Mask Learning: A learned mask is applied to the low-rank updates to further control parameter overlap and improve interpretability by identifying which parts of the model are updated for specific tasks.
Datasets
The paper evaluates RETROFIT on two representative security tasks:
- Malware Detection (Temporal Drift): Uses a dataset spanning five years (2014-2018) of Android applications, reflecting evolving malware families and behaviors.
- Binary Analysis (Representation Shift): Utilizes the CAPYBARA dataset, which contains decompiled Linux binaries at different levels of obfuscation (full, anonymized, stripped). This simulates how code semantics change during compilation and optimization.
Key Insights and Ideas
- Past models as knowledge proxies: In data-scarce, privacy-sensitive environments, the previous model itself can serve as a valuable proxy for past knowledge, enabling continual learning without explicit data replay.
- Controlled forgetting is key: Simply adapting to new data without careful control leads to catastrophic forgetting. RETROFIT's "bounded forgetting" approach is crucial for maintaining performance on older, yet still relevant, data.
- Low-rank updates reduce interference: By restricting updates to a low-dimensional subspace, RETROFIT significantly reduces the likelihood of destructive interference between old and new knowledge.
- Confidence is a powerful guide: Dynamically arbitrating between old and new model knowledge based on prediction confidence is more effective than fixed strategies, especially in complex scenarios like binary analysis.
- Bounded forgetting can improve generalization: Counter-intuitively, RETROFIT's ability to mitigate forgetting not only preserves past knowledge but also enhances its performance on new data, even surpassing oracle (all-data-trained) models in some cases.
Key Results
- Malware Detection: RETROFIT significantly improved the retention score (Past-Task Retention - PTR) by 30.29% on average over CL baselines. It also achieved better adaptability (AUT metric) and even surpassed the oracle upper bound on new data.
- Binary Analysis: RETROFIT achieved over 2x the BLEU score compared to prior transfer learning approaches on the challenging stripped-binary task. It also outperformed all baselines in cross-representation generalization.
- Comparison to Aggregation Baselines: RETROFIT outperformed model-preserving baselines (ensembles and model merging) by a substantial margin, demonstrating the advantage of sequential adaptation over static aggregation.
Limitations and Future Work
- Computational Cost: While RETROFIT is designed to be computationally efficient, the paper notes that its complexity scales linearly with the adapter rank
r. - Generalization to other security domains: The paper focuses on malware detection and binary analysis. Future work could explore RETROFIT's applicability to other security domains and different forms of representation shift (e.g., varying optimization levels, architectures).
- Integration with Active Learning: The paper shows RETROFIT's compatibility with active learning pipelines, suggesting further research into optimizing this integration.
- Private Data Scenarios: While RETROFIT is designed for data-sensitive scenarios, further exploration into its effectiveness with truly private or federated learning settings could be beneficial.
Summary updated