Papers
Topics
Authors
Recent
Search
2000 character limit reached

Weighted Set-Disagreement Metric

Updated 3 July 2026
  • Weighted set-disagreement metric is a normalized measure that replaces raw cardinality with a weighted sum, capturing dissimilarity between set pairs.
  • It generalizes classical set distances like the Jaccard index and bag-difference metrics by employing weighted Hamming cubes and embedding within a metric-geometric framework.
  • The metric satisfies all metric axioms, offers a probabilistic interpretation through total variation distance, and enables efficient computation for applications in data analysis.

The weighted set-disagreement metric is a weighted dissimilarity on subsets of a finite universe that replaces raw cardinality by a weight-sum functional. In the formulation of the general weighted set-metric family, let UU be a finite universe, let w:UR>0w:U\to\mathbb{R}_{>0} be a fixed weight function, and write W(A)=iAw(i)W(A)=\sum_{i\in A}w(i). The weighted set-disagreement metric is usually the normalized p=1p=1 case,

d~w,1(A,B)=W(AΔB)W(AB)=1W(AB)W(AB),\tilde d_{w,1}(A,B)=\frac{W(A\Delta B)}{W(A\cup B)} =1-\frac{W(A\cap B)}{W(A\cup B)},

with AΔB=(AB)(BA)A\Delta B=(A\setminus B)\cup(B\setminus A); the associated unnormalized form is dw,1(A,B)=W(AΔB)d_{w,1}(A,B)=W(A\Delta B) (Yang et al., 2016). On weighted Hamming cubes, the same disagreement quantity is equivalently the weighted 1\ell^1 distance between characteristic vectors, which places it in a well-developed metric-geometric framework (Doust et al., 2024).

1. Definition and basic notation

Let UU be finite and let

w:UR>0w:U\longrightarrow \mathbb{R}_{>0}

be fixed. For any subset w:UR>0w:U\to\mathbb{R}_{>0}0, its total weight is

w:UR>0w:U\to\mathbb{R}_{>0}1

The weighted set-metric family described in (Yang et al., 2016) introduces, for w:UR>0w:U\to\mathbb{R}_{>0}2, two versions: w:UR>0w:U\to\mathbb{R}_{>0}3 and

w:UR>0w:U\to\mathbb{R}_{>0}4

Within this family, “weighted set-disagreement” usually denotes the normalized w:UR>0w:U\to\mathbb{R}_{>0}5 case: w:UR>0w:U\to\mathbb{R}_{>0}6 The unnormalized w:UR>0w:U\to\mathbb{R}_{>0}7 quantity is

w:UR>0w:U\to\mathbb{R}_{>0}8

These formulas recover the unweighted set metrics when w:UR>0w:U\to\mathbb{R}_{>0}9, so that W(A)=iAw(i)W(A)=\sum_{i\in A}w(i)0 (Yang et al., 2016).

The terminology is not entirely uniform across the literature. In the set-metric framework of (Yang et al., 2016), “weighted set-disagreement” usually means the normalized W(A)=iAw(i)W(A)=\sum_{i\in A}w(i)1 case, whereas Doust–Weston define the weighted disagreement distance on W(A)=iAw(i)W(A)=\sum_{i\in A}w(i)2 by the unnormalized expression

W(A)=iAw(i)W(A)=\sum_{i\in A}w(i)3

for a fixed list of positive weights W(A)=iAw(i)W(A)=\sum_{i\in A}w(i)4 (Doust et al., 2024). Both usages are standard within their respective contexts.

2. Metric structure

For W(A)=iAw(i)W(A)=\sum_{i\in A}w(i)5, both W(A)=iAw(i)W(A)=\sum_{i\in A}w(i)6 and W(A)=iAw(i)W(A)=\sum_{i\in A}w(i)7 satisfy the metric axioms. The proof in (Yang et al., 2016) proceeds through four properties. Non-negativity is immediate because all weight sums are nonnegative. Symmetry follows from swapping W(A)=iAw(i)W(A)=\sum_{i\in A}w(i)8 and W(A)=iAw(i)W(A)=\sum_{i\in A}w(i)9, which interchanges p=1p=10 and p=1p=11. Identity of indiscernibles follows from

p=1p=12

and similarly for the normalized metric.

The triangle inequality uses the scalar Minkowski inequality on the two-vector

