SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2104.08821 · EMNLP · 2021

SimCSE: Simple Contrastive Learning of Sentence Embeddings

Danqi Chen, Tianyu Gao, Xingcheng Yao

arXiv · PDF · Open in the Atlas

Code that ran

17 of 30 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (9 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 11 have no contract verdict; 5 failures of our instrument; 13 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2104.08821.json · badge: /api/ran/2104.08821.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
jeongukjae/KR-BERT-SimCSE community
Papers with Code archive
5 ran · 3 no recorded run
nlpods/layerattpooler community
Papers with Code archive
4 ran · 3 no recorded run
bhuvanakundumani/SimCSE_unsupervised community
Papers with Code archive
4 ran · 2 no recorded run
dll-wu/is-cse community
Papers with Code archive
1 ran · 3 no recorded run
BM-K/KoSimCSE community
Papers with Code archive
1 ran · 0 no recorded run
shuxinyin/SimCSE-Pytorch community
Papers with Code archive
1 ran · 0 no recorded run
wakafengfan/simcse-pytorch community
Papers with Code archive
1 ran · 0 no recorded run
dltmddbs100/SimCSE community
Papers with Code archive
0 ran · 1 no recorded run
vdogmcgee/SimCSE-Chinese-Pytorch community
Papers with Code archive
0 ran · 1 no recorded run
FunctionStatusWhere it lives
AttentionLayer Ran
ran on a synthesized input · constructed an object; no result was computed
nlpods/layerattpooler/cl/models.py
pointer only (licence: NONE) · get_code("b949b4980657d9b2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, nlpods/layerattpooler when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

BERT Ran
ran on a synthesized input
BM-K/KoSimCSE/model/simcse/bert.py
pointer only (licence: NONE) · get_code("448b46ec4054641f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, BM-K/KoSimCSE when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

BertConfig Ran
ran on a synthesized input · constructed an object; no result was computed
jeongukjae/KR-BERT-SimCSE/model.py
code served (permissive licence) · get_code("d286e6c33947de1a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, BertConfig: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tensorflow as tf

ARGS = {
    'vocab_size': 30522,
    'num_hidden_layers': 12,
    'hidden_size': 768,
    'intermediate_size': 3072,
    'intermediate_activation': 'gelu',
    'num_attention_heads': 12,
    'max_position_ids': 512,
    'input_type_size': 2,
    'dropout_rate': 0.1,
    'attention_probs_dropout_rate': 0.1,
    'initializer_range': 0.02,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type BertConfig — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a BertConfig output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
BertEmbedding Ran
ran on a synthesized input · constructed an object; no result was computed
jeongukjae/KR-BERT-SimCSE/model.py
code served (permissive licence) · get_code("6dd2aadc3b6d84c6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, BertEmbedding: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tensorflow as tf

ARGS = {
    'vocab_size': 100,
    'hidden_size': 16,
    'max_position_ids': 128,
    'input_type_size': 2,
    'dropout_rate': 0.1,
    'initializer_range': 0.02,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type BertEmbedding — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a BertEmbedding output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
BertForCL Ran
ran on a synthesized input · constructed an object; no result was computed
bhuvanakundumani/SimCSE_unsupervised/model.py
pointer only (licence: NONE) · get_code("5a73e8e6db46e11d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, bhuvanakundumani/SimCSE_unsupervised when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

MLPLayer Ran
ran on a synthesized input
nlpods/layerattpooler/cl/models.py
pointer only (licence: NONE) · get_code("8e0d3e09d28f3b02")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, nlpods/layerattpooler when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

MultiheadAttention Ran
ran on a synthesized input · constructed an object; no result was computed
jeongukjae/KR-BERT-SimCSE/model.py
code served (permissive licence) · get_code("0903880703193f2a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, MultiheadAttention: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tensorflow as tf
import math

# Set seeds for reproducibility
tf.random.set_seed(0)

# Define ARGS dict with all required parameters for MultiheadAttention
ARGS = {
    'hidden_size': 8,
    'num_attention_heads': 2,
    'dropout_rate': 0.1,
    'attention_probs_dropout_rate': 0.1,
    'initializer_range': 0.02,
}

# Create an instance and prepare input data for testing
if __name__ == "__main__":
    # Instantiate the layer
    attention_layer = tf.keras.layers.Layer.__init__.__func__(
        tf.keras.layers.Layer,
        **ARGS
    )
    
    # Create sample input tensor: [batch_size=2, sequence_length=3, hidden_size=8]
    batch_size = 2
    sequence_length = 3
    hidden_size = ARGS['hidden_size']
    
    input_tensor = tf.random.normal((batch_size, sequence_length, hidden_size))
    
    # Optional: create attention mask if needed
    input_mask = None
    
    # The layer can now be called with: attention_layer(input_tensor, input_mask)
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MultiheadAttention — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MultiheadAttention output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
Pooler Ran
ran on a synthesized input · constructed an object; no result was computed
bhuvanakundumani/SimCSE_unsupervised/model.py
pointer only (licence: NONE) · get_code("cf28308ecfc2c9fd")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, bhuvanakundumani/SimCSE_unsupervised when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

Pooler Ran
ran on a synthesized input · constructed an object; no result was computed
nlpods/layerattpooler/cl/models.py
pointer only (licence: NONE) · get_code("ccd86b57fd87c336")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, nlpods/layerattpooler when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

SimcseModel Ran
ran on a synthesized input · constructed an object; no result was computed
shuxinyin/SimCSE-Pytorch/SimCSE/model.py
code served (permissive licence) · get_code("d3e6dac55359895d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, SimcseModel: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
from transformers import BertModel, BertConfig

torch.manual_seed(0)

# Create a minimal mock BERT model that satisfies the forward pass
class MockBertModel(nn.Module):
    def __init__(self, hidden_size=4, num_hidden_layers=2):
        super().__init__()
        self.hidden_size = hidden_size
        self.num_hidden_layers = num_hidden_layers
        self.embedding = nn.Embedding(100, hidden_size)
        self.transformer_layer = nn.TransformerEncoderLayer(
            d_model=hidden_size, nhead=1, dim_feedforward=8, batch_first=True
        )
        self.pooler_dense = nn.Linear(hidden_size, hidden_size)
    
    def forward(self, input_ids, attention_mask, token_type_ids, output_hidden_states=False):
        # Embed input
        hidden_states = self.embedding(input_ids)
        
        # Apply transformer layers
        all_hidden_states = [hidden_states]
        for _ in range(self.num_hidden_layers):
            hidden_states = self.transformer_layer(hidden_states)
            all_hidden_states.append(hidden_states)
        
        # Compute pooler output
        pooler_output = self.pooler_dense(torch.tanh(hidden_states[:, 0]))
        
        class Output:
            pass
        
        out = Output()
        out.last_hidden_state = hidden_states
        out.pooler_output = pooler_output
        out.hidden_states = all_hidden_states
        
        return out

# Create mock tokenizer and config
class MockTokenizer:
    def __call__(self, text, padding=True, truncation=True, return_tensors=None):
        return {}

class MockConfig:
    def __init__(self):
        self.hidden_size = 4
        self.num_hidden_layers = 2
        self.attention_probs_dropout_prob = 0.3
        self.hidden_dropout_prob = 0.3
    
    @staticmethod
    def from_pretrained(model_name):
        return MockConfig()

# Monkey-patch to use mock models
original_bert_from_pretrained = BertModel.from_pretrained
BertModel.from_pretrained = lambda pretrained_model, config=None: MockBertModel(
    hidden_size=config.hidden_size if config else 4,
    num_hidden_layers=config.num_hidden_layers if config else 2
)

original_bert_config_from_pretrained = BertConfig.from_pretrained
BertConfig.from_pretrained = MockConfig.from_pretrained

# Define arguments for SimcseModel
ARGS = {
    'pretrained_model': 'bert-base-uncased',
    'pooling': 'cls',
    'dropout': 0.3
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SimcseModel — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a SimcseModel output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
TransformerEncoder Ran
ran on a synthesized input · constructed an object; no result was computed
jeongukjae/KR-BERT-SimCSE/model.py
code served (permissive licence) · get_code("9686cc4f31888062")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, TransformerEncoder: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tensorflow as tf
import math

# Set random seed for reproducibility
tf.random.set_seed(0)

# Define ARGS dict with all required parameters for TransformerEncoder
ARGS = {
    'hidden_size': 8,
    'num_attention_heads': 2,
    'intermediate_size': 16,
    'intermediate_activation': 'gelu',
    'dropout_rate': 0.1,
    'attention_probs_dropout_rate': 0.1,
    'initializer_range': 0.02,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type TransformerEncoder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a TransformerEncoder output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
cl_forward Ran
ran; our contract draft was wrong, not the code
bhuvanakundumani/SimCSE_unsupervised/model.py
pointer only (licence: NONE) · get_code("565954449b2193d5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, bhuvanakundumani/SimCSE_unsupervised when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

find_neighbors_and_aggregation Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
dll-wu/is-cse/simcse/models.py
pointer only (licence: NONE) · get_code("428008c6d9efb161")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, dll-wu/is-cse when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_activation_fn Ran
ran; our contract draft was wrong, not the code
jeongukjae/KR-BERT-SimCSE/model.py
code served (permissive licence) · get_code("f16e63fb25fd4d54")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned function. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tensorflow as tf

# The function get_activation_fn takes a string parameter 'activation'
# and returns either a TensorFlow activation function or the string itself.
# We need to test it with different activation strings.

ARGS = {
    'activation': 'gelu'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sentemb_forward Ran
ran; our contract draft was wrong, not the code
bhuvanakundumani/SimCSE_unsupervised/model.py
pointer only (licence: NONE) · get_code("2f2997d4395b9e2d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, bhuvanakundumani/SimCSE_unsupervised when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

sentemb_forward Ran
ran; our contract draft was wrong, not the code
nlpods/layerattpooler/cl/models.py
pointer only (licence: NONE) · get_code("74c64a7d40a58644")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, nlpods/layerattpooler when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

simcse_loss Ran
ran, honoured the contract we drafted
wakafengfan/simcse-pytorch/train_and_eval.py
code served (permissive licence) · get_code("4702324b53d391dc")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import torch.nn.functional as F

torch.manual_seed(0)

# Create a small batch of embeddings
# The function expects y_pred to be a 2D tensor of shape (batch_size, embedding_dim)
# We'll use batch_size=4 (even number for the pairing logic) and embedding_dim=8
y_pred = torch.randn(4, 8)

ARGS = {
    'y_pred': y_pred
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
Arguments Not yet run
unverified (harvested, no recorded run)
bhuvanakundumani/SimCSE_unsupervised/model.py
pointer only (licence: NONE) · get_code("b1116f6967379d83")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, bhuvanakundumani/SimCSE_unsupervised when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

BertForCL Not yet run
unverified (harvested, no recorded run)
dll-wu/is-cse/simcse/models.py
pointer only (licence: NONE) · get_code("3233884fc81ed5ae")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, dll-wu/is-cse when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

BertForCL Not yet run
unverified (harvested, no recorded run)
nlpods/layerattpooler/cl/models.py
pointer only (licence: NONE) · get_code("2ffa456107908807")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, nlpods/layerattpooler when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

BertModel Not yet run
unverified (harvested, no recorded run)
jeongukjae/KR-BERT-SimCSE/model.py
code served (permissive licence) · get_code("1d4fef90a4837857")
How it ran

no invocation recorded.

BertModelForSimCSE Not yet run
unverified (harvested, no recorded run)
jeongukjae/KR-BERT-SimCSE/model.py
code served (permissive licence) · get_code("dfc8437383229830")
How it ran

no invocation recorded.

CosineSimilarity Not yet run
unverified (harvested, no recorded run)
jeongukjae/KR-BERT-SimCSE/model.py
code served (permissive licence) · get_code("d96e7952e9412323")
How it ran

no invocation recorded.

SimCSE Not yet run
unverified (harvested, no recorded run)
dltmddbs100/SimCSE/model/model.py
pointer only (licence: NONE) · get_code("2617146828164292")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, dltmddbs100/SimCSE when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

SimcseModel Not yet run
unverified (harvested, no recorded run)
vdogmcgee/SimCSE-Chinese-Pytorch/simcse_unsup.py
code served (permissive licence) · get_code("e8a2dd458c8798db")
How it ran

no invocation recorded.

cl_forward Not yet run
unverified (harvested, no recorded run)
dll-wu/is-cse/simcse/models.py
pointer only (licence: NONE) · get_code("77b8fc1348dbafc4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, dll-wu/is-cse when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

cl_forward Not yet run
unverified (harvested, no recorded run)
nlpods/layerattpooler/cl/models.py
pointer only (licence: NONE) · get_code("279795ea7a63bfcd")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, nlpods/layerattpooler when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

cl_init Not yet run
unverified (harvested, no recorded run)
dll-wu/is-cse/simcse/models.py
pointer only (licence: NONE) · get_code("b697b04f307205e1")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, dll-wu/is-cse when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

cl_init Not yet run
unverified (harvested, no recorded run)
bhuvanakundumani/SimCSE_unsupervised/model.py
pointer only (licence: NONE) · get_code("161f85267e41c87c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, bhuvanakundumani/SimCSE_unsupervised when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

cl_init Not yet run
unverified (harvested, no recorded run)
nlpods/layerattpooler/cl/models.py
pointer only (licence: NONE) · get_code("d12475050e3e007b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, nlpods/layerattpooler when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 30 samples lifted from this paper's linked repositories, 30 carry a function identity and 0 do not. Of the 30 distinct functions with an identity, 3 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 2 later) and 27 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
cl_init
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later · 1 only as an assembly brick
1908.10084 (2019-08)
Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks
2203.05877 (2022-03)
A Sentence is Worth 128 Pseudo Tokens: A Semantic-Aware Contrastive Learning Framework for Sentence Embeddings
BertForCL
brick of this paper's assembly: entry
1 other paper
1 dated earlier
1908.10084 (2019-08)
Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks
find_neighbors_and_aggregation
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2305.07424 (2023-05)
Instance Smoothed Contrastive Learning for Unsupervised Sentence Embedding

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

This paper presents SimCSE, a simple contrastive learning framework that greatly advances the state-of-the-art sentence embeddings. We first describe an unsupervised approach, which takes an input sentence and predicts itself in a contrastive objective, with only standard dropout used as noise. This simple method works surprisingly well, performing on par with previous supervised counterparts. We find that dropout acts as minimal data augmentation and removing it leads to a representation collapse. Then, we propose a supervised approach, which incorporates annotated pairs from natural language inference datasets into our contrastive learning framework, by using "entailment" pairs as positives and "contradiction" pairs as hard negatives. We evaluate SimCSE on standard semantic textual similarity (STS) tasks, and our unsupervised and supervised models using BERT base achieve an average of 76.3% and 81.6% Spearman's correlation respectively, a 4.2% and 2.2% improvement compared to previous best results. We also show-both theoretically and empirically-that contrastive learning objective regularizes pre-trained embeddings' anisotropic space to be more uniform, and it better aligns positive pairs when supervised signals are available. 1

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2104.08821")
get_code_for_paper("2104.08821")
have("2104.08821")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2104.08821.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2104.08821.svg)](https://syntology.ai/paper/2104.08821)

Connect an agent — have() is free.