Approximate Pythagoras Numbers

The Pythagoras number of a sum of squares is the shortest length among its sums of squares representations. In many rings, for example real polynomial rings in two or more variables, there exists no upper bound on the Pythagoras number for all sums of squares. In this paper we study how Pythagoras numbers behave with respect to small perturbations of elements. We show that these approximate Pythagoras numbers are often significantly smaller than their exact versions, and allow for (almost) dimension-independent upper bounds. Our results use low-rank approximations for Gram matrices of sums of squares, and estimates for the operator norm of the Gram map.