STS-B: Semantic Textual Similarity Benchmark
The STS Benchmark scores 8,628 English sentence pairs for semantic similarity on a 0-5 scale, drawn from SemEval STS tasks and part of GLUE. This Potato config reproduces the rating task with a slider and Likert scale.
About this dataset
The Semantic Textual Similarity Benchmark (STS-B) measures how close two sentences are in meaning. It was assembled by Cer, Diab, Agirre, Lopez-Gazpio, and Specia and released with SemEval-2017 Task 1, and it later became one of the tasks in the GLUE benchmark.
The benchmark holds 8,628 English sentence pairs split into 5,749 train, 1,500 development, and 1,379 test examples. Each pair carries a human similarity score from 0 to 5, where 0 means the sentences share no meaning and 5 means they are fully equivalent. The pairs come from three genres selected from SemEval STS tasks run between 2012 and 2017: news headlines, image and video captions, and user forum posts.
STS-B is treated as a regression task. A system predicts a continuous score for each pair, and quality is reported as Pearson and Spearman correlation between predicted and human scores; the GLUE leaderboard averages the two. The dataset is widely used to evaluate sentence embeddings and similarity models.
The Potato config below reproduces the rating task, presenting two sentences side by side and collecting a 0-5 similarity judgment through a fine-grained slider and a 6-point Likert scale.
- Total sentence pairs
- 8,628
- Splits
- 5,749 train / 1,500 dev / 1,379 test
- Similarity scale
- 0 (no overlap) -> 5 (equivalent)
- Source genres
- News headlines, captions, forum posts
- Evaluation metric
- Pearson and Spearman correlation
- Origin
- SemEval STS 2012-2017; part of GLUE
Configuration Fileconfig.yaml
This Potato config reproduces the annotation task. Save it as config.yaml and run potato start config.yaml to try it.
# STS Benchmark - Semantic Textual Similarity
# Based on Cer et al., SemEval 2017
# Paper: https://aclanthology.org/S17-2001/
# Dataset: https://ixa2.si.ehu.eus/stswiki/index.php/STSbenchmark
#
# This task presents two sentences and asks annotators to rate their
# semantic similarity on a 0-5 scale using both a slider and Likert scale.
#
# Similarity Scale:
# 0 - Completely different: No semantic overlap
# 1 - Not equivalent but on the same topic
# 2 - Not equivalent but share some details
# 3 - Roughly equivalent with some important differences
# 4 - Mostly equivalent with minor differences
# 5 - Perfectly equivalent: Same meaning
#
# Annotation Guidelines:
# 1. Read both sentences carefully
# 2. Assess how similar they are in meaning (not surface form)
# 3. Use the slider for a fine-grained score
# 4. Use the Likert scale for a categorical judgment
# 5. Focus on meaning, not wording
annotation_task_name: "STS Benchmark - Semantic Textual Similarity"
task_dir: "."
data_files:
- sample-data.json
item_properties:
id_key: "id"
text_key: "text"
output_annotation_dir: "annotation_output/"
output_annotation_format: "json"
port: 8000
server_name: localhost
annotation_schemes:
# Step 1: Fine-grained similarity slider
- annotation_type: slider
name: similarity_score
description: "Rate the semantic similarity between the two sentences (0 = completely different, 5 = perfectly equivalent)"
min_value: 0
max_value: 5
starting_value: 2.5
# Step 2: Categorical similarity judgment
- annotation_type: likert
name: similarity_category
description: "How semantically similar are these two sentences?"
min_label: "Completely Different"
max_label: "Perfectly Equivalent"
size: 6
annotation_instructions: |
You will be shown two sentences. Your task is to rate how semantically similar they are.
Use the slider for a fine-grained score from 0 to 5:
- 0: The sentences are completely unrelated in meaning.
- 1: The sentences are on the same topic but say different things.
- 2: The sentences share some details but are not equivalent.
- 3: The sentences are roughly equivalent with some important differences.
- 4: The sentences are mostly equivalent with minor differences.
- 5: The sentences mean exactly the same thing.
Also provide a categorical rating using the Likert scale.
Focus on the meaning of the sentences, not their surface form. Two sentences
can be highly similar even if they use very different words.
html_layout: |
<div style="padding: 15px; max-width: 800px; margin: auto;">
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px;">
<div style="background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 8px; padding: 16px;">
<strong style="color: #0369a1; font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px;">Sentence 1:</strong>
<p style="font-size: 16px; line-height: 1.7; margin: 8px 0 0 0;">{{text}}</p>
</div>
<div style="background: #fefce8; border: 1px solid #fde68a; border-radius: 8px; padding: 16px;">
<strong style="color: #a16207; font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px;">Sentence 2:</strong>
<p style="font-size: 16px; line-height: 1.7; margin: 8px 0 0 0;">{{sentence_2}}</p>
</div>
</div>
</div>
allow_all_users: true
instances_per_annotator: 50
annotation_per_instance: 2
allow_skip: true
skip_reason_required: false
Sample Datasample-data.json
[
{
"id": "stsb_001",
"text": "A plane is taking off.",
"sentence_2": "An air plane is taking off."
},
{
"id": "stsb_002",
"text": "A man is playing a large flute.",
"sentence_2": "A man is playing a flute."
}
]
// ... and 8 more itemsGet This Design
Clone or download from the repository
Quick start:
git clone https://github.com/davidjurgens/potato-showcase.git cd potato-showcase/text/semantic-similarity/stsb-sentence-similarity potato start config.yaml
Dataset & paper
Cer et al., SemEval 2017
Citation (BibTeX)
@inproceedings{cer-etal-2017-semeval,
title = "{S}em{E}val-2017 Task 1: Semantic Textual Similarity Multilingual and Crosslingual Focused Evaluation",
author = "Cer, Daniel and Diab, Mona and Agirre, Eneko and Lopez-Gazpio, Inigo and Specia, Lucia",
booktitle = "Proceedings of the 11th International Workshop on Semantic Evaluation (SemEval-2017)",
month = aug,
year = "2017",
address = "Vancouver, Canada",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/S17-2001",
pages = "1--14"
}Details
Annotation Types
Domain
Use Cases
Tags
Found an issue or want to improve this design?
Open an IssueRelated Designs
Semantic Textual Relatedness
Semantic textual relatedness task requiring annotators to rate the degree of semantic relatedness between sentence pairs using both a Likert scale and a continuous slider. Based on SemEval-2024 Task 1 (STR).
Automated Essay Scoring
Holistic and analytic scoring of student essays using a deep-neural approach to automated essay scoring (Uto, arXiv 2022). Annotators provide overall quality ratings, holistic scores on a 1-6 scale, and detailed feedback comments for educational assessment.
Graded Word Similarity in Context
Rate the graded semantic similarity of a PAIR of target words that appear together within a shared context, based on SemEval-2020 Task 3 (Armendariz et al.). The same word pair is judged within two different contexts; Subtask 1 predicts the change in similarity between contexts and Subtask 2 predicts the absolute rating. Ratings follow the SimLex-style 0-6 similarity scale (later mapped to 0-10). Similarity is distinct from relatedness (e.g., coffee and cup are related but not similar).