Papers › Phrase-BERT: Improved Phrase Embeddings from BERT with an Application to Corpus Exploration

Phrase-BERT: Improved Phrase Embeddings from BERT with an Application to Corpus Exploration

13 Sep 2021EMNLP 2021 11arXiv:2109.06304archive 2025-07-28

Shufan Wang, Laure Thompson, Mohit Iyyer

Phrase representations derived from BERT often do not exhibit complex phrasal compositionality, as the model relies instead on lexical similarity to determine semantic relatedness. In this paper, we propose a contrastive fine-tuning objective that enables BERT to produce more powerful phrase embeddings. Our approach (Phrase-BERT) relies on a dataset of diverse phrasal paraphrases, which is automatically generated using a paraphrase generation model, as well as a large-scale dataset of phrases in context mined from the Books3 corpus. Phrase-BERT outperforms baselines across a variety of phrase-level similarity tasks, while also demonstrating increased lexical diversity between nearest neighbors in the vector space. Finally, as a case study, we show that Phrase-BERT embeddings can be easily integrated with a simple autoencoder to build a phrase-based neural topic model that interprets topics as mixtures of words and phrases by performing a nearest neighbor search in the embedding space. Crowdsourced evaluations demonstrate that this phrase-based topic model produces more coherent and meaningful topics than baseline word and phrase-level topic models, further validating the utility of Phrase-BERT.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2109.06304")

Code

Syntology Ran 2 of 9 code samples harvested from 2 repositories linked to this paper; 7 have no recorded run. Of those that ran: 1 ran · honoured contract; 1 ran · violated contract.

By repository: official repository: 2 samples from 1 repository, 2 ran; community (archive-listed): 7 samples from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

sf-wa-326/phrase-bert-topic-model officialmentioned in papermentioned on GitHubpytorch report
memray/llm_phrase_semantics mentioned on GitHubpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

9 samples harvested; 2 ran; 1 honoured the contract we drafted; 7 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
1ran · violated contract
7unverified

Licence: 2 of the 9 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

compute_triplet_loss sf-wa-326/phrase-bert-topic-model/phrase-topic-model/model_utils.py official repository ran · violated contract fingerprinted licence not identified · pointer only · 251934aa5746841d · report
l2_normalize_batch sf-wa-326/phrase-bert-topic-model/phrase-topic-model/model_utils.py official repository ran · honoured contract fingerprinted licence not identified · pointer only · 5ce2a7a23084e4c8 · report
conduct_turney_test memray/llm_phrase_semantics/phrase-semantic-eval/eval_turney.py community (archive-listed) unverified Apache-2.0 (permissive) · f683260388c1d177 · report
load_PiC_PS_data memray/llm_phrase_semantics/phrase-semantic-eval/eval_PiC_PS.py community (archive-listed) unverified Apache-2.0 (permissive) · 809d9efd59171d4c · report
load_bird_dev_data memray/llm_phrase_semantics/phrase-semantic-eval/eval_bird.py community (archive-listed) unverified Apache-2.0 (permissive) · 6bee788f8fa4c5d0 · report
openai_conduct_PiCPS_test memray/llm_phrase_semantics/phrase-semantic-eval/eval_PiC_PS.py community (archive-listed) unverified Apache-2.0 (permissive) · edf9e080104293c0 · report
openai_conduct_bird_test memray/llm_phrase_semantics/phrase-semantic-eval/eval_bird.py community (archive-listed) unverified Apache-2.0 (permissive) · f664f8b11ba8231e · report
openai_conduct_turney_test memray/llm_phrase_semantics/phrase-semantic-eval/eval_turney.py community (archive-listed) unverified Apache-2.0 (permissive) · d722ba66abb59aae · report
soft_cross_entropy memray/llm_phrase_semantics/phrase-topic-model/model_utils.py community (archive-listed) unverified Apache-2.0 (permissive) · f26677a468445f39 · report

Tasks

DiversityParaphrase GenerationTopic Models

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

AdamAttentionAttention DropoutBERTDense ConnectionsDropoutLayer NormalizationLinear LayerLinear Warmup With Linear DecayMulti-Head AttentionResidual ConnectionSoftmaxWeight DecayWordPiece

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections