Tutorials › Multi-Omics Data Integration › Variation Of Information For Partition Comparison

Stability of Discovered Subgroups · Tutorial 488 of 597

Variation Of Information For Partition Comparison

You will learn to compute and interpret variation of information, including how its two conditional-entropy components describe different forms of partition disagreement.

Advanced 12 min read

What You'll Learn

  • Construct a contingency table for two partitions of the same subjects.
  • Compute partition and joint entropies using a stated logarithm base.
  • Interpret each conditional-entropy term as uncertainty about one partition given the other.
  • Distinguish splits from merges and compute variation of information.
  • Check key properties, including label invariance, zero distance, and its upper bound.
  • Recognize when a single partition distance hides subgroup-specific disagreement.

Why Compare Partitions With Entropy?

Two subgrouping procedures can assign different labels to the same subjects even when their partitions are identical: “Group 1” and “Group 2” have no intrinsic meaning. The comparison must therefore depend on which subjects are grouped together, not on the names attached to groups. Variation of information (VI) compares two partitions in this label-invariant way. Its two components also distinguish two directions of disagreement: how much one partition subdivides groups of the other, and how much the other subdivides groups of the first.

For a fair comparison, both partitions must be defined on the same set of subjects. In a stability analysis, that requirement matters: if runs include different subjects, first decide how the comparison set is being defined. A distance computed on only the shared subjects describes agreement on that subset, not on the full cohort.

Definition and Interpretation

Definition: Let \(\mathcal{C}\) and \(\mathcal{D}\) be two partitions of the same \(n\) subjects. Choose one subject uniformly at random, and let \(C\) and \(D\) be its cluster labels under the two partitions. Using logarithms to base 2, define entropy by \(H(C)=-\sum_c P(C=c)\log_2 P(C=c)\), with \(0\log_2 0=0\). Define conditional entropy by \(H(C\mid D)=\sum_d P(D=d)H(C\mid D=d)\). The variation of information is \(VI(\mathcal{C},\mathcal{D})=H(C\mid D)+H(D\mid C)\), measured in bits.

The labels themselves are arbitrary; their probabilities, and the joint probabilities \(P(C=c,D=d)\), are determined by the overlap of the groups. In a contingency table, the entry in row \(c\), column \(d\) is the number of subjects assigned to group \(c\) by \(\mathcal{C}\) and group \(d\) by \(\mathcal{D}\). Dividing each count by \(n\) gives the corresponding joint probability.

The term \(H(C\mid D)\) measures the remaining uncertainty about a subject’s \(\mathcal{C}\) group after its \(\mathcal{D}\) group is known. If a \(\mathcal{D}\) group contains subjects from several \(\mathcal{C}\) groups, it contributes uncertainty to this term. Conversely, \(H(D\mid C)\) measures uncertainty about \(\mathcal{D}\) when \(\mathcal{C}\) is known. Thus a split of an original group and a merge of original groups can contribute in different directions. Neither term is a count of errors; both are entropy-weighted summaries.

The equivalent expression \(VI=2H(C,D)-H(C)-H(D)\) follows from the entropy chain rule, \(H(C,D)=H(D)+H(C\mid D)=H(C)+H(D\mid C)\). This form can be convenient when calculating from a joint table. The two conditional entropies are usually more useful for interpretation.

Calculating VI From Overlap

Worked Example: A Split and a Merge in Six Subjects

Suppose six hypothetical subjects have partition \(\mathcal{C}=\{\{1,2,3\},\{4,5,6\}\}\) and partition \(\mathcal{D}=\{\{1,2\},\{3,4,5,6\}\}\). The overlap table is:

\(D_1\)\(D_2\)Total
\(C_1\)213
\(C_2\)033
Total246

The table shows that \(C_1\) is split between \(D_1\) and \(D_2\), while \(D_2\) contains members of both \(C_1\) and \(C_2\). The entropies of the partition labels are \(H(C)=-(1/2)\log_2(1/2)-(1/2)\log_2(1/2)=1\) bit and \(H(D)=-(1/3)\log_2(1/3)-(2/3)\log_2(2/3)=0.9183\) bits.

