TL;DR
This paper introduces LLM-DTE, a novel approach that uses Large Language Models (LLMs) to generate natural language explanations for decisions made by tree-based Network Intrusion Detection (NID) systems. They also propose a new human evaluation framework that assesses understanding through automatically generated quiz questions, finding that LLM-generated explanations significantly outperform rule-based ones.
What Problem Does This Paper Address?
Network Intrusion Detection (NID) systems are crucial for identifying malicious network traffic. While machine learning models, particularly decision trees, offer good performance, their "black-box" nature makes it difficult for system administrators to understand why a particular decision was made. Decision trees, despite their relative simplicity, still require users to have machine learning expertise for interpretation and lack the ability to provide context on feature importance. This gap hinders trust and effective utilization of NID systems in real-world scenarios. The paper aims to bridge this gap by making NID decisions understandable to users without a machine learning background.
Methods
The core of the proposed method, LLM-DTE (Large Language Model Decision Tree Explanations), involves using LLMs to translate the complex decision-making process of a decision tree into human-readable language.
- Decision Tree Inference: A trained decision tree processes network traffic data and classifies it as "Benign" or "Threat."
- Explanation Generation: The structure of the decision tree, the specific path taken for a given data point, and the decision logic at each node are extracted. This information is then fed into a Large Language Model (LLM), specifically GPT-4 in their experiments, along with prompts designed to elicit explanations. The LLM is instructed to explain the decision in simple terms, incorporating background knowledge about the features and classes.
- Counterfactual Quiz Generation: To evaluate the quality of these explanations, the authors developed a novel framework. For a given decision tree path, they define constraints on input features that lead to that path. Based on these constraints, they automatically generate counterfactual quiz questions. These questions test whether a human evaluator understands how changing a specific feature's value would alter the decision outcome.
- Human Evaluation: Human evaluators are presented with an explanation and then tasked with answering the generated quiz questions. Their understanding is measured by the proportion of correctly answered questions. Additionally, evaluators provide qualitative ratings for readability, quality, and use of background knowledge.
Datasets
- NF-BoT: This is the primary dataset used for training and evaluating the NID system. It's described as an industry-standard dataset containing 600k samples, with features including packet ports, TCP flags, flow duration, IP addresses, packet counts, and protocol, all labeled as "Benign" or "Threat."
- Iris Dataset: Used as a simple case study in Section 3.2 to illustrate the counterfactual quiz generation mechanism.
Key Insights and Ideas
- LLMs as Explainers for NID: The paper demonstrates that LLMs can effectively translate the abstract logic of decision trees into understandable natural language explanations, even for users without ML expertise.
- Contextualizing Feature Importance: LLM-DTE goes beyond simply stating which features were used; it can explain why certain features might be important for distinguishing between classes, providing valuable domain context.
- Automated Evaluation of Understanding: The counterfactual quiz generation framework is a significant contribution. It moves beyond subjective ratings of explanations to objectively measure how well an explanation enables a user to understand the underlying decision-making process. This is crucial because a "correct" explanation might still be ineffective if it doesn't lead to user comprehension.
- Correlation Between Objective and Subjective Measures: The study found that the objective quiz scores strongly correlated with human evaluators' subjective preferences for readability, quality, and background knowledge, validating both the LLM-DTE approach and the evaluation framework.
Key Results
- Quantitative Performance: LLM-based explanations resulted in 39.5% higher quiz scores compared to rule-based explanations, indicating significantly better understanding by human evaluators.
- Qualitative Preferences: Human evaluators overwhelmingly preferred LLM-based explanations:
- Rated highly for readability 15% more often than rule-based explanations.
- Rated highly for quality nearly twice as often.
- Rated highly for use of background knowledge 70% more often.
- Decision Tree Accuracy: The trained decision tree achieved a test set accuracy of 98.7% on the NF-BoT dataset.
Limitations and Future Work
Limitations:
- Cost and Latency: Generating explanations using LLMs is described as relatively slow and expensive.
- Scalability with Tree Depth: As the decision tree depth increases, the prompt provided to the LLM becomes longer, potentially leading to a degradation in explanation quality.
Future Work:
- Retrieval-Augmented Explanations: Exploring methods like dense passage retrieval (DPR) to incorporate relevant external documents could further enhance explanations.
- Tuning Explanations: The paper suggests that LLM explanations can be tuned for different user expertise levels, which could be further explored.
Summary updated