Skip to main content
LawSphereX

Are ELECTRA’s Sentence Embeddings Beyond Repair? The Case of Semantic Textual Similarity

Subject: Language and Linguistics

Author or source: Ivan Rep, David Dukić, Jan Šnajder

Updated:

We notice a significant drop in performance for the ELECTRA discriminator’s last layer in comparison to prior layers.

Ivan Rep, David Dukić, Jan Šnajder. 2024. Are ELECTRA’s Sentence Embeddings Beyond Repair? The Case of Semantic Textual Similarity. Findings of the Association for Computational Linguistics: EMNLP 2024. Association for Computational Linguistics. DOI 10.18653/v1/2024.findings-emnlp.535. CC BY 4.0. Original PDF and author abstract are reproduced unchanged apart from whitespace in the abstract. LawSphereX prepared the reading prompt and cover. No endorsement implied.

Publication sources

Authors’ abstract

Source page 1–11

While BERT produces high-quality sentence embeddings, its pre-training computational cost is a significant drawback. In contrast, ELECTRA provides a cost-effective pre-training objective and downstream task performance improvements, but worse sentence embeddings. The community tacitly stopped utilizing ELECTRA’s sentence embeddings for semantic textual similarity (STS). We notice a significant drop in performance for the ELECTRA discriminator’s last layer in comparison to prior layers. We explore this drop and propose a way to repair the embeddings using a novel truncated model fine-tuning (TMFT) method. TMFT improves the Spearman correlation coefficient by over 8 points while increasing parameter efficiency on the STS Benchmark. We extend our analysis to various model sizes, languages, and two other tasks. Further, we discover the surprising efficacy of ELECTRA’s generator model, which performs on par with BERT, using significantly fewer parameters and a substantially smaller embedding size. Finally, we observe boosts by combining TMFT with word similarity or domain adaptive pre-training.

Reading guide for language and linguistics

Source page 1–11

Identify the language phenomenon and how the authors annotate or measure it. Check whether the examples support the conclusions for other settings.