For \(H(D\mid C)\), group \(C_1\) is divided in proportions \(2/3\) and \(1/3\), while \(C_2\) is entirely in \(D_2\): \(H(D\mid C)=(1/2)[-(2/3)\log_2(2/3)-(1/3)\log_2(1/3)]+(1/2)(0)=0.4591\) bits.

For \(H(C\mid D)\), \(D_1\) is entirely in \(C_1\), while \(D_2\) contains one subject from \(C_1\) and three from \(C_2\): \(H(C\mid D)=(1/3)(0)+(2/3)[-(1/4)\log_2(1/4)-(3/4)\log_2(3/4)]=0.5409\) bits.

Therefore, \(VI=0.4591+0.5409=1.000\) bit. In this example, the \(D\) grouping splits \(C_1\), and the \(D_2\) group combines subjects from two \(C\) groups. Both directional uncertainties contribute to the distance.

Properties and a Justification

VI has several properties that make it useful for comparing partitions. It is symmetric: exchanging \(\mathcal{C}\) and \(\mathcal{D}\) swaps the two conditional entropies but leaves their sum unchanged. It is nonnegative because entropy is nonnegative. It is zero exactly when the partitions are identical up to relabeling: both conditional entropies are zero precisely when each label in either partition determines the label in the other. For partitions, that means the same groups of subjects.

VI also satisfies the triangle inequality, so it is a metric on partitions when partitions that differ only by label names are treated as the same. The key justification is that conditioning cannot increase entropy: \(H(C\mid D,Z)\leq H(C\mid D)\). For any third partition with label \(Z\), the chain rule gives:

$$ \begin{aligned} H(C\mid Z) &\leq H(C,D\mid Z)\\ &=H(D\mid Z)+H(C\mid D,Z)\\ &\leq H(D\mid Z)+H(C\mid D). \end{aligned} $$

Applying the same argument with \(C\) and \(Z\) exchanged gives \(H(Z\mid C)\leq H(D\mid C)+H(Z\mid D)\). Adding the two inequalities yields \(VI(\mathcal{C},\mathcal{Z})\leq VI(\mathcal{C},\mathcal{D})+VI(\mathcal{D},\mathcal{Z})\), as required.

For \(n\) subjects, \(0\leq VI\leq\log_2 n\). To see the upper bound, use the equivalent expression \(VI=H(C,D)-I(C;D)\), where \(I(C;D)=H(C)+H(D)-H(C,D)\) is mutual information. Mutual information is nonnegative, so \(VI\leq H(C,D)\). There are at most \(n\) distinct observed pairs of labels among \(n\) subjects, hence \(H(C,D)\leq\log_2 n\). The bound is attained by comparing a single-group partition with the partition into \(n\) singletons.

Worked Comparisons

Worked Example: Two Balanced Partitions With Crossed Membership

Consider eight hypothetical subjects. Each partition has two groups of four, with overlap table

\(D_1\)\(D_2\)Total
\(C_1\)314
\(C_2\)134
Total448

Both label entropies equal 1 bit. Given either label, the other is split in proportions \(3/4\) and \(1/4\). Therefore, \(H(D\mid C)=H(C\mid D)=-(3/4)\log_2(3/4)-(1/4)\log_2(1/4)=0.8113\) bits, and \(VI=0.8113+0.8113=1.623\) bits.

The conditional entropies are equal because the overlap pattern is symmetric. This does not mean the partitions are close in every practical sense; it means that each label leaves the same average uncertainty about the other under this subject-weighted calculation.

Worked Example: Comparing a Single Group With Singletons

For five hypothetical subjects, let \(\mathcal{C}\) place everyone in one group and let \(\mathcal{D}\) put each subject in a separate group. The label \(C\) is constant, so \(H(C)=0\); the five equally likely labels for \(D\) give \(H(D)=\log_2 5=2.322\) bits.

