DMFI-B: Dual-Modality Insider Threat Detection
- DMFI-B is a discriminative adaptation strategy that fine-tunes dual branches on normal-only and abnormal-only data, enhancing insider threat detection.
- It integrates semantic evidence from content-rich artifacts and behavioral evidence compressed into a 4W narrative, fusing both via a margin-based anomaly score.
- Empirical evaluations demonstrate improved accuracy and reduced false positives compared to unified models, albeit with additional computational costs.
DMFI-B is a discriminative adaptation strategy within the DMFI framework for LLM-based insider threat detection. It is defined by dual-modality processing and dual-branch fine-tuning: raw audit logs are converted into a semantic view for content-rich artifacts and a behavioral view compressed through a 4W narrative, while separate LoRA-enhanced branches are fine-tuned on normal-only and abnormal-only data and combined through a margin-based anomaly score (Kong et al., 6 Aug 2025). In the reported formulation, DMFI-B is designed to improve robustness under severe class imbalance by explicitly separating normal and abnormal behavior representations, then fusing semantic and behavioral evidence at session level.
1. Position within the DMFI framework
The parent DMFI framework is dual-modality. Its preprocessing parses raw audit logs into events
then produces two parallel views: a semantic view
for content-bearing artifacts such as e-mails and URLs, and a behavioral view
that is compressed via a 4W (“When–Where–What–Which”) narrative (Kong et al., 6 Aug 2025). Two LoRA-augmented LLM branches are fine-tuned on instruction-style prompts and binary labels, and inference combines semantic score aggregation with a behavioral session score through a 3-layer MLP.
Within this framework, DMFI defines two strategies. DMFI-A is a unified variant in which a single model is fine-tuned on mixed normal and abnormal data. DMFI-B is the discriminative dual-branch variant in which one model is fine-tuned on normal-only data, denoted , and another on abnormal-only data, denoted (Kong et al., 6 Aug 2025). This architectural distinction is the defining characteristic of DMFI-B.
A common source of confusion is the acronym itself. “DMFI” also appears in an unrelated fluid-mechanics context as “Downstream Microjet Fluidic Injection” in a study of supersonic jet mixing (Pourhashem et al., 2019). In the insider-threat literature discussed here, however, DMFI denotes “Dual-Modality Fine-Tuning and Inference,” and DMFI-B refers specifically to its discriminative adaptation variant.
2. Dual-modality representation of audit logs
DMFI-B inherits the representational structure of DMFI. The semantic branch operates on , the subset of log entries with non-empty content fields, and is intended for artifacts such as e-mails, URLs, and related content-rich records (Kong et al., 6 Aug 2025). These inputs are processed through instruction-formatted prompts by a semantic LLM branch.
The behavioral branch operates on the structured event tuples without the content field and compresses them into a 4W narrative. The 4W transformation encodes “When–Where–What–Which,” producing a behavioral abstraction that preserves contextual action sequences while reducing prompt length (Kong et al., 6 Aug 2025). The reported ablation states that this 4W compression reduces token length by 36.7% while preserving key anomalies, enabling faster inference with no loss of detection quality.
At inference time, the semantic branch does not directly emit a single session label. Instead, it produces per-entry semantic scores that are aggregated through four statistics: mean, max, std, and min. The behavioral branch produces one behavioral session score. These are concatenated into a five-dimensional fusion input,
which is then passed to a 3-layer MLP to obtain the final anomaly probability (Kong et al., 6 Aug 2025). The reported ablation refers to this four-statistic semantic pooling as “FullStats” and states that it outperforms simpler pooling by up to +0.008 accuracy.
This arrangement implies a division of labor between modalities. A plausible implication is that the semantic path captures intent-bearing evidence that conventional tabular detectors may miss, while the behavioral path captures session-level action regularities that are not reducible to isolated content items. The paper’s ablation supports that interpretation by reporting that removing either the semantic or behavioral view reduces accuracy and detection rate by 2–4% (Kong et al., 6 Aug 2025).
3. Discriminative dual-branch adaptation
The core innovation of DMFI-B is its discriminative dual-branch training regime. Training data are split into
and
Both branches are initialized from the same pretrained checkpoint 0, after which separate LoRA adapters are injected: 1 for the normal branch and 2 for the abnormal branch (Kong et al., 6 Aug 2025).
Each branch is fine-tuned independently on its own subset using cross-entropy. The normal branch is optimized to model normality, and the abnormal branch is optimized to model anomaly. At test time, the same prompt 3 is fed to both branches, and the outputs are combined through a learned margin rather than averaging or direct single-model classification (Kong et al., 6 Aug 2025). This scoring rule is
4
where 5 is the sigmoid.
The paper characterizes this as “margin-based” scoring because the anomaly probability is driven by the discrepancy between abnormal and normal representations rather than by an isolated branch confidence. This suggests a representation-learning objective aligned with separation: abnormal evidence is strengthened when it receives high support from 6 and comparatively low support from 7. The stated motivation is robustness under severe class imbalance, and the reported comparison with DMFI-A supports that claim (Kong et al., 6 Aug 2025).
4. Mathematical formulation
The branch-specific losses are given explicitly. For the normal branch,
8
For the abnormal branch,
9
The inference score is then
0
and the session-level fusion objective is binary cross-entropy:
1
These equations formalize a two-stage decision process: branch-level discriminative scoring followed by cross-modal fusion (Kong et al., 6 Aug 2025).
The semantic and behavioral inference path follows the same margin logic. For each semantic entry 2, DMFI-B computes semantic logits from the normal and abnormal semantic branches, then derives
3
The semantic feature vector is
4
while the behavioral score is
5
The concatenated vector
6
is passed to the MLP, and the final decision rule is abnormal if 7, otherwise normal (Kong et al., 6 Aug 2025).
5. Training procedure and implementation profile
The training algorithm begins by copying the pretrained LLM 8 into 9 and 0, then injecting LoRA modules into the query and value projections of both models. Fine-tuning proceeds for three epochs; for each batch in the branch-specific dataset, the model computes logits, evaluates the corresponding loss, and updates only the LoRA parameters 1 (Kong et al., 6 Aug 2025). The inference algorithm extracts semantic entries and the behavioral narrative from a session, computes semantic per-entry margin scores and a behavioral margin score, aggregates the semantic statistics, applies MLP fusion, and emits a final normal/abnormal label.
The reported implementation uses DeepSeek-R1 7B, instruction-tuned, as the base model. LoRA is injected into query and value projections only, with rank 2, scaling factor 3, and dropout 4. Optimization uses AdamW with learning rate 5, cosine decay, and a 100-step linear warm-up. Training runs for 3 epochs with batch size 16, gradient accumulation 4, maximum gradient norm 1.0, and FP16 mixed precision plus 8-bit quantization through bitsandbytes. The fusion module is a three-layer fully connected MLP with input dimension 5, hidden dimensions exemplified as 6, ReLU activations, and a final sigmoid. The reported hardware is 47 NVIDIA L20 GPUs (Kong et al., 6 Aug 2025).
These implementation details matter because DMFI-B adds capacity selectively rather than fully fine-tuning the underlying model. The paper’s efficiency discussion states that DMFI-B incurs approximately 20% more GPU memory and approximately 10% longer inference than DMFI-A, reflecting the cost of maintaining and evaluating dual discriminative branches (Kong et al., 6 Aug 2025).
6. Empirical evaluation and comparative performance
The evaluation uses the CERT r4.2 and r5.2 datasets. The paper reports 32M records and 7.3K anomalies for CERT r4.2, and 80M records and 10.3K anomalies for CERT r5.2. The setup performs session-level aggregation, a 70/30 train/test split, undersamples benign data to 20K sessions, and maintains an approximate benign/anomalous ratio of 8:2 (Kong et al., 6 Aug 2025). Baselines include classical methods such as SVM, Isolation Forest, and XGBoost; neural and domain-specific models such as Transformer, ITDBERT, LAN, and CATE; and LLM-oriented methods including LogGPT, LogPrompt, Audit-LLM, and ITDLM.
The reported evaluation metrics are Precision (Prec), Detection Rate (DR), False Positive Rate (FPR), and Accuracy (Acc). Against the best stated baseline, Audit-LLM, DMFI-B achieves the following results (Kong et al., 6 Aug 2025):
| Dataset | DMFI-B result vs. best baseline |
|---|---|
| CERT r4.2 | Prec 0.953 (+3.2%), DR 0.929 (+1.3%), FPR 0.009 (−40%), Acc 0.981 (+0.8%) |
| CERT r5.2 | Prec 0.945 (+2.1%), DR 0.938 (+2.5%), FPR 0.011 (−27%), Acc 0.981 (+0.8%) |
The ablation comparing DMFI-B with DMFI-A is especially important for interpreting the value of discriminative adaptation. With both modalities enabled, DMFI-A achieves Acc 0.979/0.977 and FPR 0.012/0.013 on r4.2/r5.2, whereas DMFI-B improves to Acc 0.983/0.981 and FPR 0.009/0.011 (Kong et al., 6 Aug 2025). The paper’s conclusion is that the discriminative dual-branch structure yields better separability under class imbalance.
The modality ablations further indicate that integration is central rather than incidental: removing the semantic or behavioral view lowers Acc and DR by 2–4% (Kong et al., 6 Aug 2025). In that sense, DMFI-B is not merely a normal-versus-abnormal branch split; it is a dual-modality system whose discriminative advantage depends on semantic reasoning and structured behavioral modeling being combined.
7. Interpretation, scope, and points of distinction
The paper summarizes DMFI-B’s core innovation as explicit disentanglement of normal and malicious behavior representations through dual-branch discriminative fine-tuning (Kong et al., 6 Aug 2025). The resulting margin-sensitive scoring mechanism is presented as the basis for improved robustness under severe class imbalance. This interpretation is consistent with the measured gains in FPR and DR over DMFI-A and the best baseline.
Several boundaries of the method are also clear from the reported design. First, DMFI-B is not a single-branch classifier with post hoc calibration; its anomaly score is defined by the difference between two separately adapted models. Second, it is not a text-only system: semantic evidence and 4W-compressed behavioral evidence are both required by the full formulation. Third, its reported performance is tied to session-level aggregation and to the specific CERT r4.2/r5.2 evaluation protocol described in the paper (Kong et al., 6 Aug 2025).
A further distinction concerns operational trade-offs. The paper reports better FPR and DR than DMFI-A, but also approximately 20% more GPU memory and approximately 10% longer inference (Kong et al., 6 Aug 2025). This suggests that the method is oriented toward security-critical settings in which false positives and missed detections justify additional computational cost.
Finally, the acronym “DMFI-B” should not be conflated with unrelated uses of “DMFI” in other fields. In cybersecurity and LLM-based insider threat detection, DMFI-B denotes the discriminative branch-based variant of Dual-Modality Fine-Tuning and Inference (Kong et al., 6 Aug 2025); in aerodynamics, “DMFI” refers to a downstream microjet fluidic injection system for supersonic jets (Pourhashem et al., 2019). The overlap is terminological rather than conceptual.