Skip to main content
QUICK REVIEW

[论文解读] Generation-driven Contrastive Self-training for Zero-shot Text Classification with Instruction-following LLM

Ruohong Zhang, Yau-Shian Wang|arXiv (Cornell University)|Apr 24, 2023
Topic ModelingComputer Science被引用 3
一句话总结

GenCo 提出了一种生成驱动的对比自训练框架,利用指令微调的 GPT 模型来增强小型高效句向量编码器,实现零样本文本分类。通过生成语义丰富的文本数据增强和标签条件化训练数据,GenCo 提升了与决策边界的对齐,即使在有限的领域内数据下,也在基准数据集上实现了最先进性能。

ABSTRACT

The remarkable performance of large language models (LLMs) in zero-shot language understanding has garnered significant attention. However, employing LLMs for large-scale inference or domain-specific fine-tuning requires immense computational resources due to their substantial model size. To overcome these limitations, we introduce a novel method, namely GenCo, which leverages the strong generative power of LLMs to assist in training a smaller and more adaptable language model. In our method, an LLM plays an important role in the self-training loop of a smaller model in two important ways. Firstly, the LLM is used to augment each input instance with a variety of possible continuations, enriching its semantic context for better understanding. Secondly, it helps crafting additional high-quality training pairs, by rewriting input texts conditioned on predicted labels. This ensures the generated texts are highly relevant to the predicted labels, alleviating the prediction error during pseudo-labeling, while reducing the dependency on large volumes of unlabeled text. In our experiments, GenCo outperforms previous state-of-the-art methods when only limited ($<5\%$ of original) in-domain text data is available. Notably, our approach surpasses the performance of Alpaca-7B with human prompts, highlighting the potential of leveraging LLM for self-training.

研究动机与目标

  • 为解决直接使用大型 GPT 模型进行零样本文本分类时效率低下和计算成本过高的问题。
  • 通过利用目标空间中的实例相关性和决策边界,克服基于 GPT 模型独立预测的局限性。
  • 通过高质量、GPT 生成的训练数据,提升小型高效句向量编码器分类器的性能。
  • 通过使用 GPT 生成多样且语义相关的训练样本(基于输入分布),提升零样本学习中的数据效率。

提出的方法

  • GenCo 使用 GPT 模型通过条件化输入和提示词,为每个输入生成多个增强文本,将这些文本拼接后编码,生成融合嵌入表示。
  • 该方法通过对比自训练优化句向量编码器,使其将输入-增强文本对的嵌入拉近,同时将它们与负样本对的嵌入推远。
  • 在自训练过程中,GPT 会基于模型预测的伪标签生成新的增强文本,使训练数据与目标空间中的决策边界对齐。
  • 该框架通过迭代方式利用这些 GPT 生成的、标签条件化的训练对,不断优化句向量编码器,提升泛化能力和鲁棒性。
  • 采用温度缩放的对比损失以稳定训练过程,并强调难负样本,温度超参数经过调优以增强决策边界学习。
  • 句向量编码器(如 RoBERTa-SimCSE)使用 GPT 增强的数据进行微调,其预测结果用于在后续迭代中生成新的伪标签训练实例。

实验结果

研究问题

  • RQ1GPT 生成的文本增强是否能提升零样本文本分类中输入文本与相关类别标签之间的语义对齐?
  • RQ2在预测伪标签的条件下进行 GPT 生成,是否能增强决策边界学习并提升模型泛化能力?
  • RQ3与标准自训练或直接使用 GPT 推理相比,使用 GPT 生成的、标签条件化的数据进行对比自训练是否能带来更好的性能?
  • RQ4在领域内标注数据稀缺的低数据场景下,GenCo 的有效性如何?

主要发现

  • 在包括 HellaSwag、HCN 在内的四个基准数据集上,GenCo 在零样本评估设置下优于以往最先进方法。
  • 即使仅使用有限的领域内文本数据,模型仍实现了显著的性能提升,展现出强大的数据效率。
  • 可视化结果表明,基于正确伪标签条件生成的 GPT 文本在语义空间中更接近对应标签嵌入,证实了与决策边界的对齐。
  • 通过生成在语义上与其他类别明显不同的文本,该方法减少了训练对的歧义,t-SNE 投影结果表明聚类分离更清晰。
  • 与 InstructGPT 和 Alpaca 等基线模型直接用于推理相比,GenCo 实现了更高的准确率,凸显了使用 GPT 增强数据进行迭代自训练的优势。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。