Here is a blog-style summary of the paper "Submodular Hamming Metrics".
TL;DR
This paper introduces Submodular Hamming Metrics, a novel class of discrete distance metrics over binary vectors that capture complex, higher-order feature interactions. By leveraging positive polymatroid functions, the authors provide a mathematically rigorous yet computationally tractable framework for optimizing distances, demonstrating significant improvements in clustering and diverse image summarization tasks.
What Problem Does This Paper Address?
In machine learning, choosing the right distance metric is crucial for tasks like clustering, structured prediction, and diversification. For binary vectors, the standard go-to is the Hamming distance, which simply counts the number of coordinate mismatches. However, the Hamming distance treats every feature independently.
Consider document clustering: if two documents differ by the words {"submodular", "synapse"}, the Hamming distance is 2. If they differ by {"submodular", "modular"}, the distance is also 2. Intuitively, the latter pair should be closer because the differences lie within the same conceptual domain.
While generalizations like the Mahalanobis distance allow for pairwise feature interactions, they cannot capture higher-order relationships (e.g., diminishing returns when multiple related features change). Arbitrary higher-order functions usually break the mathematical properties of a proper metric (like the triangle inequality) and make optimization intractable. This paper fills the gap by introducing a class of metrics that capture higher-order interactions while remaining computationally viable.
Methods
The authors define a distance function $d_f(A, B) = f(A \Delta B)$, where $\Delta$ is the symmetric difference between two sets (representing binary vectors), and $f$ is a positive polymatroid function (a function that is positive, normalized, monotone, and submodular). They prove that this formulation yields a valid mathematical metric.
The paper explores two primary optimization problems:
- SH-min (Centroid Finding): Finding a set $A$ that minimizes the sum of submodular Hamming distances to a collection of target sets $B_i$.
- SH-max (Diversification): Finding a set $A$ that maximizes the sum of distances to a collection of sets $B_i$.
Because the symmetric difference prevents the objective function from being purely submodular with respect to the optimization variable $A$, the authors develop several novel approximation algorithms:
- UNION-SPLIT: Splits the submodular function into two parts ($f(A \setminus B) + f(B \setminus A)$) to allow standard submodular optimization.
- MAJOR-MIN: An iterative majorization-minimization algorithm that constructs a modular upper bound at each step to handle constrained minimization problems.
- BEST-B: A simple but effective algorithm for homogeneous unconstrained minimization that selects the best candidate from the input sets.
The theoretical hardness and approximation guarantees are comprehensively mapped out in the paper's analysis:

Datasets
The authors evaluate their metrics and algorithms on three distinct datasets:
- Synthetic Document Data: 100 documents partitioned into 10 true clusters across 1,000 features, designed to test feature overlap.
- NIPS Papers Dataset: All NIPS papers from 1987 to 2014. After text preprocessing and filtering, this resulted in 5,522 papers across 12,262 unique words, clustered using Word2Vec embeddings.
- Image Summarization Dataset: A benchmark dataset consisting of 14 image collections, each containing 100 images, used to evaluate the generation of diverse $k$-best summary lists.
Key Insights and Ideas
- Submodularity as a Proxy for Concept Overlap: By using a submodular function (which exhibits a "diminishing returns" property), the metric naturally penalizes subsequent feature differences within the same category less severely than differences across entirely new categories.
- Tractable Intractability: Even though optimizing $f(A \Delta B)$ directly with respect to $A$ violates standard submodularity (making it non-submodular and non-supermodular), the underlying submodular structure of $f$ can still be exploited to yield tight approximation bounds.
- Objective Splitting: The
UNION-SPLITapproach elegantly bypasses the non-submodularity of the symmetric difference by decoupling the additions and deletions, allowing researchers to deploy standard, highly optimized submodular toolkits.
Key Results
- Clustering Accuracy: On noisy synthetic data where standard Hamming distance achieved only 57.0% accuracy, the Submodular Hamming (SM) metric achieved 88.5% accuracy (and 100% accuracy with an optimized initialization strategy).
- Real-World Document Clustering: When optimizing the submodular loss on the NIPS dataset, the SM metric drastically outperformed standard Hamming, yielding tighter, more cohesive clusters.
- Image Diversification: For the diverse $k$-best task, the Two-Part (
TP, utilizingUNION-SPLIT) algorithm achieved the highest V-ROUGE scores across 10 out of the 14 image collections, successfully generating summaries that were both high-quality and visually distinct.
Limitations and Future Work
While the paper provides a solid foundation, some theoretical gaps remain. Specifically, the exact computational hardness of the homogeneous unconstrained SH-min problem remains an open question. Additionally, the authors note that future work should explore more complex combinatorial constraints (such as knapsack constraints or matroid independence) and apply these submodular metrics to structured prediction tasks like image segmentation.
Summary updated