p=1p=13

together with the set-theoretic inclusion

p=1p=14

and the corresponding subadditivity of p=1p=15 on unions of disjoint sets. For the normalized version one additionally shows

p=1p=16

so that the usual divide-through argument preserves the inequality (Yang et al., 2016).

On weighted Hamming cubes, the same structure admits a more geometric proof. Identifying each subset p=1p=17 with its characteristic vector p=1p=18, one has

p=1p=19

Triangle inequality and symmetry are then immediate from the fact that d~w,1(A,B)=W(AΔB)W(AB)=1W(AB)W(AB),\tilde d_{w,1}(A,B)=\frac{W(A\Delta B)}{W(A\cup B)} =1-\frac{W(A\cap B)}{W(A\cup B)},0 is a weighted d~w,1(A,B)=W(AΔB)W(AB)=1W(AB)W(AB),\tilde d_{w,1}(A,B)=\frac{W(A\Delta B)}{W(A\cup B)} =1-\frac{W(A\cap B)}{W(A\cup B)},1-norm on d~w,1(A,B)=W(AΔB)W(AB)=1W(AB)W(AB),\tilde d_{w,1}(A,B)=\frac{W(A\Delta B)}{W(A\cup B)} =1-\frac{W(A\cap B)}{W(A\cup B)},2 (Doust et al., 2024).

3. Special cases, limits, and neighboring set metrics

The weighted set-disagreement metric unifies several familiar set distances. Setting d~w,1(A,B)=W(AΔB)W(AB)=1W(AB)W(AB),\tilde d_{w,1}(A,B)=\frac{W(A\Delta B)}{W(A\cup B)} =1-\frac{W(A\cap B)}{W(A\cup B)},3 yields the unnormalized weighted symmetric-difference measure

d~w,1(A,B)=W(AΔB)W(AB)=1W(AB)W(AB),\tilde d_{w,1}(A,B)=\frac{W(A\Delta B)}{W(A\cup B)} =1-\frac{W(A\cap B)}{W(A\cup B)},4

Its normalized form is the weighted Jaccard distance,

d~w,1(A,B)=W(AΔB)W(AB)=1W(AB)W(AB),\tilde d_{w,1}(A,B)=\frac{W(A\Delta B)}{W(A\cup B)} =1-\frac{W(A\cap B)}{W(A\cup B)},5

If the weights are uniform, d~w,1(A,B)=W(AΔB)W(AB)=1W(AB)W(AB),\tilde d_{w,1}(A,B)=\frac{W(A\Delta B)}{W(A\cup B)} =1-\frac{W(A\cap B)}{W(A\cup B)},6, then

d~w,1(A,B)=W(AΔB)W(AB)=1W(AB)W(AB),\tilde d_{w,1}(A,B)=\frac{W(A\Delta B)}{W(A\cup B)} =1-\frac{W(A\cap B)}{W(A\cup B)},7

which is the classical Jaccard distance (Yang et al., 2016).

At the opposite end of the d~w,1(A,B)=W(AΔB)W(AB)=1W(AB)W(AB),\tilde d_{w,1}(A,B)=\frac{W(A\Delta B)}{W(A\cup B)} =1-\frac{W(A\cap B)}{W(A\cup B)},8-family, letting d~w,1(A,B)=W(AΔB)W(AB)=1W(AB)W(AB),\tilde d_{w,1}(A,B)=\frac{W(A\Delta B)}{W(A\cup B)} =1-\frac{W(A\cap B)}{W(A\cup B)},9 in the normalized weighted metric yields the weighted bag-distance: AΔB=(AB)(BA)A\Delta B=(A\setminus B)\cup(B\setminus A)0 For uniform weights this becomes

AΔB=(AB)(BA)A\Delta B=(A\setminus B)\cup(B\setminus A)1

Thus the same formalism contains both Jaccard-type and bag-type behavior (Yang et al., 2016).

