Enhancing Unsupervised Sentence Embeddings via Knowledge-Driven Data Augmentation and Gaussian-Decayed Contrastive Learning

## Abstract

Abstract Recently, using large language models (LLMs) for data augmentation has led to considerable improvements in unsupervised sentence embedding models.
However, existing methods encounter two primary challenges: limited data diversity and high data noise.
Current approaches often neglect fine-grained knowledge, such as entities and quantities, leading to insufficient diversity. Additionally, unsupervised data frequently lacks discriminative information, and the generated synthetic samples may introduce noise.
In this paper, we propose a pipeline-based data augmentation method via LLMs and introduce the Gaussian-decayed gradient-assisted Contrastive Sentence Embedding (GCSE) model to enhance unsupervised sentence embeddings.
To tackle the issue of low data diversity, our pipeline utilizes knowledge graphs (KGs) to extract entities and quantities, enabling LLMs to generate more diverse, knowledge-enriched samples.
To address high data noise, the GCSE model uses a Gaussian-decayed function to limit the impact of false hard negative samples, enhancing the model’s discriminative capability.
Experimental results show that our approach achieves state-of-the-art performance in semantic textual similarity (STS) tasks, using fewer data samples and smaller LLMs, demonstrating its efficiency and robustness across various models.

## 1 Introduction

Sentence representation learning, a fundamental task in natural language processing (NLP), aims to produce accurate sentence embeddings, thereby improving performance in downstream tasks such as semantic inference (Reimers and Gurevych, ), retrieval (Thakur et al., ; Wang et al., ), and question answering (Sen et al., ).
To enhance computational efficiency and reduce labor costs, unsupervised sentence embedding methods based on contrastive learning, such as SimCSE (Gao et al., ) and ESimCSE (Wu et al., ), have emerged as highly effective paradigms.
In general, contrastive learning methods operate on the principle that effective sentence embeddings should pull similar sentences closer while pushing dissimilar ones further apart.
The performance of unsupervised contrastive learning methods largely depends on the quantity and quality of the samples (Chen et al., ), making it crucial to develop strategies that effectively improve both.

Previous studies mainly focused on increasing the number of samples using rule-based word modifications (Wang and Dou, ; Wu et al., ) or feature sampling and perturbation techniques (Xu et al., ; Chuang et al., ).
Recent studies (Zhang et al., ; Wang et al., ) use either few-shot manually constructed samples or zero-shot generalized refactoring instructions to create prompts that guide large language models (LLMs) in generating new samples from original sentences, increasing both the quantity and quality of the data.
Although these methods have achieved commendable performance, two limitations remain:

Low Data Diversity. Diverse data samples in sentence representation learning should contain varied expressions of the same knowledge.
However, existing approaches often struggle to distinguish fine-grained semantic knowledge like entities and quantities in the sample context.
Traditional methods modify sentences using limited patterns without considering fine-grained knowledge, which restricts their effectiveness in enhancing sample diversity.
Recent LLM-based methods, SynCSE (Zhang et al., ) and MultiCSR (Wang et al., ), adjust topic and entailment categories in prompts to guide the model in generating varied samples.
Both methods focus on the global context but lack precise control over the knowledge in the samples.
Consequently, the diversity of generated samples is constrained by the probability distributions of LLMs, resulting in unpredictable data quality.

Figure: Figure 1: Prediction comparison of false positive (FP) and negative (FN) samples, where positives have a normalized label above 0.5, while negatives are below 0.5. False samples are identified when the difference between the prediction score and the normalized label exceeds 0.2.
Refer to caption: x1.png

High Data Noise.
Unsupervised sentence representation learning often suffers from data noise caused by confusing negative samples, which mainly arise from two sources. First, traditional methods generate datasets by duplicating samples to create positive instances, leading to negatives with similar surface-level semantics that affect the model’s performance (Miao et al., ). Second, in data synthesis, differences in semantic distributions across domains can cause the LLM’s criteria for distinguishing between positive and negative samples to misalign with the target domain, introducing additional noise (Huang et al., ; Poerner and Schütze, ). The existing MultiCSR method attempts to remove noisy samples using linear programming, but this can eliminate potentially valuable samples and reduce data diversity. Figure 1 compares various baselines on the STS-Benchmark development set. The results show that the prediction of false positives outnumber false negatives, and data synthesis in SynCSE increases false negatives, further supporting the above analysis.

**Table 1: Comparison of our methods and related LLM-based methods.**
| Methods | Synthesis Approach | Use Knowledge | Denoise |
| --- | --- | --- | --- |
| SynCSE | Few-shot Synthesis | No | No |
| MultiCSR | Zero-shot Synthesis | No | Yes |
| Ours | Zero-shot Synthesis | Yes | Yes |

In this paper, we propose a pipeline-based data augmentation method using LLMs and introduce the Gaussian-decayed gradient-assisted Contrastive Sentence Embedding (GCSE) model to improve the performance of unsupervised sentence embedding methods. To address the issue of low data diversity, we begin by extracting entities and quantities from the data samples and constructing a knowledge graph (KG) with the extracted data. Next, we create a sentence construction prompt using the extracted knowledge to guide LLM in generating more diverse positive samples. To tackle high data noise, we employ an evaluation model to annotate the synthesized data and initially filter out false samples. However, this procedure is ineffective in filtering out false negatives with similar surface-level semantics. Therefore, we propose the GCSE model that employs a Gaussian-decayed function to calculate the prediction distinctions between GCSE and the evaluation model. This prevents the model from being influenced by false hard negatives in the initial steps, allowing it to use other in-batch negative sample losses to optimize the gradient. We highlight the key innovations of our approach in Table 1: (i) We are the first to incorporate fine-grained knowledge for sample synthesis in LLM-based methods. (ii) Unlike MultiCSR’s denoising approach, our method retains more false samples for training rather than discarding them. (iii) Our data selection strategy focuses on domain-specific samples, using a local LLM with fewer samples for synthesis, leading to improved performance. Experimental results demonstrate the efficiency of our model, outperforming previous best methods in average scores for semantic textual similarity (STS) tasks by 0.28 with BERT-base, 0.23 with BERT-large, and 0.46 with RoBERTa-large.

In summary, our contributions are as follows: (1) New method. We introduce a pipeline-based data augmentation method using LLM for few-shot domain data and propose a Gaussian-decayed gradient-assisted Contrastive Sentence Embedding (GCSE) model to reduce data noise. (2) New perspective. To the best of our knowledge, we are the first to explore combining knowledge graphs with LLM to synthesize data, enhancing fine-grained sentence representation learning by generating diverse positive and negative samples. (3) State-of-the-art performance. Experimental results demonstrate that our method achieves superior performance on STS tasks while using fewer samples for data synthesis with smaller LLM parameters.

## 2 Related Work

Early work on sentence embeddings builds on the distributional hypothesis, predicting surrounding sentences (Kiros et al., ; Logeswaran and Lee, ; Hill et al., ) or extending the word2vec framework (Mikolov et al., ) with n-gram embeddings (Pagliardini et al., ). Post-processing techniques like BERT-flow (Li et al., ) and BERT-whitening (Su et al., ) address the anisotropy issue in pre-trained language models (PLMs), and more recent methods focus on generative approaches (Wang et al., ; Wu and Zhao, ) and regularizing embeddings to prevent representation degeneration (Huang et al., ). Recently, contrastive learning approaches have become prominent, using various augmentation methods to derive different views of the same sentence (Zhang et al., ; Giorgi et al., ; Kim et al., ; Gao et al., ). Among these, SimCSE uses dropout as a simple augmentation and achieves strong results in unsupervised STS tasks, inspiring further approaches like ArcCSE (Zhang et al., ), DiffCSE (Chuang et al., ) and RankCSE (Liu et al., ).

