Abstract
Standard classification models often map inputs directly to labels without explicit reasoning, potentially limiting their performance, robustness, and interpretability. This paper introduces a novel two-stage approach to enhance text classification by leveraging Large Language Model (LLM)-generated reasonings. In the first stage, we fine-tune a Llama-3.2-1B-Instruct model (henceforth Llama-R-Gen) on a general-purpose reasoning dataset (syvai/reasoning-gen) to generate textual reasoning (R) given a question and its answer. In the second stage, this generally trained Llama-R-Gen is used offline to create an augmented training dataset for a downstream generative model. This downstream model, based on Llama-3.2-1B-Instruct, takes only the input text (Q) and is trained to output the generated reasoning (R) immediately followed by the predicted emotion (A). We demonstrate this methodology on the dair-ai/emotion dataset for emotion classification. Our experiments show that the generative model trained to output reasoning and the emotion (Classifier Q->RA) achieves a significant improvement of 8.7 percentage points in accuracy (for emotion prediction) compared to a baseline generative model trained solely to output the emotion (Classifier Q->A), highlighting the strong generalization capabilities of the reasoning generation and the benefit of explicit reasoning training. This work underscores the potential of LLM-generated reasonings for creating richer training datasets, thereby improving the performance of diverse downstream NLP tasks and providing explicit explanations.
Abstract (translated)
标准的分类模型通常直接将输入映射到标签,而不进行显式的推理过程,这可能会限制其性能、鲁棒性和可解释性。本文提出了一种新颖的两阶段方法,通过利用大型语言模型(LLM)生成的推理来增强文本分类。在第一阶段,我们对Llama-3.2-1B-Instruct模型(以下简称 Llama-R-Gen)进行微调,使其在一个通用推理数据集(syvai/reasoning-gen)上生成给定问题及其答案的文字推理(R)。第二阶段中,将这个经过一般训练的Llama-R-Gen离线应用于创建下游生成模型的增强型训练数据集。该下游模型基于Llama-3.2-1B-Instruct,并且仅接收输入文本(Q),其被训练以直接输出由LLM生成的推理(R)紧接预测的情感标签(A)。我们在dair-ai/emotion情感分类数据集上展示了这种方法的应用。实验结果表明,与仅用于输出情感标签(Classifier Q->A)的基础生成模型相比,训练为同时输出推理和情感(Classifier Q->RA)的生成模型,在准确率方面有显著提升(8.7个百分点),这突显了通过明确的推理训练获得的强大泛化能力以及这种训练方法的优势。这项工作强调了LLM生成推理在创建更丰富的训练数据集方面的潜力,从而提高了各种下游自然语言处理任务的表现,并提供了明确的解释支持。
URL
https://arxiv.org/abs/2507.00214