Differentiable Knapsack and Top-k Operators via Dynamic Programming

๐Ÿ“… 2026-01-29
๐Ÿ“ˆ Citations: 0
โœจ Influential: 0
๐Ÿ“„ PDF
๐Ÿค– AI Summary
This work addresses the challenge of integrating combinatorial operators such as Knapsack and Top-k into end-to-end trainable neural networks, where their piecewise-constant nature renders gradients almost everywhere zero. To overcome this, the authors propose a unified differentiable framework based on dynamic programming, in which the recurrence relations are smoothed to yield efficient relaxed forward and backward passes. Theoretical analysis reveals that the Shannon entropy is the unique regularizer preserving permutation equivariance, and the study further characterizes regularization conditions that induce sparse selections. The effectiveness and generality of the approach are demonstrated across diverse tasks, including decision-focused learning, constrained dynamic item selection in reinforcement learning, and extensions of discrete variational autoencoders.

Technology Category

Search and Optimization: Mixed Discrete/Continuous SearchReasoning under Uncertainty: Stochastic OptimizationConstraint Satisfaction and Optimization: Constraint Learning and Acquisition

Application Category

Economics, Online Markets and Human Computation: Incentives in network design for Web infrastructures and ecosystemsSearch and Retrieval-Augmented AI: Web learning to rank, online learning, and counterfactual learning for rankingGraph Algorithms and Modeling for the Web: Efficient manipulation of static and dynamic Web-related graphs
๐Ÿ“ Abstract
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.
Problem

Research questions and friction points this paper is trying to address.

differentiable operators
knapsack problem
top-k selection
discrete optimization
neural networks
Innovation

Methods, ideas, or system contributions that make the work stand out.

differentiable operators
dynamic programming
knapsack problem
top-k selection
entropy regularization
๐Ÿ”Ž Similar Papers
No similar papers found.
๐Ÿ’ผ Related Jobs
No related jobs found.
G
Germain Vivier-Ardisson
Google DeepMind, Paris, France; CERMICS, ENPC, Institut Polytechnique de Paris, CNRS, Marne-la-Vallรฉe, France
Michael E. Sander
Michael E. Sander
Google DeepMind
Machine LearningApplied Mathematics
Axel Parmentier
Axel Parmentier
CERMICS, Ecole des Ponts, Marne-la-Vallรฉe, France
Operations Research
Mathieu Blondel
Mathieu Blondel
Google
Machine Learning