Softassign versus Softmax: Benchmarks in Combinatorial Optimization

Steven Gold, Anand RangarajanNeurIPS 1995

TL;DR

This paper introduces softassign, a technique that replaces the traditional "softmax plus penalty terms" approach for solving combinatorial optimization problems like the Traveling Salesman Problem (TSP). By leveraging Sinkhorn’s theorem to enforce two-way constraints mathematically rather than through "hacks," softassign achieves better accuracy, faster speeds, and easier implementation.

What Problem Does This Paper Address?

In the 1980s, researchers began using recurrent neural networks (like the Hopfield-Tank model) to solve NP-hard combinatorial problems. However, these early models often produced poor-quality solutions. To improve them, researchers adopted "Potts glass" models using the softmax function.

The challenge lies in enforcing two-way constraints. In a problem like TSP, you need a permutation matrix where:

  1. Each city is visited exactly once (row constraint).
  2. Each stop on the tour has exactly one city (column constraint).

Standard softmax only enforces one of these constraints. To handle the second, researchers traditionally added "penalty terms" to the energy function. These terms are problematic: they require tedious manual tuning and often create "spurious local minima"—traps in the mathematical landscape that prevent the algorithm from finding the best solution.

Methods

The authors propose softassign as a cleaner alternative. Instead of using penalty terms, softassign enforces both constraints simultaneously using a mathematical result known as Sinkhorn’s Theorem.

Softassign vs. Softmax Flowchart

The process works as follows:

  1. Positivity: Start with an exponentiated matrix (ensuring all values are positive).
  2. Sinkhorn Iteration: Repeatedly normalize the rows and then the columns of the matrix. Sinkhorn proved that this iterative process converges to a "doubly stochastic matrix" (where every row and column sums to 1).
  3. Deterministic Annealing: The algorithm starts at a high "temperature" (where the matrix is blurry and continuous) and gradually cools down (increasing $\beta$) until the matrix sharpens into a discrete, valid permutation matrix.

This approach allows the constraints to be satisfied "for free" as part of the update step, eliminating the need for penalty parameters entirely.

Datasets

The authors evaluated the algorithm on two classic benchmarks:

  • Euclidean TSP: 500 different 100-city tours. Cities were generated as random points within a 2D unit square.
  • Graph Partitioning: 2,000 different randomly generated 100-node graphs with 10% connectivity, which needed to be split into four equal-sized bins while minimizing the "cutsize" (edges between bins).

Key Insights and Ideas

  • Eliminating the "Penalty Hack": The most significant insight is that enforcing constraints through the algorithm's internal dynamics (Sinkhorn) is far superior to enforcing them via external penalty terms in the energy function.
  • The Continuous-to-Discrete Transition: By using a doubly stochastic matrix as a "continuous analog" of a permutation matrix, the algorithm can smoothly navigate the search space before committing to a final discrete answer.
  • Parallelism by Design: Unlike the "serial" version of softmax (which updates one element at a time to stay stable), softassign is naturally synchronous. This makes it much better suited for massive parallelization on modern hardware.

Key Results

  • Accuracy in TSP: For the 100-city TSP, the theoretical optimal tour length is roughly between 7.65 and 8.05. Softassign consistently found high-quality solutions, with 95% of its results falling between 8 and 11.
TSP Tour Length Distributions
  • Speedup: Softassign was significantly faster than the competition. The "serial" Potts glass algorithm (the previous standard for quality) was roughly 5 times slower than softassign.
  • Robustness: While the "synchronous" version of the old softmax method was faster than the serial version, it performed very poorly in terms of solution quality. Softassign provided the best of both worlds: the speed of synchronous updates with the quality of serial ones.
  • Simplicity: Because there are no penalty terms to balance, the algorithm has fewer "knobs" to turn, making it much easier to implement for new problems.

Limitations and Future Work

  • Comparison to Specialized Heuristics: The authors acknowledge that for TSP specifically, highly specialized conventional algorithms (like Lin-Kernighan) may still outperform neural network-based approaches.
  • Graph Partitioning Sensitivity: While softassign beat softmax in graph partitioning, the margin was "modest" compared to the dramatic win in TSP. The authors suggest this advantage might grow as the number of bins increases.
  • Pattern Matching: The authors hint that the real power of softassign may lie in pattern matching and computer vision—fields where "fuzzy" assignment is a feature, not a bug. They suggest this as a primary direction for future research.

Summary updated

BibTeX
@inproceedings{gold1995softassign,
  author = {Steven Gold and Anand Rangarajan},
  title = {{Softassign versus Softmax: Benchmarks in Combinatorial Optimization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {1995},
}
Figure