Downloads · 30 days
14
9% of all-time downloads
Shawnlight/style-confusion-AuthorMix
style-confusion-AuthorMix is a sentence similarity model from Shawnlight. Use it when you need a score for how close two texts are. It is set up for sentence-transformers. The card lists the license as mit.
This repository contains the model introduced in StyleDistance: Stronger Content-Independent Style Embeddings with Synthetic Parallel Examples.
Downloads · 30 days
14
9% of all-time downloads
All-time downloads
157
Public
Parameters
125M
510 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors499 MB · 97%
From the Hugging Face model README
This repository contains the model introduced in StyleDistance: Stronger Content-Independent Style Embeddings with Synthetic Parallel Examples.
StyleDistance is a style embedding model that aims to embed texts with similar writing styles closely and different styles far apart, regardless of content. You may find this model useful for stylistic analysis of text, clustering, authorship identfication and verification tasks, and automatic style transfer evaluation.
StyleDistance was contrastively trained on SynthSTEL, a synthetically generated dataset of positive and negative examples of 40 style features being used in text. By utilizing this synthetic dataset, StyleDistance is able to achieve stronger content-independence than other style embeddding models currently available. This particular model was trained using a combination of the synthetic dataset and a real dataset that makes use of authorship datasets from Reddit to train style embeddings. For a version that is purely trained on synthetic data, see this other version of StyleDistance.
from sentence_transformers import SentenceTransformer
from sentence_transformers.util import cos_sim
model = SentenceTransformer('StyleDistance/styledistance') # Load model
input = model.encode("Did you hear about the Wales wing? He'll h8 2 withdraw due 2 injuries from future competitions.")
others = model.encode(["We're raising funds 2 improve our school's storage facilities and add new playground equipment!", "Did you hear about the Wales wing? He'll hate to withdraw due to injuries from future competitions."])
print(cos_sim(input, others))
@misc{patel2025styledistancestrongercontentindependentstyle,
title={StyleDistance: Stronger Content-Independent Style Embeddings with Synthetic Parallel Examples},
author={Ajay Patel and Jiacheng Zhu and Justin Qiu and Zachary Horvitz and Marianna Apidianaki and Kathleen McKeown and Chris Callison-Burch},
year={2025},
eprint={2410.12757},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2410.12757},
}
This model was trained with a synthetic dataset with DataDreamer 🤖💤. The synthetic dataset card and model card can be found here. The training arguments can be found here.
<small> This research is supported in part by the Office of the Director of National Intelligence (ODNI), Intelligence Advanced Research Projects Activity (IARPA), via the HIATUS Program contract #2022-22072200005. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies, either expressed or implied, of ODNI, IARPA, or the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for governmental purposes notwithstanding any copyright annotation therein. </small>