SimCSE: Simple Contrastive Learning of Sentence Embeddings
Paper · 2021 · Tianyu Gao, Xingcheng Yao and Danqi Chen
Summary
A system that represents each sentence as a vector can compare texts by comparing the directions of their vectors. The comparison is useful when it reflects what the sentences say. Descriptions that use different words can belong close together, while sentences about the same subject can make incompatible claims. Pretrained encoders supply the raw material for this kind of comparison, but their sentence vectors can crowd into a narrow range of directions. SimCSE gives the encoder a task that directly shapes those directions. For each sentence, it learns to pick a designated match out of a batch of alternatives. The authors test whether the resulting comparisons agree with human judgments of semantic similarity.
The unlabeled version uses 10^6 randomly sampled sentences from English Wikipedia. It runs each sentence through the same encoder twice and draws the ordinary dropout masks independently for the two passes. Dropout temporarily suppresses parts of the internal computation, so identical text can yield slightly different representations. The encoder learns to recognize the corresponding view among representations of other sentences. The authors find that changing the words through the tested editing procedures works less well. Performance also degrades sharply when the two passes produce identical views, either because dropout is disabled or because the passes share their masks. Dropout
The labeled version uses natural language inference. A statement that follows from a premise becomes its match, and a hypothesis written to contradict that same premise becomes a competing choice. With the base BERT encoder, the unlabeled and labeled versions reach 76.3% and 81.6% average Spearman rank correlation, respectively, across the sentence similarity tests. The authors report improvements of 4.2% and 2.2% over the corresponding previous best results. The supervised version also holds up in transfer experiments where classifiers learn from fixed sentence vectors.
Two measurements help explain the outcome. Alignment tracks how far apart the vectors of related sentences lie. Uniformity tracks how widely the collection spreads. In the training comparisons, independently drawn masks allow the unlabeled version to spread the vectors while retaining much of their initial alignment. Inference examples offer a direct way to bring distinct but related sentences closer. The authors also connect the loss to the distribution of singular values, which describes how strongly a few directions dominate the sentence vectors. SimCSE improves similarity rankings by changing both the organization of the space and the comparisons it makes possible within that space.
Deep dive: SimCSE: Simple Contrastive Learning of Sentence Embeddings
SimCSE uses dropout and natural language inference to train sentence embeddings that better match human judgments of textual similarity. · about 84 minutes to read
The problem and its context
What a sentence vector has to preserve
The paper studies an encoder that reads a sentence and returns a fixed-size vector, a sequence of numerical coordinates. The same encoder can process another sentence separately. Once both vectors exist, a comparison rule can assign the pair a score. This setup gives each sentence a reusable representation. A retrieval system can, for instance, store the vectors for its candidates and compare them with a query vector once the query arrives. The suitability of the stored vectors then depends on the kind of relationship the comparison is supposed to recover.
For the kind of similarity the authors emphasize, the score should rise when sentences describe much the same thing. Their wording can differ considerably. A sentence may state a specific action while a related sentence expresses a more general claim that the action supports. Alternatively, a pair may reuse words for the same people, objects or setting while disagreeing about what happened. Text that looks similar at the level of vocabulary can therefore present a difficult case for a system that compares sentence meanings. The representation needs to retain distinctions made by the words acting together.
A sentence encoder faces this requirement across a collection of examples. A direction that serves one comparison also participates in every other comparison involving that sentence. Bringing a sentence closer to a useful neighbor can affect its relationships with many other inputs. The authors approach this as a problem of organizing the whole collection around meaning. The closeness of intended neighbors matters, and so does their position relative to examples a reader would judge less similar. Both properties affect whether a high score signals something distinctive about the pair.
The comparison used throughout the main experiments is cosine similarity. It depends on the angle between vectors. Magnitudes can differ without affecting the score when directions stay the same. A space that offers meaningful cosine comparisons therefore needs enough directional separation for useful distinctions to register. If most vectors lean heavily in the same direction, a large shared component contributes to the cosine even when the underlying sentences have little in common. Useful distinctions may survive in the other components, yet their influence on the scores can be small.
The paper's interest in general-purpose representations also explains the distinction between two applications. A direct similarity score uses a fixed comparison rule, so the geometry has to do the work required by that rule. A downstream classifier can learn to place different weights on vector coordinates for a particular decision. Useful information can be present in a vector even when cosine similarity gives it little influence. The authors make direct similarity their principal target and use classification from frozen embeddings to examine another kind of reuse.
What unannotated text can teach
The paper situates sentence embeddings within a tradition of learning from context. In earlier approaches such as Skip-thought, a sentence's surroundings supply a training signal. The learning procedure can use sentences encountered near one another without first obtaining judgments about their similarity. This follows a general idea in which what appears around a linguistic expression gives evidence about how it is used. At the sentence level, the organization of a document provides a source of examples for distributional semantics.
The relation between sentences that occur together covers a broad range of cases. A following sentence can express a consequence, narrow the discussion to a detail or add a new observation. Its appearance can be predictable given the first sentence even when their individual claims differ substantially. Training an encoder to predict a neighbor makes use of that predictability. For semantic similarity, a neighboring sentence is therefore a source of relatedness whose exact nature is left to the text. The research question is how much that signal helps the particular comparisons a sentence embedding will be asked to make.
The paper discusses an earlier contrastive version of this idea in which the current sentence and a subsequent one occupy different roles. Separate encoders can be learned for those roles. Their outputs are compared in order to choose the right continuation from competing candidates. This approach illustrates how contrastive training can turn the order of sentences into a decision problem. It also makes two choices that can be examined independently. One is to designate a nearby sentence as the target. The other is to let the transformation on the candidate side differ from the transformation on the anchor side.
Another strand of earlier work builds sentence features out of shorter linguistic units. The authors mention an extension of word2vec that adds representations of word sequences. Combining features of this kind draws on what individual words or sequences reveal about the text. It can supply a representation for each sentence without using a judgment about that sentence's relationship to another full sentence. Averaging already learned lexical vectors is an even simpler baseline. Both approaches ask how well information available at a smaller scale serves a comparison of complete statements. Word2vec and word embeddings
Contextual encoders make a different starting point available. Their hidden representations are computed as the input is processed, so the vector at a position can reflect surrounding text. To turn these outputs into a sentence vector, a researcher can select a designated position or average a set of representations. The operation is called pooling. Pooling determines which internal information feeds the eventual comparison and how it is combined. The pretraining that created those internal representations may have rewarded a different behavior from the ordering of sentence pairs by similarity. Adapting the weights for the new objective is a separate step, known as fine-tuning.
This separation between the initial encoder and its subsequent use is central to the paper. A researcher can improve the readout of an existing encoder by finding a better pooling rule. A training objective can also change the representations that the readout receives. SimCSE studies the second route while examining the first as a design choice. It starts with pretrained weights, and the contrastive loss can update the encoder throughout. The paper tests this approach with the BERT family and with RoBERTa.
How supervision entered sentence embedding research
Natural language inference gives researchers paired statements whose relationship has been labeled. The first statement is the premise. The second is a proposed conclusion, called the hypothesis. An entailment label says that the hypothesis follows from the premise. A neutral label signals that the premise leaves the hypothesis open. A contradiction label indicates that the hypothesis conflicts with the premise. The relationships depend on what the statements assert. The same vocabulary can be used to write hypotheses in different categories.
The source of the hypotheses is part of their interest for sentence embeddings. In the annotation procedure described by the authors, a person starts from a premise and writes examples that satisfy the requested relationships. A supported and a contradictory hypothesis can thus be about much the same situation. Their usefulness comes from telling the learner something about the difference between expressions that were constructed with a common reference point. This kind of supervision supplies a relationship that the mere proximity of sentences in a document leaves unspecified. The paper draws on both SNLI and MNLI.
Earlier embedding research had already found uses for these datasets. As the authors describe it, InferSent trained a Siamese encoder with an inference classification objective. In a Siamese arrangement, the same encoding parameters are applied to both inputs. A classifier can then study the resulting representations to predict the relation label. The paper puts Universal Sentence Encoder and Sentence-BERT in the line of work that extended supervised sentence encoding to other architectures or pretrained starting points. Universal Sentence Encoder and Sentence-BERT
Predicting an inference label and assigning a cosine similarity put different demands on the outputs. A classifier with access to both vectors can learn a decision that depends on how particular features interact. Cosine similarity reduces the comparison to a single measure of direction. SimCSE uses the existing pair labels to shape that measure during learning. An entailment identifies a candidate to prefer, and a contradiction identifies a candidate that can make the choice more demanding. The goal is to give the geometry a direct reason to reflect the relationships the authors want to reward.
Bilingual corpora and automatically back-translated paraphrases had also supplied paired examples for earlier research. In back-translation, an expression passes through translation to obtain a different rendering. The resulting pair derives its relationship from that process. Inference data derive theirs from instructions about what follows from a statement. These sources all provide material for learning from comparisons, but they make different kinds of variation available. A comparison of them can ask whether a generally plausible source of positive pairs produces the same kind of sentence space as a more deliberately specified relation. Back-translation is one such use of machine translation.
The choice of views in contrastive learning
The common setup in contrastive learning is a comparison between an anchor and a set of candidates. A positive is the candidate designated as the match for the anchor. Negatives provide the alternatives. Learning aims to make the positive easier to identify through the similarity scores. As the set of candidates changes, so does the difficulty of this decision. An easy collection can be separated on broad properties alone. A close competitor can require the encoder to capture a distinction that would have little influence in a batch of unrelated examples.
A method must decide where the positive comes from. The visual framework that informs SimCSE obtains paired views by transforming an image. A crop can show a different region and a flip can change the arrangement of pixels. The training procedure uses their common origin as a reason to match the views. This teaches the encoder to retain information that is useful across the transformations chosen by the researcher. The relationship between the views is therefore a design decision with consequences for what the loss rewards. SimCLR
The paper emphasizes a complication in applying this strategy to text. A word can contribute information that the other words leave implicit or omit entirely. Deleting it changes the evidence presented to the encoder. Reordering or substituting words creates a corresponding risk because a change to the input can affect the message conveyed. The unit of the edit is discrete. The change in meaning need not be proportional to the amount of editing. Building a positive pair this way asks the training procedure to treat the edited expression as a match, so the nature of the transformation matters.
Several approaches discussed by the paper already used contrastive training for text. They created views through edits, extracted spans from the same document, or used distinct encoder copies to represent an input. An approach that pairs spans relies on something shared across a document. One that uses different encoders can get different computations from unchanged words. Other uses of contrastive learning operate on pairs that have distinct functions, such as a question and a passage. The relationship there is relevance to a question, which provides a useful basis for Dense Passage Retrieval.
The authors' choices follow from the relation they want to learn. Unannotated data offer a guaranteed correspondence because the same sentence can be presented twice. There still has to be a learning problem in matching the two representations. This is where ordinary dropout makes a difference. Annotated inference data, in turn, supply distinct expressions whose relationship gives a reason to move their vectors together or to distinguish them. SimCSE investigates how far these two sources of pair information can go within the same basic training decision.
Directional concentration in pretrained representations
The paper calls the tendency for vectors to favor some directions anisotropy. A narrow cone is a way to picture a pronounced version of the problem. Vectors in the cone may still differ, but a large part of each vector points into the same region of the space. The cosine comparison can then give many pairs high scores. One question for sentence embeddings is whether differences that matter to a reader have enough influence over the score to produce a useful ordering.
The background for this problem includes several types of representation. One earlier study considered word vectors where the input and output embeddings shared parameters. Other research observed concentration in contextual representations drawn from pretrained encoders. The paper also discusses previous work that examined singular values, numbers that describe how strongly a matrix acts along different directions. A spectrum with a few very large values and many small ones indicates an uneven distribution of that strength. This geometric line of work includes Ethayarajh's study of contextual representations.
Some earlier methods tackle concentration after the encoder has produced its vectors. They remove dominant components or transform the distribution to give directions more comparable influence. Other methods act during training by adding a regularization term, a contribution to the loss that encourages a desired property of the representations. These approaches place directional spread among the properties a researcher can deliberately affect. They also raise a question about how changing the overall distribution affects the neighbors a system intends to preserve.
The paper addresses that question with separate measurements for related pairs and for the collection at large. Broad spread can help the score distinguish pairs. Closeness between particular sentences also has to track the relation the application cares about. The contrastive objective has a way to act on both: the designated positive gives it a reason to preserve particular connections, and the competitors give it a reason to avoid treating every match as equally plausible. Which relationships the procedure actually encourages depends on how the positive and negative examples are supplied.
The method, step by step
From source sentences to a training decision
Start with the unlabeled setting. A batch supplies several individual sentences. The training procedure makes an anchor view and a candidate view of each sentence by passing it through the encoder under fresh dropout masks. For the anchor belonging to a given input, the candidate from that input is the intended match. The candidates derived from the remaining inputs also enter the comparison. The decision is repeated across anchors, so a candidate used as the target in its own comparison can be an alternative in another.
In the labeled setting, the three members of a training example are already different texts. The premise is encoded as the anchor. A hypothesis supported by the premise supplies the target, and a hypothesis written to contradict it joins the candidates. All the hypotheses from the other examples in the batch can also enter the contest for this anchor. The encoder is shared across the roles. The target differs between the two variants because they have different evidence about which items should match.
How SimCSE constructs and learns sentence comparisons
The steps in order.
The batch affects training because it supplies the alternatives. The objective assigns the positive a score relative to those alternatives, so its contribution can depend on which examples happen to be present. After training, the encoder can produce a vector for a sentence by itself. Computing a cosine for a pair then requires only their two vectors. The training procedure has used a choice among many candidates to learn the directions, while the evaluation can examine one comparison at a time and rank the resulting scores.
Each step serves a different function. The data tell the procedure which candidate to favor. The encoder produces the quantities that can be compared. The loss turns those comparisons into an update to its parameters. The reported tests then put the resulting encoding and scoring rule to use on judgments collected for a different purpose. A low loss among the supplied candidates shows success on the training decision. Agreement with the benchmark shows whether that training decision taught the encoder something useful about similarities beyond its batch.
Obtaining one vector per sentence
The paper expresses encoding as a function of the input and the learned parameters.
h = fθ(x)
The symbol x stands for the input sentence. The function fθ applies the encoder with weights θ, and h is the output vector used to represent x. The parentheses specify the input to the function, and the equality assigns its result to h. The weights in θ start from a pretrained checkpoint and are adjusted during contrastive fine-tuning. Both sides of a comparison use that same set of parameters in the final SimCSE design.
The authors use uncased BERT and cased RoBERTa checkpoints. Both supply contextual outputs at positions in the encoded sequence. For their SimCSE readout, the authors use the representation at [CLS], the special position from which the sentence-level vector is taken. This yields a vector of the same size for sentences of different lengths. Its contents depend on the input the encoder has processed, so learning can change how information from across the sentence enters that single output. The underlying architecture is the Transformer.
On top of the selected output is a multilayer perceptron, abbreviated MLP. This is a trainable transformation applied to the vector. The paper notes that BERT already provides for such a layer above [CLS] and that the authors initialize it randomly. It participates in training for both variants. The supervised version also uses it to produce the final evaluation vector. The unsupervised version reads the [CLS] output directly at evaluation, before it goes through the learned transformation.
The distinction matters for reproducing the computation. The unsupervised objective changes the encoder using comparisons made through the additional layer. Reading from an earlier point after training still uses the weights those updates produced. Training without the layer would let the loss act on a different output during learning. The paper's method thus specifies both the route through which the learning signal reaches the encoder and the point at which the final vector is read.
Scoring directions and choosing a match
The loss uses the cosine of the angle between the anchor representation and a candidate. The paper defines the score through a dot product and the lengths of the vectors.
sim(h₁, h₂) = h₁ᵀh₂ / (‖h₁‖ · ‖h₂‖)
The function sim denotes cosine similarity, and h₁ and h₂ are the vectors being compared. The indices distinguish its arguments. The transpose mark ᵀ makes the product in the numerator a dot product. It adds the products of the coordinates in matching positions. The bars ‖ ‖ give a vector's Euclidean length, and the centered dot multiplies the two lengths. Division removes the influence of those lengths on the score. If the vectors have already been normalized to unit length, their dot product gives the cosine directly.
The same function can score all the candidates regardless of where they came from. A positive from another pass of an identical input and a positive written by an annotator enter the calculation as vectors. The labels or construction rules determine the target during learning. They need no special feature in the comparison itself. Consequently, when comparing two independently obtained sentence vectors at evaluation, the encoder can give related pairs high scores without having access to the rules that formed its original training examples.
The general objective begins with sentence pairs, each containing an anchor and a designated positive.
𝒟 = {(xᵢ, xᵢ⁺) : i = 1, …, m}
The set 𝒟 is the collection of training pairs. The parentheses group the anchor xᵢ with its positive xᵢ⁺. The superscript ⁺ identifies the positive role. The index i ranges from the first pair to m, the number of pairs in the collection, with the ellipsis standing for the intervening indices. The braces collect those pairs into the dataset. A batch contains N pairs drawn from the collection so that the loss can reuse their positives as comparison candidates.
ℓᵢ = −log [
exp(sim(hᵢ, hᵢ⁺) / τ)
/ ∑ⱼ₌₁ᴺ exp(sim(hᵢ, hⱼ⁺) / τ)
]
Here ℓᵢ is the loss assigned to example i for a given batch. Its anchor vector is hᵢ. The positive for that anchor is hᵢ⁺, and hⱼ⁺ is the designated positive of batch example j. N counts the pairs in the batch. The sum ∑ⱼ₌₁ᴺ visits every candidate, including the target at j equal to i. Each candidate receives the similarity sim to the anchor, divided by the positive temperature τ, and exp converts the scaled score to an exponential weight. The fraction gives the target's share of the total weight. The function log takes its logarithm, and the minus sign makes the loss decrease as that share increases.
This is a cross-entropy loss for identifying a single target among the candidates. To see the competition in it, consider a target whose cosine is already fairly high. If many other candidates have similar scores, its share remains small. Increasing its score helps, as does reducing the scores of the alternatives. If another candidate is already far below the target, making that candidate still less similar changes the share less. The contribution of a candidate depends on its score in relation to those of the others.
Temperature adjusts the conversion from differences in cosine to differences in weight. With a smaller temperature, score differences are amplified before exponentiation. The most competitive alternatives can then take up more of the candidate weight relative to weak ones. A larger temperature compresses those differences. Temperature leaves the ordering of scores for a fixed set of vectors intact. It changes what that ordering costs during training and can therefore affect the vectors that learning eventually produces.
The objective's use of in-batch negatives gives it a candidate pool from examples needed for the same update. Every batch positive has already been encoded for a comparison involving its own anchor. Its vector can be used again for other anchors. The supervision is consequently sparse in a specific sense. Each pair identifies a target, while the other comparisons obtain their status through batch membership. The procedure can create many comparisons without assigning an independent human label to every relationship in that batch.
Making two views with the same words
The unsupervised pairs start with 10^6 sentences sampled randomly from English Wikipedia. Each provides the complete input on both passes. The equality between the two texts determines the positive, and the computation creates the variation that the encoder has to learn across.
xᵢ⁺ = xᵢ
The index i identifies the sentence, xᵢ is its text in the anchor role, and xᵢ⁺ is the input text for the positive role. The equality applies to the inputs. The two computations use those inputs under different random conditions, allowing their output vectors to differ.
Dropout is already used in ordinary Transformer training on fully connected parts of the network and on attention probabilities. A random mask specifies which quantities are suppressed in a particular computation. The paper uses the usual probability p = 0.1 for its unsupervised recipe. It samples the masks separately for the two views and introduces no extra masking stage. The input sequence, the number of words and the content the encoder is asked to represent can all stay the same when one internal computation differs from the other.
hᵢᶻ = fθ(xᵢ, z)
The vector hᵢᶻ is the encoding of input xᵢ with dropout mask z. The superscript marks which random draw applies to the vector and is used as a label. The function fθ applies the encoder with parameters θ to the sentence under the specified mask. The comma separates the text input from the conditions of that pass. Independent sampling means that knowing the first draw does not fix the one used to encode the other view.
In the paper's diagram, a description of running dogs is one of the source sentences. Its corresponding candidate is the second encoding of that description. A sentence about surfing and a sentence about skateboarding contribute their own candidate views to the batch. The dog sentence is supposed to receive a higher cosine with its corresponding view than with those other candidates. When the surfer sentence is the anchor, the roles shift. Its own view becomes the target, and the dog and skateboarding descriptions supply alternatives.
What the encoder has to preserve across the two masked computations is whatever helps identify the corresponding input. Using the same words secures the intended correspondence at the level of the text. Drawing distinct masks makes the comparison of the two resulting representations informative. At the same time, a direction that occurs for every input would offer little help in distinguishing candidates. The batch supplies a reason for the encoder to keep different inputs distinguishable as it learns to make the same input recognizable across passes.
The unsupervised loss can be written by making the particular views explicit.
ℓᵢ = −log [
exp(sim(hᵢ(zᵢ), hᵢ(z′ᵢ)) / τ)
/ ∑ⱼ₌₁ᴺ exp(sim(hᵢ(zᵢ), hⱼ(z′ⱼ)) / τ)
]
The notation hᵢ(zᵢ) denotes the anchor vector for sentence i with its dropout draw zᵢ. The vector hᵢ(z′ᵢ) is its candidate view, and the prime distinguishes the second draw. The comparison candidate hⱼ(z′ⱼ) comes from sentence j under that sentence's candidate mask. N counts the source sentences, and ∑ⱼ₌₁ᴺ includes one candidate view for each source. The similarity sim is cosine, τ is temperature, and exp assigns a weight from each scaled score. The loss ℓᵢ uses log and its leading minus sign to reward a high share of the total for the view from input i.
The paper's formulation makes it possible to vary the source of the difference within a pair. With ordinary independently sampled masks, the input stays fixed and the two computations can differ. If both passes suppress the same quantities, the shared encoder gives the same output for the two copies. Cosine between identical non-zero vectors is already at its maximum. The positive score then has no room to improve, even though changing the vectors of different inputs can still change the other scores in the loss. This relationship motivates controls that make the views identical in different ways.
The authors also express the discrete augmentation alternatives using an explicit operation on the input.
h = fθ(g(x), z)
Here g is a transformation of the sentence x and can involve a random choice. Its output g(x) is the text supplied to the encoder. The function fθ uses its parameters θ and the internal dropout mask z to obtain vector h. The nesting distinguishes a change applied to the text from a change applied during the encoding computation. A crop or a deletion modifies the words that reach the encoder. The standard SimCSE recipe gets its variation inside fθ, with the whole original sentence available to both passes.
This formulation also distinguishes copying from predicting a text neighbor. A next-sentence objective uses different source content in the anchor and positive positions. It asks which candidate participates in the observed sequence of sentences. Copy-based pairing asks which candidate view comes from the same input. Both can be expressed with a batch of targets and competitors, but the evidence identifying the target is different. That makes it possible to compare the learning effects under a shared similarity evaluation.
Turning inference examples into candidates
The supervised design uses a premise together with two hypotheses written for it. To illustrate the roles, the paper returns to the example about running dogs. A hypothesis that places animals outdoors serves as the entailment in the annotation shown. It expresses something more general than the premise. A statement about pets sitting on a couch is used as the contradiction. It shares a plausible subject with the premise while describing a different action and scene. The contrast gives the encoder a comparison it could mishandle if it mainly attends to subject matter.
The entailment provides positive evidence even though it need not reproduce every detail of the premise. The direction of inference enters through the annotation and the choice to use the premise as an anchor. The final cosine is symmetric. Exchanging the texts leaves that score unchanged, whereas reversing which text is the premise can change which inference is supported. Supervised SimCSE uses the labels to identify a semantic connection worth bringing into the space. It learns a symmetric score for that connection as part of its more general similarity objective.
Contradictions written for the same premise are candidates with a known reason to be rejected in that comparison. They are called hard negatives because the shared premise gives the writer a way to produce a competitor that can be close in wording or subject yet incompatible in what it asserts. The implementation uses one contradiction for each training group and samples one when several are available. The final recipe uses entailments for the targets. Neutral hypotheses are considered in an alternative policy.
(xᵢ, xᵢ⁺, xᵢ⁻)
The index i marks a training group. In the triple, xᵢ is the premise, xᵢ⁺ is the hypothesis it entails, and xᵢ⁻ is the hypothesis labeled contradictory to it. The superscripts mark relations to that group's premise. For a different anchor in the batch, either hypothesis is simply another candidate, since its annotation attached it to its original premise.
For each anchor, the positive candidate is still its own entailment. The denominator grows to include the entailments and contradictions from all groups. The supervised loss is as follows.
ℓᵢ = −log [
exp(sim(hᵢ, hᵢ⁺) / τ)
/ ∑ⱼ₌₁ᴺ [exp(sim(hᵢ, hⱼ⁺) / τ) + exp(sim(hᵢ, hⱼ⁻) / τ)]
]
The vectors hᵢ and hᵢ⁺ represent the premise at index i and its corresponding entailment. The candidates hⱼ⁺ and hⱼ⁻ represent the entailed and contradictory hypotheses from group j. There are N groups in the batch, and ∑ⱼ₌₁ᴺ sums across them. The plus sign adds the two exponential weights for each group. The cosine sim and temperature τ define the scores passed to exp. The negative log of the fraction gives the loss ℓᵢ, where the numerator contains only the designated entailment and the denominator also contains the alternatives.
This use of the data distinguishes the supervised procedure from earlier training to predict the inference label. The encoder is rewarded for giving the supported candidate a high cosine relative to other available hypotheses. For the premise's own contradiction it receives a direct alternative with a relationship established by the annotation. Solving this choice through cosine can reward features of the sentence vectors that are immediately available when the same comparison is applied to other texts.
The authors also formulate a variant in which the premise's own contradiction can be given an explicit weight. The change is confined to the denominator.
ℓᵢ = −log [
exp(sim(hᵢ, hᵢ⁺) / τ)
/ ∑ⱼ₌₁ᴺ [exp(sim(hᵢ, hⱼ⁺) / τ) + α⁽ᴵⁱʲ⁾ · exp(sim(hᵢ, hⱼ⁻) / τ)]
]
Here ℓᵢ again identifies the loss of anchor i. The symbols hᵢ, hᵢ⁺, hⱼ⁺ and hⱼ⁻ denote the premise, target entailment, candidate entailment and candidate contradiction vectors, respectively. The sum covers the N groups indexed by j. The functions sim, exp and log and the temperature τ play the same roles as in the unweighted objective. In the exponent on α, the indicator Iⁱʲ equals 1 when the group index j equals the anchor index i. It equals 0 otherwise. The dot applies the resulting factor to the contradiction's contribution. Consequently α changes the explicit coefficient of the anchor's own contradiction, while the other terms retain their ordinary coefficients.
The objective can already respond strongly to a high-scoring contradiction because an exponential weight rises with its scaled score. The extra factor is a separate way to increase or decrease the influence of that candidate. An explicit weight of α = 1 recovers the normal loss with the contradiction still present. This lets the authors distinguish the choice to include the example from the choice to give it special numerical treatment.
Running training and choosing the checkpoint
The authors implement the method with the Transformers package. The supervised training pool combines SNLI with MNLI, reported at 314k. The supervised run lasts 3 epochs, an epoch being a pass through its training examples. The unsupervised run uses one epoch on its Wikipedia sample. Both training schedules use the same checkpoint selection procedure. At intervals of 250 training steps, the authors evaluate the saved state on the development split of STS-B and keep the checkpoint with the strongest result there for final test evaluation.
Checkpoint selection makes the development scores part of the experimental procedure. The weights are updated using comparisons constructed from the source corpus, and the development judgments help decide which trained weights to keep. The authors also use that split for the search over settings such as the number of examples in a batch and the learning rate, the setting that governs the scale of parameter updates. The STS training splits supply no training pairs for the loss, and the final similarity scoring uses cosine on the embeddings directly.
The batch sizes in the search are 64, 128, 256 and 512. The learning rates are 1e-5, 3e-5 and 5e-5. A batch determines how many candidates compete with the target at an update. A learning rate determines how far the parameters can move in response. The paper examines the settings together, which allows the update size to be adjusted when the amount of evidence contributing to it changes. In the particular BERT base comparison of unsupervised views and objectives, the authors specify a batch size of 64 and a learning rate of 3e-5.
The authors also consider keeping a token prediction problem active during sentence-level training. Masked language modeling, or MLM, asks the encoder to predict content deliberately hidden at some positions. The auxiliary option uses the prediction loss to preserve a training signal about the words while contrastive comparisons reshape the whole-sentence vectors. Here the missing content is part of what is being predicted. In the dropout procedure for obtaining sentence views, internal masking supplies variation and the target remains a candidate sentence representation.
ℓ + λ · ℓₘₗₘ
The first term ℓ is the contrastive loss. The second uses ℓₘₗₘ for the masked language modeling loss, with the subscript identifying the auxiliary objective. The coefficient λ specifies its weight. The centered dot multiplies the auxiliary loss by that coefficient and the plus sign adds it to the contrastive loss. The authors vary the contribution in their experiments. They present this as an optional way to train when the resulting vectors will be used to supply features for other tasks.
Measuring neighborhoods and spread
To describe what happens to the embedding space, the paper uses alignment and uniformity. For both, it treats sentence vectors as normalized, so their lengths are equal. Their directions can be represented as positions on the surface of a sphere in the embedding space. Ordinary Euclidean distance between those positions then reflects how much the vectors differ in direction. The two metrics use that distance on differently selected pairs.
ℓₐₗᵢ𝓰ₙ = 𝔼[(‖f(x) − f(x⁺)‖)²], (x, x⁺) ∼ pₚₒₛ
The quantity ℓₐₗᵢ𝓰ₙ is the alignment measurement. The function f returns a normalized vector, x is the first sentence of a positive pair and x⁺ is its partner. The parenthesized pair is drawn from the positive-pair distribution pₚₒₛ, as indicated by ∼. Subtraction gives the difference between the two vectors. The norm ‖ ‖ gives its length, and the square makes the expression their squared Euclidean distance. The expectation 𝔼 averages that distance over the indicated pairs. Lower values mean those selected sentences tend to lie closer together.
The selection of positives matters to the interpretation. For the analysis that follows changes during unsupervised training, the authors use STS-B pairs with human similarity ratings higher than 4. These examples ask whether sentences readers rated as highly related remain near one another. The training positives came from repeating an input under dropout. The alignment diagnostic can therefore register a deterioration in meaningful neighborhoods even when the procedure has made its repeated-input candidates easy to identify.
ℓᵤₙᵢ𝒻ₒᵣₘ = log 𝔼[exp(−2‖f(x) − f(y)‖²)], x, y independently drawn from p_data
The quantity ℓᵤₙᵢ𝒻ₒᵣₘ measures uniformity. Here x and y are independent sentence draws from the data distribution p_data, and f again gives their unit vectors. Inside the expectation 𝔼, the squared length of their vector difference is multiplied by −2. The exponential function exp makes a larger distance contribute a smaller term. The logarithm log is taken after averaging those contributions. Lower values indicate less concentration as measured by this function, with close pairs contributing relatively strongly to the average.
For that training analysis, the authors take the STS-B sentences as a whole to define the data distribution. A pair sampled in this way may have any degree of relatedness. There is no requirement that it belong to the highly rated set used for alignment. The two diagnostics thus describe the spread of the population and the behavior of designated neighbors within it. A procedure that shifts both sets of distances in the same direction can improve one diagnostic and worsen the other. The paper uses the combination to follow changes that would be hard to infer from a single similarity score.
How the contrastive loss relates to the spectrum
The paper also studies an idealized form of the objective with a growing number of negatives. It assumes unit vectors and considers the limit as the number of sampled negatives tends to infinity. The resulting expression separates the similarity of positive pairs from the scores given to candidates drawn from the data distribution.
−(1 / τ) 𝔼[(f(x)ᵀf(x⁺)) | (x, x⁺) ∼ pₚₒₛ]
+ 𝔼[log 𝔼[exp(f(x)ᵀf(x⁻) / τ) | x⁻ ∼ p_data] | x ∼ p_data]
The function f supplies the normalized representations, and ᵀ denotes the transpose used in the dot products. The variable x is an anchor, x⁺ is its positive partner and x⁻ is a sampled alternative. The vertical bar in each expectation indicates the distribution for that average. The positive pairs come from pₚₒₛ, and the anchor and sampled alternative for the other term come from p_data, with ∼ indicating a draw. Temperature is τ. The negative sign in the first term rewards large positive-pair dot products. The second term uses exp for the weights of random comparisons and log for the logarithm of their average at a fixed anchor. The outer expectation averages these logarithms across anchors, and the plus sign joins that term to the positive-pair term.
The order of operations in the second term is significant. For a particular anchor, an unexpectedly close alternative can make a large contribution to the mean of exponentials. Only after this average is taken is its logarithm computed for that anchor. If high similarities are common among random comparisons, there is pressure to change the directions giving rise to those similarities. The positive term applies pressure of its own to the selected pairs. This is the theoretical counterpart of the distinction between broad spread and local closeness in the diagnostics.
To reason about directions more explicitly, the authors consider a finite set of m sentences with equal sampling probabilities. They express the random-comparison term as a sum over that set and use Jensen's inequality to relate it to the total of the pairwise dot products.
𝔼[log 𝔼[exp(f(x)ᵀf(x⁻) / τ) | x⁻ ∼ p_data] | x ∼ p_data]
= (1 / m) ∑ᵢ₌₁ᵐ log[(1 / m) ∑ⱼ₌₁ᵐ exp(hᵢᵀhⱼ / τ)]
≥ (1 / (τm²)) ∑ᵢ₌₁ᵐ ∑ⱼ₌₁ᵐ hᵢᵀhⱼ
Here p_data assigns equal probability to each of the m sentences. The expectations 𝔼 with their draw specifications average over x as anchor and x⁻ as alternative. The function f returns unit vectors, written hᵢ and hⱼ for the examples at indices i and j. The transpose ᵀ gives their dot product, τ sets the scale before exp, and log is applied to the inner average. The sums add the contributions from the first through the mth example, and each factor of 1 divided by m converts a sum to an average. The equality replaces the two expectations with these explicit averages. The relation ≥ makes their expression an upper bound on the scaled total of dot products. The square of m in the denominator of the bound reflects averaging over both example indices.
The inequality uses the fact that the log of an average of exponential scores is at least as large as the average of the scores before exponentiation. This gives a simpler quantity to inspect. Take W to be the matrix whose rows are the normalized vectors for the sentences. The product of W and its transpose has a row and a column for each sentence, and its entries are the dot products for the corresponding pair.
Sum(WWᵀ) = ∑ᵢ₌₁ᵐ ∑ⱼ₌₁ᵐ hᵢᵀhⱼ
In this equality, W stacks the m vectors, Wᵀ is its transpose, and WWᵀ is their Gram matrix, the matrix of pairwise dot products. Sum adds all the entries of that matrix. The double sum uses i and j for the rows that supply hᵢ and hⱼ, with ᵀ producing the dot product on the right. The diagonal entries compare each vector with itself, and every off-diagonal entry compares two different rows. Both sides add all these contributions.
Every diagonal entry is 1 because the rows of W have unit length. The trace, the sum along the diagonal, is consequently fixed for this sample size. It also equals the sum of the eigenvalues of the Gram matrix. For a matrix with positive entries, the paper uses the total of the matrix entries as an upper bound on its largest eigenvalue. The squared singular values of W are the eigenvalues of the corresponding Gram matrix, with zero values included as needed. The bound thus gives the authors a link between the negative-candidate term and the dominance of the leading singular value.
The implication concerns pressure on concentration under the assumptions of the argument. Smaller random similarities can tighten a bound on the leading eigenvalue when the positivity condition applies. The spectrum itself is still an outcome of optimizing the full objective, which also draws the positives together. The authors pair the argument with measurements of the learned representations. The theory identifies a mechanism through which contrastive learning can distribute the vectors across more directions. The measurements show how the resulting spectra and neighborhoods behave in their experiments.
Experiments and results
What the main evaluation measures
The central test comes from semantic textual similarity, or STS. Each example consists of a sentence pair and a human rating of its similarity. The authors encode each sentence separately, take the pair's cosine score, and compare the resulting scores with the ordering implied by the ratings. This setup gives direct evidence about how well a comparison of directions captures the relationships those readers perceived. An encoder whose high scores generally belong to the more highly rated pairs will do well in the evaluation.
The suite contains 7 tasks. The annual STS evaluations cover 2012–2016, and the suite also includes STS Benchmark and SICK-Relatedness. STS Benchmark is abbreviated STS-B. Its development judgments have a separate role in choosing training settings and checkpoints. The reported suite comparison uses the evaluation data for the tasks, while no STS training split is used to fit the contrastive encoder. The authors treat this distinction as applicable to both variants. Supervised SimCSE gets its labeled training signal from inference datasets. SemEval STS
The test statistic is Spearman correlation. It compares ranks, so it asks whether human ratings and the cosine scores tend to put pairs in a similar order. For this measure a system benefits when a highly similar pair is placed ahead of a less similar one, regardless of how far apart their numerical scores are. The paper follows earlier arguments for rank correlation as a way to assess sentence embeddings. This choice fits a use in which the main aim is to select or rank near neighbors by the score.
Earlier reports also used Pearson correlation, which reflects a linear relationship between the numerical values. A difference in the scale or spacing of predicted scores can affect Pearson even when the pairs remain in the same order. This matters when comparing claims made from different metrics. The question answered by SimCSE's main score concerns the quality of the ranking produced by cosine. The cosine values themselves are also examined through their distributions, which display aspects of the scores that a rank statistic compresses.
The paper leaves out the additional regressor that the default SentEval procedure can train on top of frozen embeddings for STS-B and SICK-Relatedness. In that procedure the regressor learns from the benchmark's training split and produces a task-specific scoring rule. The authors use the cosine directly throughout the main suite. The representation is therefore put to work with the same comparison rule across the tasks. Its results describe how the learned space supports that use without adapting the comparison to the labels for each benchmark.
Why the grouping of evaluation examples matters
The annual STS datasets contain subsets covering different topics. One evaluation option is to gather all the pairs for that year's task and calculate a correlation from the combined collection. This is the protocol called “all.” A pair from one topic can then be ranked relative to a pair from another. A score offset that applies to a whole topic can affect the ordering, since the pairs are all competing for positions in one ranking.
An alternative is to calculate a separate correlation for each subset. Under “mean” aggregation those correlations are given equal weight, and under “wmean” a larger subset has more influence because its correlation is weighted by its size. Both of these options rank pairs within each subset before combining the results. A method could correctly order examples within every topic but systematically assign higher scores in one topic than another. Separate rankings would leave that offset out of the computation. Pooling the examples makes the effect of such offsets part of the test.
The authors choose the pooled calculation for the main results because they regard it as closer to a use where candidates from different topics get compared together. It is the same evaluation choice used by Sentence-BERT. The average over the full suite then summarizes task scores obtained according to that protocol. This averaging across tasks is a different step from joining examples across subsets inside an annual task. The first gives a suite result, and the second specifies how the ranking that underlies an individual task result is formed.
The authors found inconsistent evaluation practices when looking for comparable results. Some papers specified the rule, and for others the choice had to be inferred by checking implementations or reproducing reported figures. Their comparison reproduces the published pattern for Sentence-BERT with the pooled setup and the whitening results with the weighted subset setup. They group BERT-flow with whitening for this purpose because the published results they examined were consistent with the same protocol. The paper also reports a SimCSE comparison under weighted aggregation to put those results on matching terms.
This protocol work affects which improvement a reader can attribute to the method. If an earlier result was obtained by weighting correlations within topics, then substituting it for a pooled score changes the comparison, even if both are called Spearman correlation. If one score uses a fitted regressor, it also depends on an additional source of benchmark supervision. Putting those evaluation choices on the same footing lets the reported gaps concern the outputs of the encoders and how they are compared. The accounts of different settings form part of the paper's contribution to evaluation and benchmarks.
Which systems set the comparison
The simplest baseline is the average of GloVe word vectors. It supplies a sentence representation built from lexical features. The authors also evaluate averages of contextual outputs from BERT and RoBERTa. These use representations from the first and last layers, combined by average pooling as in the earlier work they follow. Together these baselines represent different ways of obtaining a sentence vector from existing representations without first applying SimCSE's objective. GloVe
Another group of baselines changes the geometry after obtaining the sentence vectors. BERT-flow and BERT-whitening are included because their aims overlap with the paper's concern about directional concentration. The authors examine variants that fit the transformation on inference data and variants that estimate the distribution from the target set. In the paper's pooled evaluation, the versions fitted on the target generally yield weaker results than the ones fitted using inference data. The main comparison therefore uses the NLI versions of these post-processing methods.
The contrastive baselines make different choices about pairs. IS-BERT uses agreement between global and local features. DeCLUTR uses spans from the same document as positives, giving the training procedure views that can differ in their words and content. Contrastive Tension, described as concurrent work, compares encodings of the same input obtained from separate encoders. The common feature is contrastive training. The differences concern what identifies a match and what generates variation between its representations.
The supervised comparisons include InferSent and Universal Sentence Encoder as well as examples from the Sentence-BERT and Sentence-RoBERTa families. The authors also consider the latter kinds of supervised representations with further adjustments, including post-processing and contrastive retuning. This part of the comparison asks how much can be achieved by rearranging inference supervision for direct vector comparisons. The earlier systems are relevant because the source of labeled examples or the pretrained starting point can be shared even when the training objective differs.
The paper draws some baseline scores from previous work that used the same evaluation choices. For GloVe, InferSent and Universal Sentence Encoder, it uses figures reported in the Sentence-BERT study. For DeCLUTR and Contrastive Tension, it takes saved weights and runs the evaluation under the common setup. The authors also evaluate pretrained contextual encoders themselves. These routes allow the baselines to be compared on the same scoring rule while making clear how each reported result was obtained.
The post-processing comparators require additional work because of the evaluation mismatch. The authors retrain BERT-flow with its implementation and apply their own evaluation. For whitening, they implement the transformation with the prior study's pooling method and verify that the procedure can reproduce the original results under the corresponding settings. The aim is to avoid giving either the new method or a comparator an apparent advantage that comes from the calculations performed after its vectors have been produced.
Results across the similarity suite
Under the pooled evaluation, the previous best average reported for the unsupervised comparison is 72.05% Spearman correlation. Unsupervised SimCSE using BERT base reaches 76.25% on the same average. The result is a comparison across the STS tasks under the paper's common scoring protocol. The unlabeled recipe is also in the range of performance of earlier supervised approaches, which shows how far the authors get with a match defined by text identity and with ordinary dropout as the source of view variation.
Average Spearman correlation of unsupervised systems on the STS test suite
The independently masked sentence views give BERT base a stronger result than the previous best unsupervised score.
The numbers
| System or setting | Spearman correlation % |
|---|---|
| Previous best unsupervised result | 72.05 |
| Unsupervised SimCSE with BERT base (this paper) | 76.25 |
Supervised SimCSE with BERT base obtains 81.57% mean Spearman correlation across the STS evaluations. Because the same pretrained encoder family is used, these two BERT base results show what the complete labeled and unlabeled recipes achieve with a common starting architecture. The labeled result incorporates a different training corpus and different candidates. It expresses the benefit of the supervised procedure as used in the paper. The focused development comparisons examine narrower changes within that procedure.
The strongest result the paper highlights with RoBERTa large is 83.76% average Spearman correlation, achieved by supervised SimCSE. The authors report more pronounced gains for the RoBERTa encoders. Their comparison groups results by pretrained encoder, which gives context to these gains. A comparison between BERT base and RoBERTa large also includes a different starting encoder. A comparison within a pretrained family and size asks more specifically how the training or post-processing changes the available sentence vectors.
The abstract gives the BERT base averages as 76.3% for the unlabeled recipe and 81.6% for the labeled recipe. It describes the respective improvements over earlier best results as 4.2% and 2.2%. Those are the paper's reported gains for the suite. The main results give additional precision for the averages and specify the evaluation conditions. The improvements are about ordering similarity pairs under direct cosine scoring in those tasks. The development scores reported for individual design comparisons answer a different question about particular choices made while building the final encoders.
The performance with labeled data is especially informative in light of earlier use of inference examples. The experiments show that the way the labels enter the training decision can matter even when the data sources are familiar. Choosing an entailment from candidate hypotheses gives the shared encoder a direct comparison to solve through its geometry. A contradiction written for the same premise can make that choice more demanding. The resulting benchmark gains concern the transfer of that geometry to human similarity ratings collected independently of the inference labels.
Comparing the sources of training pairs
The development experiments permit narrower comparisons than the suite averages. The unlabeled setup compares positive views drawn from an input with positive sentences taken from its surroundings. On the STS-B development split, the authors report a Spearman score of 82.5 for SimCSE and 67.4 for the next-sentence comparison they highlight. The tested objective that predicts a nearby sentence relies on a relationship present in the document. SimCSE's objective relies on recognizing another encoding of the same sentence. The development scores favor the latter for producing a direct similarity ranking under this setup.
The authors also use the development split to compare changes that operate on the words. They test cropping a sentence, deleting words and substituting a synonym. Another alternative uses BERT to replace some of the words, allowing a contextual prediction to supply the substitute. These choices all provide a way to construct another view from an unlabeled input. None of the tested procedures exceeds the score of standard dropout alone in the reported comparison. Even the test that removes a single word produces a weaker development result. The important comparison is between concrete procedures for making the positive available, with similarity measured after retraining.
For supervised training, the data comparisons give the same objective different sources of positive pairs. Quora question pairs supply examples of related inquiries. Flickr30k provides human descriptions of a shared image, which can be paired because they describe the same scene. ParaNMT provides paraphrase candidates produced through back-translation. The inference comparison obtains its positive examples from entailment pairs in the combined SNLI and MNLI data. A common similarity evaluation makes it possible to assess how those different pairing rules serve the geometry the authors want to learn.
In the caption setting, the authors can treat any two captions written for the same image as a match. An image has 5 human captions in the dataset as described in the paper. Different captions may emphasize different aspects of the scene, so the shared image supplies the connection between them. The training signal says that both descriptions have that referent in common. In the entailment setting, the match comes from an annotated semantic relationship between the texts themselves. ParaNMT uses an automatic procedure to create its pairs, so the authors qualify its placement among supervised data sources.
The data sources provide different amounts of training material. To address quantity, the authors examine full-data settings and comparisons with samples of 134k positive pairs. Sample size refers here to the number of positives used to train, not to the number of evaluation examples. In the comparison with the same count of pairs, the combined NLI entailments perform best. The common objective, common BERT base starting point and matched number of examples make this evidence about the choice of pairs as supplied by those datasets.
To help interpret the comparison, the authors calculate word overlap between the members of each positive pair. They treat the sentences as bags of words and use F1 to measure the overlap, leaving word order aside. It is 39% for the combined NLI entailments, 60% for the Quora pairs and 55% for ParaNMT. These are measurements of the training texts. The authors suggest that hypotheses written from an inference premise frequently express related content with fewer words in common, which can give the encoder a reason to learn beyond lexical overlap.
After choosing entailments as positives, the authors add contradictions as candidates. On STS-B development data, the entailment-based training reaches 84.9 in Spearman correlation, and the version that also uses contradictions reaches 86.2. The second recipe introduces a deliberately incompatible hypothesis for each anchor and makes the batch's other contradictions available in the candidate pool as well. This result measures that complete change to the choice the encoder must solve during training.
Supervised candidate policies on the STS-B development set by Spearman correlation
Adding contradiction hypotheses improves the development score obtained with entailments as positives.
The numbers
| System or setting | Spearman correlation |
|---|---|
| Entailment pairs with in-batch alternatives | 84.9 |
| Entailment pairs with contradiction candidates (this paper) | 86.2 |
These development results have distinct reference points. The next-sentence comparison varies what makes an unlabeled pair correspond. The corpus comparison considers different sources of positive pairs in the general loss. The contradiction comparison keeps the source of positives and changes the alternatives available in supervised training. All are judged using the same kind of direct sentence comparison. Their numerical results belong to the development data used for design decisions, while the suite figures describe the evaluation of the resulting recipe over the broader set of tasks.
Transfer with frozen sentence vectors
The transfer evaluation uses a learned decision on top of the sentence vector. The authors freeze the encoder and train a logistic regression classifier with the default SentEval configuration. Logistic regression uses weights learned from the downstream labels to make a prediction from the vector features. The encoder therefore contributes information through the coordinates it already produces. The reported measure is accuracy, which records how often the classifier selects the correct label.
The transfer suite contains 7 tasks. MR and CR use review data, while SUBJ focuses on subjectivity. MPQA concerns opinion, and SST-2 draws on sentiment judgments. The set also includes TREC and MRPC, bringing question categorization and paraphrase decisions into the evaluation. The tasks supply separate reasons why a representation may be useful. Texts that differ in overall similarity can still share a sentiment label. A learned classifier can give the relevant features more influence than they receive in the cosine score. Sentiment and emotion and text classification
The authors find that supervised SimCSE is comparable to or better than the earlier approaches in this evaluation. They describe the unsupervised results as less clear. This difference is worth keeping with the main similarity result, where both training procedures improve the averages of their comparison groups. A direct ranking by cosine uses all the information in the direction of the vector according to one rule. A classifier fitted for a particular label can emphasize a comparatively narrow set of features. Results on one evaluation consequently provide incomplete evidence for the other.
Adding the masked language objective improves the transfer results in the paper's comparisons. The transfer table identifies λ = 0.1 for the setting with the auxiliary objective. The authors characterize the average benefit in the ablation as modest. On the semantic similarity evaluations examined for that intervention, they report a consistent decrease. The two outcomes show that keeping a token prediction signal during fine-tuning can help a downstream classifier even as it makes the direct ordering of sentence pairs less accurate under the reported similarity setup.
The post-processing approaches give another example of a change that fares differently across purposes. In the transfer experiments, flow and whitening reduce performance relative to the representations they start from. A transformation motivated by broad distributional spread can change what information is accessible to the trained classification rule. The authors use the transfer comparisons as additional evidence about the learned representations and reserve the main comparison for direct similarity, the behavior their contrastive procedure was designed to improve.
Inspecting the results of cosine retrieval
The paper also looks at what the vectors retrieve from a collection of captions. The pool contains 150k Flickr30k captions. The authors choose a caption as a query and rank sentences in the pool by cosine against its embedding. They compare supervised SimCSE with Sentence-BERT, using BERT base in both cases. This puts each query into a larger set of possible comparisons than a single benchmark pair provides. The result for a query is a set of neighboring descriptions a reader can inspect. Information retrieval and search
The paper displays the top-3 examples returned by each encoder for the selected queries. The authors judge the SimCSE results to be better matches in meaning in those examples. This is a qualitative assessment of what reaches the top of a cosine ranking. The main STS results summarize agreement across pairs scored by readers. The caption comparison shows the kind of candidate a user might actually be offered when the vectors are used for search. Its evidence is the displayed output, with no aggregate retrieval metric attached to the comparison.
The authors make the SimCSE code and pretrained encoder weights public through their Princeton NLP repository. The work reported with those encoders spans direct similarity, classification on frozen representations and retrieval of caption neighbors. Each use makes a different demand on the vectors. The numerical advantage is clearest in the pooled similarity benchmarks, where the comparison rule used at evaluation is the same cosine score that the training procedure was designed to shape.
What the ablations show
The two passes need room to disagree
The fixed-mask experiment changes a detail that would be easy to overlook in a description of unsupervised SimCSE. The encoder still uses dropout at the usual probability of 0.1. Within each training pair, however, the second pass uses the mask from the first. A sentence processed under those conditions yields the same vector on both passes. The authors also run a condition with a dropout probability of 0. Both conditions produce a sharp deterioration in Spearman correlation on the STS-B development split. The ordinary setting, with independent draws at 0.1, gives the best development result among the dropout settings the paper examines.
The comparison with tied masks is particularly informative because dropout still affects the training computation. Given another input or another draw, the mask can suppress a different set of internal quantities. What disappears is variation between the two representations that the loss is supposed to match. The weak development result thus gives a more specific account of the role of noise than the experiment that disables dropout altogether. It points to the need for the pair to pose a genuine matching problem even while both passes read identical words.
Consider what can happen to a positive score during an update. When the two vectors are identical, an update that rotates one also rotates the other by the same amount. Their cosine remains at its maximum. The positive still contributes a term to the loss, and the loss can still fall as other candidates become less similar to the anchor. There is consequently a way to make progress on the training decision without learning anything further about how the positive should be represented. Independent masks change this situation. An update can now affect how far the two views of the input diverge, as well as how distinguishable they are from the rest of the batch.
The authors inspect the changes during training by taking checkpoints every 10 steps. That sampling interval belongs to the geometric analysis. It lets them trace how each condition moves from the pretrained starting point, with alignment and uniformity measured at the same checkpoints. The two identical-view controls improve uniformity while alignment deteriorates markedly. The run with independently sampled masks also improves uniformity, with much steadier alignment. This difference is visible in the trajectories themselves, so the explanation rests on more than the development scores at the end of training.
The word collapse in the paper describes a failure that can be easy to misread. The unchanged-input controls learn to put greater distance between typical sentence vectors. Their loss of structure concerns the proximity of sentences readers judge to be related. In the fixed-mask case, perfect agreement inside the training pair coexists with worsening agreement across highly rated pairs of distinct sentences in the development analysis. Those findings fit together because the guaranteed match and the neighborhood being evaluated are different things. One involves the exact same input under the exact same computation. The other involves relationships the encoder has to preserve across naturally occurring differences in wording.
That distinction helps explain why the initial checkpoint matters to the authors' account. At the outset, the similarity space already puts many highly rated pairs fairly close. The trajectories show how the different objectives treat that inherited feature. With an effective signal on the positive side of the contrast, the encoder can change many of its directions while preserving useful neighborhoods. With identical views, the loss can reward global rearrangement even where it disrupts those neighborhoods. The paper's claim about the value of pretraining is grounded here in the presence of useful initial alignment and in what happens to it during fine-tuning.
The sweep over dropout rates asks a somewhat different question. After allowing the representations to vary within a pair, the authors can alter the frequency of the masking itself. The usual Transformer rate works best in this experiment. That is a result about the amount of perturbation under the tested conditions. The fixed-mask comparison holds the probability at its usual value and changes whether the randomness is shared. Its outcome is evidence about the dependence between the draws. The two comparisons identify different choices that a reproduction would have to match, even though both choices concern dropout.
These controls also sharpen what the Wikipedia training signal accomplishes. Two independently perturbed views can still agree on features that tell the encoder which input produced them. During an update, the other sentences reveal whether those features distinguish the original from alternatives. The highly related STS-B pairs have no assigned role in that update. Their measured behavior shows that a requirement about repeated inputs can help retain a property that extends to relationships between different inputs. The authors observe that extension in a fine-tuning run that already starts with a measure of semantic organization.
Small edits ask the encoder to ignore different things
The word-editing experiments test the substance of the view as well as the amount of variation. If a crop removes the end of a sentence, the resulting candidate may retain the principal action but lose a qualification. If a deletion removes a word on which the claim depends, the edited sentence and the original can support different readings. A synonym substitution retains the surrounding wording and can still be inappropriate for the particular sense in use. These are reasons the positive-pair policy can change even when edits appear small by a count of the words they affect.
Encodings made with dropout have a different source of variation. Every word is present at the input on each pass. The encoder can respond differently to those words as internal quantities are masked, but the fact used to designate the target is secure. This reduces an uncertainty in pair construction. The experiment then tests whether stable recognition across internal variation is sufficient to develop usable vectors, with the original sentence intact and other sentences giving context to the decision through their scores.
The comparisons on STS-B development data favor that approach over all the paper's tested editing procedures. The effects are visible even in the condition that removes a single word. That condition is worth following beyond its final correlation because it gives a more complicated geometric result. Training with the deletion can improve alignment on the highly rated pairs. Its gain in uniformity is smaller than the gain achieved by standard unsupervised SimCSE. A lower development correlation can therefore accompany a favorable change in how close some genuinely related sentences are.
This part of the evidence matters to an explanation centered on meaning preservation. A damaging edit is one plausible reason that a training pair could be unhelpful. The alignment trajectory for deletion shows that edited examples can nonetheless supply a signal that improves the closeness of selected semantic neighbors. The procedure can make useful changes in one respect and still arrange the wider collection less effectively for ranked comparison. The paper measures these outcomes separately. It supplies no semantic assessment of each edited sentence from which to estimate how frequently a change at the input actually altered the proposition.
The test with BERT-generated replacements makes the boundary between grammatical plausibility and preservation especially relevant. A proposal based on the surrounding words can fit the sentence as language while expressing a different detail. Once the procedure gives the edited view the positive role, the training loss treats that view as a candidate to prefer. This is a question about the supervision implicit in an augmentation. The development result applies to the particular replacement procedure and the resulting pairs, whose individual meanings were outside the measurements reported for the comparison.
What counts as a helpful invariance depends on the eventual use of a vector. When the goal is graded similarity, keeping enough distinction between a claim and a modified version of it can be valuable. Recovering a repeated input in spite of missing internal signals asks for stability of the computation while keeping the linguistic evidence available. Better performance with dropout is evidence for that particular balance under the paper's conditions. An edit that preserved a well-defined relation more reliably, or a test that rewarded a different relation, would pose another empirical question.
Nearby sentences and separate encoders
The next-sentence experiment changes how the reference match was found. A continuation can be identifiable because it develops a point introduced by the anchor. It may add a fact that neither repeats the anchor's meaning nor follows from it. The comparison with self-prediction puts that source of context beside one that keeps the content of the positive fixed. The development result favors self-prediction for the paper's direct similarity ranking. It leaves the predictability of discourse continuations as a separate property that the benchmark was never designed to reward directly.
The paper also tries sampling from the next 3 sentences. That rule extends the possible match beyond the immediate successor. All the candidates selected as positives through this route have a link to the anchor through their position in the text, but that link can cover a range of relationships. A sentence nearby may return to a point, refer to a participant from an intervening sentence, or move to the next part of an account. Training has to treat the observed choice as a target even though proximity in the document does not say which of these relationships the pair exhibits. The reported STS-B comparisons favor a more tightly specified target.
The experiments with shared and independent parameters address another question about the two sides of the choice. Shared weights constrain the encoder to use the same transformation, so any difference between two views of identical input comes from their computation under the masks. Independent parameters allow those differences to reflect how the two encoders have developed in their respective roles. The paper finds that sharing helps unsupervised SimCSE. In supervised training, the independent-encoder setting gives a Spearman correlation of 84.2 on the STS-B development split, below the result for the shared arrangement.
The supervised result is informative because the two inputs in an annotated pair do have identifiable roles. The premise provides the information from which the hypothesis is judged. There is a reasonable case for letting each position have its own encoding procedure. However, the task used to judge the result asks the representation to support a common sentence comparison. Training on both roles through shared parameters imposes that common mapping throughout the update. The experiment supports that constraint in this setting, including when the positive is a different sentence from the anchor.
Each independent encoder can adapt to its side of the training decision. This adds freedom to the optimization and changes the way evidence from the anchor and candidate sides is combined in the parameters. The paper compares the resulting setups. It gives no separate measurement of which consequence of sharing accounts for the advantage. The two cases nevertheless support a consistent design choice. Whether the text is copied or supplied through an entailment, the authors obtain stronger development rankings when the same learned transformation encodes both members.
The scope of the comparison becomes clearer in the context of earlier retrieval work. A question and a passage can warrant encoding procedures suited to their different functions, since the useful pairing is judged by whether one text answers or helps answer the other. The SimCSE development comparison rewards similarity between sentences presented for a common scoring rule. The benefit of sharing bears directly on that particular use. Extending it to a setting with different input roles would require evidence about how those roles affect the score needed there.
What changes when a batch includes contradictions
Using entailments gives the supervised loss a designated match with an explicit reason behind it. The next comparison expands what the encoder must choose among. Before the addition, the other hypotheses in the denominator are there because of their place in the batch. With the new candidates, an anchor also encounters a hypothesis composed in response to that premise and labeled incompatible with it. For the anchor's own comparison, this is a competitor with a known relationship. A high score can expose a similarity judgment that is dominated by shared subject matter even when the candidate makes a conflicting claim.
An entailment can itself preserve relatively little of the wording of a premise. That gives the supervised task a combination of demands. Some of the evidence that supports the target can be expressed in different terms, while a candidate with familiar terms may deserve a lower score. The authors' positive-source comparison and their contradiction comparison probe these demands at different points. The former changes the relationships used to choose the target. The latter introduces annotated conflicts into the available alternatives after the target policy is decided.
The controlled score increase with contradictions belongs to the full change in the batch. Hypotheses from the other groups enter as well as the contradiction written for the current anchor. Some will be ordinary alternatives, with the explicit contradiction label applying to another premise. The intervention therefore introduces more comparisons per anchor and changes what some of those comparisons say about its premise. The result supports the usefulness of the augmented candidate set. It gives a stronger reason to use the complete recipe than to assign the entire development improvement to any one entry in the denominator.
The weighting sweep examines one entry more directly. An explicit coefficient can raise the weight of the anchor's own contradiction without giving any other candidate the same adjustment. The best setting the authors find on STS-B development data is α = 1. This keeps the contradiction in the competition with the usual coefficient. Because the candidate contributions already depend on their scaled cosine scores, equal coefficients still allow one hypothesis to have a larger effect on the loss than another. A close contradiction can receive substantial influence through the same scoring rule used for the rest of the batch.
The findings distinguish the value of providing a competitor from the value of emphasizing it by hand. Choosing the candidate changes which example the encoder sees and which comparison can affect its training. Increasing its coefficient would change the loss even for a fixed set of scores. The measured improvement comes from supplying the contradiction candidates. Once they are present, the learned scores can determine their influence under the chosen objective. In this experiment, supplying an explicit emphasis beyond the ordinary rule does not improve the development result.
Neutral hypotheses help define where this policy works. Such a hypothesis can be consistent with the premise without being supported by it. It may preserve much of the premise's content and add an unconfirmed detail. Using it as a hard negative would teach the encoder to distinguish that relation from entailment in the training choice. The paper finds that adding neutral hypotheses brings no further development gain. This leaves an informative difference between having a well-defined annotation and using that annotation in a way that improves a similarity space.
The authors also report that using more than the sampled contradiction yields no observed difference in their comparison. Where several are available, the final implementation samples one. Giving the objective access to more sentences of a particular type could make sense if they offered substantially different challenges. The evidence here supports the smaller choice under the tested procedure. The paper does not present separate development results by the kind of conflict the contradictions express, so there is no corresponding basis for attributing the outcome to saturation on any specific inference distinction.
A candidate's difficulty is ultimately a relationship between the example and the encoder at some point in training. The annotation directs attention to an example likely to be informative. As training changes the vectors, its score can change and so can its influence relative to the other candidates. The paper's favored coefficient allows that process to take place under the normal exponential weighting. There is no need in the tested policy to predict in advance which contradiction will remain difficult once the encoder has adapted to the data.
What the positive-source comparison isolates
The comparison among sources is tighter when the number of training pairs is matched. In that part of the experiment, the question is whether the kind of pairing supplied with the same amount of contrastive training data makes a difference to the result. The success of the entailments gives a reason to consider the annotation rule itself. To write a supported hypothesis, a person has to express content consistent with what the premise supplies. Some of the result can be a more general statement that uses different words, as in the paper's illustration. This gives the encoder a path to matching related sentences beyond exact repetitions.
The authors offer the lexical overlap measurements as part of their explanation. The differences among the training corpora are visible even when the texts are reduced to word inventories for that analysis. The inference pairs reuse less of their vocabulary according to the measure reported earlier. The supervised loss still rewards identifying those hypotheses, so training can benefit from features that help bridge the wording difference. This is a plausible connection between the way the hypotheses were written and their performance as positives. The measurements of overlap and development correlation come from different stages of the experiment and play different roles in that explanation.
A common image supplies a useful counterexample to the idea that any credible pairing has the same effect. Two captions can be appropriate descriptions of one scene even if they select different details of it. One could focus on a person and the other on an object that person's activity involves. The texts can agree as descriptions of the scene without giving much direct evidence about the equivalence of their individual sentences. The caption pairs make a defensible target for shared visual reference. The development test uses a judgment based on the text, which helps explain why a source of examples can be coherent on its own terms yet produce a different similarity space.
The same applies to the question pairs and translated paraphrases on other grounds. A relationship derived from matched questions supplies examples organized around what people ask. A relationship derived from back-translation supplies expressions connected by the output of a translation process. In each case the training procedure takes that relationship as sufficient reason to prefer the designated candidate. The controlled comparison measures how the pair source works as a package, including what types of input and differences in phrasing it supplies. Matching quantity makes that package easier to compare while preserving its qualitative differences.
The authors also try two ways of extending the chosen supervised procedure. Adding Adversarial NLI and combining the supervised recipe with the unsupervised approach yield no meaningful improvement in their tests. These experiments show that the success of each source in one setting gives limited grounds for expecting another improvement when sources are added together. The paper gives the outcome for the tried combinations. It leaves the methods of mixing or sequencing the sources mostly unexplored. Adversarial NLI
Taken at the level of the training decision, these controls vary how much the encoder can learn from the identity of the desired candidate. For one text and its copy, that identity is fully specified, and the learning problem is created by the different computations. For different texts, it depends on an assumption or an annotation about the relation. The controlled results favor a pairing that offers a fairly direct connection in meaning when such a label is available. The tested alternatives provide relatedness through other routes, with different consequences when a similarity benchmark is used to judge the resulting representations.
The loss and the final readout can favor different vectors
The pooling comparison asks where, after processing a sentence, an encoder should provide the vector used in the test. The answer depends partly on how training has been conducted. SimCSE with BERT base compares readouts based on averaging with readouts tied to the special [CLS] position. Within the latter family, there are choices to keep the MLP for the entire procedure, to omit it, or to train through it and then read the preceding vector. The development comparison points to the last of these for unsupervised SimCSE. The supervised procedure shows smaller differences among the pooling choices.
Fitting the encoder through the MLP introduces a transformation between the [CLS] output and the contrastive scores. The loss is applied after that transformation, and its effects on the earlier parameters depend on the transformation as training progresses. At evaluation, reading from [CLS] before the MLP gives access to a vector that learned under those conditions. This explains why training with a layer and then removing it is a distinct option in the experiment. The resulting sentence vectors owe something to the layer's participation even when its output is absent from the scoring computation.
One might expect the vector scored during training to be the natural choice for evaluation. In the unsupervised case, the two stages use different judgments. Training chooses a repeated sentence among batch candidates, while evaluation compares naturally occurring sentence pairs using graded human ratings. Two locations within the same trained encoder can organize directions in different ways that suit those judgments to different degrees. The paper tests the result directly. Its preferred unsupervised pooling implies that the readout immediately before the scoring transformation can generalize better to the benchmark.
The supervised training decision already makes a distinct sentence the intended match, with meaning providing a reason for its selection. The paper retains the MLP for that variant. The observed pooling differences are modest enough that the comparison gives limited grounds for treating its final supervised choice as a requirement for every supervised encoder. It does establish the exact readout used for the reported comparisons and shows that the unsupervised result for dropping the MLP is specific enough to merit separate treatment.
An average from token positions or layers can be beneficial when evaluating pretrained weights directly. Such an average uses whatever the original training distributed among those positions. A sentence-level loss can change what information is available at a particular position, and how its direction compares to those of other sentences. The pooling ablation gives evidence about the combination of learned representation and readout. A preference found for one point in a training pipeline can change at another, even with the same underlying architecture and benchmark.
Normalization, scaling and the number of candidates
The normalization experiment changes the scores on which training operates. Cosine compares directions, while an unnormalized dot product lets the lengths of both vectors contribute. That distinction can affect the competition among candidates. An alternative with a relatively long vector can have extra influence under a dot product even when its angle would give it a lower cosine. Normalization removes that route for changing the loss. It concentrates the comparison on the same property of the vectors that the paper later uses to score evaluation pairs.
Temperature determines how strongly a given gap in similarity affects the weights in the contrastive objective. The appendix reports that cosine at a tuned τ = 0.05 works better than dot product on the STS-B development split. The result concerns the tested choices together. Changing the score function can change the range of scores to which the temperature is applied. Changing the temperature can then alter the relative contribution of candidates within that range. The experiment identifies a combination that produces stronger subsequent rankings.
This choice has consequences even though temperature does not appear in the final similarity score. Within training, the loss reacts to how well the target competes across the alternatives, and the scaling determines how strongly it reacts to different score gaps. Fine-tuning under that loss can give a sentence a different direction in the learned space. The later cosine uses the direction that training produced. Thus a setting whose direct role ends with training can still affect the ordering obtained from the trained vectors.
Batch size changes the number of alternatives contributing to an update. A larger batch creates more opportunities to encounter close competitors, and it also changes the collection of scores over which the target's share is measured. The authors report that the tested batch sizes yield similar behavior when the learning rate is adjusted appropriately. This statement concerns the range they search and the use of learning rate tuning. Holding the learning rate fixed while adding alternatives would define a different control.
The paper suggests that the pretrained initialization may help explain why a very large batch is unnecessary in these comparisons. The encoder starts with useful geometry, and fine-tuning can reshape it with the candidates provided by a modest batch. This explanation is consistent with the trajectory analysis showing initial alignment. The batch-size experiment itself changes batch sizes and pairs them with learning rates. It supplies no comparison in which an initially untrained encoder faces the same alternatives and schedule. The role of pretraining in the observed tolerance thus remains an interpretation offered by the authors.
Keeping a word prediction signal active
The auxiliary MLM ablation studies a change in what training rewards. Contrastive learning acts on a vector for the whole sentence and favors matches that can be selected in the batch. The additional objective rewards recovery of masked token content. A single update can now carry signals from both requirements. The authors motivate this addition by the possibility that sentence-level adaptation can weaken the encoder's access to token-level information that was useful before fine-tuning.
The effect is visible in the divergence between evaluations. The paper reports a modest average transfer benefit in the ablation and a consistent decline on the sentence similarity comparisons used to examine the auxiliary term. A classifier trained over fixed vectors can concentrate on coordinates that help determine its particular label. The direct STS comparison applies the same cosine rule to each pair. A feature can therefore be accessible enough to help a particular classifier and still contribute little, or even interfere, when all vector directions are compared through a uniform scoring rule.
The option also differs from the paper's experiment with word replacements in a sentence view. In that experiment, the modified sentence becomes an item the encoder is asked to match. In the auxiliary task, a masked position creates a prediction target for learning about the text. The output of that auxiliary task does not become an extra sentence candidate. These uses of token-related operations can point the encoder towards very different behavior because one determines a positive comparison and the other determines an additional loss.
The experiments give stronger grounds for the measured tradeoff than for a particular account of the features preserved. The downstream change is consistent with the authors' motivation. Tracing which aspects of token knowledge would otherwise be lost, and which of them a fitted classifier uses, would require another kind of measurement. The current comparisons establish that the extra objective changes the usefulness of the sentence vectors depending on what the evaluation asks of them.
Three views of the geometry
The geometric evidence extends beyond the training trajectories. The authors also compare the final embeddings from several procedures on alignment and uniformity. Ordinary pretrained vectors can show good proximity among the selected positive pairs while occupying a concentrated space overall. Flow and whitening substantially improve the spread and give up some proximity among positives. Unsupervised SimCSE makes much of the improvement in spread while retaining useful alignment. The authors interpret inference supervision as improving the balance by giving the loss a direct signal about the closeness of related, distinct sentences.
This comparison makes a high score on either geometric criterion by itself difficult to equate with a strong STS result. A procedure that specifically alters the distribution can disperse sentence vectors more strongly and still separate some pairs that should stay close. Conversely, a representation can keep particularly similar pairs close while assigning generous similarities to many others. The two diagnostics ask whether different requirements of the comparison are being met. The cross-system results support the value of considering those requirements together.
The singular-value comparison gives a view of directional concentration that does not depend on choosing positive pairs. The authors construct sentence matrices from STS-B texts and put their spectra on a common scale using the largest value in each. Relative to the corresponding ordinary BERT and Sentence-BERT representations, the singular values from SimCSE fall less abruptly. The post-processing approaches flatten the distributions more aggressively. This pattern is consistent with a loss that discourages large similarities among typical batch alternatives while continuing to give particular pairs a reason to come together.
The normalization of the spectra affects what one can read from them. They describe the strength of the remaining directions relative to each representation's strongest one. They do not identify which sentences are associated with a direction or which features distinguish their meanings. The evidence about individual relationships comes instead from the alignment analysis and the direct score comparisons. Together these views connect an aggregate property of the sentence matrix to consequences that are relevant for the comparisons a reader might want to make.
The grouped cosine plots give the most direct view of those consequences. The authors take STS-B pairs at different levels of human-rated similarity and examine the score distributions within those groups. The two SimCSE variants show better separation among the levels in the reported comparison. Their scores are generally more spread than the ordinary BERT or Sentence-BERT scores, while the highly similar pairs vary less than in the whitening comparison. A wider range can thus coexist with more consistent treatment of pairs readers judge to be near each other in meaning.
Keeping the distributions in view also explains why the authors examine rank correlation alongside them. A correlation provides an aggregate account of whether pairs appear in a sensible order. Distributions show how scores for different levels are positioned and where they overlap. A shift that helps on average can leave ambiguous scores shared by a range of judgments. The visual comparisons help locate the improvement at the level of how the scores are used, while the benchmark correlation gives a common outcome for comparing the representations under the same evaluation.
Limitations
Limits identified by the authors
The authors explicitly prioritize semantic textual similarity when judging the representation. That choice defines where the strongest claim belongs. The pooled STS results concern the ordering of rated pairs by a direct cosine score. The transfer evaluation concerns the information a trained classifier can recover from a fixed feature vector. The authors describe the unsupervised transfer pattern as unclear. Consequently the stronger STS performance gives narrower grounds for expectations about tasks whose eventual decision uses a different readout or depends on other properties of a sentence.
The choice of evaluation calculation further conditions the headline comparisons. The authors document differences across papers in the training of a scoring layer, in the correlation statistic and in the treatment of topical subsets. Their preference for a joined ranking makes comparisons across topics part of the evaluated behavior. A weighted combination of separate topic correlations has a different interpretation. The extra evaluations under a common alternative protocol improve comparability with specific earlier reports. The findings still attach to the chosen scoring and grouping rules, so an improvement needs its experimental protocol to be interpretable.
The reported tolerance for different batch sizes also comes with the authors' own qualification about learning rate. It applies within a search that allows the size of the update to be adjusted with the number of examples in the batch. Their suggested explanation points to the benefit of starting from pretrained weights. The experiment uses such weights throughout. It therefore supplies a practical observation about varying batch settings in this fine-tuning framework, with the dependence on pretraining left to the explanation and the alignment evidence.
The authors give further scope to the result by describing other applications as possibilities. They propose that a similar objective could be tried with other continuous representations and integrated into pretraining. The demonstrated result concerns subsequent training of pretrained sentence encoders with the particular pair constructions studied here. Extending the objective to an earlier stage of learning would change the information available at initialization. Extending it to different representations would change what views and batch candidates stand for. Both are research directions the conclusion raises.
Limits visible in how training was chosen
The description of unsupervised SimCSE applies most directly to the production of its training pairs. The original sentences need no annotated relationships. Development feedback still guides the selection of settings and the choice of which checkpoint enters the test. In particular, STS-B development judgments tell the experimenters how well the evolving encoder serves a task akin to the one emphasized in their final evaluation. This feedback can help decide how far the directions should move during training even though none of the ratings supplies a positive or negative for a parameter update.
The design therefore leaves open what can be achieved with neither labeled training pairs nor a labeled similarity development resource. In that setting, a different criterion would have to determine how long to train and which output to keep. Training loss is a measure of recognizing the positive within its competition. The fixed-mask controls illustrate how success on one part of that choice can coexist with a decline in the geometry of interest. That makes the availability of an external criterion particularly important when interpreting a development-selected result.
The development comparisons also differ in independence from the final suite results. A split used to make repeated choices can reveal which options worked there. It offers less assurance about the size of each effect in another collection. The final STS suite estimates the behavior of the complete selected procedure. From that aggregate result one cannot infer that the pooling, masking or contradiction policies would make the same contribution on each test dataset. The paper supplies stronger evidence for the entire recipe across tasks than for the portability of each development ranking separately.
A similar issue concerns the meaning of learning from an unlabeled corpus after pretraining. The contrastive updates depend on the pretrained weights that determine both where sentences begin in the space and how they respond to masking. The checkpoint analysis shows preservation of alignment that was already present. It provides limited evidence about discovering such alignment from an initially untrained encoder. Copying an input would remain possible in that setting, but the relation between the copy task and other linguistic relationships would have to develop from a different starting point. That relationship is outside the experiment.
The data themselves define another boundary. The unlabeled version uses individual sentences from English Wikipedia. The supervised version relies on the premise and hypothesis formats of the combined inference collections. The similarity suite and the transfer evaluation illuminate a range of behaviors within their designated tasks. The design offers no corresponding experiment on whether the method has the same effects with another language, substantially longer input, or a different kind of supervision. A general mechanism for creating a pair can be applied more widely in principle. Its measured gains belong to the inputs and judgments the authors actually use.
Limits of the claims about pairs and negatives
The batch convention makes many comparisons available with little extra annotation. It also permits a competitor to have a meaning that readers would regard as similar to the anchor. The procedure establishes that it came from a different training group and scores it as a negative on that basis. A paraphrase or a distinct description of the same situation could enter a batch by chance. The paper gives no estimate of the incidence of such cases or their consequences. The continued usefulness of the approach in aggregate leaves room for these local conflicts between the candidate rule and the semantic objective.
A contradiction provides more definite information about one comparison in the supervised batch. The hypothesis was labeled in relation to that premise, and the annotation supplies a specific reason to reject it as the target. A contradiction drawn from a different group has no corresponding label for the current anchor. It may appear distant, closely related, or even supported by the anchor. The supervised design thus introduces deliberate competitors without resolving the status of every comparison created by batching. This is a consequence of how the denominator is built, independent of how well the final vectors score on STS.
The development gain with contradictions identifies an improvement from the candidate policy as implemented. More candidates enter at the same time as the matched contradiction becomes available. The weighting sweep keeps the candidates and varies the coefficient on one of them. A comparison that held the number of additions fixed and varied which types of sentences supplied them would answer a different question about the effect of their content. The evidence from the reported controls supports the complete policy, with the separate contributions of count and content left undetermined.
The choice of annotation source has a similar interpretive limit. Equalizing the number of positives takes account of the amount of training material. The corpora still differ in what people or processes produced the pairs, what texts they contain, and what relation is intended. The observed lexical overlap gives a measurable distinction among several sources. It remains a property that travels with those other differences. The development comparison cannot determine whether choosing data with lower overlap by itself would reproduce the benefit or which specific range of variation is most valuable.
The relatively low overlap of entailment pairs also measures words without modeling their roles in a claim. A training pair can have little vocabulary in common because it expresses an inference in different terms. It can also have little in common because the connected text is less specific or because it covers only part of the premise. The strength of NLI data in this experiment reflects the paired examples available under its annotation policy. There is no separate evaluation that assigns the result to one of these ways of producing a low-overlap pair.
What a cosine ranking can tell a reader
A cosine can express closeness without expressing the direction of a relationship. Consider a premise that describes a particular activity and a hypothesis that says only that somebody is outdoors. If the premise supports the general observation, it can supply a good training positive. Reversing the statements would leave the outdoor observation as insufficient evidence for the particular activity. Their cosine remains the same. The resulting similarity measurement can benefit from directed inference examples while answering a symmetric question about the texts.
The same issue appears on the negative side. A cosine can provide evidence that the encoder distinguishes a contradiction from a supported candidate in a particular comparison. It does not identify which parts of the text conflict or explain whether they conflict under a particular reading. The STS scores also aggregate over many pairs whose rating reflects degrees of similarity. Success on that ranking is compatible with failures on some classes of contradiction. The experiment gives little information about how often different kinds of semantic disagreement are detected in isolation.
Rank correlation has a separate boundary concerning score interpretation. An encoder can place pairs in the same order after a change in the spacing of its similarity scores. Its rank performance would be the same even if numeric cutoffs behaved differently. This matters whenever an application expects a single cosine value to indicate a fixed degree of similarity, rather than asking which among several scores is highest. The reported STS evaluation tells how useful the ordering is under human ratings. It leaves this calibration question open.
The pooled protocol makes the comparison more demanding across the topics that enter a task. It still measures the particular mixture used in that benchmark. A change to the mixture could change the ordering that matters, for example by introducing a new set of comparisons whose scores mostly overlap with those from an existing topic. The authors choose pooling because it better reflects having to score pairs from different topics together. The result is evidence about doing so in those evaluated collections, with wider score comparability still to be tested.
The grouped score distributions reveal more about the range of cosines associated with different ratings. They summarize the pairs by rating bands, so broad improvements in separation leave open which individual pairs are difficult. A reader interested in whether a system handles changes to participants, actions or qualifications would need comparisons focused on those distinctions. The paper has examples that illustrate differences of this kind and aggregate results that quantify the ranking. The reported analyses do not link particular classes of linguistic errors to a measured portion of the remaining ranking errors.
Where the argument about the spectrum applies
The theoretical argument has several explicit conditions. The contrastive expression is considered as the number of negative instances tends to infinity, and the vectors used in the analysis have unit length. The step that replaces expectations with finite averages gives every sentence in the set the same weight. The link from the sum of the Gram matrix's entries to its leading eigenvalue is made for positive entries. The authors discuss the observed cosine distributions in support of considering that condition. Its applicability still depends on the collection of vectors to which the argument is applied.
The Jensen inequality step gives a lower bound for the random-comparison term in terms of summed dot products. The argument then uses the dot product sum as an upper bound for the largest eigenvalue under the positivity condition. This chain supplies a reason to expect the loss to discourage an excessively dominant direction. It does not specify how tightly either bound holds during a particular training run. The value serving as an upper bound can fall while a smaller quantity beneath it rises. The full loss also trades the comparison term against the reward for matching positive pairs.
With normalized vectors, the trace fixes the total of the Gram matrix's eigenvalues. The argument concerns how strongly the leading one can dominate under those circumstances. Even knowledge of that eigenvalue and the total would leave many possible distributions among the remaining directions. The geometric result is therefore clearest as a mechanism and an observed tendency, with the measured spectra showing what occurred for the STS-B representations. A guarantee about how every component moves at each step would require tighter control than the argument supplies.
The spectra plotted in the paper also depend on the sentences used to build the matrices. A distribution measured from one set of texts can favor directions that another set makes less prominent, even with an unchanged encoder. The flatter distributions provide empirical support for the paper's account on its chosen sentences and normalized scale. They cannot establish the same degree of change for every collection. The comparisons with whitening further show why this question and sensitivity to meaning have to be judged through separate measurements.
The alignment diagnostic depends in turn on which pairs are deemed positive. The high-rating rule used in the checkpoint analysis is well suited to following the fate of clear similarity pairs. Relationships below that cutoff can play an important part in the rank evaluation and remain outside that particular alignment average. Uniformity depends on which population provides independent draws. Together the measurements tell how a selected set of neighbors and a broader collection behave under the encoder. Their scope is set both by the metric definitions and by the way each sample enters them.
Averages can also conceal the distribution of changes within their samples. A lower average distance among positives can reflect sizable gains on some pairs while others become farther apart. An improvement in uniformity can reflect dispersion between several common groups with less change inside any one of them. The work uses the diagnostics for meaningful comparisons between training conditions. It would take a finer analysis to tell which portions of the collection account for most of the change and which still retain the initial geometry.
How far the additional evaluations reach
The transfer experiments give evidence about a specific form of reuse. The sentence encoder is fixed, and logistic regression learns a decision for each selected task. This probes whether the available features lend themselves to that decision under the default SentEval procedure. A different downstream training regime might adapt the entire encoder or combine the vectors in another way. Evidence from the frozen-feature test is most directly applicable when the encoder is used in the form examined. The result with auxiliary MLM consequently measures a tradeoff between the tested uses rather than a universal benefit from continued token prediction.
The retrieval comparison has a different limitation. The size of the caption pool allows the encoders to make choices among many descriptions, and the examples show what their closest results look like. The paper does not assign relevance judgments to the entire pool or report an aggregate retrieval score. A reader can inspect the quality of the illustrated matches. The probability of seeing a similar improvement across queries, the frequency of serious misses and the effect of alternative query types remain outside the evidence.
The use of a caption as a query also preserves a close relationship between the forms of query and candidate. Both are drawn from a collection built to describe images. A search application can ask for text with a different function, such as a passage that supplies missing information or material that satisfies a request. Strong similarity among captions gives some evidence about the use of the encoder to find neighbors. Relevance to an information need would require evaluating which candidates fulfill that need. That broader question is among the places where subsequent research takes the embedding problem in another direction.
What came after
Changing what the contrast teaches
The citing work closest in subject to SimCSE is DiffCSE, which studies sentence embeddings through difference-based contrastive learning. It puts the treatment of differences at the center of the same general training problem. In SimCSE, the successful unlabeled intervention keeps the original text fixed and makes the encoding sensitive enough to internal variation to give training a match to learn. The editing controls show how changing the input can ask the encoder to disregard a difference that matters. DiffCSE takes the role of differences as its subject in a contrastive sentence-embedding approach. The link between the two studies is the choice of what variations the training signal should teach the encoder to handle.
Text Embeddings by Weakly-Supervised Contrastive Pre-training applies contrastive learning to text embeddings under weak supervision. This shifts attention to the source of evidence for a training correspondence. SimCSE provides an example of a pair whose relationship is guaranteed by repeating the input and another whose relationship is established by human inference annotation. The weakly supervised work explores an intermediate kind of signal within contrastive pretraining. The comparison is useful because the loss can accept a designated match regardless of how it was obtained. What changes is the support for giving that candidate the positive role and the variety of relationships to which training can be exposed.
Towards General Text Embeddings organizes contrastive learning into stages to pursue general text embeddings. Here the extension concerns how training is arranged over time. A procedure with multiple stages can make the sequence of learning signals a design choice. In SimCSE the intended relationship is specified separately for each variant, and the authors' try at combining their versions yields no meaningful improvement. A staged approach takes up a wider question about how progress under one training condition can support another. The relevant continuity is the use of contrastive learning to arrange an embedding space, with the succession of training stages itself put under study.
Text and Code Embeddings by Contrastive Pre-Training takes the training family into a setting that includes code as well as text. The additional input type changes the scope of what a useful representation has to describe. SimCSE's designation of a positive is grounded in sentence identity or an annotated inference relationship. Including code raises a corresponding design question about what relationship an embedding comparison should preserve for the represented input. The contribution stated by the later work is the use of contrastive pretraining for this broader scope. That is a connection through the training approach, with the actual meanings of the pair roles depending on what is being encoded.
Changing the encoder or making its purpose explicit
Sentence-T5 addresses the construction of scalable sentence encoders from pretrained text-to-text systems. That focus carries forward the question of what pretraining can supply when the desired output is a reusable sentence vector. SimCSE starts from contextual encoders and examines the readout alongside the objective used to adapt them. A text-to-text starting point brings a different setup to the question of how to obtain a sentence representation. The title's emphasis on scalability adds another dimension to the comparison. The later work is concerned with building the encoder from that starting family, while the SimCSE experiment helps frame why having a pretrained system and obtaining a useful sentence space are distinct achievements.
One Embedder, Any Task studies instruction fine-tuning for text embeddings. It makes the purpose of the embedding part of the learning problem through instructions. SimCSE shows why that purpose matters even for the same encoded text. A direct cosine ranking and a classifier trained on sentence features can favor different training choices. Instructions provide a way to address task requirements when producing the embedding itself. This puts the task dependence revealed by the similarity and transfer experiments in a different place in the system, with the embedding procedure explicitly concerned with what the representation is meant to serve.
M3-Embedding pursues multilinguality, multiple functions and multiple levels of text granularity through self-knowledge distillation. These axes broaden several choices held comparatively fixed in SimCSE. Individual sentences define SimCSE's training items and main comparisons, and the evidence centers on the designated similarity tasks. Allowing different granularities makes the unit of representation part of the larger embedding question. Extending the intended functions and languages likewise broadens the set of relationships a text encoder may need to support. The later work's named method and objectives place those requirements within one embedding effort. Its connection to SimCSE lies in this widening of the representation problem.
Evaluating more uses and paying attention to relevance
MTEB makes large-scale benchmarking of text embeddings its subject. SimCSE illustrates why a benchmark for embeddings has methodological work to do even before comparing training recipes. The regression and aggregation choices can change the interpretation of a similarity result, and a learned downstream classifier tests a different use of the underlying representations. A larger benchmarking effort puts the breadth of evaluation at the center. From the perspective of SimCSE, that extends the question from how a training change affects similarity rankings to how evidence from different embedding uses should be brought together in an assessment.
Unsupervised Dense Information Retrieval with Contrastive Learning applies contrastive learning to dense retrieval without supervision. It shifts the emphasis of the learned comparison towards retrieving material. The overlap with SimCSE is the attempt to learn useful vector relationships without explicit labels for the eventual target task. The difference in the target can be understood through the original caption illustration. A similar caption is a plausible neighbor to another caption. A text that meets an information need can be valuable because it adds something the query lacks. A contrastive retrieval study makes that form of usefulness central to what the space has to support.
Precise Zero-Shot Dense Retrieval without Relevance Labels takes up dense retrieval in a setting where relevance labels are absent. This develops the question of learning a comparison under a constraint on the feedback available for the eventual decision. SimCSE's repeated-input training shows one way to create a well-defined match without obtaining similarity judgments for training pairs. In a retrieval setting, the comparable challenge is finding evidence that teaches the desired relationship between a request and candidate material. Zero-shot retrieval foregrounds that relationship as the evaluation target. The citation connects the work to sentence embedding research while the stated retrieval problem supplies a distinct criterion for a useful match.
Read together, these directions extend different parts of SimCSE's experimental question. Research on differences and weak supervision changes the information available to the contrastive decision. Work on stages, starting architectures and instructions enlarges the set of choices in training and producing an embedding. Benchmarking and retrieval put greater weight on what the vectors have to accomplish after they are learned. SimCSE remains a point of comparison because its experiments trace a particular match construction through the resulting geometry to a specified use of the scores. Each later direction changes some part of that chain and gives the learned comparison a different test.
Institutions
Fields, topics and concepts
Shelves 4The field of science this work belongs to (OpenAlex fields).Computer Science · 19,503 worksArtificial Intelligence · 18,805 worksArts and Humanities · 17,959 worksLanguage and Linguistics · 17,789 works
Concepts 2Key ideas and methods explained on our concept pages.Natural language processing · 131 worksSemantic similarity · 29 works
Cite
Cite as Tianyu Gao, Xingcheng Yao and Danqi Chen. 2021. SimCSE: Simple Contrastive Learning of Sentence Embeddings. arXiv:2104.08821.
@misc{gao2021simcse,
title = {{SimCSE: Simple Contrastive Learning of Sentence Embeddings}},
author = {Tianyu Gao, Xingcheng Yao and Danqi Chen},
year = {2021},
doi = {10.48550/arxiv.2104.08821},
eprint = {2104.08821},
archivePrefix = {arXiv},
url = {https://doi.org/10.48550/arxiv.2104.08821}
}References
- Eneko Agirre, Carmen Banea, Claire Cardie, Daniel Cer, Mona Diab, Aitor Gonzalez-Agirre, Weiwei Guo, Iñigo Lopez-Gazpio, Montse Maritxalar, Rada Mihalcea, German Rigau, Larraitz Uria, and Janyce Wiebe. 2015. SemEval-2015 task 2: Semantic textual similarity, English, Spanish and pilot on interpretability (https://doi.org/10.18653/v1/S15-2045). In Proceedings of the 9th International Workshop on Semantic Evaluation (SemEval 2015), pages 252–263. our card
- Eneko Agirre, Carmen Banea, Claire Cardie, Daniel Cer, Mona Diab, Aitor Gonzalez-Agirre, Weiwei Guo, Rada Mihalcea, German Rigau, and Janyce Wiebe. 2014. SemEval-2014 task 10: Multilingual semantic textual similarity (https://doi.org/10.3115/v1/S14-2010). In Proceedings of the 8th International Workshop on Semantic Evaluation (SemEval 2014), pages 81–91. our card
- Eneko Agirre, Carmen Banea, Daniel Cer, Mona Diab, Aitor Gonzalez-Agirre, Rada Mihalcea, German Rigau, and Janyce Wiebe. 2016. SemEval-2016 task 1: Semantic textual similarity, monolingual and cross-lingual evaluation (https://doi.org/10.18653/v1/S16-1081). In Proceedings of the 10th International Workshop on Semantic Evaluation (SemEval-2016), pages 497–511. Association for Computational Linguistics. our card
- Eneko Agirre, Daniel Cer, Mona Diab, and Aitor Gonzalez-Agirre. 2012. SemEval-2012 task 6: A pilot on semantic textual similarity (https://www.aclweb.org/anthology/S12-1051). In *SEM 2012: The First Joint Conference on Lexical and Computational Semantics – Volume 1: Proceedings of the main conference and the shared task, and Volume 2: Proceedings of the Sixth International Workshop on Semantic Evaluation (SemEval 2012), pages 385–393. our card
- Eneko Agirre, Daniel Cer, Mona Diab, Aitor Gonzalez-Agirre, and Weiwei Guo. 2013. *SEM 2013 shared task: Semantic textual similarity (https://www.aclweb.org/anthology/S13-1004). In Second Joint Conference on Lexical and Computational Semantics (*SEM), Volume 1: Proceedings of the Main Conference and the Shared Task: Semantic Textual Similarity, pages 32–43. our card
- Sanjeev Arora, Yingyu Liang, and Tengyu Ma. 2017. A simple but tough-to-beat baseline for sentence embeddings (https://openreview.net/forum?id=SyK00v5xx). In International Conference on Learning Representations (ICLR). OpenAlex ↗ · Scholar ↗
- Samuel R. Bowman, Gabor Angeli, Christopher Potts, and Christopher D. Manning. 2015. A large annotated corpus for learning natural language inference (https://doi.org/10.18653/v1/D15-1075). In Empirical Methods in Natural Language Processing (EMNLP), pages 632–642. our card
- Fredrik Carlsson, Amaru Cuba Gyllensten, Evangelia Gogoulou, Erik Ylipää Hellqvist, and Magnus Sahlgren. 2021. Semantic re-tuning with contrastive tension (https://openreview.net/forum?id=Ov_sMNau-PF). In International Conference on Learning Representations (ICLR). OpenAlex ↗ · Scholar ↗
- Daniel Cer, Mona Diab, Eneko Agirre, Iñigo Lopez-Gazpio, and Lucia Specia. 2017. SemEval-2017 task 1: Semantic textual similarity multilingual and crosslingual focused evaluation (https://doi.org/10.18653/v1/S17-2001). In Proceedings of the 11th International Workshop on Semantic Evaluation (SemEval-2017), pages 1–14. our card
- Daniel Cer, Yinfei Yang, Sheng-yi Kong, Nan Hua, Nicole Limtiaco, Rhomni St. John, Noah Constant, Mario Guajardo-Cespedes, Steve Yuan, Chris Tar, Brian Strope, and Ray Kurzweil. 2018. Universal sentence encoder for English (https://doi.org/10.18653/v1/D18-2029). In Empirical Methods in Natural Language Processing (EMNLP): System Demonstrations, pages 169–174. our card
- Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. 2020. A simple framework for contrastive learning of visual representations (http://proceedings.mlr.press/v119/chen20j.html). In International Conference on Machine Learning (ICML), pages 1597–1607. our card
- Ting Chen, Yizhou Sun, Yue Shi, and Liangjie Hong. 2017. On sampling strategies for neural network-based collaborative filtering (https://dl.acm.org/doi/abs/10.1145/3097983.3098202). In ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 767–776. OpenAlex ↗ · Scholar ↗
- Alexis Conneau and Douwe Kiela. 2018. SentEval: An evaluation toolkit for universal sentence representations (https://www.aclweb.org/anthology/L18-1269). In International Conference on Language Resources and Evaluation (LREC). our card
- Alexis Conneau, Douwe Kiela, Holger Schwenk, Loïc Barrault, and Antoine Bordes. 2017. Supervised learning of universal sentence representations from natural language inference data (https://doi.org/10.18653/v1/D17-1070). In Empirical Methods in Natural Language Processing (EMNLP), pages 670–680. our card
- Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding (https://doi.org/10.18653/v1/N19-1423). In North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT), pages 4171–4186. our card
- William B. Dolan and Chris Brockett. 2005. Automatically constructing a corpus of sentential paraphrases (https://www.aclweb.org/anthology/I05-5002). In Proceedings of the Third International Workshop on Paraphrasing (IWP2005). our card
- Alexey Dosovitskiy, Jost Tobias Springenberg, Martin Riedmiller, and Thomas Brox. 2014. Discriminative unsupervised feature learning with convolutional neural networks (https://proceedings.neurips.cc/paper/2014/file/07563a3fe3bbe7e3ba84431ad9d055af-Paper.pdf). In Advances in Neural Information Processing Systems (NIPS), volume 27. OpenAlex ↗ · Scholar ↗
- Kawin Ethayarajh. 2019. How contextual are contextualized word representations? comparing the geometry of BERT, ELMo, and GPT-2 embeddings (https://doi.org/10.18653/v1/D19-1006). In Empirical Methods in Natural Language Processing and International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 55–65. our card
- Jun Gao, Di He, Xu Tan, Tao Qin, Liwei Wang, and Tieyan Liu. 2019. Representation degeneration problem in training natural language generation models (https://openreview.net/forum?id=SkEYojRqtm). In International Conference on Learning Representations (ICLR). our card
- Dan Gillick, Sayali Kulkarni, Larry Lansing, Alessandro Presta, Jason Baldridge, Eugene Ie, and Diego Garcia-Olano. 2019. Learning dense representations for entity retrieval (https://www.aclweb.org/anthology/K19-1049). In Computational Natural Language Learning (CoNLL), pages 528–537. our card
- John Giorgi, Osvald Nitski, Bo Wang, and Gary Bader. 2021. DeCLUTR: Deep contrastive learning for unsupervised textual representations (https://doi.org/10.18653/v1/2021.acl-long.72). In Association for Computational Linguistics and International Joint Conference on Natural Language Processing (ACL-IJCNLP), pages 879–895. our card
- Raia Hadsell, Sumit Chopra, and Yann LeCun. 2006. Dimensionality reduction by learning an invariant mapping (https://ieeexplore.ieee.org/abstract/document/1640964/). In IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), volume 2, pages 1735–1742. IEEE. OpenAlex ↗ · Scholar ↗
- Matthew Henderson, Rami Al-Rfou, Brian Strope, Yun-Hsuan Sung, László Lukács, Ruiqi Guo, Sanjiv Kumar, Balint Miklos, and Ray Kurzweil. 2017. Efficient natural language response suggestion for smart reply (https://arxiv.org/pdf/1705.00652.pdf). arXiv preprint arXiv:1705.00652. OpenAlex ↗ · Scholar ↗
- Felix Hill, Kyunghyun Cho, and Anna Korhonen. 2016. Learning distributed representations of sentences from unlabelled data (https://doi.org/10.18653/v1/N16-1162). In North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT), pages 1367–1377. our card
- Minqing Hu and Bing Liu. 2004. Mining and summarizing customer reviews (https://www.cs.uic.edu/~liub/publications/kdd04-revSummary.pdf). In ACM SIGKDD international conference on Knowledge discovery and data mining. OpenAlex ↗ · Scholar ↗
- Junjie Huang, Duyu Tang, Wanjun Zhong, Shuai Lu, Linjun Shou, Ming Gong, Daxin Jiang, and Nan Duan. 2021. Whiteningbert: An easy unsupervised sentence embedding approach (https://arxiv.org/abs/2104.01767). arXiv preprint arXiv:2104.01767. OpenAlex ↗ · Scholar ↗
- Vladimir Karpukhin, Barlas Oguz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen-tau Yih. 2020. Dense passage retrieval for open-domain question answering (https://doi.org/10.18653/v1/2020.emnlp-main.550). In Empirical Methods in Natural Language Processing (EMNLP), pages 6769–6781. our card
- Taeuk Kim, Kang Min Yoo, and Sang-goo Lee. 2021. Self-guided contrastive learning for BERT sentence representations (https://doi.org/10.18653/v1/2021.acl-long.197). In Association for Computational Linguistics and International Joint Conference on Natural Language Processing (ACL-IJCNLP), pages 2528–2540. our card
- Ryan Kiros, Yukun Zhu, Ruslan Salakhutdinov, Richard S Zemel, Antonio Torralba, Raquel Urtasun, and Sanja Fidler. 2015. Skip-thought vectors (https://papers.nips.cc/paper/2015/hash/f442d33fa06832082290ad8544a8da27-Abstract.html). In Advances in Neural Information Processing Systems (NIPS), pages 3294–3302. OpenAlex ↗ · Scholar ↗
- Bohan Li, Hao Zhou, Junxian He, Mingxuan Wang, Yiming Yang, and Lei Li. 2020. On the sentence embeddings from pre-trained language models (https://www.aclweb.org/anthology/2020.emnlp-main.733). In Empirical Methods in Natural Language Processing (EMNLP), pages 9119–9130. our card
- Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019. Roberta: A robustly optimized bert pretraining approach (https://arxiv.org/abs/1907.11692). arXiv preprint arXiv:1907.11692. our card
- Lajanugen Logeswaran and Honglak Lee. 2018. An efficient framework for learning sentence representations (https://openreview.net/forum?id=rJvJXZb0W). In International Conference on Learning Representations (ICLR). our card
- Edward Ma. 2019. Nlp augmentation (https://github.com/makcedward/nlpaug). https://github.com/makcedward/nlpaug. OpenAlex ↗ · Scholar ↗
- Marco Marelli, Stefano Menini, Marco Baroni, Luisa Bentivogli, Raffaella Bernardi, and Roberto Zamparelli. 2014. A SICK cure for the evaluation of compositional distributional semantic models (http://www.lrec-conf.org/proceedings/lrec2014/pdf/363_Paper.pdf). In International Conference on Language Resources and Evaluation (LREC), pages 216–223. our card
- Yu Meng, Chenyan Xiong, Payal Bajaj, Saurabh Tiwary, Paul Bennett, Jiawei Han, and Xia Song. 2021. COCO-LM: Correcting and contrasting text sequences for language model pretraining (https://arxiv.org/abs/2102.08473). arXiv preprint arXiv:2102.08473. our card
- Jorma Kaarlo Merikoski. 1984. On the trace and the sum of elements of a matrix (https://doi.org/https://doi.org/10.1016/0024-3795(84)90078-8). Linear Algebra and its Applications, 60:177–185. OpenAlex ↗ · Scholar ↗
- Tomas Mikolov, Ilya Sutskever, Kai Chen, G. Corrado, and J. Dean. 2013. Distributed representations of words and phrases and their compositionality (https://arxiv.org/pdf/1310.4546.pdf). In Advances in Neural Information Processing Systems (NIPS). our card
- Jiaqi Mu and Pramod Viswanath. 2018. All-but-the-top: Simple and effective postprocessing for word representations (https://openreview.net/forum?id=HkuGJ3kCb). In International Conference on Learning Representations (ICLR). OpenAlex ↗ · Scholar ↗
- Yixin Nie, Adina Williams, Emily Dinan, Mohit Bansal, Jason Weston, and Douwe Kiela. 2020. Adversarial NLI: A new benchmark for natural language understanding (https://doi.org/10.18653/v1/2020.acl-main.441). In Association for Computational Linguistics (ACL), pages 4885–4901. our card
- Matteo Pagliardini, Prakhar Gupta, and Martin Jaggi. 2018. Unsupervised learning of sentence embeddings using compositional n-gram features (https://doi.org/10.18653/v1/N18-1049). In North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT), pages 528–540. our card
- Bo Pang and Lillian Lee. 2004. A sentimental education: Sentiment analysis using subjectivity summarization based on minimum cuts (https://www.aclweb.org/anthology/P04-1035.pdf). In Association for Computational Linguistics (ACL), pages 271–278. our card
- Bo Pang and Lillian Lee. 2005. Seeing stars: Exploiting class relationships for sentiment categorization with respect to rating scales (https://www.aclweb.org/anthology/P05-1015.pdf). In Association for Computational Linguistics (ACL), pages 115–124. our card
- Jeffrey Pennington, Richard Socher, and Christopher Manning. 2014. GloVe: Global vectors for word representation (https://doi.org/10.3115/v1/D14-1162). In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1532–1543. our card
- Nils Reimers, Philip Beyer, and Iryna Gurevych. 2016. Task-oriented intrinsic evaluation of semantic textual similarity (https://www.aclweb.org/anthology/C16-1009). In International Conference on Computational Linguistics (COLING), pages 87–96. OpenAlex ↗ · Scholar ↗
- Nils Reimers and Iryna Gurevych. 2019. Sentence-BERT: Sentence embeddings using Siamese BERT-networks (https://doi.org/10.18653/v1/D19-1410). In Empirical Methods in Natural Language Processing and International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 3982–3992. our card
- Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D. Manning, Andrew Ng, and Christopher Potts. 2013. Recursive deep models for semantic compositionality over a sentiment treebank (https://www.aclweb.org/anthology/D13-1170.pdf). In Empirical Methods in Natural Language Processing (EMNLP), pages 1631–1642. our card
- Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. 2014. Dropout: a simple way to prevent neural networks from overfitting (https://jmlr.org/papers/volume15/srivastava14a/srivastava14a.pdf). The Journal of Machine Learning Research (JMLR), 15(1):1929–1958. our card
- Jianlin Su, Jiarun Cao, Weijie Liu, and Yangyiwen Ou. 2021. Whitening sentence representations for better semantics and faster retrieval (https://arxiv.org/pdf/2103.15316.pdf). arXiv preprint arXiv:2103.15316. OpenAlex ↗ · Scholar ↗
- Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need (https://arxiv.org/pdf/1706.03762.pdf). In Advances in Neural Information Processing Systems (NIPS), pages 6000–6010. our card
- Ellen M Voorhees and Dawn M Tice. 2000. Building a question answering test collection (https://www.egr.msu.edu/~jchai/QAPapers/qa-testcollection.pdf). In the 23rd annual international ACM SIGIR conference on Research and development in information retrieval, pages 200–207. OpenAlex ↗ · Scholar ↗
- Lingxiao Wang, Jing Huang, Kevin Huang, Ziniu Hu, Guangtao Wang, and Quanquan Gu. 2020. Improving neural language generation with spectrum control (https://openreview.net/forum?id=ByxY8CNtvr). In International Conference on Learning Representations (ICLR). OpenAlex ↗ · Scholar ↗
- Tongzhou Wang and Phillip Isola. 2020. Understanding contrastive representation learning through alignment and uniformity on the hypersphere (http://proceedings.mlr.press/v119/wang20k/wang20k.pdf). In International Conference on Machine Learning (ICML), pages 9929–9939. OpenAlex ↗ · Scholar ↗
- Janyce Wiebe, Theresa Wilson, and Claire Cardie. 2005. Annotating expressions of opinions and emotions in language (https://www.cs.cornell.edu/home/cardie/papers/lre05withappendix.pdf). Language resources and evaluation, 39(2-3):165–210. OpenAlex ↗ · Scholar ↗
- John Wieting and Kevin Gimpel. 2018. ParaNMT-50M: Pushing the limits of paraphrastic sentence embeddings with millions of machine translations (https://doi.org/10.18653/v1/P18-1042). In Association for Computational Linguistics (ACL), pages 451–462. our card
- John Wieting, Graham Neubig, and Taylor Berg-Kirkpatrick. 2020. A bilingual generative transformer for semantic sentence embedding (https://doi.org/10.18653/v1/2020.emnlp-main.122). In Empirical Methods in Natural Language Processing (EMNLP), pages 1581–1594. OpenAlex ↗ · Scholar ↗
- Adina Williams, Nikita Nangia, and Samuel Bowman. 2018. A broad-coverage challenge corpus for sentence understanding through inference (https://doi.org/10.18653/v1/N18-1101). In North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT), pages 1112–1122. our card
- Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Remi Louf, Morgan Funtowicz, Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mariama Drame, Quentin Lhoest, and Alexander Rush. 2020. Transformers: State-of-the-art natural language processing (https://doi.org/10.18653/v1/2020.emnlp-demos.6). In Empirical Methods in Natural Language Processing (EMNLP): System Demonstrations, pages 38–45. our card
- Zhuofeng Wu, Sinong Wang, Jiatao Gu, Madian Khabsa, Fei Sun, and Hao Ma. 2020. Clear: Contrastive learning for sentence representation (https://arxiv.org/abs/2012.15466). arXiv preprint arXiv:2012.15466. OpenAlex ↗ · Scholar ↗
- Yuanmeng Yan, Rumei Li, Sirui Wang, Fuzheng Zhang, Wei Wu, and Weiran Xu. 2021. ConSERT: A contrastive framework for self-supervised sentence representation transfer (https://doi.org/10.18653/v1/2021.acl-long.393). In Association for Computational Linguistics and International Joint Conference on Natural Language Processing (ACL-IJCNLP), pages 5065–5075. our card
- Peter Young, Alice Lai, Micah Hodosh, and Julia Hockenmaier. 2014. From image descriptions to visual denotations: New similarity metrics for semantic inference over event descriptions (https://doi.org/10.1162/tacl_a_00166). Transactions of the Association for Computational Linguistics, 2:67–78. OpenAlex ↗ · Scholar ↗
- Yan Zhang, Ruidan He, Zuozhu Liu, Kwan Hui Lim, and Lidong Bing. 2020. An unsupervised sentence embedding method by mutual information maximization (https://doi.org/10.18653/v1/2020.emnlp-main.124). In Empirical Methods in Natural Language Processing (EMNLP), pages 1601–1610. our card
This page in Markdown https://md.research.elamur.ai/free/en/papers/gao-2021-simcse-simple-contrastive-learning-sentence/