Skip to content

Official Implementation of Paper *Towards Better Understanding of Contrastive Sentence Representation Learning: A Unified Paradigm for Gradient*

License

Notifications You must be signed in to change notification settings

BDBC-KG-NLP/UnderstandingCSE

Repository files navigation

Environment

Run the following command to create the required conda environment:

conda env create -f environment.yml -n your_new_environment_name

Data

  • Train files:

    Run the following command in the data/ directory:

    bash download.sh
  • Evaluation files:

    Run the following command in the SentEval/data/downstream/ directory:

    bash download_dataset.sh

Experiments

  • For experiments in Section 3.1 Theoretical Analysys, refer to simulation.py;

  • For experiments in Section 3.2 Empirical Study, refer to scripts in scripts/empirical, and to obtain statistcs, refer to statistics.py;

  • For experiments in Section 4 Modification to Ineffective Losses, refer to scripts in scripts/application;

Evaluation

For evaluation, refer to evaluation.py

Implementation

For implementations of optimization objectives, refer to line 234-434 in isotropy/models.py

About

Official Implementation of Paper *Towards Better Understanding of Contrastive Sentence Representation Learning: A Unified Paradigm for Gradient*

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published