Explainable Malware Detection with Tailored Logic Explained Networks

Peter Anthony, Francesco Giannini, Michelangelo Diligenti, Martin Homola, Marco Gori, Stefan Balogh, Ján MojzisarXiv 2024 · DOI

Introduction: The Black-Box Dilemma in Cybersecurity

In the high-stakes domain of cybersecurity, malware detection has become an arms race. While Deep Neural Networks (DNNs) excel at identifying complex patterns within massive datasets, their "black-box" nature presents a significant liability. In security-critical environments, trust, legal compliance, and forensic analysis are paramount; an opaque decision from a model is often insufficient for actionable intelligence.

Conversely, traditional "white-box" models, such as simple decision trees, often fail to generalize or maintain high accuracy against the volume and variety of modern malware. This research introduces Tailored Logic Explained Networks (LENs) to bridge this gap, offering a solution that combines the robustness of deep learning with the transparency of formal logic.

Methodology: Tailored Logic Explained Networks (LENs)

The researchers utilize Logic Explained Networks, a class of neural networks designed to be interpretable by construction. The process involves three key stages:

  1. Input Concepts: The model consumes human-understandable predicates (e.g., "has high entropy," "has no signature") as binary inputs.
  2. Rule Extraction: During training, the network employs pruning and regularization to identify the most relevant features. It then generates Local Explanations (conjunctions of features for a single sample) and Global Explanations (disjunctions of the most important local rules).
  3. The "Tailored" Innovation: Standard LENs often struggle with a trade-off between complexity and fidelity. The authors propose a new algorithm for compiling global explanations using line-search optimization. This ensures the resulting logic rules are both compact and highly faithful to the underlying model's predictions.
Local and class-level explanations generated by Logic Explained Networks (LENs).

Experimental Setup: The EMBER Dataset

To evaluate the approach, the study utilized the EMBER (Elastic Malware Benchmark for Empowering Researchers) 2018 dataset. This large-scale benchmark includes 1.1 million Portable Executable (PE) files, with 800,000 labeled samples split evenly between benign and malicious files. The authors derived binary features from this dataset to facilitate the generation of First-Order Logic (FOL) rules.

Key Results and Insights

Performance and Fidelity

LENs achieved an accuracy of 92.07% and an F1-score of 92.17% using 100 features. This performance is within 5% of top-tier black-box models like LightGBM, while significantly outperforming previous interpretable-by-design methods (such as OCEL and PARCEL), which typically reached only 60-70% accuracy on the same task. Furthermore, the Tailored-LEN approach demonstrated higher fidelity—the degree to which logic rules match the model's internal logic—compared to standard methods.

Expert Validation

The extracted logic rules, such as has_section_high_entropy ∧ ¬is_dll ∧ ¬has_debug, were qualitatively validated by cybersecurity experts. These rules align with known malware characteristics, such as the use of high entropy and the absence of debug symbols as hallmarks of obfuscated or "packed" malicious code.

Conclusion and Future Directions

While Tailored-LENs provide a powerful bridge between performance and interpretability, challenges remain regarding the binarization of continuous features and the scalability of logic rules as feature sets grow. Future work may explore more sophisticated pruning techniques and the integration of LENs into dynamic analysis to detect "zero-day" threats by observing execution behavior. Nevertheless, this work demonstrates that accuracy does not have to be sacrificed for understandability in modern malware detection.

Summary updated

BibTeX
@misc{anthony2024explainable,
  author = {Peter Anthony and Francesco Giannini and Michelangelo Diligenti and Martin Homola and Marco Gori and Stefan Balogh and Ján Mojzis},
  title = {{Explainable Malware Detection with Tailored Logic Explained Networks}},
  year = {2024},
  eprint = {2405.03009},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2405.03009},
}
Figure