  The Pythagoras number of a sum of squares is the shortest length among its
sums of squares representations. In many algebras, for example real polynomial
algebras 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 in $*$-algebras over $\mathbb{C}$ behave with respect to
small perturbations of elements. More precisely, the approximate Pythagoras
number of an element is the smallest Pythagoras number among all elements in
its $\varepsilon$-ball. 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.