With the advent of LLM (OpenAI, ; Bai et al., ; Touvron et al., ), some works attempt to utilize LLM for sentence representation learning. For example, Ni et al. () uses T5 with mean pooling to obtain a sentence embedding model by fine-tuning on a large-scale NLI corpus; Cheng et al. () uses prompt learning to measure the semantic similarity of sentence pairs. Springer et al. () employs sentence repetition to enhance the capacity for sentence representation. Nevertheless, the performance of the LLMs in unsupervised settings does not exhibit a substantial improvement compared to encoder-based approaches, while the utilization of computer resources is greatly augmented. Thus, the objective of this study is to utilize the generative capability of LLM to enhance the performance of the encoder-based models.

## 3 Methodology

In this section, we present the data augmentation pipeline via LLM and the specific structure of the GCSE. As shown in Figure 2, we start by using a data augmentation pipeline to synthesize new samples from the source data, and then train our model with the filtered synthetic data.

Figure: Figure 2: The overall workflow of our method.
Refer to caption: x2.png

Figure: Figure 3: The pipeline of knowledge extraction and data synthesis, where the solid black arrows in the Entity KG are hard edges, and dotted yellow lines are soft edges.
Refer to caption: x3.png

### 3.1 Data Augmentation

In the data augmentation pipeline, we utilize both domain data and partial general data to balance domain-specific relevance and general-domain applicability. We start by extracting knowledge from the source data and then synthesize new data for our model training. The detailed structure of the pipeline is shown in Figure 3.

Knowledge Extraction and Integration. The variety and relationships between samples directly impact model performance in sentence representation learning. A major challenge with existing LLM-based data synthesis methods is the limited diversity they generate for each short text. To trade off the low diversity of the generated samples with their relevance to the domain semantic space, we first design an extraction prompt to obtain entities and quantities from the given data. Formally, we denote the extraction prompt as $\mathcal{P}_{e}$, and LLM $\mathcal{L}$, suppose we finally extract instances with $d$ sample number, the knowledge set $\mathcal{K}_{i}=\left\{k_{i1},\dots,k_{in}\right\}$ of each instance $x_{i}$ is computed in Equation 1, where $t_{j}$, $c_{j}$ and $q_{j}$ represent the entity text, entity type and quantity of $k_{i}$. $n_{i}$ is the size of $\mathcal{K}_{i}$, and $\mathcal{F}(\cdot)$ is the formatting function that convert text to triplet. Next, we integrate all knowledge by establishing an entity knowledge graph $\mathcal{G}=\langle V,E\rangle$, where the node set $V$ contains all the $\langle t,c,q\rangle$ from $\mathcal{K}$:

$$ $\mathcal{K}=\bigcup_{i=1}^{d}{\mathcal{F}}([\mathcal{P}_{e};x_{i}],{\mathcal{L }})=\bigcup_{i=1}^{d}\{\langle t_{ij},c_{ij},q_{ij}\rangle\mid j\in[1,n_{i}]\},$ (1) $$

$$ $V=\{t_{ij},c_{ij},q_{ij}\mid i\in[1,d];j\in[1,n_{i}]\}.$ (2) $$

The edges $E$ consist of hard edges $E_{r}$ and soft edges $E_{s}$. As shown in Equations 3 and 4, $E_{r}$ represents the relationship between the entity text, type and quantity of each $k\in\mathcal{K}$, and $E_{s}$ indicates the relationship between entity text in $k_{ij}$ and other entity text or type in the same instance $x_{i}$.

$$ $E_{r}=\{(t_{ij},c_{ij})\cup(t_{ij},q_{ij})\mid i\in[1,d];j\in[1,n_{i}]\},$ (3) $$

$$ $E_{s}=\bigcup_{i=1}^{d}\{(t_{ij},t_{ik}),(t_{ij},c_{il})\mid k,l\neq j;j,k,l \in[1,n_{i}]\}.$ (4) $$

By defining hard and soft edges, we can more efficiently identify and replace entity nodes near the current node, improving the correlation between the synthesized instance and the source instance.

Data Synthesis via LLM. Empirical evidence and model performance on standard datasets show that sentence embedding models struggle more with accurately identifying negative samples than positives (Chuang et al., ; Miao et al., ). In the contrastive learning methods, the model acquires sentence embedding representation by calculating the distance between sentence-pairs. It aims to minimize the spatial distance between positive pairs and increase the spatial distance between negative pairs. Thus, it is essential to obtain negative samples that closely resemble the source instance in surface-level features, while positive samples should have diverse representations but still convey the same meaning as the source instance.

In this study, we use LLM to generate positive samples through a rewrite prompt. We also focus on the impact of variations in entities and quantities within the samples. Negative samples are generated by the LLM at both the syntactic and fine-grained knowledge levels. The data synthesis prompts are divided into three main types: (1) Rewriting prompt, (2) Syntactic antisense prompt, and (3) Entity revision prompt. The first type is used to create positive samples, while the second and third types are used to create negative samples at the syntactic and knowledge levels, respectively.

The “rewriting prompt" can be classified into three forms: directly requesting LLM to generate a new sentence instance using the “rewrite" instruction, creating the preceding part of the sentence instance, and generating based on the knowledge set of the instance. As the diversity of synthetic samples increases, the likelihood of generating false positives also rises. To address this, the next section involves scoring the generated samples using an evaluation model. The “syntactic antisense prompt” aims to modify the semantics to create a contradiction at the syntactic level. Such as transforming it into a positive/negative statement using explicit positive/negative words, or by expressing a contrary sentiment. This is an initial approach to synthesizing negative samples that preserves a strong coherence with the source instance in terms of sequence structure. However, it is deficient in generation diversity. To alleviate the issue, the “entity revision prompt" aims to enhance text diversity by replacing the entity text and quantity compared to the source instance. Simultaneously, to ensure the semantic relevance between the synthetic samples and the source instance, replacement entities are selected by searching for neighboring nodes on entity KG. We define $\mathcal{T(\cdot)}$ as the search function, and the replacement entity of $t_{ij}$ are computed as:

$$ $\mathcal{T}_{r}(t_{ij})=\{t_{ip}\mid(t_{ij},c_{ik})\in E_{r}\land(t_{ip},c_{ik })\in E_{r}\},$ (5) $$

$$ $\mathcal{T}_{s}(t_{ij})=\{t_{ip}\mid(t_{ij},t_{ip})\in E_{s}\},$ (6) $$

$$ $\mathcal{T}_{p}(t_{ij})=\{t_{ip}\mid t_{ik}\in\mathcal{T}_{s}(t_{ij})\cap \mathcal{T}_{s}(t_{ip})\land t_{ip}\in\mathcal{T}_{r}(t_{ij})\},$ (7) $$

$$ $\mathcal{T}(t_{ij})=\mathcal{T}_{r}(t_{ij})\cup\mathcal{T}_{p}(t_{ij}),$ (8) $$

where the function $\mathcal{T}_{r}(\cdot)$ is used to search for entities that have a hard edge with the current entity, and $\mathcal{T}_{s}(\cdot)$ is used to search for entities that have a soft edge with the current entity. $\mathcal{T}_{p}(\cdot)$ aims to search for $t_{ip}$, that is of the same type as $t_{ij}$, and they both have soft edges with another in-context entity $t_{ik}$. Finally, the replacement entity can be randomly selected from the result of the search function $\mathcal{T}(t_{ij})$. Compared to randomly replacing entities, our strategy enhances the semantic relevance between the generated sample and the source instance.

### 3.2 Model Training

The training process of our model consists of two stages. First, we combine general and domain-specific data to train an evaluation model using standard unsupervised contrastive learning. This improves the uniformity of sentence embeddings in general scenarios and reduces the impact of semantic distribution limitations in the synthesized data, enhancing model robustness. Then, we freeze the evaluation model to filter synthetic data and help the GCSE model eliminate false hard negative sample noise.

