[Paper Review] LlamBERT: Large-scale low-cost data annotation in NLP
LlamBERT combines LLM-based labeling on a subset of unlabeled data with fine-tuning of BERT/RoBERTa, achieving competitive accuracy at reduced cost on IMDb and UMLS datasets.
Large Language Models (LLMs), such as GPT-4 and Llama 2, show remarkable proficiency in a wide range of natural language processing (NLP) tasks. Despite their effectiveness, the high costs associated with their use pose a challenge. We present LlamBERT, a hybrid approach that leverages LLMs to annotate a small subset of large, unlabeled databases and uses the results for fine-tuning transformer encoders like BERT and RoBERTa. This strategy is evaluated on two diverse datasets: the IMDb review dataset and the UMLS Meta-Thesaurus. Our results indicate that the LlamBERT approach slightly compromises on accuracy while offering much greater cost-effectiveness.
Motivation & Objective
- Motivate a resource-efficient data annotation paradigm using LLMs to label a subset of a large unlabeled corpus.
- Demonstrate the effectiveness of using LLM-labeled data to fine-tune smaller transformers like BERT and RoBERTa.
- Evaluate the approach on diverse datasets (IMDb sentiment and UMLS anatomy-related concepts) to assess generality and cost-efficiency.
Proposed method
- Annotate a randomly selected subset of unlabeled data with Llama 2 using binary prompts reflecting labeling criteria.
- Parse Llama 2 outputs into target categories and discard ambiguous data.
- Fine-tune a BERT/RoBERTa classifier on the LLM-labeled data and optionally on gold data for improved performance.
- Apply the fine-tuned classifier to annotate the full unlabeled corpus.
- Compare LlamBERT variants (0-shot, few-shot prompts; extra unlabeled data; combined with gold data) across models.
- Experiment with Llama-2-7b-chat, Llama-2-70b-chat, and GPT-4-0613 to assess effectiveness and cost.
Experimental results
Research questions
- RQ1Can LLM-assisted labeling of a subset of unlabeled data yield competitive NLP model performance when used to fine-tune smaller transformers?
- RQ2How does adding extra unlabeled data labeled by LLMs affect downstream accuracy compared to gold-standard data alone?
- RQ3What is the comparative cost-efficiency of LlamBERT versus fully supervised or fully LLM-based labeling across benchmarks?
- RQ4Does the hybrid approach generalize across different domains, such as sentiment analysis (IMDb) and biomedical ontology labeling (UMLS)?
Key findings
- For IMDb, RoBERTa-large with LlamBERT achieved state-of-the-art performance (96.68% on the test set) when combining gold data with LLM-labeled data.
- LlamBERT approaches approach gold-baseline accuracy with substantially lower labeling costs; using the extra unlabeled data labeled by Llama-2-70b-chat yields small accuracy gains.
- Labeling 10,000 entries with Llama-2-70b-chat provides a reasonable balance between accuracy and efficiency, with RoBERTa-large showing strong robustness to labeling noise.
- In UMLS experiments, LlamBERT improves over baseline BERT/RoBERTa results, with combined labeling (Llama-2-70b-chat plus gold data) approaching or matching domain-specific models like BiomedBERT-large.
- The combined strategy often marginally outperforms using LLM labeling alone, suggesting practical benefits of the hybrid approach for large-scale annotation.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.