Searcharxiv⌕ Search

arXiv · 2611.16050

Your PID Is Already a Neural Network: Learning Its Gains with Only Three Weights and No Teacher

Abstract

A discrete PID controller is exactly a recurrent neural network, a classical state-space fact: a fixed linear memory of the running integral and the last error, read out by three trainable weights that map one-to-one to the PID gains. Networks with bounded hidden states, such as LSTMs of any width, only approximate it. Trained only on a one-step physical cost (the expected cost of one transition from a fixed state distribution), with no demonstrations, teacher controller, or known gains, the network solves a strongly convex least-squares problem, so gradient descent converges from any initialization to the unique one-step optimal PID gains; the limit network is that PID, with the same action on every error sequence. Partitioned regression then shows what extra capacity buys. Orthogonal residual features keep these gains and improve on the PID if and only if they correlate with the part of the optimal action outside the PID span. On a nonlinear second-order example the gap is 5.88% of the optimal PID cost, and 4.00% against PID with a bias; no controller can improve on PID by more on this objective. A residual started at a tuned PID begins exactly at that PID; at the one-step optimal PID, a fixed-feature residual's first gradient step lowers the cost if and only if its features can improve on the PID. Experiments confirm the realization, recovery, and gap results to numerical precision. On held-out plants of three families, under a protocol frozen before the test data existed, a residual warm-started at a heavily tuned PID and trained with it lowers the long-horizon cost by 3.5%, 3.5%, and 1.9%, with family-wise 95% bounds excluding zero, also under distribution shift; a post hoc comparison with the PID tuned alone suggests that most of it comes from the recurrent part in two families. The primary endpoint, a gain of at least 5% from a generic PID start, is not met in any family.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Felipe de Jesús Félix-Arredondo, Nezih Nieto-Gutiérrez, Carlos Astengo-Noguez, Alejandro Ucan-Puc. 2026-11-11. Your PID Is Already a Neural Network: Learning Its Gains with Only Three Weights and No Teacher. https://searcharxiv.com/abs/2611.16050

Citations retain the original authors and DOI and include this site’s record URL. If this discovery service contributed to your research, you can also cite Searcharxiv by Indiciae: BibTeX · RIS.

KEEP EXPLORING

Related papers

First-order methods for stochastic and finite-sum convex optimization with deterministic constraints

In this paper, we study a class of stochastic and finite-sum convex optimization problems with deterministic constraints. Existing methods typically aim to find an $ε$-$expected\ feasible\ stochastic\ optimal$ solution, in which both the expected constraint violation and the expected optimality gap are within a prescribed tolerance $ε$. However, in many practical applications, constraints must be nearly satisfied with certainty, rendering such solutions potentially unsuitable due to the risk of substantial violations. To address this issue, we propose stochastic first-order methods for finding an $ε$-$surely\ feasible\ stochastic\ optimal$ ($ε$-SFSO) solution, where the constraint violation is deterministically bounded by $ε$ and the expected optimality gap is at most $ε$. Our methods apply an accelerated stochastic gradient (ASG) scheme or a modified variance-reduced ASG scheme $only\ once$ to a sequence of quadratic penalty subproblems with appropriately chosen penalty parameters. We establish first-order oracle complexity bounds for the proposed methods in computing an $ε$-SFSO solution. Preliminary numerical results are presented to illustrate the performance of the proposed methods.

math.OC↗

Attention's forward pass and Frank-Wolfe

We study the hardmax limit of self-attention dynamics for token embeddings obtained in the zero-temperature ($β\to+\infty$) regime, and relate it to the finite-$β$ setting. In this limit, the update rule can be viewed as a Frank-Wolfe step for a quadratic objective over the convex hull of the current token embeddings. When the key-query matrix is negative semidefinite, the method linearly contracts all tokens to a single cluster at the origin. When it is positive semidefinite, extending the hardmax rule to the entire convex hull induces a Voronoi diagram: vertices are stationary, interior points remain in their initial cells, and each token moves along a straight line toward its cell's vertex, yielding (super-)exponential convergence. As a byproduct, we also establish well-posedness of the associated ODE limit in this regime. Returning to the finite-$β$ regime, we model self-attention dynamics as a Markov chain and prove dynamic metastability: with high probability, interior tokens reach near-vertex configurations in a constant number of steps and remain within a small neighborhood for times that grow exponentially in the inverse temperature $β$, before ultimately collapsing to the origin. Thus, the hardmax dynamics accurately approximate the finite-$β$ process over exponentially long time horizons.

math.OC↗

Finite de Finetti for convex bodies and Polynomial Optimization

We study polynomial optimization over convex bodies with separately affine objectives and local affine equality and inequality constraints. We construct a convergent hierarchy of conic relaxations with explicit finite-level error bounds of order $n^{-1/2}$ at level $n$, complemented by a constructive rounding scheme that produces feasible points. The relaxation bounds and rounded objective values bracket the optimum at the same rate. The analytic ingredient is a finite de Finetti representation theorem for arbitrary proper cones: bipartite marginals of symmetric extensions in maximal tensor products are $O(n^{-1/2})$-close, in base norm, to points of the minimal tensor product. Its proof combines a uniform, monogamy-type bound on a variational mutual information based on Frenkel's relative entropy with classical conditioning and informationally complete measurements. We apply the framework to the assemblage relaxation of two-player non-local games in general probabilistic theories. For polytopic state spaces, the hierarchy consists of linear programs, and experiments on the Clauser--Horne--Shimony--Holt (CHSH) game provide a numerical proof of concept for the outer approximations and feasible rounding procedure.

math.OC↗