Knowing \(C\) gives no information about which singleton label a subject has, so \(H(D\mid C)=2.322\) bits. Knowing \(D\) determines that subject’s \(C\) label, so \(H(C\mid D)=0\). Thus \(VI=2.322\) bits, the maximum \(\log_2 5\) for five subjects. This is an extreme comparison, not a usual target for subgroup stability.

Diagnostics, Alternatives, and Limitations

A reliable calculation begins with the overlap table and its margins. Check that all counts are nonnegative integers, that the grand total is \(n\), and that the row and column totals match the sizes of the groups in each partition. Convert counts to probabilities using the same denominator \(n\). Calculate conditional entropy as a weighted average over conditioning groups; omitting the weights is a common source of incorrect results. Terms with zero probability contribute zero, not an undefined quantity.

Use a consistent log base: base 2 reports bits, while natural logarithms report nats. The numerical value changes with the base, so comparisons and any normalization must use a consistent convention. Also verify that the subject identities match across partitions. A table built after inadvertently pairing different subjects has no meaningful interpretation as partition disagreement.

Common pitfall: “The partitions have different cluster labels, so their VI must be positive.” This is wrong because labels are arbitrary. If two runs assign exactly the same subjects to the same groups but swap the names of the groups, their contingency table has one nonzero cell in each row and column, both conditional entropies are zero, and \(VI=0\). Compare memberships, not label codes.

VI complements, rather than replaces, other agreement summaries. The adjusted Rand index is a chance-adjusted pair-counting measure; VI is an entropy-based distance that reports uncertainty in bits. Cluster-wise Jaccard stability focuses on the overlap of individual groups and can help identify which particular subgroup is poorly matched. These summaries answer different questions: a single VI value does not identify the group or subjects driving disagreement, and a single group-wise overlap does not summarize the full partition in the same way.

VI weights subjects through their probabilities in the partition, so large groups contribute more to the overall entropy calculation than equally sized summaries of tiny groups would suggest. A low VI can coexist with a consequential mismatch in a small subgroup. Conversely, a larger value can reflect a broad restructuring of memberships. Inspect the overlap table and subgroup-specific summaries alongside VI when the scientific question concerns particular subtypes. A normalized value such as \(VI/\log_2 n\) lies between zero and one for \(n>1\), but normalization does not remove the dependence of the raw distance on the number of subjects or reveal which groups disagree.

The measure describes disagreement, not its cause. It cannot by itself determine whether a difference arose from sampling variation, feature selection, preprocessing, or algorithmic randomness, and it does not establish that either partition is biologically meaningful. Interpret it in the context of how the partitions were generated and what subjects they cover.

Check Your Understanding

Work from the definitions and show how the overlap determines each answer.

  1. If two runs produce the same groups but exchange the labels “A” and “B,” what is their VI, and why?
  2. For four subjects, let \(\mathcal{C}=\{\{1,2\},\{3,4\}\}\) and \(\mathcal{D}=\{\{1\},\{2,3,4\}\}\). Calculate both conditional entropies and VI.
  3. For \(n=5\), what is the maximum possible VI in bits, and which type of comparison attains it?
  4. Can equal VI values establish that the same subjects or subgroups disagree in two different comparisons? Explain.

Solutions. (1) The VI is 0. Each group in either partition corresponds to exactly one group in the other, so both conditional entropies are zero; exchanging names does not alter membership. (2) The overlap counts are \(1,1,0,2\), with row and column totals \(2,2\) and \(1,3\). Thus \(H(D\mid C)=(1/2)(1)+(1/2)(0)=0.5000\) bits. Also, \(H(C\mid D)=(1/4)(0)+(3/4)h_2(1/3)\), where \(h_2(1/3)=-(1/3)\log_2(1/3)-(2/3)\log_2(2/3)=0.9183\); this gives \(0.6887\) bits. Therefore \(VI=1.1887\) bits. (3) The maximum is \(\log_2 5=2.3219\) bits, attained by comparing one group containing all subjects with five singleton groups. (4) No. VI is an aggregate entropy distance; equal values can arise from different overlap tables and different affected subjects. Inspect the overlap tables and relevant group-level summaries to identify where disagreement occurs.

Clinical Biostats