Differentiable Learning of Submodular Functions

Josip Djolonga, Andreas KrauseNeurIPS 2017

Introduction

Deep learning excels at learning complex representations from raw data, but it often struggles to enforce high-level structural constraints. For example, in image segmentation, it is often desirable to ensure that neighboring pixels have similar labels. Discrete optimization tools like graph cuts are perfect for this, but they have a major flaw for deep learning: their outputs are non-continuous or "jumpy."

If a neural network's weights change slightly, a graph cut might produce the exact same result (yielding a zero gradient) or suddenly flip a pixel's label (yielding an undefined gradient). This makes standard backpropagation impossible. Researchers usually bypass this by using "soft" approximations or post-processing, but these methods often lose the theoretical guarantees and sharpness of the original discrete problem.

This paper introduces a method to integrate submodular optimization—a powerful class of discrete optimization problems—directly into deep learning architectures as differentiable layers. By leveraging a continuous relaxation and deriving an efficient, approximate Jacobian, the authors enable end-to-end training of models that combine the feature-learning power of neural networks with the structural priors of discrete optimization.

Methodology

The authors bridge the gap between discrete optimization and continuous learning using submodular minimization. Submodular functions are a discrete analogue to convex functions; they can be minimized in polynomial time and have a deep connection to convex optimization.

  1. Continuous Relaxation: Instead of solving the hard discrete problem, the authors solve a proximal version called the min-norm point problem. This involves the Lovász extension, a technique to turn a discrete submodular function into a continuous, convex one. The output of this relaxation is a continuous vector $y^*$ that can be easily mapped back to a discrete solution.
  2. Argmin-Differentiation: To train the model, the network requires the Jacobian (the derivative of the output $y^*$ with respect to the input parameters $\theta$). The authors demonstrate that this problem is locally equivalent to isotonic regression.
  3. Efficient Jacobian: They derive an approximate Jacobian that has a very simple, block-diagonal structure. Essentially, it performs block-wise averaging over segments of the output. This approximation is theoretically grounded and computationally efficient—it can be applied in linear time $O(n)$, making it practical for large-scale deep networks.

Experiments and Results

The paper evaluates the approach on the Weizmann horse segmentation dataset, where the task is to identify pixels belonging to a horse in an image. To make the task harder and explicitly test the model's ability to learn from structural priors, the authors only revealed 0.1% of the labels during training.

The authors compared a standard Convolutional Neural Network (CNN) against a CNN equipped with a Graph Cut (GC) layer.

Quantitative comparison between a standard CNN and a CNN with a Graph Cut (GC) layer.

The CNN+GC model reached 91.2% accuracy, significantly outperforming the standalone CNN at 81.0%. The Negative Log-Likelihood (NLL) also improved from 0.39 to 0.26.

Beyond raw metrics, the CNN+GC model produced much cleaner results qualitatively. While the standard CNN often left "speckles" or spurious foreground blobs, the submodular layer enforced spatial consistency. This led to smoother segments and far fewer disconnected foreground objects (averaging 25.3 objects for CNN+GC versus 96.9 for the baseline CNN).

Key Insights

  • The Isotonic Connection: A major theoretical insight is linking submodular differentiation to isotonic regression. This allows the authors to use the "Pool Adjacent Violators Algorithm" (PAVA) logic to understand how the output segments change as inputs shift.
  • Stability via Averaging: The Jacobian essentially dictates that if you change an input, the effect is averaged across its entire connected segment. This provides a highly stable gradient for backpropagation.
  • Bi-level Variational Inference: This technique isn't just for "hard" labels; it can be used to learn probabilistic log-supermodular models by treating the layer as a variational inference step.
  • Stackability: Because the layers are fully differentiable, they can be stacked. For example, a network could feature a layer that performs a graph cut followed immediately by a layer that enforces a sparsity constraint.

Limitations and Future Work

While highly effective, the approach has a few limitations. First, the Jacobian used is an approximation. While the authors provide theoretical conditions (inseparability) under which it is exact, real-world data might not always satisfy these conditions—though empirical experiments suggest the approximation remains robust.

Second, there is a computational overhead. While the Jacobian calculation is linear time, the forward pass still requires solving a submodular minimization problem. Though polynomial, this is inherently more computationally expensive than a standard convolution or ReLU layer. Future work may focus on developing new algorithms that can compute both the min-norm point and its derivatives simultaneously, potentially accelerating the entire pipeline.

Summary updated

BibTeX
@inproceedings{djolonga2017differentiable,
  author = {Josip Djolonga and Andreas Krause},
  title = {{Differentiable Learning of Submodular Functions}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2017},
}
Figure