Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rbroc/contrastive-user-encoders

Code for: Rocca, R., & Yarkoni, T. (2022), Language models as user encoders: Self-supervised learning of user encodings using transformers, to appear in Findings of the Association for Computational Linguistics: EMNLP 2022
https://github.com/rbroc/contrastive-user-encoders

contrastive-learning nlp python tensorflow transformers user-modeling

Last synced: 11 days ago
JSON representation

Code for: Rocca, R., & Yarkoni, T. (2022), Language models as user encoders: Self-supervised learning of user encodings using transformers, to appear in Findings of the Association for Computational Linguistics: EMNLP 2022

Awesome Lists containing this project

README

        

## Contrastive training of author encoders using transformers
Includes code for constrastive user encoder from the EMNLP Findings paper:
- Rocca, R., & Yarkoni, T. (2022), Language models as user encoders: Self-supervised learning of user encodings using transformers, to appear in *Findings of the Association for Computational Linguistics: EMNLP 2022* (link coming soon)

### Structure
- This repository does not include data, but the dataset can be recreated entirely using scripts made available under `reddit/preprocessing`;
- Model classes, trainer, and other utils can be found under `reddit`;
- `notebooks` include the code needed to replicate plots presented in the paper, as well as baseline fitting;
- `scripts` contain Python training scripts for both triplet loss training and downstream tasks;

Note: triplet loss training could be streamlined using HuggingFace's `transformers` library - future refactoring may simplify the current code in this direction.