Manuscript Offprint
arXiv:2611.08778Semantic Conditional Similarity (SCS): A Formal Mathematical Framework
Abstract
Semantic Textual Similarity (STS) operates on document pairs, returning a single scalar for each comparison. In multi-document settings where several source texts may have contributed to a single target, pairwise STS cannot disentangle the marginal semantic contribution of each source from the vocabulary they share. This paper introduces Semantic Conditional Similarity (SCS), a conditional form of STS in which the similarity between two documents is computed after eliminating the semantic elements shared with a third document, via set-theoretic operations. SCS makes four contributions. First, it introduces directionality to semantic similarity, partitioning pairwise relations into lateral (inter-source) and vertical (source-to-target) classes. Second, the conditioning operation induces role-dependent asymmetry: extending the comparison domain from unordered document pairs to ordered, conditioned triples produces scores that depend on which source serves as reference and which as conditioning document. The asymmetry is a consequence of the set-theoretic construction, not a relaxation of the similarity function itself. Third, SCS introduces inter-document conditioning, which subtracts shared content from a third document, as a complement to the intra-document attribute-based conditioning of recent Conditional STS (C-STS) work. Fourth, the set-theoretic decomposition achieves threshold-free partitioning of shared and residual content, requiring no arbitrary similarity cutoff. Although developed for the many-to-one () configuration, the framework extends to the one-to-many () case through a vertical role reversal of the conditioning structure, and to the many-to-many () case through the independent composition of source-side and target-side conditioning. Together with the established one-to-one () case, these extensions span the entire document cardinality spectrum. SCS scores should be interpreted ordinally, as rankings of marginal contributions rather than as absolute measurements. The broader implication is that the metric space axioms commonly assumed in similarity formalizations impose substantive constraints on expressiveness in role-differentiated multi-document settings, and that extending the comparison domain to conditioned triples can recover information that pairwise-symmetric comparisons suppress.
1 Introduction
Many real-world analytical settings, however, involve a richer structure. As in studies of intellectual influence, legislative drafting, policy diffusion, or intertextual analysis, when a target text is situated within a context of multiple source texts that may have contributed to it, the relevant question is no longer merely how similar each source is to the target. Instead, one should ask how much each source contributed uniquely, net of what it shares with the other sources. Standard pairwise STS cannot answer this question. If two source documents share vocabulary with the target and with each other, their pairwise STS scores with the target will each be inflated by the shared inter-source context. There is no mechanism within the pairwise framework to disentangle the marginal contribution of each source from the confounding overlap among them.
1.2 Empirical motivation
The need for such a mechanism emerged from an earlier study on the semantic relationship between normative theories of ethics and institutional texts. In that study, Albayrakoğlu and Aydin (2022) applied classical semantic similarity analysis to compare theories of ethics against organizational codes of conduct/ethics, using unconditioned pairwise STS to assess the alignment between each theory and each code. While this approach revealed broad patterns of semantic association, it could not distinguish whether the observed similarity between a given theory and a given code reflected a genuine, unique alignment or was an artifact of vocabulary shared across multiple theories, i.e., vocabulary that would appear in any code regardless of its specific theoretical orientation.
This limitation became more acute in a subsequent work by Albayrakoğlu and Aydin (2026), in which the authors applied transformer-based STS to analyze the semantic alignment between normative theories of ethics and the European Union Artificial Intelligence (EU AI) Act. This is an explicitly multi-source setting: multiple theories (deontological ethics, virtue ethics, and consequentialism) are examined as potential source documents of a single legislative text. When several theories share foundational ethical vocabulary using terms like “harm,” “fairness,” “transparency,” and “accountability,” unconditioned pairwise STS assigns elevated similarity scores to all of them without revealing which theory uniquely contributed to the legislative text. The shared ethical lexicon inflates every score, obscuring the differential alignment that is the actual object of inquiry.
1.3 The response: Semantic Conditional Similarity
This paper introduces Semantic Conditional Similarity (SCS), a conditional form of STS in which the similarity between two documents is computed after eliminating semantic elements shared with a third document in a given context. SCS addresses the confounding problem described in empirical motivation by conditioning the similarity computation on the inter-source overlap. For each pair of source documents, their shared vocabulary is subtracted from both the source and target representations before similarity is computed, isolating the marginal semantic contribution of each source to the target.
The framework makes the following contributions:
Directionality. SCS introduces a structural distinction between lateral similarity (among source documents) and vertical similarity (between a source and the target), partitioning the similarity space of a multi-document configuration into two functionally distinct classes. This is a departure from classical STS, in which all pairwise similarities belong to a single undifferentiated set (Section 3.2).
Asymmetry. By extending the comparison domain from unordered document pairs to ordered, conditioned triples, SCS produces scores that depend on which source serves as reference and which as conditioning document: the marginal contribution of source to the target, net of what shares with source , is not in general equal to the marginal contribution of net of what shares with . The underlying similarity function (cosine) remains symmetric; the asymmetry arises because swapping roles changes the inputs to the function, not the function itself, and hence, it is role-induced (Section 6.9).
Inter-document conditioning. Unlike recent work on Conditional STS (C-STS) (Deshpande et al., 2023; Zhang et al., 2026; Song et al., 2025), which conditions on named semantic attributes within the compared texts (intra-document conditioning), SCS conditions on the shared content of a third document outside the pair under comparison (inter-document conditioning). The two forms of conditioning address different problems: intra-document conditioning disambiguates which aspect of similarity to evaluate; inter-document conditioning decomposes multi-document similarity into marginal contributions.
Threshold-free partitioning. SCS operates via set-theoretic operations—mainly intersection and complement—that yield a lexical decomposition of shared and residual content without requiring an arbitrary similarity threshold. The partition is a set-theoretic fact, not a judgment call.
More broadly, SCS has implications for the foundations of similarity theory: the metric space axioms commonly assumed in similarity formalizations, including the symmetry axiom which is preserved throughout the unified theory of Rozinek and Mareš (2021), encode substantive assumptions about the relationships being modeled. These assumptions become visible once the comparison domain is enlarged beyond unordered pairs (Section 10).
Although developed for the many-to-one () configuration, the conditioning mechanism extends to the one-to-many () case through a vertical role reversal, and to the many-to-many () case through the independent composition of source-side and target-side conditioning. Together with the established one-to-one () case, these extensions cover the entire document cardinality spectrum (Section 8).
1.4 Paper organization
The remainder of this paper is organized as follows. Section 2 establishes the mathematical foundations. Section 3 develops the multi-document semantic decomposition.
Section 4 identifies the two principal departures from classical STS. Section 5 presents the set-theoretic bridge. Section 6 introduces the SCS framework, including the algorithmic workflow. Section 7 discusses properties and constraints. Section 8 extends the framework across the full document cardinality spectrum. Section 9 provides a synthetic numerical demonstration. Section 10 positions SCS with respect to related work. Section 11 discusses broader implications. Section 12 concludes the paper.
2 Foundational Setting
2.1 Semantic space as a normalized metric space
Let be a non-empty set of textual documents. A normalized metric on is a function satisfying, for all :
-
Identity:
-
Symmetry:
-
Triangle inequality:
The pair is a normalized metric space. Semantic similarity is defined as the complement of distance :
where is the semantic similarity function.
2.2 Document representation as unit-area regions
Each document is modeled as a unit-area region in a conceptual space encapsulating the document's structure and content (Gärdenfors, 2000). This normalization ensures that comparisons reflect qualitative semantic overlap rather than superficial differences in length, as shown in Figure 1.
Definition 2.1 (Unit-area regions). Each document is represented as a bounded planar region of unit area. For any two document regions, the area of their overlap equals the similarity and the area of their non-overlapping portions equals the dissimilarity . The regions need not be literal geometric circles; any bounded shapes of equal area suffice.
For one source document and one target :
(similarity)
(2)
(dissimilarity)
(3)
Under the unit-area assumption, the normalized symmetric difference between two regions equals by inclusion-exclusion, so the geometric and metric formalizations are interchangeable, linking the geometric illustration to the framework of Rozinek and Mareš (2021). Throughout this paper, Venn diagrams serve as the visual representation of documents: each circle corresponds to a document's unit-area region, and each distinct zone corresponds to a portion defined by a unique pattern of overlap and non-overlap across the documents. From Section 5 onward, the abstract regions are grounded in concrete lemma sets.

