Introduction
Large Language Models (LLMs) are typically adapted for classification tasks by appending a "value head"—a small, task-specific neural layer—to the model's internal representations. However, this approach often creates a performance bottleneck due to the architectural mismatch between the pre-trained LLM and the newly initialized head. GenCLS++ proposes a paradigm shift: leveraging the generative capabilities of LLMs for classification through a unified framework of Supervised Fine-Tuning (SFT) and Reinforcement Learning (RL).
The GenCLS++ Framework
The GenCLS++ approach optimizes the classification pipeline across three critical stages: SFT, RL, and Inference. Unlike traditional methods, it treats classification as a text generation task, where the model directly outputs the category label.
1. Comprehensive SFT Exploration
The researchers systematically explored five dimensions of SFT to identify optimal prompting strategies:
- In-Context Learning (ICL): Comparing zero-shot, N-shot, and RAG-based "Similar-3-shot" examples.
- Category Definitions: Incorporating LLM-generated definitions for each class within the prompt.
- Uncertainty Modeling: Training the model to explicitly output "Uncertain" for ambiguous inputs to minimize noise.
- Numerical Mapping: Testing the model's ability to map categories to semantically neutral numerical labels.
- Perplexity-based Decoding: Utilizing a specialized inference technique to select the most probable label based on token likelihood.
2. Reinforcement Learning with Reinforce++
Following an SFT "warm-up" phase, the model undergoes RL using the Reinforce++ algorithm. This stage uses simple rule-based rewards: the model receives a positive reward for producing the correct label in the required format. This allows the model to explore and reinforce high-accuracy output paths without the need for complex human preference data.
Key Insights: The "Anti-Reasoning" Discovery
One of the most significant findings of this study is that Chain-of-Thought (CoT) reasoning is detrimental to classification performance. While "thinking" steps are crucial for complex reasoning tasks like mathematics or coding, they appear to introduce unnecessary noise or "overthinking" in classification. Models trained to output the answer directly consistently outperformed those utilizing <think> tags. Furthermore, during the RL phase, models naturally learned to prune their responses, eventually discarding reasoning steps in favor of direct, accurate label generation.
Experimental Results
GenCLS++ was evaluated on seven datasets, including public benchmarks (EC, EIC, IFLYTEK, TNEWS) and large-scale proprietary datasets (Query Intent, Search Correlation, Query Taxonomy) with up to 326 categories.
The results demonstrate that GenCLS++ consistently outperforms both naive SFT and traditional discriminative (value-head) baselines. On public datasets, the framework achieved an average accuracy improvement of 4.00%. Key takeaways from the results include:
- SFT Warm-up is Essential: Performing RL directly on a base model is highly inefficient; an initial SFT phase improved final RL accuracy by an average of 18.18%.
- Generative Superiority: The generative approach proves more robust than traditional discriminative models, particularly as the number of categories increases.
- Efficiency: Using Reinforce++ provided significant performance gains with lower computational overhead compared to algorithms like PPO or GRPO.
Conclusion
GenCLS++ demonstrates that the generative nature of LLMs is a feature, not a bug, for classification tasks. By aligning training and inference strategies and refining the model through rule-based RL, GenCLS++ sets a new standard for high-performance, scalable text classification. Future work will investigate if these findings—particularly the negative impact of CoT—scale to models beyond the 7B parameter range.
Summary updated