Manuscript Offprint

arXiv:2610.02528

Autoregressive Differentiable Method for Integer Programming

Ouns El Harzli, Yudong Cao

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

We introduce an autoregressive differentiable method to solve 0-1 integer programs. We fix an arbitrary order of the binary variables and we train a transformer to predict the next bit while remaining in the feasible set. Our method is first trained on feasible incumbents provided by any solver, thus allowing us to initialize the transformer in the feasible set. Our procedure then implements a Lagrangian penalty to penalize infeasible solutions, and the transformer is further trained to explore the feasible set using Gumbel-softmax activations on the relaxed objective. We have tested our method on non-convex instances of quadratic knapsack problem and demonstrated consistent improvement upon state-of-the-art open-source solvers for dense problems up to 10,000 binary variables. In particular, we empirically demonstrate a phenomenon akin to a tunneling effect where the effective change of variables from binary variable to the continuous weights of the transformer that the method implements enables crossing barriers in the relaxed objective landscape.

1 INTRODUCTION

Binary integer programming is a central modeling language for combinatorial optimization (Nemhauser & Wolsey, 1988). Problems including knapsack (Martello & Toth, 1990), maximum cut (Goemans & Williamson, 1995), facility location (Cornuéjols et al., 1990), sparse regression (Bertsimas et al., 2016), and scheduling (Pinedo, 2016) can be formulated over binary vectors, yet many practically relevant instances remain computationally challenging (Belotti et al., 2013; Bertsimas et al., 2016; Bixby, 2012; Lodi, 2010; Gleixner et al., 2021). Modern branch-and-cut solvers and primal heuristics are extremely powerful, but can still spend substantial time improving a good feasible incumbent (Berthold, 2013; Fischetti & Lodi, 2003; Rothberg, 2007).

We ask whether autoregressive differentiable models can serve as enhanced primal mechanisms for binary integer programs (Vinyals et al., 2015; Bello et al., 2017; Geng et al., 2025). Rather than predicting a solution from scratch, we initialize a neural model at a feasible incumbent obtained from a standard solver (Nair et al., 2020; Khalil et al., 2022; Han et al., 2023), then optimize it directly against a differentiable relaxation of the original objective with a Lagrangian penalty for constraint violation (Di Pillo & Grippo, 1989). The resulting method searches in neural network weight space rather than directly in the decision variables. This formulation is intended to complement conventional integer programming machinery: the solver supplies a feasible point and the neural reparameterization is used only for subsequent primal improvement. The central question is whether the nonlinear, shared autoregressive parametrization exposes useful optimization directions that differ from direct coordinate-wise movement in the binary decision space.

Our starting point is deliberately instance-specific. The neural network is not trained to generalize across a dataset of optimization instances; instead, it is initialized at a solution already found by a solver and used as a local improvement mechanism. This separates feasibility discovery from neural improvement and lets the transformer exploit a high-quality incumbent without learning the combinatorial problem from scratch.

We focus on binary quadratic integer programs

max⁡x∈{0,1}nx⊤Qxs.t.Ax≤b,(1)\max_{x\in\{0,1\}^{n}}x^{\top}Q x\qquad\text{s.t.}\qquad Ax\leq b, \tag{1}

Figure

Figure 1: Overview of ADIP. Starting from a feasible incumbent xincx^{inc} obtained from a standard integer-programming solver, Phase 1 trains an autoregressive transformer to reproduce the incumbent using smoothed binary targets. Phase 2 optimizes the transformer parameters directly against the relaxed integer-program objective with a Lagrangian feasibility penalty, using Gumbel-softmax to maintain near-discrete outputs. Hard candidates are decoded throughout training, and the best feasible solution encountered is returned.

where Q∈Rn×nQ \in \mathbb{R}^{n \times n}, A∈Rm×nA \in \mathbb{R}^{m \times n}, and b∈Rmb \in \mathbb{R}^m. Our experimental testbed is the quadratic knapsack problem (QKP), following and extending Lopez Piqueres & Chen (2025). QKP is known to remain strongly NP-hard even with small integer weights (Gallo et al., 1980; Pisinger et al., 2007), and arbitrary Q yields a non-convex relaxed landscape. Although we experiment with non-convex quadratic objectives, the method applies whenever the binary objective admits a differentiable continuous relaxation.

Our method, which we call Autoregressive Differentiable Integer Programming (ADIP), has two phases. We fix an arbitrary variable ordering and use a causal transformer to learn pθ(x)=∏i=1npθ(xi∣x<i)p_{\theta}(x) = \prod_{i=1}^{n} p_{\theta}(x_i \mid x_{<i}). For each instance, an open-source solver such as SCIP (Hojny et al., 2025), HiGHS (Huangfu & Hall, 2018), CP-SAT (Perron et al., 2023), or CBC (Forrest & Lougee-Heimer, 2005; COIN-OR, 2026) first produces a feasible incumbent xincx^{inc}. In Phase 1, the transformer is trained to reproduce xincx^{inc} using targets ε\varepsilon and 1−ε1 - \varepsilon (instead of 0 and 1), preventing softmax saturation and preserving gradients. In Phase 2, the same weights are optimized against

Jλ(θ)=x~θ⊤Qx~θ−λ∑j=1mReLU((Ax~θ−b)j),(2)\mathcal{J}_{\lambda}(\theta)=\tilde{x}_{\theta}^{\top}Q\tilde{x}_{\theta}-\lambda\sum_{j=1}^{m}\mathrm{R e L U}((A\tilde{x}_{\theta}-b)_{j}), \tag{2}

where x~θ∈[0,1]n\tilde{x}_\theta \in [0, 1]^n is generated autoregressively. Gumbel-softmax activations (Jang et al., 2017; Maddison et al., 2017) encourage near-discrete exploration, while the best feasible hard solution encountered is retained throughout training.

For the purpose of advancing open-source software and open science, we deliberately chose to compare against state-of-the-art open-source solvers, and not against their closed-source competitors. Our contributions are fourfold. First, we introduce an autoregressive nonlinear reparametrization of relaxed binary decision variables for integer programs, in which the shared parameters of the autoregressive model themselves become the optimization variables. Second, we present our specific method ADIP combining transformer-based incumbent imitation, finite-logit targets, Gumbel-softmax exploration, and a Lagrangian feasibility penalty in a two-phase primal-improvement procedure. Third, we provide theoretical results showing that incumbent improvement remains NP-hard, that the transformer reparametrization retains the binary search space, and that parameter-space gradient flow induces a state-dependent geometry in decision space. Fourth, we evaluate ADIP on random QKP instances under matched computational budgets and study whether its trajectories reach attraction basins different from those reached by combinatorial optimization or by direct relaxed optimization, uncovering a “tunneling-like” phenomenon.

References (37)