Skip to main content
QUICK REVIEW

[Paper Review] Improving Domain Adaptation through Extended-Text Reading Comprehension

Ting Jiang, Shaohan Huang|arXiv (Cornell University)|Jan 14, 2024
Topic ModelingComputer Science3 citations
TL;DR

This paper proposes a domain adaptation method that improves large language models using LLM-generated question-answer pairs and length-based clustering to extend context, combined with parameter-efficient fine-tuning via LoRA. The approach outperforms AdaptLLM by over 5% on average across domain-specific tasks, demonstrating superior performance in biomedicine and finance domains through enhanced comprehension and context enrichment.

ABSTRACT

To enhance the domain-specific capabilities of large language models, continued pre-training on a domain-specific corpus is a prevalent method. Recent work demonstrates that adapting models using reading comprehension data formatted by regex-based patterns can significantly improve performance on domain-specific tasks. However, regex-based patterns are incapable of parsing raw corpora using domain-specific knowledge. Furthermore, the question and answer pairs are extracted directly from the corpus in predefined formats offers limited context. To address this limitation, we improve reading comprehension via LLM and clustering. LLM focuses on leveraging domain knowledge within the corpus to refine comprehension stage, while clustering supplies relevant knowledge by extending the context to enrich reading stage. Additionally, our method incorporates parameter-efficient fine-tuning to improve the efficiency of domain adaptation. In comparison to AdaptLLM, our method achieves an improvement exceeding 5% in domain-specific tasks. Our code will available at https://github.com/microsoft/LMOps.

Motivation & Objective

  • To address the limitations of regex-based pattern methods in converting domain corpora into reading comprehension format.
  • To enhance context richness in question-answering pairs by extending document clusters based on similarity and length.
  • To improve efficiency of domain adaptation through parameter-efficient fine-tuning with LoRA.
  • To enable high-quality, domain-specific knowledge extraction from raw corpora without relying on handcrafted regex patterns.
  • To demonstrate consistent performance gains over existing methods like AdaptLLM and DAPT on diverse domain benchmarks.

Proposed method

  • Fine-tune a 7B-parameter LLM via knowledge distillation from ChatGPT to generate high-quality question-answer pairs for domain-specific corpora.
  • Use length-based clustering to group similar documents and concatenate them into extended context inputs for question-answering tasks.
  • Apply 0/1 knapsack algorithm to fit clustered documents within the LLM’s maximum context length.
  • Employ LoRA with rank 256 and int8 quantization for efficient, parameter-efficient fine-tuning of the LLM on domain data.
  • Augment the domain corpus with general instruction data to improve zero-shot generalization.
  • Use text embedding models to compute document similarity for effective clustering in the preprocessing pipeline.

Experimental results

Research questions

  • RQ1Can LLM-generated question-answer pairs improve domain adaptation compared to regex-based pattern methods?
  • RQ2Does extending context via document clustering enhance model performance on domain-specific tasks?
  • RQ3Can parameter-efficient fine-tuning with LoRA match or exceed full fine-tuning efficiency in domain adaptation?
  • RQ4How does the integration of clustering and LLM-based preprocessing affect retrieval-augmented generation (RAG) performance?
  • RQ5To what extent does the proposed method improve upon AdaptLLM and DAPT in biomedicine and finance domains?

Key findings

  • The proposed method achieves an average improvement of 6.8% over AdaptLLM on biomedicine benchmarks and 5.6% on finance benchmarks.
  • In PubMedQA, the method reaches 79.8% accuracy, a 11.1% improvement over AdaptLLM’s 68.7%.
  • On the BioMMLU benchmark, the method achieves 54.5% with LoRA, outperforming full fine-tuning (59.5%) when using 610M trainable parameters.
  • Clustering improves performance across all methods (DAPT, ReadCompre, and the proposed method), confirming its effectiveness in context extension.
  • The method matches full fine-tuning performance with only 610M trainable parameters using LoRA rank 256, demonstrating high efficiency.
  • In RAG evaluation, the method achieves 54.5% on BioMMLU, a 6.2% improvement over DAPT and 4.2% over ReadCompre.

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.