General Contrastive Learning. In the first stage, we follow the formulation of SimCSE (Gao et al., ) to train the evaluation model. Formally, we define the encoder of the evaluation model as $E^{\prime}$, each unlabeled sentence instance as $x_{i}$, and its positive sample as $x_{i}^{+}=x_{i}$. The representation of each instance is denoted as $\mathbf{h}^{\prime}=\mathcal{F}_{E^{\prime}}(x)$, the representations of $x_{i}$ and $x_{i}^{+}$ are computed as $\mathbf{h}^{\prime}_{i}$ and $\mathbf{h}^{\prime+}_{i}$, respectively. Since the dropout mask in $E^{\prime}$ is random, $\mathbf{h}^{\prime}_{i}$ and $\mathbf{h}^{\prime+}_{i}$ are computed with the same input but with slightly different results. Then, the loss of evaluation model is defined as:

$$ $-\log\frac{e^{\text{sim}(\mathbf{h}^{\prime}_{i},\mathbf{h}^{\prime+}_{i})/ \tau}}{\sum_{j=1}^{N}e^{\text{sim}(\mathbf{h}^{\prime}_{i},\mathbf{h}^{\prime+ }_{j})/\tau}},$ (9) $$

where $N$ represents the size of each mini-batch, $\tau$ is a temperature hyperparameter, and $\text{sim}(\cdot)$ is the cosine similarity function.

Figure: Figure 4: In-batch training with Gaussian-decayed on GCSE.
Refer to caption: x4.png

Gaussian-decayed Training on Synthesized Data. In the second stage, we adopt a copy of the evaluation model as the backbone of GCSE and continue training on synthesized data. In this stage, each input is set as a triplet $(x_{i},x_{i}^{+},x_{i}^{-})$, where $x_{i}^{+}$ and $x_{i}^{-}$ stand for the positive and negative samples of $x_{i}$, respectively. Nevertheless, the synthesized data contains many potential false positive and false negative samples, necessitating the implementation of a filtering process. We use the frozen evaluation model to initially correct these inaccurate samples and build the ultimate triplet dataset. Let $\mathcal{S}(x_{i})=\left\{\hat{x}_{i1},\dots\hat{x}_{im}\right\}$ denotes the synthetic data set of $x_{i}$, where $m$ is the size of the set, and $x_{i}^{+}$, $x_{i}^{-}$ are calculated as:

$$ $x_{i}^{+}=\begin{cases}\hat{x}_{ij},&\text{sim}(\mathbf{h}^{\prime}_{i},\hat{ \mathbf{h}}^{\prime}_{ij})\geq\alpha,j\in[1,m]\\ x_{i},&\text{else}\end{cases},$ (10) $$

$$ $x_{i}^{-}=\begin{cases}\hat{x}_{ij},&\text{sim}(\mathbf{h}^{\prime}_{i},\hat{ \mathbf{h}}^{\prime}_{ij})\leq\beta,j\in[1,m]\\ x_{k},&k\in[1,N],k\neq i\end{cases},$ (11) $$

where $\alpha$, $\beta$ are the threshold for positives and negatives, respectively. $x_{k}$ denotes a randomly selected instance from in-batch data. We can set a high value for $\alpha$ to reduce false positive samples. However, filtering out false negatives in synthetic data is more challenging. In theory, smaller $\beta$ can reduce more false negatives, but samples with low similarity to the source instance are easy to distinguish due to significant surface-level differences. As a result, training on these samples does not effectively improve the model’s ability to distinguish fine-grained false positives. Therefore, we opt for a higher value of $\beta$. During training, we use a Gaussian-decayed function to align the distances of hard negative samples between the GCSE encoder $E$ and the frozen encoder $E^{\prime}$. As shown in Figure 4, for each mini-batch of triplet inputs, both $E$ and $E^{\prime}$ compute similarity scores for the negative samples and their corresponding source instances. The loss for each instance in GCSE is defined as:

$$ $-\log\frac{e^{\text{sim}({\bf h}_{i},{\bf h}_{i}^{+})/\tau}}{\sum_{j=1}^{N}e^{ \text{sim}({\bf h}_{i},{\bf h}_{j}^{+})/\tau}+\sum_{\begin{subarray}{c}j=1\\ j\neq i\end{subarray}}^{N}e^{\text{sim}({\bf h}_{i},{\bf h}_{j}^{-})/\tau}+G(s _{i},s^{\prime}_{i},\tau,\sigma)},$ (12) $$

$$ $G(s_{i},s^{\prime}_{i},\tau,\sigma)=s_{i}\left(1-e^{-\frac{(s_{i}-s^{\prime}_{ i})^{2}\tau^{2}}{2\,\sigma^{2}}}\right),$ (13) $$

where $s_{i}=\text{sim}(\mathbf{h}_{i},\mathbf{h}^{-}_{i})$, $s^{\prime}_{i}=\text{sim}(\mathbf{h}^{\prime}_{i},\mathbf{h}^{\prime-}_{i})$. $G(\cdot)$ is the Gaussian-decayed function, where the loss attenuation of the hard negative sample grows as the distance between $s_{i}$ and $s^{\prime}_{i}$ decreases, and $\sigma$ is a hyperparameter that controls the width of $G(\cdot)$. This implies that when $E$ initially calculates the hard negative sample, it follows the spatial distribution of $E^{\prime}$ as the “established guidelines” and uses other in-batch negative samples to further increase the spatial distance between negatives, effectively reducing the influence of false negatives. As training progresses, the spatial distribution of true hard negatives between $E$ and $E^{\prime}$ will progressively increase, and its gradient will be restored.

## 4 Experiment

### 4.1 Experiment Setup

Training: We utilize the subset of NLI dataset from Gao et al. () as the general data, and use the training sets from STS-Benchmark (STS-B) (Cer et al., ) with 5.7k samples and SICK (Marelli et al., ) with 4.5k samples as the domain data for a fair comparison with related approaches. To simulate the unsupervised scenario, we exclusively include unlabeled samples from the dataset. In this experiment, the ratio of sample numbers between domain data and general data was 1:3. We adopt ChatGLM-3(6B) (GLM et al., ) as the LLM for data synthesis, and we choose BERT (Devlin et al., ) and RoBERTa (Liu et al., ) as the backbone models of GCSE. In the stage of Gaussian-decayed training on synthesized data, the filtering thresholds of $\alpha$ and $\beta$ are set as 0.9 and 0.75, respectively. The temperature of $\tau$ is set as 0.05, and the $\sigma$ of $G(\cdot)$ is set as 0.01. In the first stage training, the evaluation model is firstly trained on the unlabeled dataset of all general data and domain data. One copy instance of the evaluation model is then utilized as the pre-trained model for GCSE, while the original instance is set to be frozen to filter synthesized data and provide guidance for GCSE. In the second stage, GCSE is trained on the filtered synthesized data, and the sentence embedding is obtained from the last output hidden states of the first token.

