Compressing Sentence Representation for Semantic Retrieval via Homomorphic Projective Distillation

Xuandong Zhao, Zhiguo Yu, Ming Wu, Lei Li
3/15/2022
cs.CLcs.IR
distillation

Official code: XuandongZhao/HPD (8 stars, Python, last commit 2022-05-20).

Abstract

How to learn highly compact yet effective sentence representation? Pre-trained language models have been effective in many NLP tasks.

Show full abstract

However, these models are often huge and produce large sentence embeddings. Moreover, there is a big performance gap between large and small models. In this paper, we propose Homomorphic Projective Distillation (HPD) to learn compressed sentence embeddings. Our method augments a small Transformer encoder model with learnable projection layers to produce compact representations while mimicking a large pre-trained language model to retain the sentence representation quality. We evaluate our method with different model sizes on both semantic textual similarity (STS) and semantic retrieval (SR) tasks. Experiments show that our method achieves 2.7-4.5 points performance gain on STS tasks compared with previous best representations of the same size. In SR tasks, our method improves retrieval speed (8.2$\times$) and memory usage (8.0$\times$) compared with state-of-the-art large models.

View on arXivView PDF

Code Implementations(1)

XuandongZhao/HPDOfficial100%

[ACL 2022] Homomorphic projective distillation (HPD) for sentence embedding

80Python, ShellMar 7, 20224 years ago

Similar Papers

Cite this paper

@article{zhao2022compressing,
  title  = {Compressing Sentence Representation for Semantic Retrieval via Homomorphic Projective Distillation},
  author = {Xuandong Zhao and Zhiguo Yu and Ming Wu and Lei Li},
  year   = {2022},
  eprint = {2203.07687},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2203.07687}
}

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/2203.07687.svg)](https://codeofpaper.com/paper/2203.07687)

Discussion