TL;DR
This paper introduces a novel method for making prototype-based text classifiers both more accurate and easier to understand by using Large Language Models (LLMs) as optimizers. Instead of "projecting" abstract learned vectors onto messy, real-world training examples, the authors use LLMs to iteratively synthesize concise, "Platonic ideal" prototypes that better represent the model's internal logic.
What Problem Does This Paper Address?
Prototype Neural Networks (PNNs) are a popular "interpretable-by-design" architecture. They classify data by comparing an input to a set of "prototypes"—representative examples of a class. If a model classifies a movie review as "Positive" because it’s similar to a prototype review saying "Great acting and plot," a human can easily follow that logic.
However, current PNNs face a "projection problem." During training, the model learns abstract mathematical vectors as prototypes. To make these human-readable, researchers usually find the nearest actual sentence in the training data and swap the vector for that sentence. This causes two issues:
- Performance Drop: Real training examples rarely align perfectly with the "perfect" mathematical vector the model learned, leading to a loss in accuracy.
- Cognitive Overload: Real-world training examples are often long and full of irrelevant details (e.g., a review mentioning a specific actor's name when the model only cares about the sentiment), making them hard for humans to parse quickly.
Methods
The authors propose LLM Optimization to bridge the gap between abstract vectors and readable text.
Instead of just picking the closest existing sentence, they treat the LLM as a search engine for the "perfect" prototype text. The process works in three stages:
- Initialization: The system identifies the top-k nearest training examples to a learned prototype vector. It then asks an LLM to generate short, focused "guesses" that capture the core concepts of these examples.
- Iterative Optimization: The LLM is put into a loop. In each iteration, it receives the current best text snippets and their cosine similarity scores to the target vector. It is then prompted to "suggest another guess closer to 1" (perfect similarity). To maintain diversity and avoid local minima, the authors use three LLMs in parallel (Meta-Llama-3-8B-Instruct).
- Final Projection: Once the loop finishes (or a similarity threshold is met), the highest-scoring generated text becomes the official prototype for the model.
Datasets
The researchers evaluated their method across six diverse text classification benchmarks:
- For Intelligibility (Longer text): IMDB (movie reviews), Amazon Reviews (product feedback), and AG News (news categorization).
- For Accuracy (Harder classification): TREC (question types), DBpedia (Wikipedia categories), and 20 Newsgroups (email topics).
They tested these using four different backbone models: BERT, RoBERTa, ELECTRA, and MPNet.
Key Insights and Ideas
- Abstract is Better than Real: Following classical "Prototype Theory" from psychology, a prototype should be an abstract representation, not a specific instance. By letting the LLM "hallucinate" a clean summary, the researchers found they could create prototypes that are more "prototypical" than anything found in the raw data.
- LLMs as Zero-Order Optimizers: Since we can't easily perform gradient descent on discrete text to match a vector, using an LLM to "search" the space of possible sentences is a highly effective alternative.
- The "Sparsity" Advantage: The LLM-generated prototypes act as "sparse featural representations." They strip away the "spurious" details of training data, reducing the cognitive load on the human user without confusing the model.
Key Results
- Radical Simplification: The optimized prototypes were, on average, 10x shorter than the training data projections (95.5 characters vs. 682.3 characters). Despite this brevity, they preserved the core semantic meaning.
- Closing the Accuracy Gap: In datasets where standard projection caused significant accuracy loss, the LLM-optimized prototypes recovered much of that performance. For example, on the harder datasets, the accuracy drop was reduced from 1.12% (standard) to just 0.78% (optimized).
- Higher Fidelity: The generated text achieved significantly higher cosine similarity to the model's internal "black-box" vectors than any real training example could.
- Human-Aligned Logic: Using "LLM-as-a-judge" (Claude 3.5 Sonnet), the authors found that the optimized prototypes preserved 57% of the relevant concepts while being only 11% of the original length.
Limitations and Future Work
- Domain Constraint: The study is currently limited to text. The authors suggest that future work could apply this to the image domain using generative models like Stable Diffusion to "synthesize" visual prototypes.
- Computational Cost: While the optimization is a one-time initialization cost, running iterative LLM loops is more expensive than a simple nearest-neighbor search.
- Model Choice: While Llama-3-8B was used for accessibility and cost, the authors noted that more powerful models like Claude 3.5 Sonnet produced even better results, suggesting the method scales with the quality of the optimizer LLM.
Summary updated