Training-Free versus Training-Based Intent Classification in LLMs: Accuracy, Robustness, and Failure Modes

Nan Chen, Zhouhao Yang, Soufiane Hayou

This paper, recently published at COLM 2026, explores a critical component of modern AI infrastructure: the intent classifier. As Large Language Model (LLM) systems move toward routing architectures—where a prompt is first categorized and then sent to a specialized expert model (e.g., a "math" model or a "coding" model)—the efficiency and robustness of this first step become paramount.

TL;DR

The authors compare lightweight, training-free statistical methods against traditional training-based classifiers for LLM intent detection. They find that while trained models excel at fine-grained distinctions, training-free methods are significantly more robust to adversarial attacks and far easier to scale in production environments.

What Problem Does This Paper Address?

In production-scale LLM systems, routing prompts to specialized models improves both accuracy and cost-efficiency. However, building the "router" (the intent classifier) presents a dilemma.

Directly asking an LLM to classify its own input is slow and expensive. On the other hand, training dedicated supervised classifiers (like MLPs) requires significant labeled data and must be entirely retrained whenever a new category (e.g., a new programming language) is added to the system. The authors investigate whether we can instead use the "statistical signature" of an LLM’s internal activations to classify intent without any gradient-based training.

Methods

The researchers propose a "statistical compression ladder" using two training-free methods that operate during the LLM's prefill phase (the initial processing of the prompt):

  1. NormStat: The most lightweight approach. It compresses all internal features into a single radial norm per token. It is "dimension-free," meaning it requires very few samples to calibrate.
  2. VecStat: A more detailed approach that preserves coordinate-wise mean and variance of activations. It captures directional information that NormStat misses.

These are compared against Training-Based methods:

  • Avg-MLP / Tail-MLP: Small neural network heads trained on top of frozen LLM features.
  • Linear Probes: Simple linear transformations of the features.

The core idea is that different intents (math vs. code) induce distinct activation distributions. By comparing a new prompt's statistics to a pre-computed "baseline" for each class using Gaussian KL divergence, the system can route the prompt with negligible computational overhead.

Datasets

The study utilizes seven benchmark datasets across four tasks:

  • Task 1 (Coarse-grained): General text (MMLU), Math (GSM8K/MATH500), and Code (Magicoder/HumanEval).
  • Task 2 & 3: Programming language identification (9 languages) and Natural language identification (5 languages).
  • Task 4 (Fine-grained): Mathematical subfield classification (e.g., Algebra vs. Geometry) using Competition Math.

Crucially, the authors introduced two "stress-test" datasets:

  • Mixed-Intent: Prompts that interleave math and code to test uncertainty quantification.
  • Adversarial MATH500: Math problems rewritten by GPT-4o to look like coding bug reports or technical documentation, designed to trick classifiers that rely on surface-level keywords.

Key Insights and Ideas

  • The Directional vs. Radial Trade-off: Coarse tasks (Math vs. Code) can often be separated by activation magnitude alone, making NormStat highly effective. However, fine-grained tasks (Java vs. Python) require directional information. Because programming languages share a broad "code" domain, their activations differ in orientation rather than scale.
  • Robustness through Simplicity: Training-based models (MLPs) tend to overfit to "surface cues"—specific words or formatting. When a math problem is disguised as a bug report, MLPs fail spectacularly. Statistical methods, which look at the broader distributional signature of the activations, remain much more stable.
  • Scalability in Production: Adding a new class to a training-free system is nearly free—you just compute a new baseline. For an MLP-based system, adding 1,000 classes could require 20GB of storage for cached embeddings to avoid full retraining, whereas NormStat requires only 1.7MB.

Key Results

  • Saturation on Easy Tasks: On coarse-grained tasks (Task 1), both training-free and training-based methods achieved near-perfect accuracy (~99-100%).
  • The Fine-Grained Gap: On harder tasks like mathematical subfield classification, training-based MLPs significantly outperformed training-free methods. As seen in Figure 3, MLPs hit ~73-81% accuracy on subfields where VecStat struggled at ~36-55%.
Table 3: Level-2 mathematical subfield classification results. Values represent per-subfield accuracy across seven mathematical subfields. Best accuracy in each subfield is highlighted in bold.
  • Adversarial Resilience: In the adversarial "Medium" difficulty tier, NormStat:KL maintained 80.67% accuracy on Qwen3-32B, while the Avg-MLP collapsed to a mere 0.40%.
  • Efficiency: As summarized in Figure 2, training-free methods offer "Better" adversarial robustness and easier extendability compared to MLPs, despite the MLP's edge in raw accuracy on complex tasks.
Classifier Comparison Table

Limitations and Future Work

The authors acknowledge that their study focuses on single-turn prompts. In real-world applications, intent often evolves over a conversation, and routing might need to be dynamic. Furthermore, the reliance on Gaussian surrogates for activations is a simplification; while it works well, activations are not perfectly Gaussian.

Future work could explore more sophisticated non-linear statistical summaries that bridge the gap between the robustness of training-free methods and the high accuracy of trained MLPs.

Summary updated

BibTeX
@inproceedings{chen2026training,
  author = {Nan Chen and Zhouhao Yang and Soufiane Hayou},
  title = {{Training-Free versus Training-Based Intent Classification in LLMs: Accuracy, Robustness, and Failure Modes}},
  booktitle = {COLM},
  year = {2026},
  url = {https://openreview.net/forum?id=q8GCZ4sdSW},
}
Figure