sumitguha13/phi-4-mini-adr-detector

TEXT GENERATIONPricing:Input $0.32 / Cached $0.016 / Output $1.4Concurrent Unit Cost:1Model Size:3.8BQuant:BF16Context Size:32kPublished:Sep 1, 2026License:mitArchitecture:Transformer Open Weights Featherless Exclusive Cold

The sumitguha13/phi-4-mini-adr-detector is a 3.8 billion parameter LoRA fine-tune of Microsoft's Phi-4-mini-instruct model, specifically designed to classify AI-agent execution traces as benign or malicious. It features a 32768-token context window, allowing it to process full execution traces without truncation, a significant advantage for security analysis. This model excels at detecting various AI agent threats, achieving a balanced accuracy of 72.7% on the Uber ADR-Bench dataset, making it a specialized tool for AI agent security triage.

Loading preview...

Model Overview

This model, sumitguha13/phi-4-mini-adr-detector, is a LoRA fine-tune of the microsoft/Phi-4-mini-instruct model, specialized in classifying AI-agent execution traces as either benign or malicious. It leverages a 3.8 billion parameter architecture with an extended context length of 32,768 tokens, which is crucial for analyzing complete agent interaction logs without truncation.

Key Capabilities & Performance

  • AI Agent Threat Detection: Specifically trained to identify adversarial attacks within AI agent execution traces.
  • High Context Window: Utilizes a 32,768-token context, ensuring zero truncation of even lengthy traces (up to 27,932 tokens observed in ADR-Bench).
  • Evaluated on ADR-Bench: Achieves a balanced accuracy of 72.7% on the Uber ADR-Bench dataset, significantly outperforming base Phi-4-mini models which struggle with class imbalance.
  • Threat Technique Coverage: Demonstrates strong performance in detecting Indirect Prompt Injection, Tool Shadowing, and various other specific attack techniques.

Limitations & Considerations

  • Malicious Recall: The model's recall for malicious traces is 59.5%, meaning it misses approximately two out of five attacks. It is intended as a triage aid, not a standalone security control.
  • Precision: Has a precision of 0.403, with 37 false positives on 261 benign traces.
  • Semantic Data Poisoning: Currently fails to detect Semantic Data Poisoning attacks.
  • Generalization: Evaluated solely on ADR-Bench; generalization to other agent frameworks is untested.

Training Details

The model was fine-tuned using LoRA (r=32, alpha=64, dropout 0.05) on qkv_proj, o_proj, gate_up_proj, and down_proj layers. Training involved 2 epochs with a learning rate of 1e-4 (cosine schedule) and a max_len of 3072, completed in 32 minutes on a single A100-40GB GPU.