TwinBERT: Distilling Knowledge to Twin-Structured BERT Models for Efficient RetrievalCCS: Computing methodologies Massively parallel algorithmsCCS: Computing methodologies Machine learning algorithmsCCS: Computing methodologies Supervised learningCCS: Computing methodologies Neural networksCCS: Computing methodologies Learning latent representationsCCS: Information systems Document representationCCS: Information systems Query representationCCS: Information systems Sponsored search advertising
Wenhao Lu Affiliation: Bing Ads of AI、Research Group , Microsoft , One Microsoft Way , Redmond , WA , 98052-6399 email: , Jian Jiao Affiliation: Bing Ads of AI、Research Group , Microsoft , One Microsoft Way , Redmond , WA , 98052-6399 email: and Ruofei Zhang Affiliation: Bing Ads of AI、Research Group , Microsoft , One Microsoft Way , Redmond , WA , 98052-6399 email:
Abstract
Pre-trained language models like BERT have achieved great success in a wide variety of NLP tasks, while the superior performance comes with high demand in computational resources, which hinders the application in low-latency IR systems. We present TwinBERT model for effective and efficient retrieval, which has twin-structured BERT-like encoders to represent query and document respectively and a crossing layer to combine the embeddings and produce a similarity score. Different from BERT, where the two input sentences are concatenated and encoded together, TwinBERT decouples them during encoding and produces the embeddings for query and document independently, which allows document embeddings to be pre-computed offline and cached in memory. Thereupon, the computation left for run-time is from the query encoding and query-document crossing only. This single change can save large amount of computation time and resources, and therefore significantly improve serving efficiency. Moreover, a few well-designed network layers and training strategies are proposed to further reduce computational cost while at the same time keep the performance as remarkable as BERT model. Lastly, we develop tw
原文 arXiv:2002.06275;中英对照 + 大白话阅读 https://aha.fim.ai/paper/2002.06275v1