Figure 1: Pairwise similarity as two overlapping normalized documents, and . The overlap region corresponds to the similarity ; the non-overlapping portions correspond to .
3 Multi-Document Semantic Decomposition
3.1 Document cardinalities
Let be a set of source documents and be a single target document. The framework addresses the (many-to-one) multi-document configuration, in which source documents may each contribute to the target. Throughout, , and serve as cardinality labels; in formal statements the number of sources is .
This work develops the framework for the case, shows that it extends to the case by vertical role reversal (Section 8.3), and demonstrates that the case reduces to the independent composition of the two unilateral conditionings (Section 8.4). Together with the established case (unconditioned pairwise STS), these configurations cover the whole document cardinality landscape illustrated in Figure 2.
3.2 Directionality of similarity relations
Classical STS treats all pairwise similarities as structurally interchangeable: , , and are all instances of the same undifferentiated function. In an multi-document configuration, however, the documents occupy two distinct roles—source and target—which induces a natural partition of the similarity relations into two classes.
Definition 3.1 (Lateral similarity). A similarity relation between two source documents is called a lateral similarity. Lateral similarities measure the semantic overlap within the source context.
Definition 3.2 (Vertical similarity). A similarity relation between a source document and the target document is called a vertical similarity. Vertical similarities measure the semantic overlap across the source–target boundary.

Figure 2: The four possible document cardinality configurations. (a) One-to-one (1 → 1): unconditioned pairwise STS. (b) One-to-many (1 → n): a single source with multiple targets. (c) Many-to-one (n → 1): the configuration developed in Sections 6–7. (d) Many-to-many (m → n): multiple sources and multiple targets.
This distinction is not merely notational. The two classes play fundamentally different roles in the SCS framework. Lateral similarities generate the shared context (the overlaps among source documents) that must be eliminated to isolate marginal contributions. Vertical similarities are what SCS ultimately measures, after conditioning on the lateral structure.
Figure 3 illustrates this partition for the case. In the case, there is one lateral pair and two vertical pairs. In the general case, there are lateral pairs and vertical pairs. The introduction of directionality partitions the similarity space of documents into:
This partition is a departure from classical STS, in which all pairwise similarities belong to a single undifferentiated set.
3.3 Zone decomposition
For two source documents and one target T, the conceptual space decomposes into seven zones as depicted in Figure 4 and further explained in Table 1.:

Figure 3: Directionality of similarity relations in the case. Lateral similarity (dashed) pairwise connects source documents and ; vertical similarities (solid) connect each source to the target .
Each document's unit-measure constraint yields:
The symmetry property gives three additional equations (any one of which follows from the other two combined with the unit-measure constraints):
3.4 General region counting
Theorem 3.3 (Region counting). For source documents and one target ( documents total), the total number of distinct semantic regions is:
This follows from the recurrence , proved by induction.
Observation 3.4. There is exactly one region of full semantic similarity (shared by all documents).

Figure 4: Three-circle Venn diagram for the case, showing the seven semantic zones: full similarity , partial similarities , and full dissimilarities .
Observation 3.5. There are exactly regions of full semantic dissimilarity (one per document).
Observation 3.6. The number of partial similarity regions is .
3.5 Underdetermination result
The region decomposition of Section 3.2 and its Venn diagram (Figure 4) provide geometric intuition for the case: three circles on a plane produce seven regions whose areas can be labeled and constrained. However, this planar representation does not extend beyond three documents—for , no arrangement of circles in the plane can realize all non-empty intersections. The argument must therefore be stated in terms of unit-measure regions in an -dimensional space, not circles with a unit-area constraint on the plane.
Theorem 3.7 (Underdetermination). sets of unit measure with all mutual intersections non-empty produce at most distinct zones, but only independent equations from unit-measure and pairwise-overlap constraints. The system is underdetermined whenever all zones are non-empty.
Proof. In the general-position case (all zones non-empty), the mutually intersecting unit-measure sets produce distinct zones, each an unknown measure variable. The available equations are: unit-measure equations and pairwise intersection equations. We must show that for all . Expanding
| Zone | Symbol | Meaning |
|---|---|---|
| Full similarity | Shared by all three documents | |
| Partial similarity 1 | Shared by and only (not ) | |
| Partial similarity 2 | Shared by and only (not ) | |
| Partial similarity 3 | Shared by and only (not ) | |
| Full dissimilarity 1 | Unique to | |
| Full dissimilarity 2 | Unique to | |
| Full dissimilarity 3 | Unique to |
Table 1: Zone decomposition for the case.
the left side via the binomial theorem and substituting :
The final inequality holds for all , since every binomial coefficient is strictly positive.
For , this is 7 unknowns but only 6 equations. The missing degree of freedom is —the measure of the three-way intersection, which no combination of pairwise information can resolve. More generally, the surplus unknowns correspond precisely to the higher-order intersections (triples and above), which are invisible to pairwise measurements.
Unit-measure constraints and pairwise overlaps do not determine every zone when three or more texts interact. The Venn diagram offers useful intuition for small but cannot serve as a computational foundation for arbitrary . The remainder of this paper resolves this limitation by grounding document regions in concrete lemma sets, where each element either belongs to a document or does not, making every region explicit and computable regardless of the number of documents.
4 Departures from Classical STS
The multi-document setting introduces two structural properties that distinguish SCS from classical STS. Both arise naturally from the multi-document configuration and are formalized in detail in Sections 3.2 and 6.9 respectively.
Departure 1: Directionality. The lateral–vertical partition (Section 3.2) is a departure in corpus structure: SCS partitions pairwise similarities into functionally distinct classes based on document roles.
Departure 2: Asymmetry. Metric-induced pairwise similarity inherits the symmetry of the underlying distance and cannot represent role-sensitive conditional comparisons. SCS enlarges the domain from unordered pairs to ordered, conditioned triples, producing role-induced asymmetry: Section 6.9 proves that in general.
Together, these two departures allow SCS to answer a question that symmetric, undirected STS cannot: which source document contributes more uniquely to the target, and by how much?
5 Transition to Set-Theoretic Representation
The principle of compositionality states that the meaning of a complex expression is determined by the meanings of its constituents and the rules used to combine them (Partee, 1984). The principle enables systematic interpretation of language and extends to complexity analysis across domains including mathematics, computer science, and epistemology (Janssen, 2012).
The principle has known limits: it does not handle idiomatic expressions, metaphors, or context-dependent meanings well (Szabó, 2024). However, these exceptions do not apply when the texts under analysis rely on standardized terminology, explicit definitions, and normative discourse—genres in which compositional clarity supports meaningful semantic decomposition.
Accordingly, each document is decomposed into its lexical elements. Documents are tokenized, lemmatized, and represented as ordered sets of lemmas.
Definition 5.1 (Preprocessing map). Let be a finite lemma universe. Define the deterministic preprocessing map
where is the deduplicated lemma set of document . By a standard abuse of notation, we write for both the -th source document and its lemma set , and for both the target document and , from this point on.
All lemma sets satisfy . This representation replaces geometric regions with Boolean operations on finite lemma sets.
The preprocessing map bridges the geometric framework of Sections 2 and 3 with the set-theoretic operations that follow, collapsing the text-processing pipeline into a single deterministic step that makes the residual comparisons computable and reproducible.
Representation assumption. The lemma-set representation treats lexical overlap as a proxy for semantic overlap. This is an approximation: synonymy, polysemy, and other non-compositional phenomena mean that lexical co-occurrence neither necessary nor sufficient for semantic alignment. The approximation is consistent with much of the STS literature, which has long used surface-level features as proxies for meaning; its limitations are discussed in Section 11.
6 Semantic Conditional Similarity (SCS)
6.1 Cosine Similarity on Token Sets
For non-zero vectors in an inner product space:
where and are term-frequency (or binary) vectors derived from the lemma sets, and denotes the Euclidean norm.
Cosine similarity is a similarity function, not a distance function. Its complement fails the triangle inequality and is therefore not a metric; however, the angular distance is a true metric on the unit sphere.
6.2 Key insight
The intersection spans the zones and of Figure 4 and is not a differentiating factor for the vertical semantic relationship between either and or and . Instead, one must isolate the marginal (residual) semantic contribution of each source document by conditioning on the other as shown in Figure 5. Table 2 further tabulates the set expressions for each geometric zone shown in the figure.
6.3 Definition
Definition 6.1 (Semantic Conditional Similarity). Semantic Conditional Similarity (SCS) is a conditional form of Semantic Textual Similarity in which the similarity between two documents is computed after eliminating semantic elements shared with another document in a given context. SCS captures the marginal (net or residual) semantic contribution of one document to another by conditioning on pairs of documents under analysis within the specified context.
6.4 Notation
For source documents with lemma sets and target with lemma set , each conditioning operation selects one source as the reference document (the source whose marginal contribution is being measured) and another as the conditioning document (the source whose shared content is subtracted). For an ordered pair with , we set and and write
for the marginal semantic similarity between the target and the reference document, conditional on the conditioning document.

