mlsanityData to 7 Oct 2026

Differentiable Knapsack and Top-k Operators via Dynamic Programming

arXiv 2601.21775 ↗First posted 29 Jan 2026cs.LGcited by 1

Not on the map. Why?

Abstract (arXiv)

Knapsack and Top-k operators are useful for selecting discrete subsets of variables. However, their integration into neural networks is challenging as they are piecewise constant, yielding gradients that are zero almost everywhere. In this paper, we propose a unified framework casting these operators as dynamic programs, and derive differentiable relaxations by smoothing the underlying recursions. On the algorithmic side, we develop efficient parallel algorithms supporting both deterministic and stochastic forward passes, and vector-Jacobian products for the backward pass. On the theoretical side, we prove that Shannon entropy is the unique regularization choice yielding permutation-equivariant operators, and characterize regularizers inducing sparse selections. Finally, on the experimental side, we demonstrate our framework on a decision-focused learning benchmark, a constrained dynamic assortment RL problem, and an extension of discrete VAEs.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 27 of its 40 references that are in the map. First posted on arXiv 29 Jan 2026.

Builds on

27 of 40 references.

References · 27

  1. 2017Proximal Policy Optimization Algorithmscited by 14,441
  2. 2013Estimating or Propagating Gradients Through Stochastic Neurons for Conditional Computationcited by 2,031
  3. 2016From Softmax to Sparsemax: A Sparse Model of Attention and Multi-Label Classificationcited by 337
  4. 2019Differentiation of Blackbox Combinatorial Solverscited by 224
  5. 2019Stochastic Beams and Where to Find Them: The Gumbel-Top-k Trick for Sampling Sequences Without Replacementcited by 205
  6. 2016Discrete Variational Autoencoderscited by 124
  7. 2019Learning with Fenchel-Young Lossescited by 117
  8. 2019Differentiable Ranks and Sorting using Optimal Transportcited by 113
  9. 2021Implicit MLE: Backpropagating Through Discrete Exponential Family Distributionscited by 97
  10. 2019MIPaaL: Mixed Integer Program as a Layercited by 93
  11. 2020Interior Point Solving for LP-based prediction+optimisationcited by 83
  12. 2020Learning with Differentiable Perturbed Optimizerscited by 81
15 more
  1. 2018Differentiable Dynamic Programming for Structured Prediction and Attentioncited by 58
  2. 2020Contrastive Losses and Solution Caching for Predict-and-Optimizecited by 52
  3. 2022SIMPLE: A Gradient Estimator for k-Subset Samplingcited by 34
  4. 2022PyEPO: A PyTorch-based End-to-End Predict-then-Optimize Library for Linear and Integer Programmingcited by 32
  5. 2022Backpropagation through Combinatorial Algorithms: Identity with Projection Workscited by 29
  6. 2018Dynamic Assortment Optimization with Changing Contextual Informationcited by 28
  7. 2018Learning Classifiers with Fenchel-Young Losses: Generalized Entropies, Margins, and Algorithmscited by 27
  8. 2023Fast, Differentiable and Sparse Top-k: a Convex Analysis Perspectivecited by 26
  9. 2019The Limited Multi-Label Projection Layercited by 21
  10. 2022Differentiable Top-k Classification Learningcited by 21
  11. 2020LP-SparseMAP: Differentiable Relaxed Optimization for Sparse Structured Predictioncited by 17
  12. 2020Differentiable Top-k Operator with Optimal Transportcited by 17
  13. 2022Multi-Vector Retrieval as Sparse Alignmentcited by 12
  14. 2025Structured Reinforcement Learning for Combinatorial Decision-Makingcited by 7
  15. 2025Fenchel-Young Variational Learningcited by 1

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 1.

1 paper.