Set-Theoretic Compositionality of Sentence Embeddings

Naman Bansal, Yash mahajan, Sanjeev Sinha, Santu Karmaker
2/28/2025
cs.CL

No confident code implementation found for this paper.

Abstract

Sentence encoders play a pivotal role in various NLP tasks; hence, an accurate evaluation of their compositional properties is paramount. However, existing evaluation methods predominantly focus on goal task-specific performance. This leaves a significant gap in understanding how well sentence embeddings demonstrate fundamental compositional properties in a task-independent context. Leveraging classical set theory, we address this gap by proposing six criteria based on three core "set-like" compositions/operations: \textit{TextOverlap}, \textit{TextDifference}, and \textit{TextUnion}. We systematically evaluate $7$ classical and $9$ Large Language Model (LLM)-based sentence encoders to assess their alignment with these criteria. Our findings show that SBERT consistently demonstrates set-like compositional properties, surpassing even the latest LLMs. Additionally, we introduce a new dataset of ~$192$K samples designed to facilitate future benchmarking efforts on set-like compositionality of sentence embeddings.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{bansal2025settheoretic,
  title  = {Set-Theoretic Compositionality of Sentence Embeddings},
  author = {Naman Bansal and Yash mahajan and Sanjeev Sinha and Santu Karmaker},
  year   = {2025},
  eprint = {2502.20975},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.20975v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.20975.svg)](https://codeofpaper.com/paper/2502.20975)

Discussion