Going beyond least-squares – II : Self-concordant analysis for logistic regression
Last month, we saw that self-concordance is a key property in optimization, to use local quadratic approximations in the sharpest possible way. In particular it was an affine-invariant quantity leading to a simple and elegant analysis of Newton method. The key assumption was a link between third and second-order derivatives, which took the following form for one-dimensional functions,
Indeed, if we take this logistic loss function , it satisfies

There is thus a link between third and second-order derivatives, but without the power . Does this difference really matter? In this post, I will show how some properties from classical self-concordance can be extended to this slightly different notion. We will then present applications to stochastic gradient descent as well as the statistical analysis of generalized linear models, and in particular logistic regression.
I will describe applications to Newton method for large-scale logistic regression [8] in later posts (you read well: Newton method for large-scale machine learning can be useful, in particular for severely ill-conditioned problems).
-self-concordance
A function is said -self-concordant on the open interval if and only if it is convex, three-times differentiable on , and there exists , such that
Note the difference with classical self-concordance (which corresponds to and ). All positive powers are possible (see [1]), but we will focus primarily on , for which most of the properties below were derived in [2].
Note that the definition above in one dimension is still “affine-invariant” if the constant is allowed to change (that is, if it is true for , it is true for for any ). However, unless , this will not be true in higher dimension, and therefore, the analysis of Newton method will be more complicated.
For a convex function defined on a convex subset of , we need the same property along all rays, or equivalently, if is the third-order tensor (with three different arguments, as needed below) and the symmetric second-order one, then there exists such that
Examples. One can check that if and are -self-concordant, then so is their average with the same constant (this is one key advantage over -self-concordance). Moreover, if is -self-concordant with constant , then is also -self concordant, with constant .
Classical examples are all linear and quadratic functions (with constant ), the exponential function and the logistic loss , both with constant . This extends to the “log-sum-exp” function , which is -self-concordant with constant . More generally, as shown at the end of the post, any log-partition function of the form
Logistic regression. The most classical example is thus logistic regression, with

Logistic regression in two dimensions: data space with represented with a different color/mark depending on the label (left), parameter space (right) with level sets of the objective function and its minimizer (purple asterisk).
Properties in one dimension. Mimicking what was done last month, a nice reformulation of Eq. (1) (which is one-dimensional) is
We can then integrate Eq. (3) twice between and to obtain lower and upper bounds on and then :

