[Paper Review] Nested Multiple Instance Learning in Modelling of HTTP network traffic
This paper proposes a nested multiple instance learning (MIL) framework to model HTTP network traffic for detecting infected computers, leveraging hierarchical URL structure without hand-designed features. By treating each computer's full traffic as a bag of URL instances and using token-level representations (e.g., 3-grams), the model outperforms prior art based on handcrafted features and CNNs, especially in zero-shot detection of unseen malware families.
In many interesting cases, the application of machine learning is hindered by data having a complicated structure stimulated by a structured file-formats like JSONs, XMLs, or ProtoBuffers, which is non-trivial to convert to a vector / matrix. Moreover, since the structure frequently carries a semantic meaning, reflecting it in the machine learning model should improve the accuracy but more importantly it facilitates the explanation of decisions and the model. This paper demonstrates on the identification of infected computers in the computer network from their HTTP traffic, how to achieve this reflection using recent progress in multiple-instance learning. The proposed model is compared to complementary approaches from the prior art, the first relying on human-designed features and the second on automatically learned features through convolution neural networks. In a challenging scenario measuring accuracy only on unseen domains/malware families, the proposed model is superior to the prior art while providing a valuable feedback to the security researchers. We believe that the proposed framework will found applications elsewhere even beyond the field of security.
Motivation & Objective
- To address the challenge of modeling semantically structured, hierarchical network traffic (e.g., URLs) in machine learning without relying on human-designed features.
- To improve detection of infected hosts by analyzing complete HTTP traffic per computer rather than individual URLs, enabling detection of subtle behavioral anomalies.
- To enhance model interpretability by identifying specific URL components responsible for classification decisions.
- To develop a scalable, end-to-end trainable framework that reflects data hierarchy in the learning process, improving generalization to unseen malware families.
- To demonstrate the framework's superiority over existing methods—particularly in cross-domain, zero-shot evaluation—on real-world network traffic.
Proposed method
- The model treats each computer’s HTTP traffic as a 'bag' of URL instances, with each URL decomposed into structured components (scheme, hostname, path, query) and tokenized using 3-grams.
- A nested MIL architecture is employed: inner MIL problems process individual URL tokens (e.g., 3-grams), while outer MIL models aggregate these to classify the entire computer as infected or clean.
- The framework avoids fixed-length padding or truncation by modeling variable-length sequences through hierarchical MIL, preserving structural semantics.
- It uses a differentiable scoring function to learn representations of URL tokens and aggregate them across instances (URLs) and bags (computers), enabling end-to-end training.
- The method is implemented in a custom library (Mill.jl) to simplify deployment and reuse of the nested MIL structure across hierarchical data.
- The model is trained end-to-end using only coarse labels at the computer level (infected or not), avoiding the need for instance-level labeling.
Experimental results
Research questions
- RQ1Can a nested multiple instance learning framework improve malware detection accuracy by modeling hierarchical URL structure without human-designed features?
- RQ2Does modeling full computer traffic instead of individual URLs enhance detection of stealthy malware that only alters traffic distribution on legitimate servers?
- RQ3Can the model provide interpretable feedback by identifying specific URL components responsible for infection classification?
- RQ4How does the proposed model perform in zero-shot evaluation—on previously unseen malware families or domains—compared to prior art?
- RQ5Can the framework generalize beyond network security to other domains with complex, hierarchical data structures?
Key findings
- The proposed model significantly outperforms the prior art based on handcrafted features (R. Forest model) and CNN-based approaches (eXpose) in zero-shot detection of unseen malware families.
- The model achieves superior accuracy on unseen domains, demonstrating strong generalization capability due to its hierarchical, structure-aware design.
- The model provides interpretable feedback by identifying specific URL tokens (e.g., 3-grams) that contributed to a positive classification, enabling actionable indicators of compromise.
- The framework enables end-to-end training from coarse labels at the computer level, reducing labeling effort and improving labeling accuracy compared to instance-level labeling.
- The model’s performance is robust even when URLs are not truncated or padded, due to the inherent flexibility of the nested MIL approach.
- The authors release the Mill.jl library to facilitate adoption and extension of the framework in other domains with hierarchical data.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.