Skip to main content
QUICK REVIEW

[Paper Review] SparseMAP: Differentiable Sparse Structured Inference

Vlad Niculae, André F. T. Martins|arXiv (Cornell University)|Feb 12, 2018
Topic ModelingComputer Science40 references37 citations
TL;DR

This paper introduces SparseMAP, a differentiable sparse structured inference method that selects a small, interpretable set of high-scoring structures instead of a single MAP solution or a dense marginal distribution. By leveraging only a MAP oracle and exploiting sparsity, SparseMAP enables efficient, differentiable training of deep networks with structured hidden layers, achieving competitive accuracy with improved interpretability on dependency parsing and natural language inference tasks.

ABSTRACT

Structured prediction requires searching over a combinatorial number of structures. To tackle it, we introduce SparseMAP: a new method for sparse structured inference, and its natural loss function. SparseMAP automatically selects only a few global structures: it is situated between MAP inference, which picks a single structure, and marginal inference, which assigns probability mass to all structures, including implausible ones. Importantly, SparseMAP can be computed using only calls to a MAP oracle, making it applicable to problems with intractable marginal inference, e.g., linear assignment. Sparsity makes gradient backpropagation efficient regardless of the structure, enabling us to augment deep neural networks with generic and sparse structured hidden layers. Experiments in dependency parsing and natural language inference reveal competitive accuracy, improved interpretability, and the ability to capture natural language ambiguities, which is attractive for pipeline systems.

Motivation & Objective

  • To address the limitations of traditional MAP and marginal inference in structured prediction, particularly their lack of sparsity and interpretability.
  • To develop a differentiable inference method that balances the strengths of MAP (sparsity) and marginal inference (differentiability), enabling end-to-end training of deep networks with structured hidden layers.
  • To provide a general-purpose, modular framework applicable to any structured problem with tractable MAP inference, including intractable marginal inference cases like linear assignment.
  • To introduce a novel loss function for structured prediction that inherits the sparsity and differentiability of SparseMAP, improving model interpretability and performance.

Proposed method

  • SparseMAP is formulated as a convex optimization problem over the convex hull of all possible structures, promoting solutions that are sparse combinations of a few high-scoring structures.
  • The method uses a quadratic regularization term to induce sparsity, ensuring that only a small number of structures receive non-zero weights in the output distribution.
  • Forward pass is computed via a projected gradient method that requires only repeated calls to a MAP oracle, making it applicable to problems like linear assignment where marginal inference is intractable.
  • Backward pass is derived using subgradient calculus and reuses quantities from the forward pass, enabling efficient and general backpropagation regardless of structure type.
  • The method generalizes the sparsemax transformation to structured spaces, extending its sparsity-inducing properties from unstructured to structured outputs.
  • The proposed SparseMAP loss function is derived from the same optimization framework and enables end-to-end training with differentiable supervision.

Experimental results

Research questions

  • RQ1Can we design a structured inference method that is both differentiable and sparse, avoiding the dense outputs of marginal inference and the single-structure limitation of MAP?
  • RQ2Can we compute sparse structured inference efficiently using only a MAP oracle, without requiring complex, problem-specific backward passes?
  • RQ3Does the use of SparseMAP in structured prediction lead to models with improved accuracy and interpretability, especially in ambiguous natural language tasks?
  • RQ4Can SparseMAP be effectively used as a differentiable, sparse structured hidden layer in deep neural networks, enabling end-to-end training?

Key findings

  • On dependency parsing, models trained with the SparseMAP loss achieved competitive accuracy while producing sparse, interpretable predictions that adapt to input ambiguity.
  • In natural language inference, SparseMAP learned latent structured alignments that were orders of magnitude sparser than softmax-based counterparts, with comparable accuracy and improved visual interpretability.
  • Despite GPU memory overhead, training and validation times with SparseMAP were comparable to or faster than with softmax, especially as models became more certain, due to sparsity.
  • The method demonstrated computational advantages over marginal inference: while Kim et al. (2017) reported a 5× slowdown with marginal inference, SparseMAP maintained efficient training times.
  • The SparseMAP loss and its gradients were computed efficiently using only MAP oracles, enabling modular integration into existing deep learning pipelines.
  • Experiments confirmed that SparseMAP solutions are sparse combinations of a few key structures, enabling better statistical efficiency and qualitative interpretability than dense marginal inference.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.