Figure 5: From geometric zones to residual sets. The seven zones of the Venn diagram (Figure 4) are mapped to set-theoretic expressions. The lateral shared context is subtracted from both reference and target, yielding the reference residual and the target residual . The SCS score is computed on these residuals.
| Zone | Set expression |
|---|---|
Table 2: Set-theoretic zone mapping for the case.
6.5 Directional comparison state
The directional comparison state is the triple , read as “target , reference , conditioned on .” The triple encodes which source is the reference and which serves as the conditioning document—swapping and changes the comparison state and can change the score.
6.6 Named residual sets
Definition 6.2 (Named residual sets). For a conditioning triplet , define:
(lateral shared context)
(17)
(reference residual)
(18)
The target enters the score computation through the expression : the target with the lateral shared context removed. This expression is written inline throughout, since it is self-documenting and requires no separate symbol.
6.7 Cosine-SCS formula
Definition 6.3 (Cosine-based Semantic Conditional Similarity). Each lemma set is represented as a binary indicator vector over the vocabulary, where coordinate is 1 if and only if the -th lemma belongs to the set. Since both vectors are binary, counts exactly the positions where both are 1, i.e. ; likewise, the Euclidean norm (Manning et al., 2008, § 6.3). Cosine similarity therefore reduces to set-cardinality expressions. The cosine-based SCS is therefore
with admissible domain and .
The conditioning framework is measure-agnostic: any set-based similarity function—Jaccard, Sørensen-Dice, or others—can replace cosine in the construction above. This paper develops SCS with cosine throughout, as cosine similarity is the dominant measure in semantic similarity research (Agirre et al., 2012).
6.8 Overlap identity
Theorem 6.4 (Overlap identity). The overlap actually counted by SCS is exactly the target content aligned with but not with :
Proof.
The score counts target content aligned with the reference document after removal of the content shared with the conditioning document.
6.9 Role-induced asymmetry
As noted in Section 4, extending the comparison domain to ordered triples induces asymmetric scores: the underlying cosine function remains symmetric, but swapping the reference and conditioning roles changes its inputs. We now prove this formally.
Theorem 6.5 (Asymmetry of SCS). SCS is not symmetric in general: swapping the reference and conditioning roles can change the score.
Proof by counterexample. Let with , , .
Setting and :
so and
Now swap the roles: set and . Then
so and
Therefore .
The SCS score matrix for source documents is therefore a non-symmetric matrix (with undefined diagonal), where entry . This contrasts with the symmetric similarity matrix of classical STS. The implications of this asymmetry for similarity theory are discussed in Section 11.
6.10 SCS score count
For source documents, the procedure is repeated across all ordered source pairs with . This yields SCS scores. For , this gives 6 scores.
6.11 Admissibility and averaging
For a collection of source texts compared with a common target, define the admissible conditioning indices for source i:
where and .
The average conditional score for source with respect to target is then:
The average can support ranking sources within a specified comparison design. Note that the average depends on the comparison set: adding or removing a source document changes the conditioning partners available and may therefore change the average scores of the existing sources. A causal or historical interpretation requires additional evidence beyond the similarity score.
6.12 Algorithmic Workflow
The SCS algorithm proceeds as follows:
Input: source documents , one target document .
-
Preprocessing. Each document undergoes tokenization into lemma lists (excluding stop words, punctuation, numerical tokens).
-
Set construction. Convert lemma lists into ordered lemma sets , eliminating duplicate lemmas.
-
Pairwise decomposition. For each source pair , compute:
• Intersection:
• Complement of given :
• Complement of given :
• Conditioned target:
-
Vectorization. Transform all complement sets into binary document vectors over a common vocabulary (union of all lemmas). Each dimension corresponds to a lemma; presence = 1, absence = 0.
-
Similarity computation. Compute cosine similarity between each conditioned source vector and the corresponding conditioned target vector to obtain SCS scores , where and .
-
Ranking. Sort all SCS scores in descending order to identify dominant source documents.
Output: A ranked profile of SCS scores, revealing the marginal semantic contribution of each source document to the target.
Figure 6 provides a visual overview of the computational pipeline, mapping each stage to the formal definitions of Sections 5–6.
Complexity analysis Let k be the number of sources, the document length before lemmatization, the average resulting lemma-set size, and v the active vocabulary size.
Preprocessing. Lemmatization and deduplication run in , where denotes asymptotic upper-bound complexity.
Pairwise loop. The pair loop visits unordered source pairs and computes two directional scores per pair. With hash-set operations and explicit vectorization, the dominant cost is
plus for sorting the averaged scores.
Direct set-cardinality computation can avoid explicit vectorization, since cosine on binary indicator vectors reduces to set-cardinality expressions (Definition 6.3).
7 Properties and Constraints
7.1 Formal properties
Theorem 7.1 (Boundedness). For every admissible triple,
Proof. The cosine of nonzero binary vectors lies in .
Theorem 7.2 (Collapse to STS). If , then SCS collapses to ordinary set-based cosine similarity:
Proof. If , then and . Substituting into the cosine-SCS definition yields the standard cosine similarity formula.
Together with the admissibility condition , the Collapse theorem identifies one end of a spectrum: as the overlap between reference and conditioning document decreases toward zero, SCS approaches unconditional similarity. The opposite boundary—total overlap—is the subject of the next theorem.
Theorem 7.3 (Identical sources). If , then and is undefined.
Proof. . The reference residual is the zero vector, so the cosine has a zero denominator.
This is the correct behavior: when the conditioning document is identical to the reference, the reference has no unique content, and the question “how much of ’s unique content appears in ?” is vacuous. Operationally, any pair with falls outside the admissible domain and is excluded from the comparison set (Section 6.12).
Theorem 7.4 (Identity). Identity behaves differently on residualized objects and on raw documents.
First, on residualized objects:
Second, on raw documents, identity of indiscernibles fails: there exist such that .
Proof. The first claim is immediate because any set is maximally similar to itself. For the second claim, take , , . Then , . So cosine-SCS equals 1, even though .
The conditional score is not a metric on raw texts. Identity on residualized objects does not imply identity of raw documents.
Theorem 7.5 (Monotonicity). SCS has the expected conditional monotonicity properties. If and , then adding matched source material increases similarity:
If , then adding unmatched source material decreases similarity:
Likewise, if , then adding unmatched target material decreases similarity:
Proof. If , then , which increases with . When unmatched material is added, the intersection size stays fixed while the denominator grows, so cosine weakly decreases.
Matched source and target material can raise the score; unmatched additions increase a denominator without increasing its numerator.
7.2 Structural constraints
- SCS is defined for source documents (the conditioning requires at least one other source document).
• The framework assumes a single target (the constraint).
-
Binary document vectors ensure that lexical frequency does not distort the conditional analysis; only the presence or absence of lemmas matters.
-
The method is scalable in the number of source documents, with pairwise comparisons (Section 6.12).
-
SCS introduces directionality (Section 3.2), using lateral similarities to condition vertical measurements.
-
SCS exhibits role-induced asymmetry (Section 6.9), producing a non-symmetric score matrix that distinguishes the direction of marginal contribution.
7.3 Ordinal interpretation
SCS scores should be interpreted ordinally, not absolutely. The algorithm's final operation is sorting: it produces a ranked profile of conditional pairwise similarities, not a set of absolute values. This is an epistemological constraint, not a technical limitation. Semantics is not a precise science—the cosine similarities computed over binary document vectors are quantitative approximations of inherently imprecise semantic relationships. While the set-theoretic decomposition stage is exact (a lemma is either in an intersection or it is not), the similarity scores derived from those decomposed sets are best treated as providing an ordering of marginal contributions rather than as exact magnitudes. SCS tells which source document contributes more uniquely to the target, and by roughly how much relative to the others—but the individual scores should not be taken as precise measurements of semantic content.
The appropriate use of SCS output is therefore to rank conditional pairwise document similarities, identifying dominant source documents. When the number of source documents is sufficiently large, the scores may also support clustering to identify groups of source documents with similar marginal contribution profiles. Since each source document generates scores (one per conditioning partner), the feasibility of clustering depends on whether is large enough to constitute a meaningful profile that distinguishes genuine patterns from noise. For small , ranking is the only viable interpretive operation.
8 Extensions Across the Document Cardinality Spectrum
Sections 6–7 developed SCS for the (many-to-one) configuration. This section shows that the framework extends naturally to the remaining document cardinalities, completing the spectrum introduced in Section 3. Figure 2 illustrates the four configurations.
8.1 The case: unconditioned pairwise STS
The configuration is the established baseline: a single source document and a single target document . With only one source, there is no second source to serve as a conditioning document, and the SCS conditioning operation is vacuous. The similarity reduces to unconditioned pairwise STS:
This is precisely the Collapse theorem (Section 7): when —or, equivalently, when no conditioning document exists—SCS reduces to ordinary cosine similarity. The case therefore sits at the unconditioned end of the spectrum, and every standard STS result applies without modification.
8.2 The case: source-side conditioning
The configuration is the primary setting of this paper: source documents may each have contributed to a single target . The analytical question is how much each source contributed uniquely, net of what it shares with the other sources. SCS addresses this by conditioning on the lateral overlap among sources, producing directional scores. The full development appears in Sections 6–7.
8.3 Extension to the configuration
Although this paper develops SCS for the (many-to-one) configuration, the framework extends naturally to the (one-to-many) case through a vertical role reversal of the conditioning structure. The key observation is that the confound addressed by SCS is symmetric across the source-target boundary: in the case, source documents share vocabulary with one another, inflating every source's unconditioned similarity to the target; in the case, target documents share vocabulary with one another, inflating the single source's unconditioned similarity to every target.
In the configuration, a single source document has a semantic relationship with multiple target documents . The analytical question is no longer “how much did each source uniquely contribute to the target?” but rather “how much of the source’s content did each target uniquely receive?” The roles transpose as follows:
-
The source is fixed, replacing the fixed target of the case.
-
Lateral similarities are now among targets: . These generate the shared context that must be eliminated.
-
Vertical similarities remain source-to-target: . These are what SCS ultimately measures after conditioning.
-
Each conditioning operation selects one target as the reference target (the target whose unique reception of is being measured) and another as the conditioning target (the target whose shared content is subtracted).
The residual sets for the case are:
(lateral shared context among targets)
(33)
(reference target residual)
(34)
(source residual)
(35)
and the SCS score is
All four contributions of SCS—directionality, asymmetry, inter-document conditioning, and threshold-free partitioning—carry over intact, with the lateral structure now lying among targets rather than among sources.
The case has natural applications wherever a single source text has diffused into multiple receiving documents. For example, if a constitutional principle has influenced several statutes, the SCS would identify which statute received the most distinctive content from that principle, net of what the statutes share with one another.
8.4 Extension to the configuration
The and frameworks condition on one side of the source-target boundary: the former eliminates lateral overlap among sources, the latter among targets. The (many-to-many) configuration, in which sources and targets interact simultaneously, requires conditioning on both sides. The key observation is that the two conditioning operations are independent: source-side conditioning acts only on source documents, target-side conditioning acts only on target documents, and the two document sets are disjoint. Because the operations do not interact, they can be composed without ordering effects.
For a specific source-target pair in an corpus with source set and target set :
-
Compute the source-side residual , as in the framework.
-
Compute the target-side residual , as in the framework.
-
The bilaterally conditioned SCS is
This measures the cosine similarity between the content that is unique to source among all sources and the content that is unique to target among all targets. The numerator captures the lemmas that appear in exactly one source and exactly one target—the exclusive bilateral overlap.
The bilateral decomposition yields three complementary matrices for any corpus:
-
: source-conditioned (the view), measuring how much of each source's unique content aligns with each target.
-
: target-conditioned (the view), measuring how much of each target's unique content aligns with each source.
-
: bilaterally conditioned, measuring the overlap between source-unique and target-unique content.
Comparing the three matrices entry by entry reveals how each side of the boundary contributes to or attenuates the observed similarity. A high paired with a low indicates that what source uniquely contributes to target is content that target shares with other targets—the uniqueness is one-sided. Bilateral conditioning is more restrictive than either unilateral case: both residuals are subsets of the original documents, so entries will generally be lower and, for some pairs, may approach zero. This is a feature of the measure: it identifies genuinely exclusive source-target relationships, filtering out content that is laterally shared on either side.
All four contributions carry over to the bilateral case, with lateral and vertical classes defined on both sides of the source-target boundary simultaneously.
8.5 Completeness of the cardinality spectrum
Together with the case—which is the established, unconditioned pairwise STS—the , , and configurations exhaust the document cardinality landscape. SCS thus provides a complete family of conditional similarity measures for all multi-document configurations, unified by the same set-theoretic conditioning mechanism and preserving all four contributions across the spectrum.
9 Synthetic Demonstration
This section provides a self-contained numerical demonstration of SCS on synthetic data. The demonstration uses single-letter lemmas to make every set operation visible, and is fully reproducible from the accompanying Python script (seed 5663).
9.1 Setup
Three source documents and one target are represented as ordered lemma sets over the alphabet :
9.2 Unconditioned pairwise STS
The standard cosine similarities between each source and the target are:
The unconditioned ranking is . On pairwise STS alone, and contribute equally to the target.
9.3 Lateral structure
The inter-source overlaps reveal a confound:
Sources and share six of their eight-to-ten lemmas. Of the three lemmas in , two ( and ) also belong to . The unconditioned score therefore counts content that shares with , conflating shared lateral vocabulary with genuinely unique contribution.
9.4 SCS scores
Table 3 reports all six SCS scores for the configuration, computed via Equation 19. Each row shows the lateral shared context , the reference residual , the target residual , their overlap, and the resulting score.
| SCS | Overlap | Score | |||
|---|---|---|---|---|---|
| SCS | 0.204 | ||||
| SCS | 0.375 | ||||
| SCS | 0.289 | ||||
| SCS | 0.338 | ||||
| SCS | 0.433 | ||||
| SCS | 0.338 |
Table 3: SCS scores for the synthetic demonstration.
9.5 Asymmetry
All three role-swap pairs illustrate that asymmetry is contingent. It may or may not hold depending on the composition of the document sets:
The third pair happens to be symmetric because and both residuals contribute exactly two matching lemmas to the same target residual , so the numerators and denominators coincide. Such coincidences are not guaranteed: the asymmetry result (Section 6.9) states that in general, not that it holds for every triple.
9.6 Ranking reversal
The average conditional scores and the resulting ranking are:
| STS ranking | SCS ranking | |
|---|---|---|
| 1st | (0.375) | (0.386) |
| 2nd | (0.375) | (0.313) |
| 3rd | (0.335) | (0.290) |
The conditioning operation reverses the top of the ranking. The mechanism is transparent: 's unconditioned similarity to was inflated by the lemmas and , which shares with . Once this lateral overlap is subtracted, 's residual contribution to drops. , by contrast, shares little with the other sources (, ), so its overlap with is almost entirely its own. The conditioning operation confirms this by ranking first: it is the source whose content in the target is least attributable to vocabulary shared with other sources.
This is exactly the confound that motivates SCS: when sources share substantial lateral vocabulary, unconditioned STS cannot distinguish a source that contributes uniquely from one that merely shares the common pool. SCS resolves the confound by subtracting the shared pool before measuring alignment.
9.7 Vertical role reversal: the case
The same four sets can demonstrate the case by reassigning roles. Let serve as the single source , and let the remaining sets become three targets: , , . The analytical question reverses: not “which source contributed most uniquely to the target?” but “which target uniquely received the most from the source?”
The unconditioned scores are:
giving the unconditioned ranking .
The lateral overlaps are now among targets: , , —moderately balanced, unlike the heavily skewed source-side overlaps in the case.
Table 4 reports the six SCS scores, computed via the role-reversed formula of Section 8.3.
| SCS(S,R | C) | Overlap | Score | |||
|---|---|---|---|---|---|
| SCS(S,T_1 | T_2) | {a,p,t} | {f,m,q,w,y} | 9 letters | {f,m,q,w,y} | 0.745 |
| SCS(S,T_1 | T_3) | {m,p,w} | {a,f,q,t,y} | 8 letters | {a,f,q,y} | 0.632 |
| SCS(S,T_2 | T_1) | {a,p,t} | {c,i,j,l,o} | 9 letters | {o} | 0.149 |
| SCS(S,T_2 | T_3) | {c,i,p} | {a,j,l,o,t} | 10 letters | {a,o} | 0.283 |
| SCS(S,T_3 | T_1) | {m,p,w} | {b,c,d,h,i} | 8 letters | {b} | 0.158 |
| SCS(S,T_3 | T_2) | {c,i,p} | {b,d,h,m,w} | 10 letters | {b,m,w} | 0.424 |
Table 4: SCS scores for the demonstration (vertical role reversal).
The average scores are , , , preserving the ranking . In this instance the conditioning does not reverse the ranking, but the asymmetry is striking: versus . Almost all of 's residual content (after removing what it shares with ) aligns with , while almost none of 's residual content does. This is the analogue of the source-side confound: genuinely received the most from , and conditioning on other targets confirms rather than overturns that finding.
9.8 Bilateral conditioning: the case
The bilateral case requires conditioning on both sides of the source-target boundary simultaneously. Using and as the two sources and and as the two targets (relabeled and ), the source-side lateral overlap is and the target-side lateral overlap is .
The source and target residuals are:
(2 letters)
(5 letters)
Source-conditioned matrix . Each entry conditions only on sources, using the formula with the source residuals and . The target enters unconditioned but with the source lateral overlap removed.
| Entry | Overlap | Score | ||
|---|---|---|---|---|
| (4) | (7) | (1) | 0.189 | |
| (4) | (6) | (1) | 0.204 | |
| (2) | (7) | (2) | 0.535 | |
| (2) | (6) | (1) | 0.289 |
Table 5: Source-conditioned matrix for the bilateral demonstration.
Target-conditioned matrix . Each entry conditions only on targets, using the formula with the target residuals and . The source enters unconditioned but with the target lateral overlap removed.
| Entry | Overlap | Score | ||
|---|---|---|---|---|
| (5) | (10) | (2) | 0.283 | |
| (5) | (10) | (3) | 0.424 | |
| (5) | (7) | (2) | 0.338 | |
| (5) | (7) | (2) | 0.338 |
Table 6: Target-conditioned matrix for the bilateral demonstration.
Bilaterally conditioned matrix . Each entry uses both the source and target residuals simultaneously.
Summary comparison. Table 8 compares the unconditioned STS matrix with the three conditioned matrices defined in Section 8.4: source-conditioned , target-conditioned , and bilaterally conditioned .
The most revealing entry is . Sources and have an unconditioned STS of 0.375, a source-conditioned score of 0.289, and a target-conditioned score of 0.338—yet their bilateral score is zero. The reason is visible in the residuals: and , which share no letters at all. Everything
| Entry | Overlap | Score | ||
|---|---|---|---|---|
| (4) | (5) | (1) | 0.224 | |
| (4) | (5) | (1) | 0.224 | |
| (2) | (5) | (1) | 0.316 | |
| (2) | (5) | (0) | 0.000 |
Table 7: Bilaterally conditioned matrix for the bilateral demonstration.
| Pair | STS | |||
|---|---|---|---|---|
| 0.224 | 0.189 | 0.283 | 0.224 | |
| 0.335 | 0.204 | 0.424 | 0.224 | |
| 0.375 | 0.535 | 0.338 | 0.316 | |
| 0.375 | 0.289 | 0.338 | 0.000 |
Table 8: Four-matrix comparison for the bilateral demonstration. : source-conditioned; : target-conditioned; : bilaterally conditioned.
contributes to is content that shares with or that shares with (or both). Bilateral conditioning strips away both lateral pools, revealing that the link is entirely parasitic on shared vocabulary.
A noteworthy property of the bilateral case is that is not bounded above by . For instance, . This occurs because cosine normalization divides by : when bilateral conditioning reduces the target residual from 8 to 5 letters without reducing the 1-letter overlap, the smaller denominator ( versus ) pushes the score up. The residual sets are subsets of the originals; the cosine scores need not be.
10 Related Work and Positioning
10.1 Tversky’s contrast model and the asymmetry of similarity
Tversky (1977) challenged the then-dominant geometric models of similarity by arguing that similarity judgments are better explained as a feature-matching process than as a distance in metric space. His contrast model defines similarity as a linear combination of the measures of common and distinctive features:
where and are the feature sets of the two stimuli, is a monotone set function, and , , are non-negative weights. The central empirical finding is that subjects weight distinctive features asymmetrically: a prominent stimulus used as the referent contributes more weight to the “” term than when the roles are reversed, so that —a direct violation of the symmetry axiom that metric-space similarity theories presuppose.
SCS shares two of Tversky’s premises and departs on a third. Both frameworks (i) decompose similarity into shared and distinctive components and (ii) predict asymmetry as a structural consequence of that decomposition. The departure is in the source of asymmetry. In the contrast model, asymmetry arises from differential weighting of two-way distinctive features—the same sets receive different coefficients depending on which stimulus is the referent. In SCS, asymmetry arises from differential content: the conditioning operation produces different residual sets when the roles of reference and conditioning document are exchanged (Section 6.9), and the similarity function applied to those residuals is itself symmetric.
The contrast model operates on pairs and introduces asymmetry through weighting; SCS operates on triples and introduces asymmetry through conditioning. Tversky's insight that similarity need not be symmetric is the intellectual ancestor; SCS provides a mechanism by which asymmetry emerges without free parameters, from the set-theoretic structure of a multi-document configuration.
10.2 Conditional similarity: from vision to language
The insight that a single unconditional notion of similarity is insufficient when multiple aspects of resemblance coexist was first formalized in computer vision. Veit et al. (2017) introduced Conditional Similarity Networks (CSNs), which learn disentangled embedding subspaces, each capturing a different aspect of image similarity (e.g., color, shape, category); a learned mask selects the relevant subspace for a given condition. Shi et al. (2025) extended this framework to the weakly supervised setting, where the condition label for each comparison is unknown and must be inferred via semantic matching. In these vision approaches, the condition selects which similarity function to apply; in SCS, a single similarity function operates on inputs whose lexical content has been modified by set-theoretic operations with the conditioning document.
In NLP, Deshpande et al. (2023) introduced Conditional Semantic Textual Similarity (C-STS) at EMNLP 2023, proposing a task in which the similarity between two sentences is evaluated with respect to a natural-language condition describing an aspect of interest. Subsequent work extended C-STS along architectural and training dimensions: Zhang et al. (2026) proposed Condition-Aware Sentence Embeddings (CASE); Song et al. (2025) proposed PoLi-RL; Liu et al. (2025) proposed a conditional contrastive learning framework; and earlier contributions include Li et al. (2024), Zhang et al. (2025), Tu et al. (2024), and Yamada and Zhang (2025). Despite the shared use of the term “conditional,” SCS and the C-STS family are fundamentally different operations. The distinction is best understood through three progressively deeper structural viewpoints.
Distinction 1: Scope. The entire C-STS line of research operates at the sentence level with pairwise comparison. SCS operates at the document level with three or more documents simultaneously in an configuration. The shift from pairwise comparison to multi-document decomposition changes the structure of the problem from evaluating a single relationship to decomposing a system of relationships.
Distinction 2: Conditioning mechanism. In C-STS and all its descendants, the condition is a compound noun phrase that names a semantic attribute of the entities described in the sentences (e.g., “the color of the object”). This is intra-document conditioning: the condition directs attention to aspects internal to the documents being compared. In SCS, the condition is another document whose lexical intersection with the document under analysis is operationally subtracted. This is inter-document conditioning: the condition is a concrete textual entity whose shared content is removed.
to isolate what remains. The CASE subtraction operation—subtracting the unconditional condition embedding—is a noteworthy parallel: both CASE and SCS employ an “eliminate-then-compare” strategy, but they eliminate different things for different reasons.
Distinction 3: Partitioning. C-STS produces similarity scores on a continuous Likert scale (1–5) with no principled boundary between similar and dissimilar. The standard evaluation metric—Spearman rank correlation—sidesteps the partitioning question. SCS operates through set operations that produce a lexical decomposition requiring no threshold. A lemma is either in the intersection or it is not. This is a direct consequence of Contrast 2: precisely because SCS conditions via set operations, it can partition without thresholds.
Mathematical consequences. The cumulative structural differences produce two mathematical properties absent from C-STS: directionality (Section 3.2) and asymmetry (Section 6.9). C-STS preserves symmetry.
Complementarity. The two frameworks address different questions: C-STS asks “similar in what respect?”; SCS asks “similar after removing what?” Whether they can be composed in a single pipeline—applying SCS-style subtraction first to isolate marginal content, then C-STS-style aspect selection to evaluate the residual—remains an open question, since the two operate at different granularities (sentence vs. document) and use fundamentally different conditioning mechanisms (intra- vs. inter-document).
10.3 Positioning with respect to the duality of similarity and metric spaces
Rozinek and Mareš (2021) established a rigorous set-theoretic foundation for the relationship between similarity and distance, deriving generally valid conversion relations and showing that measures such as Jaccard, Tanimoto, Steinhaus, and others satisfy a unified axiom system.
SCS accepts and builds upon this set-theoretic foundation. However, SCS reveals that the metric space axioms—which Rozinek and Mareš inherit and preserve throughout—function not merely as structural guarantees but also as constraints that limit the expressiveness of the formalism. The symmetry axiom encodes a substantive assumption that the similarity between two documents is independent of which document is taken as the reference. In their unified theory, this assumption is never relaxed, and consequently the framework characterizes only the unconditional, symmetric case.
SCS demonstrates, by construction, that this assumption becomes untenable in multi-document settings where documents occupy role-differentiated positions. The conditioning operation—fully compatible with the foundations of Rozinek and Mareš—produces role-induced asymmetry (Section 6.9) without relaxing the similarity function itself.
Symmetry is an appropriate axiom for unordered-pair similarity. It limits what the formalism can express when documents occupy distinct roles. SCS extends the domain to ordered, conditioned triples in which role assignment changes the residualized inputs, identifying a class of conditional relationships that symmetric axioms do not reach. This does not invalidate symmetric similarity spaces; Rozinek and Mareš unified one side of the story; SCS opens the other.
10.4 Comparative document analysis
The decomposition of document content into shared and unique components has precedent in comparative document analysis, where it serves summarization rather than similarity measurement. Mani and Bloedorn (1999) proposed a graph-based approach using spreading activation to separate common from unique concepts across related documents, enabling summaries that highlight both similarities and differences. Ren et al. (2017) extended this direction at scale, decomposing documents into shared and unique phrase sets for contrastive summarization of large text corpora. Both lines of work recognize the same structural insight that underlies SCS—that the relationship between documents is richer than a single scalar score can express, and that separating shared from unique content is analytically productive. However, they apply the decomposition to generate text (summaries of similarities and differences), whereas SCS applies it to measure similarity (a conditional score that isolates marginal contribution). The shared/unique decomposition is the common substrate; the downstream task distinguishes the two research programs.
11 Discussion
11.1 Symmetry as a constraint on understanding
As Section 6.9 demonstrated, the role-induced asymmetry of SCS arises from the inputs, not the function. The pairwise symmetry axiom is therefore not a flaw in classical STS but a faithful reflection of the pairwise setting; it becomes a constraint only when the comparison domain extends to role-differentiated configurations.
A related open question is whether SCS's inter-document conditioning and C-STS's intra-document conditioning (Section 10.2) can be composed, given their differences in granularity and mechanism.
11.2 Term frequency and the conditioning mechanism
In traditional unconditioned pairwise STS, term frequency exerts a systematic influence on similarity scores. High-frequency domain terms—words that recur across most documents in a given field—contribute disproportionately to every pairwise comparison, inflating all scores and obscuring the differential alignment that is often the object of inquiry. In the motivating application of this paper, foundational ethical vocabulary such as “harm,” “fairness,” “transparency,” and “accountability” pervades all source theories; their shared presence elevates every theory’s similarity to any target text, regardless of whether the alignment reflects a genuine unique contribution.
Term Frequency-Inverse Document Frequency (TF-IDF) weighting is the standard remedy: it downweights terms that are frequent across a corpus and amplifies rare, distinctive ones. However, TF-IDF operates on corpus-wide distributional statistics—inverse document frequency is a property of the term's prevalence across all documents in the collection, not of its role in the specific comparison at hand. A term that is rare corpus-wide but happens to be shared by both the reference and the conditioning document still receives a high IDF weight, even though it carries no differentiating information for the triple under analysis.
SCS addresses the same confound through a fundamentally different mechanism. Rather than reweighting shared terms, it removes them: the conditioning operation sub-tracts the lateral shared context from both the reference and the target before similarity is computed. The high-frequency domain terms that inflate traditional STS scores are precisely the ones most likely to appear in multiple source documents and therefore to fall into the intersection that conditioning eliminates. What remains in the residual sets and are the lower-frequency, distinctive terms that carry the actual differentiating signal—the terms that TF-IDF weighting would amplify but cannot isolate from the shared context.
The two approaches are complementary rather than competing. Frequency weighting adjusts the magnitude of each term's contribution; SCS conditioning adjusts the membership of the term sets entering the comparison. A hybrid approach—applying TF-IDF weighting to the residual sets after conditioning—would combine set-theoretic removal of shared context with distributional reweighting of the remaining terms. However, such an extension would replace the binary indicator vectors with real-valued vectors, and the clean set-cardinality expressions of Definition 6.3 and Equation 19 would no longer hold. The trade-off between the interpretive transparency of binary representation and the potential discriminative gain of frequency weighting is an empirical question for future work.
11.3 Scope and limitations
Several limitations should be acknowledged. Binary vectorization discards frequency information, a design choice whose rationale and trade-offs are discussed in Section 11.2; extension to TF-IDF weighting is algebraically straightforward but may affect the asymmetry result. The quality of the decomposition depends on the quality of the lemmatization. An alternative using dense embeddings rather than sparse binary vectors would capture semantic similarity beyond lexical co-occurrence but would sacrifice threshold-free partitioning.
The set-theoretic operations that underlie SCS place implicit requirements on the documents to which it is applied. “Because conditioning subtracts the intersection of two lemma sets before computing cosine similarity on the residual, documents must be long enough to produce dense, stable term-frequency estimates; very short texts (a single sentence or a tweet) yield sparse vectors whose residuals are dominated by noise.
In practice, documents of at least several hundred words—and ideally one thousand or more—provide a reliable substrate for the intersection and subtraction steps. Equally important is the degree of thematic overlap among documents in the corpus: if two documents share almost all of their vocabulary, conditioning removes nearly everything and the residual collapses toward zero; if they share almost nothing, conditioning removes nothing and SCS reduces to ordinary STS. The method is therefore most informative in the middle ground—corpora whose documents share partial thematic overlap yet retain substantial unique content.
Domains that naturally exhibit this structure include regulatory and legal texts addressing related topics, academic papers within a subfield, news coverage of the same event from multiple outlets, and corporate reports from the same industry. The synthetic letter-set demonstrations in Section 9 were designed to make the set-theoretic mechanics transparent; validating the framework on natural-language corpora with the properties described above is a natural direction for future work.
11.4 Future directions
SCS was motivated by ethical influence analysis but is domain-agnostic. The four cardinality configurations suggest natural applications: for legal precedent analysis and patent prior-art retrieval, where multiple source documents are compared against a single target; for tracing a single source's differential reach across multiple targets, as in statutory influence; and for settings where both sides are plural, such as policy diffusion across jurisdictions or literary intertextuality. Testing generalizability across these domains and configurations is a primary empirical direction.
At large k or , clustering of the SCS score matrices may identify groups of documents with similar contribution profiles; the threshold for viability is an open empirical question. A hybrid approach using set-theoretic conditioning to define subsets, then computing similarity via transformer-based embeddings of those subsets, could combine the set-theoretic advantages of SCS with the semantic depth of contextual embeddings.
12 Conclusion
This paper introduced Semantic Conditional Similarity (SCS), a conditional form of STS in which the similarity between two documents is computed after eliminating semantic elements shared with a third document. SCS makes four contributions: it introduces the concept of directionality to semantic similarity; it demonstrates that extending the comparison domain to ordered, conditioned triples induces role-dependent asymmetry as a mathematical consequence; it introduces inter-document conditioning as a complement to the intra-document conditioning of C-STS; and it achieves threshold-free partitioning through set-theoretic operations. Although developed for the configuration, the framework extends to the case through a vertical role reversal and to the case through the independent composition of source-side and target-side conditioning. Because the two conditioning operations act on disjoint document sets, they compose without interaction, and all four contributions carry over to the bilateral case. Together with the established case, SCS thus provides a complete family of conditional similarity measures covering the full document cardinality landscape.
SCS scores should be interpreted ordinally—as providing an ordering of marginal contributions—rather than as absolute measurements. Natural language is inherently ambiguous and vague; any procedure that maps it to a real-valued similarity score performs a substantial reduction, compressing contextual, pragmatic, and connotative dimensions into a single number. Because SCS rankings depend only on the order of the scores, not on their exact magnitudes, they are robust to monotone distortions of the scale—making the ranking valid even when the binary indicator vectors provide only an approximate numerical representation. Rankings ask only that the mapping preserve order, not magnitude, and are thus the epistemologically appropriate level of interpretation for a framework built on set-cardinality proxies for semantic content.
The broader implication is that the metric space axioms commonly assumed in similarity formalizations are not neutral structural scaffolding but substantive claims about the nature of the relationships being modeled. When the application domain involves role differentiation among documents, the pairwise symmetric framework suppresses information that an extended, conditioned comparison domain can recover. SCS makes this visible, and in doing so, opens a side of the similarity-distance duality that the symmetric, unconditional case leaves closed.
Acknowledgments
The author thanks Prof. Mehmet Nafiz Aydin for supervision of the doctoral research from which this work derives. The author is particularly grateful to Assoc. Prof. Emrullah Fatih Yetkin for emphasizing the importance of theoretical grounding and validation during the progression of the doctoral research. The author also thanks the members of the doctoral jury for their examination and feedback during the defense.
Ethics Statement
This work is purely theoretical and mathematical: it introduces formal definitions, theorems, and proofs within the framework of set-theoretic similarity analysis. Neither human subjects, nor information about individuals, groups, or organizations are used.
Data Availability Statement
This paper presents a theoretical mathematical framework and contains neither empirical nor external datasets. The synthetic demonstration in Section 9 uses randomly generated letter sets (Python, seed 5663).
References
Eneko Agirre, Daniel Cer, Mona Diab, and Aitor Gonzalez-Agirre. 2012. SemEval-2012 task 6: A pilot on semantic textual similarity. In Proceedings of the First Joint Conference on Lexical and Computational Semantics (SEM 2012) and the Sixth International Workshop on Semantic Evaluation (SemEval 2012), pages 385–393. Association for Computational Linguistics.
Mehmet Murat Albayrakoglu and Mehmet N. Aydın. 2022. Influence of different theories of ethics on organizational codes of conduct or ethics: A comparative semantic analysis. Journal of Research in Business, 7(IMISC 2021 Special Issue):33–47.
Mehmet Murat Albayrakoglu and Mehmet N. Aydın. 2026. Semantic alignment between normative theories of ethics and the European Union Artificial Intelligence Act: A transformer-based semantic textual similarity analysis. arXiv preprint arXiv:2601.13372.
Ameet Deshpande, Carlos E. Jimenez, Howard Chen, Vishvak Murahari, Victoria Graf, Tanmay Rajpurohit, Ashwin Kalyan, Danqi Chen, and Karthik Narasimhan. 2023. C-STS: Conditional semantic textual similarity. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing (EMNLP 2023), pages 5669–5690. Association for Computational Linguistics.
Peter Gärdenfors. 2000. Conceptual Spaces: The Geometry of Thought. MIT Press.
Theo M. Janssen. 2012. Compositionality: Its historic context. In M. Werning, W. Hinzen, and E. Machery, editors, The Oxford Handbook of Compositionality, pages 19–46. Oxford University Press.
Baixuan Li, Yunlong Fan, and Zhiqiang Gao. 2024. SEAVER: Attention reallocation for mitigating distractions in language models for conditional semantic textual similarity measurement. In Findings of the Association for Computational Linguistics: EMNLP 2024, pages 78–95. Association for Computational Linguistics.
Xinyue Liu, Zeyang Qin, Zeyu Wang, Wenxin Liang, Linlin Zong, and Bo Xu. 2025. Conditional semantic textual similarity via conditional contrastive learning. In Proceedings of the 31st International Conference on Computational Linguistics (COLING 2025), pages 4548–4560. Association for Computational Linguistics.
Inderjeet Mani and Eric Bloedorn. 1999. Summarizing similarities and differences among related documents. Information Retrieval, 1(1-2):35–67.
Christopher D. Manning, Prabhakar Raghavan, and Hinrich Schütze. 2008. Introduction to Information Retrieval. Cambridge University Press, Cambridge.
Barbara H. Partee. 1984. Compositionality. In F. Landman and F. Veltman, editors, Varieties of Formal Semantics. Foris Publications.
Xiang Ren, Jialu Liu, Xiao Yu, Urvashi Khandelwal, Quanquan Gu, Lidan Wang, and Jiawei Han. 2017. Comparative document analysis for large text corpora. In Proceedings of the Tenth ACM International Conference on Web Search and Data Mining (WSDM '17), pages 325–334. ACM.
Ondrej Rozinek and Jan Mareš. 2021. The duality of similarity and metric spaces. Applied Sciences, 11(4):1910.
Yi Shi, Rui-Xiang Li, Le Gan, De-Chuan Zhan, and Han-Jia Ye. 2025. Generalized conditional similarity learning via semantic matching. IEEE Transactions on Pattern Analysis and Machine Intelligence, 47(5):3847–3862.
Zixin Song, Bowen Zhang, Qian-Wen Zhang, Di Yin, Xing Sun, and Chunping Li. 2025. PoLi-RL: A point-to-list reinforcement learning framework for conditional semantic textual similarity. Preprint, arXiv:2510.04080.
Zoltán Gendler Szabó. 2024. Compositionality. In The Stanford Encyclopedia of Philosophy, edited by Edward N. Zalta and Uri Nodelman, Fall 2024 Edition.
Jingxuan Tu, Keer Xu, Liulu Yue, Bingyang Ye, Kyeongmin Rim, and James Pustejovsky. 2024. Linguistically conditioned semantic textual similarity. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1161–1172. Association for Computational Linguistics.
Amos Tversky. 1977. Features of similarity. Psychological Review, 84(4):327–352.
Andreas Veit, Serge Belongie, and Theofanis Karaletsos. 2017. Conditional similarity networks. In 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1781–1789. IEEE.
Kosuke Yamada and Peinan Zhang. 2025. Out-of-the-box conditional text embeddings from large language models. Preprint, arXiv:2504.16411.
Gaifan Zhang, Yi Zhou, and Danushka Bollegala. 2025. Annotating training data for conditional semantic textual similarity measurement using large language models. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing (EMNLP 2025), pages 27015–27027. Association for Computational Linguistics.
Gaifan Zhang, Yi Zhou, and Danushka Bollegala. 2026. CASE – condition-aware sentence embeddings for conditional semantic textual similarity measurement. In Proceedings of the 19th Conference of the European Chapter of the Association for Computational Linguistics (EACL 2026), Volume 1: Long Papers, pages 4954–4968. Association for Computational Linguistics.

Figure 6: Computational pipeline for Semantic Conditional Similarity (SCS). Source documents are read, lemmatized, and converted to ordered sets (Definition 5.1). For each ordered source pair , setting and , intersection and complement operations produce the residual sets and (Definition 6.2). Cosine similarity on the binary indicator vectors of these residuals reduces to set-cardinality expressions (Equation 19). The nested loop over all ordered pairs yields scores, which are sorted to produce the final ranked profile.