A broader neighboring literature studies set metrics built from pairwise distances in an ambient metric space. For non-empty finite subsets AΔB=(AB)(BA)A\Delta B=(A\setminus B)\cup(B\setminus A)2 of a metric space AΔB=(AB)(BA)A\Delta B=(A\setminus B)\cup(B\setminus A)3, (Fujita, 2011) defines an average-distance metric AΔB=(AB)(BA)A\Delta B=(A\setminus B)\cup(B\setminus A)4 and its weighted analogue AΔB=(AB)(BA)A\Delta B=(A\setminus B)\cup(B\setminus A)5, where each point AΔB=(AB)(BA)A\Delta B=(A\setminus B)\cup(B\setminus A)6 carries a nonnegative weight AΔB=(AB)(BA)A\Delta B=(A\setminus B)\cup(B\setminus A)7 with positive total weight on each set of interest. In that setting, when AΔB=(AB)(BA)A\Delta B=(A\setminus B)\cup(B\setminus A)8 is the discrete metric and all AΔB=(AB)(BA)A\Delta B=(A\setminus B)\cup(B\setminus A)9, the unweighted dw,1(A,B)=W(AΔB)d_{w,1}(A,B)=W(A\Delta B)0 collapses exactly to the Jaccard distance. By replacing the simple average in the corresponding constructions with a weighted power-mean of distances, one recovers as extremal cases the Hausdorff metric and intermediate “soft” metrics (Fujita, 2011). This suggests a broader continuum in which disagreement metrics, average-distance metrics, and Hausdorff-type metrics can be studied within related set-metric programs.

4. Relations to probability metrics and dw,1(A,B)=W(AΔB)d_{w,1}(A,B)=W(A\Delta B)1-divergences

When the weights form a probability distribution on dw,1(A,B)=W(AΔB)d_{w,1}(A,B)=W(A\Delta B)2, so that

dw,1(A,B)=W(AΔB)d_{w,1}(A,B)=W(A\Delta B)3

the unnormalized dw,1(A,B)=W(AΔB)d_{w,1}(A,B)=W(A\Delta B)4 disagreement distance has an explicit probabilistic interpretation. If dw,1(A,B)=W(AΔB)d_{w,1}(A,B)=W(A\Delta B)5 and dw,1(A,B)=W(AΔB)d_{w,1}(A,B)=W(A\Delta B)6 are the induced distributions on dw,1(A,B)=W(AΔB)d_{w,1}(A,B)=W(A\Delta B)7, with masses dw,1(A,B)=W(AΔB)d_{w,1}(A,B)=W(A\Delta B)8 and similarly for dw,1(A,B)=W(AΔB)d_{w,1}(A,B)=W(A\Delta B)9, then

1\ell^10

This identifies the weighted symmetric-difference mass with twice the total variation distance (Yang et al., 2016).

The same paper records inequalities linking the weighted disagreement metric to classical divergences. By Pinsker’s inequality,

1\ell^11

and one also has

1\ell^12

where 1\ell^13 denotes the Hellinger distance (Yang et al., 2016). These identities and inequalities place the metric in direct relation with the 1\ell^14-divergence literature.

The broader metric class of (Yang et al., 2016) was presented as unifying and generalizing Jaccard and bag distances on sets, Manhattan distance on vector spaces, and Marczewski–Steinhaus distance on integrable functions. The probabilistic interpretation of the set-disagreement case is one instance of that wider unification.

5. Weighted Hamming cubes and metric geometry

Doust–Weston study the weighted disagreement distance on subsets of 1\ell^15 as the metric geometry of subsets of weighted Hamming cubes (Doust et al., 2024). For positive weights 1\ell^16,

1\ell^17

is precisely the weighted 1\ell^18-distance between characteristic vectors. In this form, the metric is of 1-negative type. More explicitly, for any finite family 1\ell^19 and any real coefficients UU0 with UU1,

UU2

Strict 1-negative type on a finite set is equivalent to strict negativity of this quadratic form for every nonzero UU3 with zero sum (Doust et al., 2024).

The same work establishes a hierarchy-collapse theorem for finite subspaces UU4. The following properties are equivalent: affine independence in UU5; nonvanishing determinant of the distance matrix; strict 1-negative type; supremal negative type greater than UU6; maximal generalized roundness greater than UU7; positive 1-negative type gap UU8; and absence of nontrivial 1-polygonal equalities (Doust et al., 2024). In particular, nontrivial 1-polygonal equalities in a weighted Hamming cube arise exactly from affine dependencies among characteristic vectors.

For affinely independent finite subspaces, the paper also derives formulas for algebraic invariants of the distance matrix, including its determinant and cofactor sum, and gives the formula

