Skip to main content
QUICK REVIEW

[Paper Review] FineText: Text Classification via Attention-based Language Model Fine-tuning

Yunzhe Tao, Saurabh Gupta|arXiv (Cornell University)|Oct 25, 2019
Topic ModelingComputer Science31 references4 citations
TL;DR

FineText proposes an attention-based fine-tuning method that extracts contextualized features from a pre-trained language model to improve text classification performance. By applying self-attention to select relevant representations, the model achieves state-of-the-art results across six benchmark datasets, with relative improvements over prior SOTA methods ranging from 2.27% to 25.38%.

ABSTRACT

Training deep neural networks from scratch on natural language processing (NLP) tasks requires significant amount of manually labeled text corpus and substantial time to converge, which usually cannot be satisfied by the customers. In this paper, we aim to develop an effective transfer learning algorithm by fine-tuning a pre-trained language model. The goal is to provide expressive and convenient-to-use feature extractors for downstream NLP tasks, and achieve improvement in terms of accuracy, data efficiency, and generalization to new domains. Therefore, we propose an attention-based fine-tuning algorithm that automatically selects relevant contextualized features from the pre-trained language model and uses those features on downstream text classification tasks. We test our methods on six widely-used benchmarking datasets, and achieve new state-of-the-art performance on all of them. Moreover, we then introduce an alternative multi-task learning approach, which is an end-to-end algorithm given the pre-trained model. By doing multi-task learning, one can largely reduce the total training time by trading off some classification accuracy.

Motivation & Objective

  • To develop an effective transfer learning algorithm that leverages pre-trained language models for downstream text classification tasks.
  • To address the limitations of training deep neural networks from scratch, which require large labeled datasets and long training times.
  • To improve model performance in terms of accuracy, data efficiency, and generalization to new domains through feature selection using attention mechanisms.
  • To explore a multi-task learning approach that reduces training time by jointly fine-tuning the language model and classifier.
  • To evaluate the impact of pre-training data and model architecture on downstream task performance.

Proposed method

  • The method employs a self-attention mechanism to dynamically select and weight relevant contextualized features from the hidden states of a pre-trained language model.
  • The selected attention-weighted features are used as input representations for a downstream text classifier, replacing traditional concatenation or pooling strategies.
  • The model is trained end-to-end using a cross-entropy loss for classification and a language modeling objective for feature refinement.
  • An alternative multi-task learning framework is introduced, where the language model and classifier are jointly fine-tuned with a weighted loss combining both objectives.
  • The attention mechanism is applied at the sequence level, allowing the model to focus on salient tokens and contextual dependencies relevant to classification.
  • The approach is evaluated using a standard pre-trained language model, with fine-tuning performed on six widely used text classification benchmarks.

Experimental results

Research questions

  • RQ1How does attention-based feature selection from a pre-trained language model impact performance on downstream text classification tasks?
  • RQ2What factors in the pre-trained language model (e.g., training data, architecture) most significantly affect downstream performance?
  • RQ3Can joint multi-task fine-tuning of the language model and classifier reduce training time without sacrificing classification accuracy?
  • RQ4How does the proposed method compare to existing SOTA approaches like ULMFiT and ELMo in terms of accuracy and data efficiency?
  • RQ5To what extent does the attention mechanism improve feature representativeness compared to fixed pooling or concatenation strategies?

Key findings

  • The proposed attention-based fine-tuning method achieves new state-of-the-art performance on all six benchmark datasets tested, including AG, IMDb, DBpedia, Yelp-bi, Yelp-full, and Sogou news.
  • On the Yelp-bi dataset, the method achieves a 16.88% relative improvement over ULMFiT and a 25.38% improvement over the previous SOTA, demonstrating strong gains in low-resource settings.
  • On the Sogou news dataset, the method achieves a 25.22% relative improvement over ULMFiT and an 8.15% improvement over the previous SOTA, highlighting its effectiveness on diverse domains.
  • The multi-task learning variant reduces total training time from 6.5 hours to 3.5 hours on the AG news dataset, though with a slight performance drop to 5.49% error rate.
  • Attention visualization confirms that the model learns to focus on semantically relevant tokens, such as class-specific keywords, improving interpretability and feature relevance.
  • The use of a single self-attention layer outperforms ensemble and multi-head attention variants in terms of performance-to-complexity trade-off, justifying its adoption in the final architecture.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.