arXiv:2609.06430cs.LGSep 2026

Manuscript Offprint

arXiv:2609.06430

Stability and Generalization of Straight-Through Estimators for Training Two-Layer Quantized Neural Networks

Yiming Ying

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

Abstract

We study the identity straight-through estimator (STE) for training a two-layer binary-activation network with hinge loss from the perspective of Statistical Learning Theory (SLT). Our central question is whether algorithmic stability can explain the statistical generalization of the estimator produced by the discontinuous STE training rule. In the saturated-output regime, the zero-initialized samplewise STE recursion is exactly the stochastic subgradient descent on the convex latent loss (−yu⊤x)+(-yu^\top x)_+. This representation makes a stability analysis possible. We derive an exact distance identity for two coupled updates and prove approximate non-expansiveness of the common-example map, with a quadratic defect only when the two latent margins straddle zero. We then obtain explicit ℓ2\ell_2 on-average model-stability and generalization bounds, transferring stability isometrically from the latent vector to the full first-layer matrix. Combining stability with a standard optimization bound yields an explicit excess induced-risk guarantee and the rate O(n−1/2)O(n^{-1/2}) when T=n2T=n^2. Under margin separability, a complementary argument gives the optimal-order O(R2/(γ2n))O(R^2/(\gamma^2 n)) expected excess misclassification error for a randomized one-pass STE iterate and a corresponding majority-vote bound.

1 Introduction

A major driving force behind the recent progress of artificial intelligence is deep learning, in which deep neural networks trained on large-scale datasets learn increasingly complex representations. Deep neural networks have achieved remarkable performance in image classification [12, 15], speech recognition [27], game playing [30], and natural language processing [24]. These successes, however, are often accompanied by models with very large numbers of parameters and substantial computational and memory requirements.

The high cost of inference presents a serious obstacle to deploying deep neural networks on resource-constrained devices, including smartphones, embedded systems, and Internet-of-Things devices. Full-precision networks may require considerable memory for storing their parameters and a large number of floating-point operations for each prediction. Network quantization has therefore emerged as an important approach for reducing inference cost. It replaces full-precision weights or activations with low-precision representations, thereby reducing memory usage, storage, communication bandwidth, and arithmetic cost while seeking to preserve predictive performance.

Training a quantized neural network nevertheless presents a fundamental mathematical difficulty. Quantized activations make the displayed network loss piecewise constant in the trainable weights, so its ordinary gradient vanishes almost everywhere. Straight-through estimators (STEs), introduced by Bengio, Léonard, and Courville [5], address this difficulty by replacing the unavailable activation derivative with a surrogate during back-propagation. STEs have become the backbone of quantization-aware training and have achieved substantial empirical success in influential quantized architectures such as BinaryNet [8], XNOR-Net [20], and DoReFa-Net [29].

Despite this empirical success and widespread practical use, the theoretical understanding of the heuristic STE training remains limited. Existing studies have focused primarily on optimization dynamics under Gaussian data and/or teacher-student assumptions. Yin et al. [28] considered a one-hidden-layer model with binarized ReLU activations and Gaussian inputs. For suitable STE surrogates, they showed that the expected coarse gradient is positively correlated with a population gradient and established convergence to critical points of the population objective. Long, Yin, and Xin [18] considered broader classes of quantized activations and monotone STE surrogates, proving population convergence and perfect classification under structured-distribution and boundedness assumptions.

These population analyses provide important insight into coarse-gradient dynamics, but they do not study an estimator trained from a finite set of training data. Their formulation effectively assumes direct access to expectations under the data distribution. Consequently, convergence of the population coarse-gradient dynamics does not by itself explain whether the STE estimator trained on a finite set of training data generalizes well to the unseen test data. Jeong, Xin, and Yin [13] recently made an important advance toward finite-sample analysis. They established sample-complexity conditions for convergence of STE in a two-layer network with binary weights and activations. Their analysis assumes Gaussian covariates and a planted binary ground-truth network generating the observations, and its objective is convergence to, or recovery of, the planted quantized weights. Thus, their result explains how sample size affects STE optimization under a particular generative model, but it does not provide a generalization bound for the data-dependent STE estimator.

Statistical generalization is a core question of Statistical Learning Theory [6, 19, 22, 23]: how well does the predictor produced from a finite training dataset perform on unseen data? For STE training, this question remains largely unexplored. Moreover, it cannot be addressed by a routine application of existing SGD theory because of the first two reasons. Firstly, the STE coarse gradient is generally neither the gradient nor a subgradient of the displayed empirical network loss; Secondly, the discontinuous forward map makes a direct stability analysis of the network weights difficult.

In this paper, we investigate the generalization of samplewise identity-STE training through the framework of Algorithmic Stability [7, 10, 16]. Algorithmic stability measures how much the learned model changes when one training example is replaced and converts this sensitivity into a generalization guarantee. Our central idea here is that, for a zero-initialized two-layer binary-activation network, the entire identity-STE trajectory admits an exact rank-one representation. In the saturated hinge regime, this reduction enables us to construct a convex latent loss such that the associated aggregate latent vector evolves exactly according to stochastic subgradient descent.

This latent convex loss makes an algorithmic-stability analysis possible. We establish approximate non-expansiveness of the single-example update map and apply the nonsmooth on-average stability approach of Lei and Ying [16]. The rank-one representation then transfers stability isometrically from the latent vector to the complete first-layer weight matrix, without dependence on the network width. In contrast to the earlier population and recovery analyses, our stability and induced-risk generalization results require NEITHER Gaussian covariates NOR the existence of a planted ground-truth neural network.

Combining stability with a stochastic subgradient optimization bound gives an explicit vanishing excess induced-risk guarantee. Under an additional large-margin separability condition, we also obtain the optimal-order

O(R2γ2n)O\left(\frac{R^{2}}{\gamma^{2}n}\right)

expected misclassification error for a randomized one-pass STE iterate and a corresponding majority-vote guarantee. Specifically, Our main contributions are summarized as follows.

  1. We identify an exact convex representation of the samplewise hinge-loss identity-STE recursion. In the saturated regime it is unprojected stochastic subgradient descent on Fz(u)=(−yu⊤x)+F_z(u) = (-yu^\top x)_+, and the rank-one trajectory connects the latent iterate exactly to the two-layer network parameters. This is the structural step that makes an SLT stability analysis possible.

  2. The loss convexification through the latent convex loss enables an algorithmic-stability analysis of STE. Building on the nonsmooth on-average stability framework of Lei and Ying, we prove an exact distance identity and approximate non-expansiveness for the coupled STE updates, and derive explicit stability, generalization, and excess induced-risk bounds. The rank-one representation transfers the stability result to the full first-layer matrix without an additional width or dimension factor, yielding an O(n−1/2)O(n^{-1/2}) excess induced-risk bound when T=n2T=n^2.

  3. For the separable data with large margin, the exact reduction to perceptron iterates along the rank-one trajectory gives an optimal-order excess misclassification result for one-pass STE. A randomized iterate has expected excess error at most R2/(γ2n)R^2/(\gamma^2 n), while the majority-vote classifier has error at most 2R2/(γ2n)2R^2/(\gamma^2 n). Up to universal constants, the dependence on R,γR, \gamma, and nn matches the minimax lower bound [11] for realizable large-margin linear classification when the ambient dimension is at least of order R2/γ2R^2/\gamma^2.

References (25)