UU9

for the w:UR>0w:U\longrightarrow \mathbb{R}_{>0}0-constant in the full-dimensional affinely independent case (Doust et al., 2024). These results connect the weighted set-disagreement metric to negative-type geometry, finite metric embeddings, and quadratic-form optimization.

6. Computation and a worked example

The weighted set-disagreement metric is computationally simple. A naïve computation of w:UR>0w:U\longrightarrow \mathbb{R}_{>0}1 costs w:UR>0w:U\longrightarrow \mathbb{R}_{>0}2 if one scans all of w:UR>0w:U\longrightarrow \mathbb{R}_{>0}3, or w:UR>0w:U\longrightarrow \mathbb{R}_{>0}4 if w:UR>0w:U\longrightarrow \mathbb{R}_{>0}5 and w:UR>0w:U\longrightarrow \mathbb{R}_{>0}6 are stored in hash-sets or sorted lists and w:UR>0w:U\longrightarrow \mathbb{R}_{>0}7 is retrieved in w:UR>0w:U\longrightarrow \mathbb{R}_{>0}8. The additional work for exponentiation is only two w:UR>0w:U\longrightarrow \mathbb{R}_{>0}9th-powers and one w:UR>0w:U\to\mathbb{R}_{>0}00th-root for the unnormalized version, and one more sum for normalization, so the overall cost per pair is linear in the size of the input sets (Yang et al., 2016).

For very large w:UR>0w:U\to\mathbb{R}_{>0}01 or very sparse sets, (Yang et al., 2016) notes that one may pre-index the weights in a segment-tree or Fenwick-tree to support dynamic updates and range-sum queries, although for most static applications a simple hash lookup suffices. Because both w:UR>0w:U\to\mathbb{R}_{>0}02 and w:UR>0w:U\to\mathbb{R}_{>0}03 are true metrics, one can accelerate w:UR>0w:U\to\mathbb{R}_{>0}04-nearest-neighbor search or clustering by using cover-trees, vantage-point trees, or ball trees directly. Approximate nearest-neighbor methods, including locality-sensitive hashing adapted to w:UR>0w:U\to\mathbb{R}_{>0}05, may also benefit when one deregularizes the normalizer in w:UR>0w:U\to\mathbb{R}_{>0}06 (Yang et al., 2016).

A concrete example from (Yang et al., 2016) takes

w:UR>0w:U\to\mathbb{R}_{>0}07

with

w:UR>0w:U\to\mathbb{R}_{>0}08

Then

w:UR>0w:U\to\mathbb{R}_{>0}09

so that

w:UR>0w:U\to\mathbb{R}_{>0}10

For w:UR>0w:U\to\mathbb{R}_{>0}11,

w:UR>0w:U\to\mathbb{R}_{>0}12

For w:UR>0w:U\to\mathbb{R}_{>0}13,

w:UR>0w:U\to\mathbb{R}_{>0}14

7. Role in learning and structured-data analysis

The weighted set-disagreement metric belongs to a broader class of metrics on sets, vectors, and functions proposed for exploratory data analysis, learning, and result interpretation (Yang et al., 2016). That class was introduced as unifying and generalizing several familiar dissimilarities, including Jaccard and bag distances on sets, Manhattan distance on vector spaces, and Marczewski–Steinhaus distance on integrable functions.

To extend the approach beyond flat set representations, (Yang et al., 2016) introduces information-theoretic metrics on directed acyclic graphs drawn according to a fixed probability distribution, with concept hierarchies and ontologies given as examples of structured objects. The same paper reports empirical investigation demonstrating intuitive interpretation and effectiveness on real-valued, high-dimensional, and structured data, along with comparative evaluation against multiple traditional similarity and dissimilarity functions, including the Minkowski family, the fractional w:UR>0w:U\to\mathbb{R}_{>0}15 family, two w:UR>0w:U\to\mathbb{R}_{>0}16-divergences, cosine distance, and two correlation coefficients.

Within that wider program, the weighted set-disagreement metric is the set-theoretic w:UR>0w:U\to\mathbb{R}_{>0}17 normalized instance: a metric that preserves exact set semantics, admits a direct probabilistic interpretation through total variation, and inherits the algorithmic advantages of metric-space methods (Yang et al., 2016).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Weighted Set-Disagreement Metric.