Properties in multiple dimensions. The properties above in Eq. (3) and (4) directly extend to multiple dimensions. For any , then for any , we have upper and lower bounds for the Hessian, the gradient (not presented below) and the functions value at , that is, denoting by the standard Euclidean norm
Avoiding exponentially decaying constants. In this post, I will focus primarily on the use self-concordant functions in optimization (stochastic gradient descent in this post and Newton method in another post) as well as in statistics.
The main benefit of using self-concordance is to avoid exponential constants traditionally associated with the analysis of logistic regression. Indeed, for the logistic loss, the second-derivative at is is equal to and is equivalent to when is large. Thus, if we are willing to only apply the logistic loss to small values of , let’s say less than , then the logistic loss is strongly-convex with constant greater than . Therefore, we can apply many results in optimization and statistics that apply to such losses. However, all of these results will be impacted by the constant , which is strictly positive but can be very small. With self-concordance, the analysis will get rid of these annoying constants and replace them by eigenvalues of Hessian matrices at the optimum, which are typically much larger (note that in the worst case, the exponential constants are unavoidable [3]).
Adaptivity of stochastic gradient descent
I have not written about stochastic gradient descent for quite a while. Self-concordance gives me the occasion to talk about adaptivity.
It is well known that for smooth convex functions, gradient descent will converge exponentially fast if the function is also strongly-convex (essentially all eigenvalues of all Hessians being strictly positive). If the problem is ill-conditioned, then the exponential convergence rate turns into a rate of where is the number of iterations. Gradient descent is adaptive as the exact same algorithm (with constant step-size or line-search) can be applied without the need to know the strong-convexity parameter. Moreover, if locally around the global optimum, the Hessians are better conditioned, gradient descent will also benefit from it. Therefore, gradient descent is great! What about stochastic gradient descent (SGD)?
It turns out that similar adaptivity exists for a well-defined version of SGD, and that self-concordance is one way to achieve simple non-asymptotic bounds (asymptotic bounds exist more generally [4]).
Logistic regression. We consider the logistic regression problem where we aim to minimize the expectation
Note here that we are not trying to minimize the empirical risk and by using a single pass, we obtain bounds on the generalization performance. This is one of the classical benefits of SGD.
Averaged stochastic gradient descent. We consider the stochastic gradient recursion:
Standard results from the stochastic gradient descent literature [5, 6] show that if , then, up to universal (small) constants,
Adaptivity. Wouldn’t it be great if these three problems could be solved at once? This is what I worked on a few years ago [7], where I showed that for constant step-size proportional to (thus dependent on the total number of gradient steps), we have. up to constants:
We thus get (almost) the best of all worlds! The proof relies strongly on self-concordance and applies to all generalized linear models. Note that (a) no new algorithm is proposed here, I am simply providing partial theoretical justifications why a classical algorithm works so well, (b) this is only an upper-bound on performance (more on this below).
Generalization bounds for generalized linear models
Beyond optimization, the use of self-concordant can make the non-asymptotic statistical analysis of logistic regression, and more generally all generalized linear models, sharper in the regularized unregularized setting [2, 10], with -norm [10], or with non-parametric kernel-based models [2, 9]. The first benefit is to avoid exponential constants associated with usual strong-convexity arguments of the loss (which can also be achieved with other tools, see [11]). But there is another important benefit that requires some digression.
Asymptotic statistics is great… Supervised learning through empirical risk minimization is the workhorse of machine learning. It can be analyzed from different perspectives and with different tools. As shown in the great book by Aad Van der Vaart [12], asymptotics statistics is a very clean way of understanding the behavior of statistical estimators when the number of observations goes to infinity.
Empirical risk minimization is indeed an example of M-estimation problems (estimators based on minimizing the empirical average of some loss functions), and it is known that under general conditions, the estimator has a known asymptotic mean and variance (with the traditional Fisher information matrices), which leads to an asymptotic equivalent of the unseen population risk (e.g., the “test error”). We recover the usual bound for unregularized problems as well as dimension-independent results when using regularization with squared Euclidean norms (then with worse dependence in ).
Because we deal with limits, one can formally compare two methods by favoring the one with the smallest asymptotic risk. This is not possible when non-asymptotic upper bounds are available: the fact that they are true for all is a strong benefit, but since they are only bounds, they don’t say anything about which method is best.
… But it is only asymptotic. Of course, these comparisons are only true in the limit of large , and, in particular for high-dimensional problems (e.g., data and/or parameters in large dimensions), we are unlikely to be in the asymptotic regime. So we cannot really rely only on letting go to infinity. Moreover, these asymptotic limits typically depend on some information which is not available at training time. But does this mean that we have to throw away all asymptotic results?
Self-concordance to the rescue. Since many of the asymptotic results are obtained by second-order Taylor expansions, we need non-asymptotic ways of dealing with these expansions, which is exactly what self-concordance allows you to do (with some extra effort of course). Therefore the best of both worlds can be achieved with such tools; see, e.g., [9, 10], for examples of analysis, and [13, 14] for other tools that can achieve similar results. It is then possible to prove that some asymptotic expansions are valid non-asymptotically.
Conclusion
In this post I focused on two aspects of self-concordant analysis for logistic regression and its extensions, namely adaptivity of stochastic gradient descent and statistical generalization bounds.
In a later post, I will go back to Newton’s method, where the lack of affine invariance of -self-concordance makes the analysis more complicated. However it will come with some interesting benefits for large-scale severely ill-conditioned problems [8]. You may wonder why we should bother with Newton method for large-scale machine learning when stochastic gradient descent, with or without variance reduction, seems largely enough. Stay tuned!
References
[1] Tianxiao Sun, and Quoc Tran-Dinh. Generalized self-concordant functions: a recipe for Newton-type methods. Mathematical Programming 178(1): 145-213, 2019. [2] Francis Bach. Self-Concordant Analysis for Logistic Regression. Electronic Journal of Statistics, 4, 384-414, 2010. [3] Elad Hazan, Tomer Koren, and Kfir Y. Levy. Logistic regression: Tight bounds for stochastic and online optimization. Proceedings of the International Conference on Learning Theory (COLT), 2014. [4] Boris T. Polyak, and Anatoli B. Juditsky. Acceleration of stochastic approximation by averaging. SIAM journal on control and optimization, 30(4):838-855, 1992. [5] Arkadi Nemirovski, Anatoli Juditsky, Guanghui Lan, and Alexander Shapiro. Robust stochastic approximation approach to stochastic programming. SIAM Journal on optimization, 19(4), 1574-1609, 2009. [6] Francis Bach, and Eric Moulines. Non-asymptotic analysis of stochastic approximation algorithms for machine learning. Advances in Neural Information Processing Systems (NIPS), 2011. [7] Francis Bach. Adaptivity of averaged stochastic gradient descent to local strong convexity for logistic regression. Journal of Machine Learning Research, 15(Feb):595−627, 2014. [8] Ulysse Marteau-Ferey, Francis Bach, Alessandro Rudi. Globally convergent Newton methods for ill-conditioned generalized self-concordant Losses. Advances in Neural Information Processing Systems (NeurIPS), 2019. [9] Ulysse Marteau-Ferey, Dmitrii Ostrovskii, Francis Bach, Alessandro Rudi. Beyond Least-Squares: Fast Rates for Regularized Empirical Risk Minimization through Self-Concordance. Proceedings of the International Conference on Learning Theory (COLT), 2019 [10] Dmitrii Ostrovskii, Francis Bach. Finite-sample Analysis of M-estimators using Self-concordance. Electronic Journal of Statistics, 15(1):326-391, 2021. [11] Sham Kakade, Ohad Shamir, Karthik Sridharan, and Ambuj Tewari. Learning exponential families in high-dimensions: Strong convexity and sparsity. In Proceedings of the international conference on artificial intelligence and statistics (AISTATS), 2010. [12] Aad W. Van der Vaart. Asymptotic Statistics. Cambridge University Press, 2000. [13] Vladimir Spokoiny. Parametric estimation. Finite sample theory. The Annals of Statistics, 40(6), 2877-2909, 2012. [14] Tomer Koren, and Kfir Y. Levy. Fast Rates for Exp-concave Empirical Risk Minimization. Advances in Neural Information Processing Systems (NIPS), 2015.
Self-concordance for generalized linear models
We consider a probability distribution on some set , with density
The theory of exponential families tells us that the function is the “cumulant generating” function. That is, the cumulants of for the probability distribution defined by , are exactly the derivatives of taken at . More precisely, for the usual mean and covariance matrix, we get