AdaSent: Efficient Domain-Adapted Sentence Embeddings for Few-Shot Classification

Yongxin Huang, Kexin Wang, Sourav Dutta, Raj Nath Patel, Goran Glavaš +1 more
11/1/2023
4 citations
cs.CL

Official code: UKPLab/AdaSent (17 stars, Python, Apache-2.0, last commit 2024-06-03).

Abstract

Recent work has found that few-shot sentence classification based on pre-trained Sentence Encoders (SEs) is efficient, robust, and effective. In this work, we investigate strategies for domain-specialization in the context of few-shot sentence classification with SEs.

Show full abstract

We first establish that unsupervised Domain-Adaptive Pre-Training (DAPT) of a base Pre-trained Language Model (PLM) (i.e., not an SE) substantially improves the accuracy of few-shot sentence classification by up to 8.4 points. However, applying DAPT on SEs, on the one hand, disrupts the effects of their (general-domain) Sentence Embedding Pre-Training (SEPT). On the other hand, applying general-domain SEPT on top of a domain-adapted base PLM (i.e., after DAPT) is effective but inefficient, since the computationally expensive SEPT needs to be executed on top of a DAPT-ed PLM of each domain. As a solution, we propose AdaSent, which decouples SEPT from DAPT by training a SEPT adapter on the base PLM. The adapter can be inserted into DAPT-ed PLMs from any domain. We demonstrate AdaSent's effectiveness in extensive experiments on 17 different few-shot sentence classification datasets. AdaSent matches or surpasses the performance of full SEPT on DAPT-ed PLM, while substantially reducing the training costs. The code for AdaSent is available.

View on arXivView PDF

Code Implementations(1)

UKPLab/AdaSentOfficial100%
Apache-2.0

This repository contains the code for the EMNLP'23 paper "AdaSent: Efficient Domain-Adapted Sentence Embeddings for Few-Shot Classification"

171Python, ShellOct 13, 20232 years agoApache-2.0

Similar Papers

Cite this paper

@article{huang2023adasent,
  title  = {AdaSent: Efficient Domain-Adapted Sentence Embeddings for Few-Shot Classification},
  author = {Yongxin Huang and Kexin Wang and Sourav Dutta and Raj Nath Patel and Goran Glavaš and Iryna Gurevych},
  year   = {2023},
  eprint = {2311.00408},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2311.00408v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2311.00408.svg)](https://codeofpaper.com/paper/2311.00408)

Discussion