NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Taylor expansion of the accumulated rounding error

Seppo LinnainmaaBIT 1976

TL;DR

This seminal 1976 paper introduces a formal method to track how individual rounding errors at each step of a calculation propagate into the final result using Taylor expansions. Most notably, it describes what we now recognize as the reverse mode of automatic differentiation (AD)—the mathematical foundation of backpropagation in modern deep learning—originally developed here to analyze numerical stability.

What Problem Does This Paper Address?

In numerical analysis, computers don't work with perfect real numbers; they use finite-precision floating-point arithmetic. Every addition, multiplication, or division introduces a tiny "local rounding error." In a complex algorithm with thousands of steps, these tiny errors can accumulate, potentially rendering the final result useless.

The challenge Linnainmaa addresses is: How do we determine the sensitivity of the final result to each individual intermediate rounding error? If we know which operations are the most "sensitive," we can redesign algorithms to be more numerically stable. While previous researchers like Henrici had noted that these errors could be expanded as a Taylor series, Linnainmaa provides the first concrete algorithmic framework to compute these coefficients efficiently.

Methods

The paper treats a computing process as a sequence of operations $u_i = Q_i(u_j, u_k)$. It defines the accumulated rounding error ($R_i$) as the difference between the finite-precision result and the theoretical "true" result.

Key methodological contributions include:

  • Taylor Expansion Framework: Expressing the total error as a sum of local errors multiplied by specific coefficients (partial derivatives).
  • Algorithm T: A systematic, a posteriori algorithm for computing first-order Taylor coefficients. It works by saving information about every operation during the "forward" calculation and then traversing those operations in reverse order to accumulate the sensitivities. This is the "Reverse Mode" of AD.
  • Algorithm S: An extension for computing second-order coefficients, which are necessary when first-order approximations aren't accurate enough.
  • Graph Representation: Modeling the computation as a Directed Acyclic Graph (DAG) where vertices are values and arcs represent dependencies.
  • Graph Reduction Rules: To manage the massive storage requirements of saving every intermediate step, the author proposes rules to simplify the graph on-the-fly, particularly when only the first-order error behavior is needed.

Datasets

As a theoretical numerical analysis paper, it does not use modern "datasets." Instead, it evaluates the algorithms using classic numerical benchmarks:

  • Horner’s Scheme: Used for evaluating high-degree polynomials (up to 1,000 degrees in the paper's experiments).
  • Gaussian Elimination: Used to solve linear systems of equations to test the scalability of graph reduction techniques.

Key Insights and Ideas

  • The Derivative Connection: The paper formalizes the insight that the coefficient of a local rounding error in the Taylor expansion is exactly the partial derivative of the final result with respect to that intermediate value.
  • Efficiency of the Reverse Pass: Linnainmaa demonstrates that while a "forward" pass can compute the effect of one input on many outputs, a "reverse" pass (Algorithm T) can compute the effect of all intermediate errors on a single final output much more efficiently.
  • Storage vs. Precision: The author identifies a critical trade-off: to perfectly analyze error propagation, you must store the entire history of the computation. This led to the development of graph reduction rules to prune "inactive" variables that no longer influence future operations.

Key Results

The paper provides a lookup table for the coefficients of elementary operations, which serves as the "rules" for the reverse traversal:

Table 1: Coefficients of 1st and 2nd order terms for elementary operations. Note how division introduces more complex second-order terms compared to addition or multiplication.
  • Computational Overhead: Testing on a Burroughs B6700, the author found that computing first-order coefficients for a 1,000-degree polynomial evaluation increased execution time by a factor of about 20.
  • Storage Requirements: Algorithm T requires roughly $5n$ external storage units (where $n$ is the number of operations) and $m$ internal storage units (where $m$ is the number of variables).
  • Optimization: The paper proves that for linear processes (like Horner's scheme), graph reduction can keep storage requirements proportional to the number of variables rather than the number of operations.

Limitations and Future Work

  • Storage Bottleneck: The primary limitation is the "prohibitively large" amount of computer storage required to save the history of long numerical processes. While graph reduction helps, it doesn't solve the problem for all types of algorithms.
  • Higher-Order Complexity: While Algorithm S handles second-order terms, the complexity grows rapidly for even higher orders, making them impractical for most routine uses.
  • Practicality: The author concludes that while these methods are excellent for testing the stability of new algorithms, the overhead is too high for "continuous estimation" in routine production code.

This work remains a cornerstone of numerical analysis, providing the mathematical lineage for the automatic differentiation tools that power today's AI revolution.

Summary updated

BibTeX
@inproceedings{linnainmaa1976taylor,
  author = {Seppo Linnainmaa},
  title = {{Taylor expansion of the accumulated rounding error}},
  booktitle = {BIT},
  year = {1976},
  doi = {10.1007/bf01931367},
}
Figure