SearcharxivSearch

arXiv subjects

Theo Mary

Publications and source records attributed to Theo Mary.

4 recordsLinked to original sources

Mixed precision Newton's method for optimization

Second-order optimization methods, such as Newton's algorithm, achieve fast local convergence and high accuracy, but their practical use is often limited by high computational costs. To mitigate this issue, variants such as inexact and quasi-Newton methods are widely used. A complementary and promising approach to improve the efficiency of the method is to employ mixed precision arithmetic, using different floating-point precisions for different operations, based on their impact on the convergence and accuracy of the method. In this work, we perform an error analysis of Newton's method accounting for different sources of inexactness, including approximations and rounding errors. We present a convergence analysis for the generated sequence, establishing bounds on the convergence rate and attainable accuracy. This theoretical framework covers quasi-Newton and inexact Newton methods, and is leveraged to propose mixed precision algorithms. We present a wide set of numerical experiments to illustrate our theoretical results and the behavior of Newton's method and its approximate variants in mixed precision floating-point arithmetic.

math.OC

Multiword matrix multiplication over large finite fields in floating-point arithmetic

This article is concerned with the efficient computation of modular matrix multiplication C=AB mod p, a key kernel in computer algebra. We focus on floating-point arithmetic, which allows for using efficient matrix multiplication libraries. However, the existing approach is limited to primes p with bitsize at most half the mantissa size (e.g., 26 bits with double precision arithmetic), and becomes quite inefficient when p approaches this limit. We present a new approach that overcomes this limitation and can efficiently handle primes with larger bitsizes. The key idea is to use multiword decompositions, which represent A and B as scaled sums of u and v matrices (words) with smaller coefficients. We provide a rigorous analysis that proves the correctness of this approach for suitably chosen scaling parameters. Our analysis determines the maximum bitsize of p that can be handled for a given number of words; in particular, we show that decomposing in two words each input suffices to handle bitsizes almost equal to the full mantissa size (e.g., the 26 bits limit is raised to 52 bits in double precision arithmetic). Moreover, we show that (1,v) decompositions with v>1 are also of interest to handle intermediate bitsizes. We perform an extensive experimental analysis for various matrix shapes and prime bitsizes. Our performance benchmarks on both CPU and GPU architectures confirm the efficiency of the proposed approach, which can outperform the existing single word approach for bitsizes as low as 23, and can handle bitsizes as high as 52 while retaining high performance.

math.NA

Frugality in second-order optimization: floating-point approximations for Newton's method

Minimizing loss functions is central to machine-learning training. Although first-order methods dominate practical applications, higher-order techniques such as Newton's method can deliver greater accuracy and faster convergence, yet are often avoided due to their computational cost. This work analyzes the impact of finite-precision arithmetic on Newton steps and establishes a convergence theorem for mixed-precision Newton optimizers, including "quasi" and "inexact" variants. The theorem provides not only convergence guarantees but also a priori estimates of the achievable solution accuracy. Empirical evaluations on standard regression benchmarks demonstrate that the proposed methods outperform Adam on the Australian and MUSH datasets. The second part of the manuscript introduces GN_k, a generalized Gauss-Newton method that enables partial computation of second-order derivatives. GN_k attains performance comparable to full Newton's method on regression tasks while requiring significantly fewer derivative evaluations.

cs.LG

Mixed precision accumulation for neural network inference guided by componentwise forward error analysis

This work proposes a mathematically founded mixed precision accumulation strategy for the inference of neural networks. Our strategy is based on a new componentwise forward error analysis that explains the propagation of errors in the forward pass of neural networks. Specifically, our analysis shows that the error in each component of the output of a linear layer is proportional to the condition number of the inner product between the weights and the input, multiplied by the condition number of the activation function. These condition numbers can vary widely from one component to the other, thus creating a significant opportunity to introduce mixed precision: each component should be accumulated in a precision inversely proportional to the product of these condition numbers. We propose a numerical algorithm that exploits this observation: it first computes all components in low precision, uses this output to estimate the condition numbers, and recomputes in higher precision only the components associated with large condition numbers. We test our algorithm on various networks and datasets and confirm experimentally that it can significantly improve the cost--accuracy tradeoff compared with uniform precision accumulation baselines.

cs.LG