Evaluation: To validate our method for sentence embeddings, we evaluated the model’s performance on semantic textual similarity (STS) tasks, we use the standard evaluation method, measuring model performance with Spearman’s correlation, and we adopt SentEval(^1^11https://github.com/facebookresearch/SentEval) (Conneau and Kiela, ) as the evaluation tool, which contains seven STS subsets: STS 2012-2016 (Agirre et al., , , , , ), the STS-Benchmark (Cer et al., ) and the SICK Relatedness (Marelli et al., ). To compare the ranking performance of our method on retrieval tasks, we evaluated the model using the MTEB benchmark (Muennighoff et al., ) with four reranking datasets: AskUbuntuDupQuestions (Lei et al., ), MindSmallReranking (Wu et al., ), SciDocsRR (Cohan et al., ) and StackOverflowDupQuestions (Liu et al., ), and follow the same settings of Zhang et al. () by using Mean Average Precision (MAP) as the metric. Additionally, we compared the performance of our model with other methods on transfer tasks in SentEval to evaluate its applicability in Appendix B.

**Table 2: Comparison of Spearman’s correlation results on STS tasks, where the value highlighted in bold is the best value, and the value underlined is the second-best value. “†”: results from Miao et al. (), “$\clubsuit$”: results from Wang et al. (), “$\spadesuit$”: results from Liu et al. (), “${\dagger}{\dagger}$”: results from Zhang et al. (). “*”: we reproduce the results with the officially released corpus from Zhang et al. ().**
| Model | Method | STS-12 | STS-13 | STS-14 | STS-15 | STS-16 | STS-B | SICK-R | Avg. |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| BERT-base | whitening† | 57.83 | 66.90 | 60.90 | 75.08 | 71.31 | 68.24 | 63.73 | 66.28 |
| SimCSE† | 68.40 | 82.41 | 74.38 | 80.91 | 78.56 | 76.85 | 72.23 | 76.25 |  |
| DiffCSE† | 72.28 | 84.43 | 76.47 | 83.90 | 80.54 | 80.59 | 71.23 | 78.49 |  |
| PromptBERT$\clubsuit$ | 71.56 | 84.58 | 76.98 | 84.47 | 80.60 | 81.60 | 69.87 | 78.54 |  |
| PCL$\spadesuit$ | 72.84 | 83.81 | 76.52 | 83.06 | 79.32 | 80.01 | 73.38 | 78.42 |  |
| DebCSE† | \ul76.15 | 84.67 | 78.91 | 85.41 | 80.55 | 82.99 | 73.60 | 80.33 |  |
| RankCSE$\spadesuit$ | 75.66 | 86.27 | 77.81 | 84.74 | 81.10 | 81.80 | 75.13 | 80.36 |  |
| SynCSE (ChatGPT)* | 75.86 | 82.19 | 78.71 | 85.63 | \ul81.11 | 82.35 | \ul78.79 | 80.66 |  |
| MultiCSR (ChatGPT)$\clubsuit$ | 74.86 | 84.19 | \ul79.46 | 84.70 | 80.34 | 83.59 | 79.37 | \ul80.93 |  |
|  | GCSE (Ours) | 76.91 | \ul86.23 | 80.49 | \ul85.16 | 81.45 | \ul82.54 | 75.71 | 81.21 |
| BERT-large | SimCSE† | 70.88 | 84.16 | 76.43 | 84.50 | 79.76 | 79.26 | 73.88 | 78.41 |
| PCL$\spadesuit$ | 74.87 | 86.11 | 78.29 | 85.65 | 80.52 | 81.62 | 73.94 | 80.14 |  |
| DebCSE† | \ul76.82 | 86.36 | \ul79.81 | 85.80 | 80.83 | 83.45 | 74.67 | 81.11 |  |
| RankCSE$\spadesuit$ | 75.48 | \ul86.50 | 78.60 | 85.45 | \ul81.09 | 81.58 | 75.53 | 80.60 |  |
| SynCSE (ChatGPT)* | 74.24 | 85.31 | 79.41 | \ul85.71 | 81.76 | 82.61 | 79.25 | \ul81.18 |  |
|  | GCSE (Ours) | 76.99 | 87.34 | 80.88 | 85.47 | 80.55 | \ul82.97 | \ul75.68 | 81.41 |
| RoBERTa-base | whitening† | 46.99 | 63.24 | 57.23 | 71.36 | 68.99 | 61.36 | 62.91 | 61.73 |
| SimCSE† | 70.16 | 81.77 | 73.24 | 81.36 | 80.65 | 80.22 | 68.56 | 76.57 |  |
| DiffCSE† | 70.05 | 83.43 | 75.49 | 82.81 | 82.12 | 82.38 | 71.19 | 78.21 |  |
| PromptRoBERTa$\clubsuit$ | 73.94 | 84.74 | 77.28 | 84.99 | 81.74 | 81.88 | 69.50 | 79.15 |  |
| PCL$\spadesuit$ | 71.13 | 82.38 | 75.40 | 83.07 | 81.98 | 81.63 | 69.72 | 77.90 |  |
| DebCSE† | 74.29 | \ul85.54 | 79.46 | 85.68 | 81.20 | 83.96 | 74.04 | 80.60 |  |
| RankCSE$\spadesuit$ | 73.20 | 85.95 | 77.17 | 84.82 | \ul82.58 | 83.08 | 71.88 | 79.81 |  |
| SynCSE (ChatGPT)${\dagger}{\dagger}$ | 74.61 | 83.76 | 77.89 | 85.09 | 82.28 | 82.71 | \ul78.88 | 80.75 |  |
| MultiCSR (ChatGPT)$\clubsuit$ | \ul75.61 | 84.33 | \ul80.10 | 84.98 | 82.13 | 84.54 | 79.67 | 81.62 |  |
|  | GCSE (Ours) | 76.06 | 85.30 | 80.38 | \ul85.28 | 83.26 | \ul84.07 | 74.55 | \ul81.27 |
| RoBERTa-large | SimCSE† | 72.86 | 83.99 | 75.62 | 84.77 | 81.80 | 81.98 | 71.26 | 78.90 |
| PCL$\spadesuit$ | 74.08 | 84.36 | 76.42 | 85.49 | 81.76 | 82.79 | 71.51 | 79.49 |  |
| DebCSE† | \ul77.68 | \ul87.17 | \ul80.53 | 85.90 | \ul83.57 | 85.36 | 73.89 | 82.01 |  |
| RankCSE$\spadesuit$ | 73.20 | 85.83 | 78.00 | 85.63 | 82.67 | 84.19 | 73.64 | 80.45 |  |
| SynCSE (ChatGPT)${\dagger}{\dagger}$ | 75.45 | 85.01 | 80.28 | \ul86.55 | 83.95 | 84.49 | 80.61 | \ul82.33 |  |
|  | GCSE (Ours) | 78.24 | 87.24 | 81.93 | 86.80 | 83.52 | \ul85.08 | \ul76.70 | 82.79 |

Baselines: We compare our method with mainstream unsupervised sentence embedding baselines: BERT-whitening (Su et al., ), SimCSE (Gao et al., ), DiffCSE (Chuang et al., ), PromptBERT (Jiang et al., ), PCL (Wu et al., ), CARDS (Wang et al., ), DebCSE (Miao et al., ) and RankCSE (Liu et al., ). In addition, we further compare two baselines: SynCSE (Zhang et al., ) and MultiCSR (Wang et al., ), which use LLM for data synthesizing in whole NLI datasets. To verify the effectiveness of our data synthesis method, we choose their results of using ChatGPT for comparison.

### 4.2 Main Results

STS Tasks: The overall results of the STS tasks are shown in Table 2. Our approach achieves state-of-the-art performance across the BERT-base, BERT-large, and RoBERTa-large backbones compared to other unsupervised baselines. This highlights the applicability of our method, as it can be effectively applied to multiple models. Compared to the standard unsupervised SimCSE, Spearman’s correlation of our approach is improved by an average of 17.24% on the base models and 3.44% on the large models. On the strong baseline RankCSE, our approach achieved a 1.36% improvement over its average performance, demonstrating the effectiveness of the LLM data synthesis process. Furthermore, we compare two baseline models: SynCSE and MultiCSR, both of which utilize LLM as the data synthesis model. We specifically analyze the results of using ChatGPT for both models. The results show that our approach outperforms both models in most cases; in the case of using RoBERTa-base, our method is slightly behind MultiCSR by 0.35% and still achieves the second-best result. It should be noted that the ChatGLM-3(6b) we use is much more lightweight than ChatGPT(about 175b) in parameters. Additionally, our method only utilizes 14% of the sample size compared to the other two methods that employ the entire NLI datasets. This demonstrates the effectiveness of our data synthesis strategy and domain-oriented sample selection strategy.

**Table 3: Comparison of Mean Average Precision (MAP) results on reranking tasks, where the value highlighted in bold is the best value, and the value underlined is the second-best value. “${\dagger}{\dagger}$”: results from Zhang et al. (). “*”: we reproduce the results with the officially released corpus from Zhang et al. ().**
| Model | Method | AskU. | Mindsmall | SciDocsRR | StackO. | Avg. |
| --- | --- | --- | --- | --- | --- | --- |
| BERT-base | SimCSE | 51.89 | 28.68 | 67.88 | \ul39.60 | 47.01 |
| PCL | 52.46 | 28.72 | 68.03 | 41.30 | \ul47.63 |  |
| SynCSE (ChatGPT)* | \ul52.61 | 29.17 | \ul68.46 | 38.60 | 47.21 |  |
| GCSE (Ours) | 52.62 | \ul28.79 | 70.67 | 39.53 | 47.90 |  |
| BERT-large | SimCSE | 53.10 | \ul29.59 | \ul71.94 | \ul40.68 | \ul48.83 |
| PCL | 52.03 | 29.11 | 70.30 | 42.33 | 48.44 |  |
| SynCSE (ChatGPT)* | \ul53.24 | 30.09 | 71.45 | 39.24 | 48.50 |  |
| GCSE (Ours) | 53.40 | 29.43 | 73.04 | 39.68 | 48.89 |  |
| RoBERTa-base | SimCSE${\dagger}{\dagger}$ | 52.78 | \ul29.91 | 65.96 | 39.25 | 46.95 |
| CARDS${\dagger}{\dagger}$ | 52.94 | 27.92 | 64.62 | 41.51 | 46.75 |  |
| PCL${\dagger}{\dagger}$ | 51.85 | 27.92 | 64.70 | \ul41.18 | 46.41 |  |
| SynCSE (ChatGPT)${\dagger}{\dagger}$ | \ul53.27 | 30.29 | \ul67.55 | 39.39 | \ul47.63 |  |
| GCSE (Ours) | 53.44 | 29.35 | 67.89 | 41.13 | 47.95 |  |
| RoBERTa-large | SimCSE${\dagger}{\dagger}$ | \ul55.10 | 29.23 | 68.54 | \ul42.56 | 48.86 |
| CARDS${\dagger}{\dagger}$ | 53.83 | 29.07 | 68.26 | 43.24 | 48.60 |  |
| PCL${\dagger}{\dagger}$ | 53.43 | 28.56 | 66.06 | 41.54 | 47.40 |  |
| SynCSE (ChatGPT)${\dagger}{\dagger}$ | 55.48 | \ul30.27 | \ul70.85 | 40.00 | \ul49.15 |  |
| GCSE (Ours) | 54.05 | 30.30 | 71.23 | 41.65 | 49.31 |  |

Reranking Tasks: Table 3 presents the MAP results of our approach and related baselines on the reranking benchmark, and all models are evaluated on the test sets of the reranking benchmark without using the training sets. The results indicate that various approaches exhibit varying performance on different datasets, which can be attributed to the distinct semantic distribution and evaluation scale of each dataset. Our GCSE outperforms SynCSE by 0.39% in average MAP score and achieves the best results in all backbone models, demonstrating the efficacy of our approach in enhancing the precision of unsupervised ranking tasks.

### 4.3 Analysis

**Table 4: Ablation studies of STS tasks on BERT-base. Other PLMs yield similar patterns to BERT-base.**
| Method | STS-12 | STS-13 | STS-14 | STS-15 | STS-16 | STS-B | SICK-R | Avg. |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| GCSE | 76.91 | 86.23 | 80.49 | 85.16 | 81.45 | 82.54 | 75.71 | 81.21 |
| w/o stage-2 | 71.85 | 83.65 | 76.84 | 83.37 | 78.74 | 79.10 | 71.69 | 77.89 |
| w randomly | 71.94 | 84.03 | 76.99 | 83.65 | 79.11 | 78.66 | 69.28 | 77.67 |
| w/o filtering | 74.65 | 83.54 | 77.39 | 83.27 | 79.97 | 79.66 | 74.27 | 78.96 |
| w/o decay | 76.15 | 85.83 | 79.77 | 85.19 | 80.72 | 82.59 | 75.55 | 80.83 |
| w/o general | 75.44 | 85.55 | 79.19 | 84.91 | 80.23 | 81.57 | 74.14 | 80.15 |
| w/o domain | 75.59 | 85.66 | 78.93 | 84.09 | 80.87 | 82.29 | 76.00 | 80.49 |

Ablation Studies: We analyze the impact of each module or strategy in our GCSE and report the results in Table 4. First, “w/o stage-2” refers to the results obtained without training in the second stage. This leads to a significant decrease in performance compared to the default model, which is the performance of the evaluation model and is similar to the conventional unsupervised SimCSE. Then, “w randomly” refers to the direct use of the instance itself as a positive sample in the combination dataset of domain and general data, while randomly selecting a negative instance from the dataset. We can observe that its performance in this case is even worse than the evaluation model. This demonstrates that the diversity of positive samples and the quality of negative samples significantly impact the performance of the model. “w/o filtering” indicates the results of training by skipping evaluation model filtering and directly using the data synthesized by LLM. The results show that the performance of the model is significantly affected when false positive and negative samples are introduced without filtering. We investigate the impact of the Gaussian-decayed function by removing it, and the results are shown in “w/o decay”. We can observe that the default model performs better overall than when the Gaussian-decayed function is removed, indicating that it can filter out potential false negative sample noise. Finally, we analyze the necessity of including general data and domain data in “w/o general” and “w/o domain” respectively. It can be observed that removing either of them results in a decline in performance, which indicates the significance of domain data and the essentiality of general data in our method.

**Table 5: Comparison of Spearman’s correlation results on the synthetic data of the STS-Benchmark development set.**
| Method | Spearman’s |
| --- | --- |
| unsup-SimCSE | 75.59 |
| RankCSE | 79.74 |
| SynCSE (ChatGPT) | 91.58 |
| GCSE (Ours) | 93.77 |

Analysis of entities and quantities awareness: We analyze GCSE awareness of entities and quantities by constructing a dataset using the data synthesis method in Section 3.1 on the STS-Benchmark development set. Then, the similarity scores of each triplet in the dataset are annotated by two supervised pre-trained models: “sup-simcse-bert-large” and “sup-simcse-roberta-large”. The final label is the average score of the similarity calculated by both models. We evaluate Spearman’s correlation scores of GCSE and the other three strong baselines on the backbone of the BERT-base model, and the results are shown in Table 5. Our GCSE achieves the best result and outperforms RankCSE by 14.03%. In this case, both SynCSE and GCSE achieve significant improvements over methods without LLM. This might be due to the similarity of the semantic representation space between the training set and the development set, both of which are synthesized via LLM. Nevertheless, GCSE shows a notable enhancement in performance of 2.19% compared to SynCSE, demonstrating that its understanding of the entities and quantities in sentences has enhanced to a certain degree.

Figure: Figure 5: Spearman’s correlation against the ratio of domain data to general data on the STS tasks.
Refer to caption: x5.png

Figure: Figure 7: Density plots of the STS-Benchmark development set with labels $\geq 4$, which is evaluated by GCSE with different $\sigma$ weights. (c) is the density plot of gold labels.
Refer to caption: x7.png

Impact on the ratio between domain and general data: Figure 6 presents the trend of the GCSE Spearman’s correlation result as the proportion of general data introduced increases, where “d” represents that only using the domain data. The results show that adding a certain amount of general data improves performance on STS tasks. However, when the size of general data exceeds three times that of domain data, performance starts to decline. This suggests that incorporating a moderate amount of external data enhances the uniformity of sentence embeddings. But as the out-of-domain data grows, the influence of domain-specific data on training weakens. Overall, the results indicate that domain data improves the model’s ability to represent target domain sentences, while general data helps with sentence embedding uniformity.

Impact of the Gaussian-decayed: To further investigate the effectiveness of the Gaussian-decayed function, we analyze the GCSE performance against the weight of $\sigma$ on the synthesized data, both with and without filtering. As shown in Figure 6, we use the synthesized data without filtering to evaluate the efficacy of the Gaussian-decayed function in eliminating false negative samples, and results are presented in Figure 6 (b). It is clear that the model’s performance improves as the weight of $\sigma$ grows. This suggests that a greater $\sigma$ weight enhances the model’s effectiveness in mitigating the impact of false negative samples. It is important to acknowledge that a higher $\sigma$ does not necessarily indicate better performance. As shown in Figure 6 (a), an increase in $\sigma$ at the initial stage contributes to enhancing the model’s performance. Nevertheless, as the weight of $\sigma$ increases, the performance of backbones generally declines, resulting in the model adhering too strictly to the “established guidelines”. Consequently, it impacts the efficacy of learning from the hard negative samples. We further use the density plots to visualize the prediction on the STS-Benchmark development set in Figure 7. These models are trained on the synthesized data without filtering. We can observe that in Figure 7 (a), the distribution of prediction results for labels $\geq 4$ is significantly shifted to the left. Compared with the results in Figure 7 (b), this issue is effectively alleviated, demonstrating the effectiveness of the Gaussian-decayed function in reducing the influence of false negative samples. To further verify the applicability of the Gaussian-decayed function, we applied it to SynCSE and verified the performance in Appendix D.

## 5 Conclusion

In this paper, we propose a pipeline-based data augmentation method using LLM to enhance data diversity in sentence representation learning. By leveraging knowledge of entities and quantities, our approach improves the model’s ability to capture fine-grained semantic distinctions. The Gaussian-decayed function in our GCSE model further reduces noise in the generated data. Extensive experiments on STS and reranking tasks show that our method achieves state-of-the-art results with fewer synthesized samples and a more lightweight LLM, demonstrating its effectiveness and efficiency.

## Appendix

## Appendix A Data Synthesis Prompts

**Table 6: Examples of data synthesis prompts, where $\left\{variable~{}name\right\}$ refers to a varibale.**
| Knowledge Extraction Prompt | Instruction: Predicts the subject categories, contained entities, and quantified information of the following text<br>Rules: The category is an item in [$\left\{categories_name\right\}$, …], quantified information refers to information contained in the text with numerical values or units, such as ‘2GB’, ‘three cups’, ‘two dogs’, etc<br>Output format: json format data, the data format is: {<br>cls: [], // category<br>entities: [{text: “", type: “"}], // entities, ‘text’ must be subsequences in the Input text<br>quantities: [{text: “", type: “", quantity: 0}] // To quantify the information, ‘text’ must be a subsequence in the Input text<br>}<br>Input: $\left\{x\right\}$ |
| --- | --- |
| Rewriting Prompt 1 | Instruction: You are an excellent storyteller; rewrite the input sentence in a different way. Please try to recreate the sentence using different expressions, including varied tones, synonyms, and sentence patterns, while ensuring that the new sentence has the same meaning as the original sentence.<br>Input: $\left\{x\right\}$ |
| Rewriting Prompt 2 | Instruction: You are a great storyteller; I would be grateful if you could employ your creativity to devise an illustration of the preceding segment of the sentence. The preceding statement must not exceed $\left\{number\right\}$ words, and it follows the original text.<br>Input: $\left\{x\right\}$ |
| Rewriting Prompt 3 | Instruction: You are a great rewriter, and I want you to generate new sentence according to the classification, entities and quantities info provided by the json.<br>Rules: You should aware that the new text in “quantities" should be rewrite follows the “quantity" value. e.g. “text": “A man", “quantity": 5 should rewrite as “five men".<br>Metadata: {<br>“cls": “$\left\{categories_name\right\}$",<br>“entities": [{<br>“text": “$\left\{entity_text\right\}$",<br>“type": “$\left\{entity_type\right\}$"<br>}, …],<br>“quantities": [{<br>“text": “$\left\{entity_text\right\}$",<br>"quantity": $\left\{entity_quantity\right\}$<br>}, …] }<br>Input: $\left\{x\right\}$ |
| Syntactic Antisense Prompt | Instruction: You are dishonest; you ought to reformulate the input sentence so that the NLI model perceives it as an opposing sample.<br>Rules: 1. If the statement asserts negation, you should affirm; conversely, if the statement asserts affirmation, you should negate. 2. If an individual loves something, one should assert that it does not reciprocate that affection. 3. If an individual is engaged in one activity, state that they are performing a different activity. 4. If the statement is affirmative/negative, express it as negative/affirmative.<br>Input: $\left\{x\right\}$ |
| Entity Revision Prompt | Instruction: You are a great story teller, rewrites the input sentence, and change the entity ‘$\left\{original_entity_text\right\}$’ to another $\left\{entity_type\right\}$ ‘$\left\{new_entity_text\right\}$’.<br>Input: $\left\{x\right\}$ |
| Quantity Revision Prompt | Instruction: You are a great story teller, rewrites the input sentence, and change the quantity $\left\{original_quantity_value\right\}$ of ‘$\left\{original_quantity_text\right\}$’ to $\left\{random_quantity_value\right\}$.<br>Input: $\left\{x\right\}$ |

In this section, we provide the specifics of our prompts for knowledge extraction and integration, and data synthesis. The particular prompts are presented in Table 6.

## Appendix B Performance on Transfer Tasks

We also evaluate our GCSE follow the same settings as SimCSE on seven transfer tasks: MR [Pang and Lee, ], CR [Hu and Liu, ], SUBJ [Pang and Lee, ], MPQA [Wiebe et al., ], SST2 [Socher et al., ], TREC [Voorhees and Tice, ], and MRPC [Voorhees and Tice, ]. The results are shown in Table 7, it can be observed that our GCSE achieve best performance on BERT-base, BERT-large and RoBERTa-large. In RoBERTa-base, our method also shows comparable results, demonstrating the potential capability in downstream tasks.

**Table 7: Comparison of different sentence embedding models accuracy on transfer tasks. “$\spadesuit$”: results from Liu et al. [], “$\clubsuit$”: results from Wang et al. [], “${\dagger}{\dagger}$”: results from Zhang et al. []. “*”: we reproduce the results with the officially released corpus from Zhang et al. [].**
| Model | Method | MR | CR | SUBJ | MPQA | SST2 | TREC | MRPC | Avg. |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| BERT-base | SimCSE$\spadesuit$ | 68.40 | 82.41 | 74.38 | 80.91 | 78.56 | 76.85 | 72.23 | 76.25 |
| DiffCSE$\spadesuit$ | 72.28 | 84.43 | 76.47 | 83.90 | 80.54 | 80.59 | 71.23 | 78.49 |  |
| PCL$\spadesuit$ | 72.84 | 83.81 | 76.52 | 83.06 | 79.32 | 80.01 | 73.38 | 78.42 |  |
| RankCSE$\spadesuit$ | 75.66 | 86.27 | 77.81 | 84.74 | 81.10 | 81.80 | 75.13 | 80.36 |  |
| MultiCSR (ChatGPT)$\clubsuit$ | \ul82.70 | 88.15 | 94.97 | 90.08 | 86.87 | \ul87.70 | 75.46 | \ul86.56 |  |
| SynCSE (ChatGPT)* | 83.34 | 88.80 | 93.88 | 90.39 | 88.96 | 83.60 | \ul75.94 | 86.42 |  |
| GCSE (Ours) | 82.22 | \ul88.43 | \ul94.59 | \ul90.09 | \ul86.88 | 89.40 | 76.06 | 86.81 |  |
| BERT-large | SimCSE$\spadesuit$ | 70.88 | 84.16 | 76.43 | 84.50 | 79.76 | 79.26 | 73.88 | 78.41 |
| PCL$\spadesuit$ | 74.87 | 86.11 | 78.29 | 85.65 | 80.52 | 81.62 | 73.94 | 80.14 |  |
| RankCSE$\spadesuit$ | 75.48 | 86.50 | 78.60 | 85.45 | 81.09 | 81.58 | 75.53 | 80.60 |  |
| SynCSE (ChatGPT)* | 85.78 | 90.47 | \ul94.77 | 90.41 | 90.50 | \ul89.00 | 75.77 | 88.10 |  |
| GCSE (Ours) | \ul83.97 | \ul89.38 | 95.13 | \ul90.22 | \ul89.57 | 90.60 | \ul75.71 | \ul87.80 |  |
| RoBERTa-base | SimCSE$\spadesuit$ | 70.16 | 81.77 | 73.24 | 81.36 | 80.65 | 80.22 | 68.56 | 76.57 |
| DiffCSE$\spadesuit$ | 70.05 | 83.43 | 75.49 | 82.81 | 82.12 | 82.38 | 71.19 | 78.21 |  |
| PCL$\spadesuit$ | 71.13 | 82.38 | 75.40 | 83.07 | 81.98 | 81.63 | 69.72 | 77.90 |  |
| RankCSE$\spadesuit$ | 73.20 | 85.95 | 77.17 | 84.82 | 82.58 | 83.08 | 71.88 | 79.81 |  |
| MultiCSR (ChatGPT)$\clubsuit$ | \ul84.70 | 90.69 | 94.40 | \ul89.38 | 89.42 | 89.62 | 77.01 | 87.89 |  |
| SynCSE (ChatGPT)${\dagger}{\dagger}$ | 85.47 | 91.44 | 92.53 | 89.67 | \ul90.94 | 81.60 | 76.06 | 86.82 |  |
| GCSE (Ours) | 84.39 | \ul90.81 | \ul94.02 | 88.90 | 91.05 | \ul89.40 | \ul76.12 | \ul87.81 |  |
| RoBERTa-large | SimCSE$\spadesuit$ | 72.86 | 83.99 | 75.62 | 84.77 | 81.80 | 81.98 | 71.26 | 78.90 |
| PCL$\spadesuit$ | 74.08 | 84.36 | 76.42 | 85.49 | 81.76 | 82.79 | 71.51 | 79.49 |  |
| RankCSE$\spadesuit$ | 73.20 | 85.83 | 78.00 | 85.63 | 82.67 | \ul84.19 | 73.64 | 80.45 |  |
| SynCSE (ChatGPT)${\dagger}{\dagger}$ | 87.24 | 92.16 | \ul93.75 | 90.81 | 91.87 | 84.00 | 76.29 | \ul88.02 |  |
| GCSE (Ours) | \ul85.65 | \ul90.78 | 94.16 | \ul90.08 | \ul90.44 | 92.80 | \ul73.74 | 88.24 |  |

## Appendix C Case Studies

**Table 8: Case studies on model prediction similarity with gold labels in the STS-Benchmark development set, where Gold represents the label score of the sentence pair (ranging from zero to five). The similarity scores of all models are multiplied by a coefficient of five for better comparison, and the value in parentheses denotes the RMS error between the predicted score and the label. Words highlighted in blue denote the entity alteration in the sentence-pair, whereas words in yellow indicate the quantities that change inside the sentence-pair.**
| Premise | Hypothesis | Gold | SimCSE | RankCSE | SynCSE | GCSE |
| --- | --- | --- | --- | --- | --- | --- |
| A woman is cooking eggs. | A woman is cooking something. | 3.00 | 4.37 (1.372) | 4.23 (1.320) | \ul3.66 (0.662) | 3.24 (0.236) |
| Two little girls are talking on the phone. | A little girl is walking down the street. | 0.50 | 3.38 (2.881) | 3.64 (3.139) | \ul1.97 (1.468) | 1.85 (1.351) |
| A chef is preparing some food. | A chef prepared a meal. | 4.00 | 4.27 (0.270) | 4.59 (0.588) | 4.56 (0.561) | \ul4.41 (0.408) |
| Five kittens are eating out of five dishes. | Kittens are eating food on trays. | 2.75 | 3.81 (1.056) | 3.71 (0.957) | \ul3.28 (0.535) | 3.12 (0.373) |
| A woman is cutting some herbs. | A woman is chopping cilantro. | 2.80 | 3.58 (0.777) | 3.58 (0.967) | \ul3.11 (0.313) | 2.61 (0.185) |

To further verify the improvement in our method’s awareness of entity and quantity, we selected five sample sets from the STS-Benchmark development set that explicitly contained alterations in entity or quantity within the sentence-pair, and presented the prediction cosine-similarity scores of GCSE and related methodologies with the backbone of BERT-base in Table 8. We can observe from the results that the prediction score of our model achieves the minimum root-mean-square error compared to the label in most cases, which indicates that our model has a stronger capacity to distinguish information.

## Appendix D Ablation Studies of Gaussian-decayed and Few-shot Samples

**Table 9: Ablation studies of sample size and the Gaussian-decayed function by utilizing SynCSE. “*”: we reproduce the results with the officially released corpus from Zhang et al. [].**
| Method | STS-12 | STS-13 | STS-14 | STS-15 | STS-16 | STS-B | SICK-R | Avg. |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| SynCSE (ChatGPT)* | 75.86 | 82.19 | 78.71 | 85.63 | 81.11 | 82.35 | 78.79 | 80.66 |
| w sampled | 75.48 | 85.60 | 78.76 | 84.78 | 80.38 | 82.12 | 76.46 | 80.51 |
| w sampled & G.D. | 75.71 | 85.24 | 79.09 | 85.15 | 80.82 | 82.68 | 77.54 | 80.89 |
| w G.D. | 75.89 | 85.26 | 79.24 | 85.67 | 80.79 | 82.63 | 78.19 | 81.10 |
| w sampled & domain & G.D. | 75.88 | 86.02 | 79.46 | 86.10 | 80.27 | 82.87 | 76.91 | 81.07 |

We employ the Gaussian-decayed function on SynCSE and sample SynCSE training data with a sample size the same as our synthetic data to evaluate the efficacy of the proposed Gaussian-decayed function and our domain-oriented selection strategy in the ablation experiment. The data sample size is 64k, and the weight of $\sigma$ in $G(\cdot)$ is assigned the same value as specified in Section 4.1. The results of various policies implemented in SynCSE are presented in Table 9. “w sampled” denotes the utilization of purely the sampled data in SynCSE, and a performance decrease can be observed when training on a reduced number of samples without extra configurations. “w sampled & G.D.” denotes the additional incorporation of $G(\cdot)$ based on “w sampled”. “w G.D.” indicates the results by training on the full dataset utilizing $G(\cdot)$. In both configurations, the average performance outperforms the vanilla model, illustrating the module’s efficacy. “w sampled & domain & G.D.” denotes the concurrent utilization of sample data, domain data, and $G(\cdot)$, with a sample size of 48k for the SynCSE dataset and 16k for the synthesized domain dataset. The results reveal that "w sampled & domain & G.D." attains the second-best performance, suggesting that incorporating domain data can decrease the required training samples while enhancing model efficacy.

## Appendix E Unsupervised Sentence Embedding on LLM

**Table 10: Performance comparison of different LLMs on STS tasks. “†”: results from Miao et al. [], “$\clubsuit$”: results from Wang et al. []**
| Model | Avg. |
| --- | --- |
| SimCSE${\dagger}$ | 76.57 |
| Flan-T5-XL$\clubsuit$ | 68.76 |
| ChatGPT$\clubsuit$ | 76.19 |
| ChatGLM-3 LoRA | 71.17 |

In this section, we utilize contrastive learning on ChatGLM-3 with a low-rank adapter (LoRA) layer, and we gather other sentence embedding results from LLMs via in-context learning (ICL) to evaluate the alignment of LLM-generated similarities with the gold labels, as presented in Table 10. The results indicate that even ChatGPT with ICL cannot surpass the performance of contrastive learning methods based on encoder models. The existing methodology of LLM for generating sentence embeddings is unsatisfactory. Although some works utilize prompts without extra training, the efficacy of sentence embedding primarily relies on the quality of prompt engineering. Furthermore, employing the contrastive learning fine-tuning method for LLMs achieves no substantial benefit in semantic textual similarity tasks, underutilizing the capabilities of LLMs. To reduce expenses, we assert that fully leveraging the capabilities of LLMs for distilling smaller models is the better option.

## Peer Reviews

confidence: 4
contribution: 2
initial_rating: 5
presentation: 3
questions: If SynCSE and GCSE use the same LLM, would the improvement be greater? Could you provide these results?
soundness: 3
strengths: The authors have provided a thorough analysis and summary of the shortcomings of existing methods.

This paper is easy to follow, and the technical approach is sound.
summary: This paper investigates the use of large language models for data augmentation to generate unsupervised sentence embeddings. To overcome two limitations of existing methods: limited data diversity and high data noise, the authors propose using knowledge graphs to extract entities and quantities to address low data diversity. Additionally, they suggest using a Gaussian-decayed function to limit the impact of false hard negative samples in the Contrastive Sentence Embedding model to tackle the issue of high data noise. Experimental results on semantic textual similarity (STS) and reranking tasks indicate that the proposed method offers certain improvements over existing large language model-based approaches.
weaknesses: Although introducing the Gaussian-decayed function into SimCSE is straightforward, its contribution does not seem very significant.

From the results in Tables 2 and 3, the improvement of GCSE over SynCSE appears to be relatively minor in many cases. I suggest conducting multiple experiments and reporting the results of statistical significance tests.

---

confidence: 4
contribution: 3
initial_rating: 6
presentation: 3
questions: 1. Is it possible to visually demonstrate the improvement in data diversity and reduction in data noise brought about by the proposed method through some quantitative metrics (same as Weakness) ?

2. Ablation analysis of the hyperparameters α and β in equations 10 and 11.

3. The impact of different LLMs on performance, and whether replacing with a more powerful LLM could raise the method's upper limit.
soundness: 3
strengths: 1. By integrating knowledge graphs and LLMs, the paper proposes a novel data augmentation approach that effectively enhances sample diversity and embedding quality.
2. The introduction of the Gaussian decay function significantly mitigates the impact of false negative samples, bolstering the model's robustness.
3. While reducing data requirements and model size, the method presented in this paper achieves state-of-the-art performance across multiple benchmarks, demonstrating its efficiency and generalization capability.
summary: To address the challenges of unsupervised sentence embedding models in terms of data diversity and noise, this paper first proposes a pipeline-based data augmentation method using large language models. This method utilizes knowledge graphs to extract entity and quantity information, generating more diverse samples. Next, the paper introduces a Gaussian Contrastive Sentence Embedding (GCSE) model assisted by a Gaussian decay function to reduce the impact of false negative samples and enhance the model's discriminative ability. Finally, the paper demonstrates that this approach achieves SOTA performance on semantic textual similarity  tasks, while exhibiting efficiency and robustness with fewer data samples and smaller LLMs.
weaknesses: 1. The core motivation of this paper's approach is data diversity and data noise. Although higher benchmark performance has been achieved, there is a lack of significant quantitative analysis on how the proposed methods or modules enhance data diversity and reduce data noise. For example, could some quantitative metrics be used to intuitively demonstrate the improvements in data diversity and reductions in data noise brought about by the proposed method or individual modules?

---

confidence: 4
contribution: 2
initial_rating: 3
presentation: 2
questions: 1. In figure 1, why choosing 0.5 as a hard limit to distinguish Positives & Negatives? Can we choose other limits, like >0.8 is Positives, < 0 is Negatives, and 0~0.8 is ambiguous? Theoretically,  most embedding models like SimCSE are trained with a list-wise temperature-scaled contrastive loss, which is basically optimized via Cross-Entropy. The distribution of query-positive cosine similarity scores will be pushed greatly towards 1.0, and query-negative scores towards -1.0. If SimCSE is trained with some optimization object like a point-wise MSE loss, choosing 0.5 will be more rational. Thus, I suggest you to set a hard limit Top-k window for the prediction of Positives & Negatives. For example, the prediction with largest similarity is positive, and lowest is negative.
2. Can you do statistic significant tests on your results?
3. Where is the evaluation model E′ in Figure 4?
4. Why choosing Gaussian-decayed function? Does it have some special mathematical traits? Can we just choose a MSE loss / Cross-Entropy loss / KL loss to align hard negatives between the training encoder and frozen encoder?
5. Why do you want to align the hard negatives between the training encoder and frozen encoder?
6. Why do you train a frozen encoder first, then train a new encoder with the LLM-generated data? Can we just merge these steps to one stage? 
7. Line 311: How would the “spatial distribution of negatives” change? How will the gradients update?
soundness: 2
strengths: 1. The paper is well-written. The figures are neat and clear to read.
2. The pipeline of utilizing prompt engineering, entity extraction and KG construction serves as a new paradigm of data augmentation for STS tasks.
summary: This paper proposes a STS task-related data augmentation method, prompting LLM for entity extraction, KG construction and data generation. It also introduces a Gaussian-decayed function to align hard negatives between a training encoder and a frozen encoder.
weaknesses: 1. Analysis of false positive (FP) and negative (FN) in Figure 1 is unconvincing. See Question 1 for details.
2. The improvements (0.28 with BERT-base, 0.23 with BERT-large, and 0.46 with RoBERTa-large) seem very marginal.
3. The motivation of choosing Gaussian-decayed function is unclear. No theoretical proves on the modification with Gaussian-decayed function.

---

confidence: 5
contribution: 2
initial_rating: 3
presentation: 2
questions: 1、Why was a Gaussian-decayed function chosen? 
2、Why train a frozen encoder first, followed by training a new encoder with LLM-generated data? What's the benefit?
soundness: 2
strengths: The proposed pipeline, which leverages prompt engineering, entity extraction, and knowledge graph construction, introduces a novel paradigm for data augmentation in STS tasks. The paper is well written and easy to follow.
summary: This paper proposes a data augmentation method related to the STS task, aiming to prompt LLMs for entity extraction, knowledge graph construction, and data generation. Additionally, it introduces a Gaussian-decayed function to align hard negatives between a training encoder and a frozen encoder.
weaknesses: 1、The motivation is not clearly clarified. why was a Gaussian-decayed function chosen? 
2、The experimental improvement is marginal.  

missing references;
[1]  Zhou K, Zhang B, Zhao W X, et al. Debiased contrastive learning of unsupervised sentence representations[J]. arXiv preprint arXiv:2205.00656, 2022.
[2] Wu X, Gao C, Su Y, et al. Smoothed contrastive learning for unsupervised sentence embedding[J]. arXiv preprint arXiv:2109.04321, 2021.

---

confidence: 4
contribution: 1
initial_rating: 3
presentation: 3
questions: Why the Gaussian-decayed function G() in the denominator? It seems that the Gaussian-decayed function has no connection with the denominator. Can we just add the Gaussian-decayed function to the contrastive learning loss?
soundness: 1
strengths: 1. The paper is well-written.
2. The data augmentation is interesting.
summary: This paper proposes a pipeline-based data augmentation method via LLMs and introduces the Gaussian-decayed gradient-assisted Contrastive Sentence Embedding (GCSE) model to enhance unsupervised sentence embeddings. The data augmentation first constructs a knowledge graph (KG) with the extracted data, guides LLM to generate more diverse positive samples, and filter noisy data. Experimental results show its effectiveness.
weaknesses: 1. The main results are based on BERT and Roberta. However, LLMs are effective in sentence embedding [1,2]. Please use LLMs for evaluation. Using only ChatGLM-3 for evaluation is not convincing. Therefore, the experimental evaluation in this paper should be redone.

2. Analysis of \alpha and \beta.

3. Two missing references. [3] is about data noise and [4] is about data augmentation.

[1] BeLLM: Backward Dependency Enhanced Large Language Model for Sentence Embeddings, NAACL 2024

[2] AoE: Angle-optimized Embeddings for Semantic Textual Similarity, ACL 2024

[3] Debiased Contrastive Learning of Unsupervised Sentence Representations, ACL 2022

[4] Improving Text Embeddings with Large Language Models, ACL 2024

Meta-review: This paper introduces a pipeline-based data augmentation method utilizing LLMs combined with a novel Gaussian-decayed gradient-assisted Contrastive Sentence Embedding (model to enhance unsupervised sentence embeddings. The proposed approach integrates knowledge graphs for data diversity and employs a Gaussian decay function to mitigate data noise, resulting in good performance on semantic textual similarity tasks. 

However, as pointed out by the reviewers, there are several concerns, including the marginal improvements over existing methods, the unclear theoretical justification for the Gaussian-decayed function, and the lack of significant quantitative analysis demonstrating how the proposed methods enhance data diversity or reduce noise. Even though the authors tried to address these issues during the rebuttal, the reviewers were not fully satisfied with the answers, particularly regarding the practical significance and theoretical underpinnings of the improvements reported.

Decision: Reject