                                                    Covering Number of Real Algebraic Varieties and Beyond:

                                                              Improved Bounds and Applications

                                                                                Yifan Zhang∗              Joe Kileel†





                                                                                              Abstract

                                                    Covering numbers are a powerful tool used in the development of approximation algorithms,

arXiv:2311.05116v4 [math.AG] 6 Jun 2025









                                                    randomized dimension reduction methods, smoothed complexity analysis, and others. In

                                                    this paper we prove upper bounds on the covering number of numerous sets in Euclidean

                                                    space, namely real algebraic varieties, images of polynomial maps and semialgebraic sets

                                                    in terms of the number of variables and degrees of the polynomials involved. The bounds

                                                    remarkably improve the best known general bound by [84], and our proof is much more

                                                    straightforward. In particular, our result gives new bounds on the volume of the tubular

                                                    neighborhood of the image of a polynomial map and a semialgebraic set, where results for

                                                    varieties by [53] and [7] are not directly applicable. We illustrate the power of the result on

                                                    three computational applications. Firstly, we derive a near-optimal bound on the covering

                                                    number of tensors with low canonical polyadic (CP) rank, quantifying their approximation

                                                    properties and filling in an important missing piece of theory for tensor dimension reduction

                                                    and reconstruction. Secondly, we prove a bound on dimensionality reduction of images

                                                    of polynomial maps via randomized sketching, which has direct applications to large scale

                                                    polynomial optimization. Finally, we deduce generalization error bounds for deep neural

                                                    networks with rational or ReLU activation functions, improving or matching the best known

                                                    results in the machine learning literature while helping to quantify the impact of architecture

                                                    choice on generalization error.



                                          keywords: covering number, real algebraic variety, semialgebraic set, low rank tensor, sketch-

                                          ing, polynomial optimization, generalization error,







                                          1        Introduction

                                          Given a bounded set V ⊆ RN in Euclidean space, an ε net of V is a subset N ⊆ V so that for

                                          every x ∈ V , there exists y ∈ N such that ∥x − y∥ ⩽ ε. The minimal cardinality of an ε net is

                                          the covering number of V , denoted as N (V, ε). The covering number measures the complexity

                                          of V , in the sense that one only needs N (V, ε) points, or log N (V, ε) bits of information, to

                                          approximate an arbitrary point in the set to a Euclidean distance of ε. An upper bound on

                                          N (V, ε) is thus a powerful tool, widely used in approximation theory and signal reconstruction

                                          [73, 70], dimension reduction [81, 79, 55], learning theory and statistical applications [52, 37, 47],

                                          topological data analysis [61, 24], etc. ASbound on N (V, ε) also leads to a bound on the volume

                                          of the tubular neighborhood T(V, ε) := x∈V B(x, ε). For V the set of bad (or ill-posed) inputs

                                          to a given algorithm, T(V, ε) can be used in smoothed complexity analysis of the algorithm

                                          [7, 14]. Furthermore, in applications the logarithm of the covering number log N (V, ε), also

                                          called the metric entropy of V , is frequently the key quantity to be bounded, and it has deep

                                          connections to other parts of mathematics [27, 30].

                                               For many sets in Rn such as the unit sphere in a linear subspace or other smooth subman-

                                          ifolds, the covering number has been extensively studied [79, 29, 42, 74, 65, 82]. Other works

                                              ∗

                                                  Oden Institute, UT Austin, yf.zhang@utexas.edu

                                              †

                                                  Department of Mathematics and Oden Institute, UT Austin, jkileel@math.utexas.edu





                                                                                                  1

studied covering numbers in infinite dimensional spaces, such as function spaces, under appro-

priate metrics [77, 85, 35, 73, 5, 47]. However, to the best of our knowledge, there is limited

work on the covering number of polynomially defined sets, i.e., images of real polynomial maps,

algebraic varieties and other semialgebraic sets. Nonetheless, algebraic sets appear in many ap-

plications. For example, the set of low rank matrices can be viewed as an algebraic variety or the

image of the polynomial map defined via low rank factorization [49], and its covering number is

important to compressed sensing algorithms [36]. For higher dimensional arrays, the analogs are

the sets of low rank tensors and tensor networks [46]. In high dimensional settings as in tensor-

based algorithms, dimension reduction and approximation are critical, and thus it is important

to have a good bound on the covering number of these algebraic sets. Although algebraic sets

can be viewed as manifolds after the removal of a measure zero subset, it is challenging to apply

existing tools to bound the covering number, as they require estimating geometric descriptors

such as the volume and the reach of these manifolds [42], which are often very difficult to access.

     Equipped with good upper bounds on the covering number of algebraic sets, one can analyze

nonlinear computational problems such as polynomial optimization and dimension reduction of

tensor networks. In addition, the universal approximation power of polynomial maps allows the

theory to be applied to derive covering number bounds on many compact (non-algebraic) sets,

e.g., as arising from deep neural networks. We refer the readers to Section 3 for more details on

possible computational applications.



1.1     Our Contributions

We prove a unified bound on the covering number N (V, ε) for all regular sets V restricted to a

compact domain, defined informally as follows:

Definition 1.1. We say a set V ⊆ RN is a (K, n) regular set if

      1. For almost all affine planes L of codimension n′ ⩽ n in RN , V ∩ L has at most K path

         connected components.

      2. For almost all affine planes L of codimension n′ ⩾ n + 1 in RN , V ∩ L is empty.

See Definition 2.1 for a formal version of Definition 1.1. Classic theory in algebraic geometry

shows that real algebraic varieties, images of polynomial maps, and other semialgebraic sets are

indeed regular. For those sets, n is the intrinsic dimension and K is controlled by a result of

early work by Petrovskii and Oleinik [62, 66] and later independent works of Milnor and Thom

[57, 76]; see Proposition 2.14 and Lemma 2.15.

     We are mainly interested in the regime of n ≪ N . This setting is typically the case in

applications where the set of interest V ⊆ RN is parametrized by n variables; it is also a

necessity for compression to be possible in order to survive the curse of dimensionality.1 Our

main result (Theorem 2.6) states that for a (K, n) regular set V in the cube [−1, 1]N , the covering

number is bounded by



                            log N (V, ε) ⩽ n log(1/ε) + log K + Cn log N,                               (1)



for some absolute constant C.2 In particular, if V is the intersection of the unit ball B N with the

image of a polynomial map whose coordinate functions have degree at most d, then Lemma 2.15

guarantees log K = O(n log d). The bound (1) has an optimal dependence on ε as ε → 0. We

also provide a conjecture and a heuristic justification stating the dependence on log N seems

inevitable given the structure in Definition 1.1. See the discussion at the end of Section 2.1.

     Our main result (1) only requires the dimension of V , and to compute K, by the theorem

of Petrovskii-Oleinik-Milnor-Thom, it is enough to have an upper bound on the degree of the

  1

    That said, there are applications where n ≈ N , e.g., smoothed analysis for semi-definite programs [21].

However, sets of low codimension are not the main theme of this paper.

  2

    The choice C = 3 is valid unless N is trivially small.





                                                     2

defining polynomials when V is a variety or semialgebraic set, or on the degree of the coordinate

functions of the polynomial map when V is a polynomial image. The new bound (1) remarkably

improves the best known general bound on N (V, ε) in [84]. In addition, there is no need to acquire

a bound on the volume or the reach of V , in contrast to existing results that take a different

approach using manifolds (e.g., [42]). Despite recent advances in algorithmically computing

bounds on the reach for smooth algebraic varieties [23], such methods would require nontrivial,

and possibly unaffordable computations in large dimensions. Furthermore, the covering number

is a global feature of the set (like volume), and ideally it should not be expressed in terms of a

worst-case local descriptor (like the reach).

     As a direct consequence of Theorem 2.6, we obtain a new bound on the volume of the tubular

neighborhoods of polynomial images (Corollary 2.20) and general semialgebraic sets.

     The other contributions of this paper are to three application domains, chosen to illustrate

the power of Theorem 2.6 in computation. Firstly, we deduce a bound on the covering number

of tensors of low CP rank (Section 3.1). It quantifies the fact that a Gaussian tensor is almost

never close to low rank, and hence there is a need of an appropriate data generation model for

low rank tensor modeling to make sense. Next, in Section 3.2 we prove a bound for sketching

(i.e., dimension reduction on) the image of a polynomial using random matrices. The techniques

developed there can also be applied to sketch a general regular set. As a downstream task, we

show how to compress a nonlinear polynomial optimization problem (and some derived variants

of it) using a randomized sketch operator, almost as efficiently as when compressing a linear

least squares problem (up to a logarithmic factor). Thirdly, in Section 3.3 we leverage the

approximation power of polynomial and rational maps to deliver bounds on the generalization

error of various deep neural networks – fully connected or convolutional networks with rational

or ReLU activations. The bounds in Section 3.3 either improve or match the best known results

in the machine learning literature, and they give guidance on architecture and activation choice

from a generalization error perspective.



1.2   Comparison to Prior Art

To our knowledge, the best existing bounds on N (V, ε) for regular sets (Definition 1.1) are

developed in [40, 80, 84]. These works studied the covering number of a set V ⊆ RN using its

variations, defined as                        Z

                              Vari (V ) = c(N, i)       Var0 (V ∩ P ) dP,                      (2)



where i ⩽ N , c(N, i) is some normalization constant, and Var0 (·) denotes the number of con-

nected components of a set. The integral in (2) is over all affine subspaces P in RN with

codimension i with respect to an appropriate measure (see the beginning of Section 2). Obvi-

ously for bounded regular sets, the variations are easily controlled. [40, 80, 84] derived a bound

on the covering number of any set V given bounds on the variations. In particular, [84, Propo-

sition 5.8] showed that for a semialgebraic set V ⊆ RN of intrinsic dimension at n, the covering

number is bounded by

                          log N (V, ε) ⩽ n log(1/ε) + log C(N ) + D(V ),

where C(N ) depends on the ambient dimension N and D(V ) depends on the sum of the degrees

of the defining polynomials and the intrinsic dimension n. The point to make is that the term

log C(N ), while not explicitly specified in [84], is of order Ω(N log N ) by the argument of [84],

see [7, Remark 3.3]. Therefore, our result improves this general bound by reducing the term to

O(n log N ).

    In the case where V is a semialgebraic set, our result greatly reduces the dependence on

the degree of the defining polynomials, by depending only on an upper bound for the degrees

instead of their the sum (see item 8 in Lemma 2.15). Moreover, our argument is remarkably

straightforward compared to [40, 84].



                                                    3

     When V is the image of the polynomial map p : Rn → RN whose coordinate functions have

degree at most d, to our knowledge we deduce the first bound in this setup. An alternative to

our approach would be to relate Im(p) to an algebraic variety U by taking its Zariski closure.

There are recent results on bounding the volume of the tubular neighborhood of a real algebraic

variety [53, 7], which produce a bound on the covering number by a volume argument (see e.g.,

[79, Proposition 4.2.12]):

                                                             Vol(T(U, ε/2))

                                    N (V, ε) ≲ N (U, ε) ⩽                   .                                  (3)

                                                             Vol((ε/2)B N )

Denote D the degree bound of the defining polynomials of variety U . After a careful relaxation

of equation (3.2) in [7], 3 when n ≪ N and ε ≲ 1/(Dn), the resulting bound from (3) is

                               N (V, ε) = n log(1/ε) + O(n log N + N log D).

By comparison our result improves the last term O(N log D) to log K = O(n log d), which is

significant since n ≪ N and D can be exponentially large compared to d [56]. Most importantly,

it is almost never easy to find the polynomials defining U (e.g., [20]). For example, when V is

the set of low rank tensors (see Section 3.1) and p is the map from the low rank factors to the

tensor, understanding the equations defining U is an active area of research [46].

     Lastly, when V is a real algebraic variety defined by the vanishing of polynomials, our bound

has the same asymptotic order as the state-of-the-art [7] when n ≪ N . We remark that our

argument is much simpler than [53, 7]. Table 1 below summarizes all the comparisons above.



   Source                  Conditions on V and ε                      Deduced bound on log N (V, ε)

                    U real semialgebraic sets with B

                                                                   n log(1/ε) + O(N log d + N log B +

       [84]        equality and inequality constraints,

                                                                                N log N )

                              V = U ∩ BN

       [84]            U real varieties, V = U ∩ B N                n log(1/ε) + O(N log d + N log N )

                      V complex projective varieties,

       [14]                          √                              2n log(1/ε) + O(N log d + n log N )

                               ε ≲ 1/ n

                  U real smooth complete intersections,

       [53]                                                          n log(1/ε) + O(N log d + n log N )

                              V = U ∩ BN

       [7]             U real varieties, V = U ∩ B N                 n log(1/ε) + O(N log d + n log N )

                     U real semialgebraic sets with b

 this paper                                                       n log(1/ε) + O(N log d + b + n log N )

                   inequality constraints, V = U ∩ B N

 this paper            U real varieties, V = U ∩ B N                 n log(1/ε) + O(N log d + n log N )

                  U = Im(p), p : Rn → RN polynomial,

 this paper                                                          n log(1/ε) + O(n log d + n log N )

                             V = U ∩ BN



Table 1: Comparison of covering number bounds. Recall B N is the unit ball in RN , and N , n

are respectively the ambient and intrinsic dimensions. The polynomials defining varieties and

semialgebraic sets, as well as the coordinate functions of the polynomial map, are all assumed

to have a degree at most d. The covering number bounds are simplified to the regime of n ≪ N

and b = O(N log b) in the semialgebraic case.





1.3      Other Related Works

General background on covering numbers can be found in [77]. There are many previous works on

bounding the covering number of various sets: e.g., compact Riemannian manifolds and curves

  3

      A tighter but easy relaxation is needed here than the authors used to deduce their Theorem 1.1 in [7].





                                                         4

[69, 43], compact smooth manifolds [29, 42, 82] and in particular Grassmannian manifolds [74,

65], Lipschitz functions with bounded Lipschitz constant over a compact set [33, 54], kernel

functions [47], shallow and deeper neural networks [73, 51, 5], spaces of convex functions [35],

tensors with low Tucker rank [68] and low CP rank tensors sharing the same set of factor matrices

[41], nearly critical points of functions [83], etc. Some of these sets are regular sets, e.g., the

Grassmannian manifold and low rank Tucker tensors. By using special properties of these sets,

e.g., Lipschitz property of the parameterization of low Tucker rank tensors, sometimes it is

possible to avoid dependencies of the covering number on the ambient dimension. However,

such arguments are limited to special cases.

     Another topic related to this paper is topological data analysis [15, 61]. The goal is to learn

many properties of a space V from noisy sample points on V . Recently, topological data analysis

has been initiated for algebraic varieties [13]. In such applications, it is important to obtain an

(ε, δ) sample S on V , which means V ⊆ T(S, ε) and S ⊆ T(V, δ), see [26]. Our Theorem 2.6 can

easily be used to obtain a bound on the optimal size of S, assuming that bounds on the degree

of defining equations of V and its dimension are available.



1.4     Notation

We use bold lowercase letters (e.g., a, b) for vectors, bold uppercase letters (e.g., A, B) for

matrices, and calligraphic uppercase letters (e.g., T ) for higher order tensors. For matrices,

∥A∥2 denotes the ℓ2 → ℓ2 operator norm and ∥A∥F denotes the Frobenius norm. The closed

unit ball in RN is B N . The symmetric cube is denoted as C N := [−1, 1]N . For a set U ⊆ RN ,



                                 π(U ) := {x/ ∥x∥ : x ∈ U, x ̸= 0}



denotes the projection of U \ {0} to the unit sphere. We also write π(x) = x/ ∥x∥ for vectors

x ̸= 0. The image of function f is denoted Im(f ), and for a set U we write f (U ) = Im(f |U ).

For n ∈ N, let [n] = {1, 2, . . . , n}. The covering number N (V, ε) refers to the covering number

by Euclidean balls. When a different ambient metric d is used, we denote the corresponding

covering number by N (V, ε, d). The function log(·) refers to the natural logarithm with base e.

We use symbol c to denote an absolute constant. Note that if multiple instances of c appear in

a derivation, the instances need not refer to the same number.





2      Main Results

Our main result in Theorem 2.6 bounds the covering number of all (K, n) regular sets (formally

defined in Definition 2.1). In particular, it applies to algebraic varieties and images of polynomial

maps (see Section 2.3).

                                                                           k

    We start by defining a (K, n) regular set in RN formally. Denote GN the affine Grassmannian

                                                                                   k

manifold whose points are all k dimensional affine planes in RN . For A ∈ GN , we parametrize

it by (x, P ), where P ∼= Rk denotes the tangent space of A and x ∈ P ⊥ ∼        = RN −k denotes the

                                                                                                   k

vector in the normal plane corresponding to the point in A closest to 0 ∈ RN . We equip GN

with the uniform measure µkN invariant to rigid body transformations. We refer the readers to

[71, 60] for more discussion on technical details of measure constructions. Sometimes we drop

the dimensions from the notation when they are obvious from the context.



Definition 2.1. We say a set V ⊆ RN is a (K, n) regular set in RN if



      1. For µ-almost all planes L of codimension n′ ⩽ n in RN , V ∩ L has at most K path

         connected components.

      2. For µ-almost all planes L of codimension n′ ⩾ n + 1 in RN , V ∩ L is empty.



                                                 5

In Section 2.3, we list some useful classes of regular sets. In many situations, such as when V is

a real algebraic variety, n can be taken as the intrinsic dimension of V . The following properties

of regular sets will be useful in the discussion of our main result and its proof.



Lemma 2.2. Let V be (K, n) regular in RN . Then for µ-almost all planes L in RN of codi-

mension m ⩽ n, the set L ∩ V is (K, n − m) regular in L ∼

                                                        = RN −m .

Lemma 2.3. Any (K, 0) regular set is a collection of at most K discrete points.



    The lemmas are proven Appendix A. It is also convenient to introduce the following defini-

tion.



Definition 2.4 (generic planes). Let V be a (K, n) regular set. We say an affine subspace

L of codimension m ⩽ n is generic to V if L is not in the µ-null set in the condition 1 of

Definition 2.1, nor in the µ-null set in Lemma 2.2. We say an affine subspace L of codimension

m > n is generic to V if L is not in the µ-null set in condition 2 of Definition 2.1. Consequently,

planes generic to V constitute a µ-full measure set in the affine Grassmannian.



   In order for a regular set V to have a finite covering number, we require it to be bounded.

The following notation is convenient.



Definition 2.5. For a set V in RN , we denote [V ]N the smallest r ⩾ 0 such that V can be

covered by a set that is a rigid body transformation of r · C N , where C N = [−1, 1]N .



2.1   Main Statement on Covering Numbers

For all bounded (K, n) regular set V , the main result below establishes an upper bound on its

covering number.



Theorem 2.6. Let V ⊆ RN be a (K, n) regular set with [V ]N ⩽ t. Then for any ε ∈

(0, diam(V )],

                                       !

                              2tnN 3/2                                           

         log N (V, ε) ⩽ n log            + log 2K = n log(t/ε) + O n log N + log K . (4)

                                 ε



Remark 2.7. The constants in (4) can possibly be improved as we paid little attention to opti-

mize them. Note that a (K, n) regular set is also (K ′ , n′ ) regular for K ′ ⩾ K and n′ ⩾ n. This

accords well with our bound above, which is increasing in K and n. Therefore an upper bound

on K and n is sufficient to derive a bound on the covering number.



    The proof of the main theorem is given in Section 2.2. Below we discuss the optimality of

our bound on log N (V, ε). First we note that our bound is asymptotically tight as ε → 0. Let

V be a bounded n dimensional smooth algebraic variety. It is known that V has a Hausdorff

dimension dimH (V ) = n. Thus, by a classic result, the entropy dimension



                                                        log N (V, ε)

                                 dime (V ) := lim sup

                                                ε→0       log(1/ε)



is lower bounded by its Hausdorff dimension n (see e.g., [84, Chapter 2]). Since V is (K, n)

regular for some K, we conclude that for some (K, n) regular sets log N (V, ε) = Ω(n log(1/ε))

as ε → 0. This shows our bound is asymptotically tight.

     Another key concern is whether the N 3/2 dependence in the numerator in (4) is necessary. A

factor of N 1/2 is contributed by the fact that we are covering a set in the cube C N with ℓ2 balls.

Indeed if we bound the covering number of V with respect to the ℓ∞ metric using the same

argument, then in (4) the term N 3/2 is reduced to N 1 . We conjecture that an N 1 dependence

is necessary.



                                                 6

Conjecture 2.8. There exists a (K, n) regular set V in B N with covering number N (V, ε) =

Ω(N n ).



     To justify this conjecture, consider the intersection of V with coordinate hyperplanes, Vi =

                                                                        4     N −1 . Then N (V, ε) ≳

   ∩

PN {xi = 0}. Then Lemma 2.2 implies Vi are (K, n − 1) regular in B

V

                                                                                          n

   i=1 N (Vi , ε) ≍ N · N (V1 , ε) is plausible. So by induction, we expect N (V, ε) = Ω(N ).

     Even assuming Conjecture 2.8 holds, it is an interesting question whether for specific sub-

classes of regular sets, e.g., varieties and semialgebraic sets, the N dependence can be improved

in the regime n ≪ N . We leave this to a future investigation.

     Lastly, we note that the dependency on K is natural in (4). A discrete set of K elements is

a (K, 0) regular set, and it has a covering number of K when ε is sufficiently small.



2.2      Proof of Theorem 2.6

Our proof of Theorem 2.6 is based on a slicing argument. The idea is to intersect V with a lower

dimensional affine subspace L, and bound the covering number of V ∩ L. Starting from the base

case where L has a codimension n and V ∩ L is a finite set of points, we inductively decrease

the codimension of L and finally conclude a bound on V . The following definitions and lemma

are elementary but handy.



Definition 2.9 (cells). Let U be a set in RN and L = {Li }i∈I a collection of affine hyperplanes.

For x, y ∈ U , define the equivalence relation on U \ ∪Li ∈L Li by x ∼ y if for all i ∈ I, x and

y are on the same side of plane Li . We denote cell(U, L) the collection of all such equivalence

classes. We denote diam(cell(U, L)) the supremum of the diameters of all elements in cell(U, L).



Definition 2.10 (ε regular system). Let V be a bounded regular set in RN . For any ε > 0, we

say a finite collection L of affine hyperplanes is an ε regular system on V if diam(cell(V, L)) ⩽ ε

and each L ∈ L is generic to V .



Lemma 2.11. Fix any t > 0, ε > 0, τ > 1. Let V ⊆ RN be a regular set with [V ]N ⩽ t. Then

there exists an ε regular system L on V of size 2tN 3/2 ε−1 , such that for any plane L ∈ L, it

holds [L ∩ V ]N −1 ⩽ τ t.



Proof. By translation, we may assume V ⊆ t · C N , and it suffices to have [L ∩ (t · C N )]N −1 ⩽ τ t in

                                                                        N

the regular system. Let E = {e1 , . . . , eN } be the standard basis

                                                               √ of R . For some δ > 0 chosen

later, put a grid with grid spacing no larger than ((1 − δ)ε/ N ) on [−t, t], with size at most

                                           j √                k

                                   M ⩽ 2t N (ε(1 − δ))−1 .



Note that we excluded the end points at {−t, t} from the grid. Denote the grid points by {θi }i .

For each i ∈ [M ] and k ∈ [N ], denote  k          ⊥

                                  k Li = θi ek + ek .

    Now clearly the planes L = Li : i ∈ [M ], k ∈ [N ] partition t · C N , and thus V , into small

cubes of diameter at most (1 − δ)ε. The cardinality of L is

                                          j √               k

                                 |L| ⩽ N · 2t N ((1 − δ)ε)−1 ,



and for each L ∈ L, [L ∩ (t · C N )]N −1 = t. By Lemma 2.2 and the fact that t · C N is bounded, we

can perturb each L ∈ L by a sufficiently small amount to get L′ and consequently a perturbed

collection L′ , so that (i) each L′ is generic to V , (ii) diam(cell(L′ , V )) ⩽ ε, and (iii) [L′ ∩ (t ·

C N )]N −1 ⩽ τ t. Since δ > 0 is arbitrary, we can take it sufficiently small and conclude that

|L′ | ⩽ 2tN 3/2 ε−1 . Since (iii) implies [L′ ∩ V ]N −1 ⩽ τ t for L′ ∈ L′ , L′ is a valid candidate for the

desired ε regular system.                                                                                ■

  4

      If the coordinate hyperplanes happen to be non-generic, we perturb them by a small amount.





                                                       7

    Lastly we introduce one more piece of language needed in the main proof. An illustration

of Definition 2.12 can be found in Figure 1.

                              N

Definition 2.12. Let V ⊆ R  S . Let L be a collection of affine hyperplanes. Let W be a path

connected component of V \ L∈L L. We call W type-I if W ∩ V ∩ L = ∅ for all L ∈ L, that

is, W ∩ V is contained in the interior of some E ∈ cell(RN , L). Otherwise we call W a type-II

component.



    Below use the set illustrated Figure 1 (a) as a simple example in R2 to explain the main

idea behind the proof.



Example 2.13. Consider a compact (K, 1) regular set V in R2 illustrated by the colored√ curves

in Figure 1 (a) (for this curve, K = 4 is sufficient). The black grid denotes an ε/ 2 regular

system L so the diameter of the cells are bounded by ε. The green circle is a type-I component,

and the blue curve is the union of type-II components.

    To cover both curves, we put a single ball for each type-I component to take care of all the

green components. Then we put a ball at each intersection of the blue curve and the black grid

(e.g., the red dots). This will cover the blue curve of type-II components.

    Since there are at most K green components (because there are at most K connected compo-

nents in V overall) and since each black line has at most K intersections with V , the covering

number N (V, ε) is bounded as N (V, ε) ⩽ K + |L| · K. Lemma 2.11 gives a bound on the number

of planes |L|, and therefore we have a bound on the total number of balls.



          (a)                                         (b)









Figure 1: (a): An example where dim(V ) = 1 in R2 . The black lines represent planes in L.

There are a circle-shaped type-I component colored in green, and a wave-shaped blue curve

containing a few type-II components. In (b) we have dim(V ) = 2 in R3 (the blue surface). The

black box denotes a cell of the regular system. We can identify the intersection of the roof of

the black cell (a generic plane) and V , which is the red curve, as an instance of the curve in (a).



    Going into higher dimensions, each red dot in Figure 1 (a) is no longer a dot that is covered

by a single ball, but rather a lower dimensional regular set (see Figure 1 (b)). This allows us

to do the induction as the dimension of the intersection grow and get the final result. The full

proof is given below.



Proof of Theorem 2.6. The bound is obviously valid if N = 1 or n = 0. Consider N ⩾ 2 and

n ⩾ 1. Take some δ ∈ (0, 2t], which will be specified later. Let Lk be an affine plane of dimension

N − n + k, 0 ⩽ k ⩽ n. Denote Vk = V ∩ Lk . We prove by induction that for all 0 ⩽ k ⩽ n, if

Lk is generic and [Vk ]N −m ⩽ τ t for some τ > 1, then Vk is covered by at most

                                                  k

                                                  Y

                                           k ck

                              Mk = (2t/δ) τ K         (N − n + j + 1)                           (5)

                                                  j=1





                                                  8

balls centered in Vk of radius                       √

                                               rk = k N δ,                                             (6)

where c0 = 0 and ck > 0. The exact values of ck will not be important.

    The base case k = 0 is automatic, since by Lemma 2.2, V0 is (K, 0) regular, which is a set

of at most K points by Lemma 2.3. Thus, they are covered by M0 = K balls of radius r0 = 0.

    Next consider Lk being a generic plane having codimension  √ N − n + k, k ⩾ 1, and [Lk ∩

V ]N −n+k ⩽ τ t. Again, Vk is (K, k) regular in Lk . Let L be a N δ regular system on Vk . By

Lemma 2.11, we can take L so that all planes L ∈ L are generic to Vk , and



                                      (N − n + k)3/2

                       |L| ⩽ 2τ t ·       √          ⩽ (2t/δ)τ · (N − n + k),

                                            Nδ



and in addition each plane L ∈ L satisfies [L ∩ Vk ]N −n+(k−1) ⩽ τ 2 t. Therefore, by the induction

hypothesis, for all L ∈ L, L ∩ V = L ∩ Vk is covered by at most

                                                       k−1

                                                       Y

                          Mk−1 = (2t/δ)k−1 τ 2ck−1 K         (N − n + j + 1)

                                                       j=1



                               √

balls of radius rk−1 = (k − 1) N δ.

    Let us go back to Vk = Lk ∩ V . By regularity conditions, there are at most K type-I       √

components on Vk . For each type-I component W , we have diam(W    √   ) ⩽ diam(cell(V, L)) ⩽    N δ.

Hence, all type-I components are covered by K balls of radius N δ with     S centers in Vk .

    Next, take an arbitrary type-II component W . Take arbitrary u ∈ L∈L W ∩ Vk ∩ L. Since

                                √                 √

W has a diameter is at most N δ, W ⊆ B(u, N δ). Now we identify L ∈ L that            S contains u.

By the induction hypothesis, there are centers {v i }, i ∈ [Mk−1 ] on L ∩ Vk so that i B(v i , rk−1 )

covers L ∩ Vk . In particular, there is some v ∈ {v i }i so that d(u,√

                                                                     v) ⩽ rk−1 . Thus, we conclude

that W is covered by a ball centered at v of radius rk = rk−1 + N δ. For each L ∈ L and for

each center v i in L, we put a ball of radius rk centered at v i . These balls then cover all type-II

components. Consequently, all type-I and type-II components are covered by at most

                                                                               k−1

                                                                               Y

                                                               k−1 2ck−1

       K + |L|Mk−1 ⩽ K + (2t/δ)τ · (N − n + k) · (2t/δ)              τ     K         (N − n + j + 1)

                                                                               j=1

                                                                              k−1

                                                                              Y

                                                              k−1 2ck−1

                      ⩽ (2t/δ)τ · (N − n + k + 1) · (2t/δ)       τ        K         (N − n + j + 1)

                                                                              j=1



                      = Mk



balls of radius rk . For points in Vk that is not in any type-I or type-II component, they are

in some L ∈ L, and thus are also covered by these balls by the induction hypothesis. This

completed our induction step.

    Finally

      √     we apply the result on k = n ⩾ 1. The covering number of V by balls of radius

ε = n N δ is at most

                                       n

                                                                       !n

                               n cn

                                      Y                          N 3/2

                   Mn = (2t/δ) τ K       (N − n + j + 1) ⩽ 2tn            · 2K.            (7)

                                                                   ε

                                         j=1





                                                      N ⩾ 2, we have nj=1 (N −n+j+1) ⩽ (3/2)N n .

                                                                    Q

In the last inequality, note that for all 1 ⩽ n ⩽ N , Q

we choose τ sufficiently close to 1 so that τ cn nj=1 (N − n + j + 1) ⩽ 2N n . For δ > 2t,

       √

ε > 2t N ⩾ diam(V ). In this trivial case, V is covered by a single ball of radius ε. The proof

is thus complete by taking the logarithm of the right-hand side of (7).                       ■



                                                   9

2.3    Examples of Regular Sets

As our next concern, we show in this section that some important sets are indeed regular sets.

Namely, this include images of polynomial and rational maps, as well as algebraic varieties and

semialgebraic sets. We remark that the bound on K for semialgebraic sets therein drastically

improves the result in [84, Corollary 4.9]. The main handle to bound K for polynomially defined

sets is the following theorem of Petrovskii-Oleinik-Milnor-Thom (POMT).

Proposition 2.14 (POMT). Let {f1 , . . . , fk } be a collection of polynomials on RN of degree at

most d. Denote Z(fi ) the zero set of fi . Then the number of path connected components5 of

V = ∩i Z(fi ) is upper bounded by d(2d − 1)N −1 .

    We show how to use POMT to control K when V is a polynomial image in Lemma 2.15.

Then we list more examples of regular sets with explicit bounds on (K, n) in Lemma 2.16 to

Lemma 2.18. The proofs to these results are similar to the polynomial case, and thus are given

in Appendix B.

Lemma 2.15 (polynomial images are regular). Let p : Rn → RN be a polynomial map whose

coordinate functions are of degree at most d. Then

   (a) Im(p) is ((2d)n , n) regular.

   (b) Im(p) ∩ (c · B N ) is ((4d)n+1 , n) regular for all c > 0.

   (c) π(Im(p)) is ((4d + 1)n+1 , n) regular. If Im(p) is a cone, then the second regularity param-

       eters may be changed from n to n − 1.

Proof. Let L = (u, P ) be an affine subspace of RN of codimension m (see the beginning of

Section 2 for this parametrization). Let e1 , . . . , em be an orthonormal basis of P ⊥ . For a subset

S of Euclidean space, let CC(S) denote the number of path connected components of S with

respect to the Euclidean topology. Note that item 4 and item 5 are immediate from item 8. We

prove the rest of the assertions.

    For item 1, consider S = {x : p(x) ∈ L} in Rn . It is the solution set of a system of degree d

polynomial equations:

                               ⟨p(x), ei ⟩ = ⟨u, ei ⟩ , i = 1, . . . , m.

Thus by POMT (Proposition 2.14), CC(S) ⩽ d(2d − 1)n ⩽ (2d)n . The same is true for Im(p) ∩

L, because Im(p) ∩ L = p(S) and p is continuous. When m > n, the polynomial system is

overdetermined and has no solution for Zariski generic u and P . Indeed, see [22, Theorem 1.1]

or [32, Section 3.2.B], and note Im(p) is contained in a variety of dimension at most n (namely

its Zariski closure). We conclude that Im(p) is ((2d)n , n)regular.

     For (2), let w be a dummy variable and consider S = (x, w) : ∥p(x)∥2 + w2 = c2 , p(x) ∈ L

in Rn × R. It is given by the solution set of

                                  ⟨p(x), ei ⟩ = ⟨u, ei ⟩ ,       i = 1, . . . , m;

                                                   2

                                            ∥p(x)∥ + w = c2 .2





The polynomial equations have degree bounded by 2d. So POMT implies CC(S) ⩽ (4d)n+1 .

When m > n, S = ∅ Zarski-generically by [22, Theorem 1.1]. Since the map (x, w) 7→ p(x) is

continuous and sends S to Im(p) ∩ (c · B M ) ∩ L, we conclude that Im(p) ∩ (c · B M ) is ((4d)n+1 , n)

regular.

    For (3), consider S = (x, w) : ∥p(x)∥2 w = 1, π(p(x)) ∈ L in Rn × R. Then S is the solu-

                         



tion set to

                            ⟨p(x), ei ⟩2 = ⟨u, ei ⟩2 ∥p(x)∥2 ,         i = 1, . . . , m;

                                                       2

                                              ∥p(x)∥ w = 1.

  5

    Path connectedness is equivalent to connectedness on semialgebraic sets, see e.g. [10, Proposition 2.5.13,

Theorem 2.4.5].





                                                       10

The bottom equation excludes the zero set of p, so that π(p(x)) is well-defined. Note all the

equations have degree at most 2d + 1. By POMT, CC(S) ⩽ (2d + 1)(4d + 1)n ⩽ (4d + 1)n+1 .

Again, we have S = ∅ when m > n and L is Zariski generic. Since the map (x, w) 7→ π(p(x)) is

continuous on S with image π(Im(p)) ∩ L, we conclude that π(Im(p)) is ((4d + 1)n+1 , n) regular.

Finally, if Im(p) is a cone then π(Im(p)) is contained in a variety of dimension 1 less. Hence, we

can replace n by n − 1 in the second regularity parameter.                                       ■



Lemma 2.16 (varieties are regular). Let V ⊆ RN be a variety defined by {∀j, fj = 0}, where

fj are polynomials of degree at most d, d ⩾ 2. Suppose V has dimension at most n. Then



   (a) V is ((2d)N , n) regular.

   (b) V ∩ (c · B N ) is ((2d)N +1 , n) regular for all c > 0.

   (c) π(V ) is ((2d + 1)N +1 , n) regular. If V is a cone, then the second regularity parameters

       may be changed from n to n − 1.



Lemma 2.17 (images of rational maps are regular). Let f be a rational map from an open

dense subset of Rn to RN whose coordinate functions are ratios of polynomials of degree at most

d (see Definition 3.15). Then Im(f ) is ((2N d + 1)n+1 , n) regular.



Lemma 2.18 (semialgebraic sets are regular). Let U ⊆ RN be a semialgebraic set defined

by {∀k, pk = 0} ∩ {∀ℓ, qℓ ⩽ 0} ∩ {∀t, rt < 0}6 , where pk , qℓ , rt are polynomials of degree at

most d. Suppose U has dimension at most n and there are b inequality constraints. Then U is

((2d)N min (2d)b , 7b N, (c b2 )N , n) regular7 .

           



    The above lemmas showed that polynomially defined sets are indeed regular. However,

the class of regular sets is more general. For example, it can be shown that trigonometrically-

parameterized sets are regular with explicit bounds on n and K. Another example is convex

sets in affine subspaces and the relative boundaries of convex sets.



2.4    Corollaries on Tubular Volumes

The bound on the covering number gives a bound on the volume of tubular neighborhoods

T(V, ε) for regular sets V , as T(V, ε) is covered by the union of radius 2ε balls centered at the

points in the ε covering net of V .



Corollary 2.19. Let V be a (K, n) regular set in RN with [V ]N ⩽ t. Then



             Vol(T(V, ε)) ⩽ N (V, ε) · (2ε)N Vol(B N ) ⩽ Vol(B N )2N εN −n K · (c tN 3/2 n)n .

                                                                                         S

Proof. By triangle inequality, for any ε net U on V , we have T(V, ε) ⊆                      x∈U B(x, 2ε). Substi-

tuting in our bound in Theorem 2.6 finishes the proof.                                                             ■



   We can then apply this to bound the volume of tubular neighborhoods of polynomial images.

The following version of Corollary 2.19 is specialized to the setup studied in [53, 7].



Corollary 2.20. Let V ∈ RN be the image of a polynomial map whose coordinate functions have

a degree at most d. Suppose the dimension of V is bounded by n. Given p ∈ RN and σ > 0, let x

be uniformly distributed in B(p, σ). Denote dist(x, V ) the minimal Euclidean distance between

x and V . Then for any ε > 0,

                                                                                 

          log P dist(x, V ) ⩽ ε ⩽ (N − n) log(ε/σ) + N log 2 + c · n log d + n log N .

   6

     In general, a semialgebraic set is a finite union of such U defined here. It is trivial to show that the union of

a (K1 , n1 ) regular set and a (K2 , n2 ) regular set is (K1 + K2 , max {n1 , n2 }) regular.

   7

     The term 7b N can be improved with N replaced with the dimension of the variety defined by polynomials pk .





                                                         11

Proof. To begin with, we note that

                                       Vol T(V ∩ B(p, σ + ε), ε)

                      P dist(x, V ) ⩽ ε ⩽                          .

                                               Vol B(p, σ)

Indeed, when T(V, ε) ∩ B(p, σ) is empty, the probability is trivially 0. Otherwise, for any

y ∈ T(V, ε) ∩ B(p, σ), ∥y − p∥ ⩽ σ, and there exists some z ∈ V so that ∥y − z∥ ⩽ ε. Thus,

z ∈ V ∩ B(p, σ + ε), and since y ∈ B(z, ε), we have T(V, ε) ∩ B(p, σ) ⊆ T(V ∩ B(p, σ + ε), ε).

The probability bound hence follows.

     We bound the numerator using Corollary 2.19. To this end, V ∩ B(p, σ + ε) is a ((4d)n+1 , n)

regular set by Lemma 2.15. Thus,

 log Vol T(V ∩ B(p, σ + ε), ε) ⩽ log Vol(B N ) + (N − n) log ε + n log σ + N log 2 + c n log(N d),

                              



where we used n ⩽ N and ε ⩽ σ. Finally, with log Vol(B(p, σ)) = log(Vol(B N )) + N log σ, we

arrive at the claimed bound on the logarithm of the probability.                           ■

    Similarly, one can deduce bounds for the volume of the tubular neighborhood for algebraic

varieties and semialgebraic sets from Theorem 2.6. When V is a real algebraic variety, the

corresponding bound on the volume has the same scaling as the one in [7]. To our knowledge,

our bound for tubular neighborhoods of general semialgebraic sets is new. Note that the semi-

algebraic set given by {∀k, pk = 0} ∩ {∀ℓ, qℓ ⩽ 0} ∩ {∀t, rt < 0} can have a lower dimension

compared to the bigger variety {∀k, pk = 0}.





3     Applications

In this section, we present diverse applications of Theorem 2.6. The first application is rather

straightforward: we bound the covering number of tensors of low canonical polyadic (CP) rank.

The CP rank of a tensor T , sometimes simply called the rank, is a generalization of the matrix

rank, i.e., the smallest number of rank-1 tensors that sum up to T (see more details in Sec-

tion 3.1). Secondly, we study dimensionality reduction for polynomial images (and other regular

sets), and how it can accelerate optimization problems (under a general loss). Thirdly, we derive

bounds on generalization errors for deep neural networks with rational and ReLU activations.

This choice of applications illustrates the power of Theorem 2.6 in different domains.



3.1   Covering Number of Low Rank CP Tensors

In many tensor problems, low-rank decompositions can remarkably improve the computation

and storage efficiency. One classic example is approximating a general tensor by a tensor of low

CP rank, which is a high order extension of low rank matrix approximation (see e.g., [45, 3, 72]

for the importance of low-rank tensor decompositions). A covering number bound on the set of

low rank tensors characterizes the approximation power. Moreover, it gives guarantees on the

accuracy when randomized dimension reduction techniques are applied to algorithms finding

the low rank approximations (see Section 3.2). Among commonly-used low rank structures on

tensors, covering number bounds for the tensor train (TT), hierarchical Tucker, and Tucker

tensors format have been derived [68, 36]. However, to the best of our knowledge, there is no

such bound available for low rank CP tensors (defined below), despite CP tensors being one of

the most popular low rank tensor formats. We show how to use Theorem 2.6 to fill this gap.

In fact, Theorem 2.6 is general enough to give covering number bounds for arbitrary tensor

networks [63].

     Let T ∈ Rn1 ×...×nd be a dth order tensor. The tensor is said to be of CP rank at most r if

                      (j)

there exist vectors ai ∈ Rni (i = 1, . . . , d and j = 1, . . . , r) such that

                                          r

                                                 (j)         (j)

                                          X

                                    T =         a1 ⊗ . . . ⊗ ad .

                                          j=1





                                                  12

                                                            (1)      (r) 

Here a ⊗ b denotes the tensor product. We call Ai = ai | . . . |ai         ∈ Rni ×r (i = 1, . . . , d) the

factor matrices, and denote T = CP(A1 , . . . , Ad ). In the matrix case T ∈ Rn1 ×n2 of rank r, the

formula reads in the familiar way T = A1 A⊤    2 . Our new bound on the covering number of low

rank CP tensors is as follows.

Theorem 3.1. Let V ⊆ P   Rn1 ×...×nd be the set of tensors with CP rank at most r where ni ⩾ 2

for each i. Denote n = d di=1 ni as the average dimension. Then for any t > 0, ε ∈ (0, 2t],

                       1



                                                                                       d

                                                                                       X

                      log N (V ∩ t · B n1 ×...×nd , ε) ⩽ rdn · log(t/ε) + c rdn ·            log ni .

                                                                                       i=1



If in fact r ⩽ mini ni , then for some c1 , c2 ⩾ 1,

                log N (V ∩ t · B n1 ×...×nd , ε) ⩽ rdn log(c1 dt/ε) + c2 d2 r2 log r − dr2 log(c1 ),

Since V is a cone, the bounds above also apply to log N (π(V ), ε) with t = 1 and rdn replaced by

rdn − 1.

Remark 3.2. The first bound in Theorem 3.1 applies to any rank r, and has an essentially

optimal dependence in ε. The second bound in Theorem 3.1 applies only to small r, but in this

regime it improves the term independent of ε, achieving an optimal linear dependence on ni .

    We need the following technical lemma for the second bound in Theorem 3.1.

Lemma 3.3. Let E and F be two points on the Grassmannian manifold Gkn . Let P E , P F be

                                                           E − P F ∥2 ⩽ ε, then for any basis QE

the orthogonal projections to E and F , respectively. If ∥P√

of E, there is a basis QF of F such that ∥QE − QF ∥2 ⩽ 2ε.

Proof. See Appendix C.                                                                                               ■

                                                                                         Pr         Nd       (j)

proof of Theorem 3.1. A rank at most r tensor T can be written as T =                         j=1       i=1 ai for some

          (j)    ni

      Pai ∈ R . Thus, V is the image of a polynomial with coordinate function of degree d

vectors

and r i ni variables, and diam(V ) = 2t. The first bound follows directly from Lemma 2.15 and

Theorem 2.6 after simplification. When the cone V is projected to the sphere, by Lemma 2.15

we can reduce rdn by 1.

    For the second bound, since V is a cone, it is sufficient to prove the claim assuming t =

1. Take t = 1, and thus ε ⩽ 2. We exploit the idea of stabilizing the parametrization via

canonicalization (see e.g., [48, 87]). Let T = CP(A1 , . . . , Ad ), with Ai ∈ Rni ×r being the factor

matrices. We can orthogonalize Ai by Ai = U i Ri for some orthonormal basis U i . Here if Ai is

not full rank, we put the rank deficiency in the Ri factor and keep U i as an orthonormal matrix

in Rni ×r . Now T as a vector can be written as

                                       O d    

                            vec(T ) =       U j · vec(CP(R1 , . . . , Rd )),

                                                j=1



where vec(·) flattens a tensor into a vector. Denote r = vec(CP(R1 , . . . , Rd )). By the triangle

inequality, for a different rank at most r tensor Tb = CP(U

                                                          b 1R             b dR

                                                              b 1, . . . , U  b d ) of norm at most 1,

we have

                         O d          O d             O d                O  d     

         ∥T − Tb ∥F ⩽          Uj · r −       Uj · rb +         Uj · r     b−         Ubj ·r

                                                                                           b

                               j=1                  j=1                          j=1            j=1

                                          d

                                         O                d

                                                           O            

                               b∥ +

                        ⩽ ∥r − r                    Uj −            U

                                                                    bj

                                                                             2

                                              j=1             j=1

                                       d

                                       X

                               b∥ +

                        ⩽ ∥r − r                     b j ∥2

                                              ∥U j − U                                                              (8)

                                        j=1







                                                           13

where r̂ = vec(CP(R              b d )).

                    b 1, . . . , R

                                                √

    To construct an ε net on V , we put an ε/(2 2d) net on each Grassmannian Gkni , whose size

can be bounded by [65, 74], and we use Lemma 3.3 to bound the error terms ∥U i − U b i ∥2 . Then

we put another ε/2 net on the space of all possible r vectors, which we denote as VR . The size

of this net can be bounded using the first bound of this theorem.

    To the latter end, by our first bound in the statement,



                             log N (VR , ε/2) ⩽ dr2 log(d/ε) + c2 d2 r2 log r,                            (9)



Denote WR a minimal ε/2 net of VR . Next, by [74, 65] we have8

                                     √

                   log N (Grni , ε/(2 2d), ∥·∥2 ) ⩽ ni r − r2 log(c1 d/ε).

                                                             

                                                                                                         (10)

                                              √

Now for each i ∈ [d], find a minimal ε/(2 2d) net Wi on Grni . For each point E in the net, fix

an arbitrary orthonormal basis QE of E to represent E. To complete the proof, we claim that

the tensors in V with U i factors in {QE : E ∈ Wi } and r vectors in WR form an ε net on V .

    Indeed, for any T = CP(U 1 R1 , . . . , U d Rd ), look at its ith factor U i Ri . Let Fi = span(U i ) ∈

  k

Gni . By the net assumption of Wi and Lemma 3.3, we can find some Ei ∈ Wi and another basis

QFi of Fi so that ∥QEi − QFi ∥2 ⩽ ε/(2d). Under the new basis of F , we have Ai = QFi R                  ei

for some new coordinates R  e i . Repeat this reparametrization process for each i ∈ [d]. Let the

new r vector for T be r̃ = vec(CP(R                    e d )). We can then find some r ∈ WR so that

                                          e 1, . . . , R

∥r − r̃∥2 ⩽ ε/2. By (8), we get



                                         d

                                        O            

                            vec(T ) −              QEi · r ⩽ d · ε/(2d) + ε/2 = ε.

                                         i=1



The latter term on the left-hand side is an element of the net, and thus the claim is justified.

Finally, the size of the ε net on V is bounded by

                                                                                  √

            log N (V ∩ B n1 ×...×nd , ε) ⩽ log N (VR , ε/2) + d log N (Grni , ε/(2 2d), ∥·∥2 )

                                         = rdn log(c1 dt/ε) + c2 d2 r2 log r − dr2 log(c1 ).



The proof is thus complete. When the cone V is projected to the sphere, it is equivalent to project

the cone VR to the sphere. Thus, in (9), we can replace the first term by (dr2 − 1) log(d/ε). This

leads to reducing rdn to rdn − 1 in the final bound.                                             ■



   As a quick illustration of the covering number, we derive a bound for the probability that a

random Gaussian tensor is ε-close to a CP rank at most r tensor.



Corollary 3.4. Let T ∈ Rn1 ×...×nd be a random tensor with i.i.d. standard Gaussian entries.

Denote ∡(T , T ′ ) the angle between T and T ′ under the Frobenius inner product. Denote N :=

Q

  i ni . Suppose N ⩾ 8. Then for any r ⩽ mini ni and ε ⩽ π/6, we have



                                                                           2 2

    

         ′                                    sin(2ε)N −1 (c1 d)rdn · rc2 d r

                                               ′

                                                                                  

                                                                                       N −rdn

                                                                                              

 P ∃ T of rank at most r s.t. ∡(T , T ) ⩽ ε ⩽            ·   √                 = O   ε          .

                                                 εrdn−1         N (c1 )dr2



where c1 , c2 ⩾ 1 are absolute constants.



Proof. Denote V the cone of tensors of rank at most r. Since π(T ) is uniformly distributed on

the sphere, it suffices to bound the volume of the tubular neighborhood around π(V ). On the

   8

     For points E and F in Gkn , the 2-norm in (10) is ∥E − F ∥2 := ∥P E − P F ∥2 , with P E and P F being the

projections to E and F , respectively.





                                                           14

sphere, it is convenient to use the geodesic distance dg . The covering number of geodesic balls

of π(V ) is then bounded by

                                N (π(V ), ε, dg ) ⩽ N (π(V ), 2 sin(ε/2), ∥·∥2 ).

We then bound the volume of its tubular neighborhood on the sphere by

                     Vol T(π(V ), ε, dg ) ⩽ N (π(V ), 2 sin(ε/2), ∥·∥2 ) · Vol B(2ε, dg ),

where B(2ε, dg ) is the geodesic ball of radiusp2ε. By [11, Exercise 7.9] we have the following

tight bound for Vol B(2ε, dg ) when cos(2ε) ⩾ 2/N , which holds as ε ⩽ π/6 and N ⩾ 8:

                        Vol B(2ε, dg )         1            N −1   sin(2ε)N −1

                                       ⩽          √  sin(2ε)     ⩽     √       .

                         Vol S N −1      2 cos(2ε) N                     N

Finally, note that the probability of interest is simply Vol T(π(V ), ε, dg )/ Vol S N −1 . We use the

relaxation 2 sin(ε/2) ⩾ c ε for ε ⩽ π/6, and substitute in our bound for N (π(V ), c ε, ∥·∥2 ) in

Theorem 3.1. This leads to the bound given in the corollary statement.                              ■

Remark 3.5. Corollary 3.4 implies that given a random tensor the probability to obtain a

good low rank approximation decays fast as ε → 0, especially when n is large. As a numerical

reference, set d = 3, ni = n = 100, r = 30, and take the constants in the bound to be 3. Then

for ε = π/6 we have P < e−38567 , and for ε = π/7 we have P < e−139455 . The conclusion is that

low rank tensor decomposition requires special structure in the input tensor, e.g., as in [78, 86].



3.2     Dimension Reduction of Regular Sets via Random Sketching

In this section, we use the covering number bound developed in Section 2 to derive dimension

reduction guarantees for regular sets. Specifically, for a regular set V ⊆ RN , we find an upper

bound on the sketching dimension m (m ≪ N ), so that for a random matrix S : RN → Rm

(either a sub-Gaussian matrix or an FJLT-like matrix, see Definition 3.6 and Definition 3.7),

with high probability it holds ∥Sx∥ ≈ ∥x∥ for every x ∈ V .



3.2.1    Backgrounds and Motivation

As the dimension of datasets in modern applications grows, overcoming the curse of dimension-

ality becomes a key concern. Among many attempts at dimension reduction (a.k.a. sketching),

one of the best known tools is the Johnson-Lindenstrauss transform [44]. It compresses a finite

set {xi }i down to a lower dimension by the map xi 7→ Sxi , where S is a short-fat random

matrix with properly rescaled i.i.d. Gaussian entires. When the number of rows in S, called the

sketching dimension, is sufficiently large, S is an approximate isometry on this finite set, with

high probability.

     In more recent developments, researchers found better designs of the random matrix S that

improve the efficiency of sketching. These include the sub-Gaussian sketch and the fast Johnson-

Lindenstrauss transform (FJLT). The latter has been generalized to a broader class called the

subsampled orthogonal matrix with random signs (SORS). We give precise definitions below.

For more details on theory and motivations of these sketching matrices, see e.g., [1, 2, 55, 81,

79, 42, 25].

Definition 3.6 (sub-Gaussian sketch). Let G ∈ Rm×M be a random matrix such that the

entries Gij are independent, mean zero, unit variance random variables with sub-Gaussian norm

∥Gij ∥ψ2 ⩽ α.9 We call S = √1m G a sub-Gaussian random projection with parameter α, denoted

as S ∈ subG(α). 10

                                            2                                                              2

   9

     This is the Orlicz norm with ψ(x) = ex − 1. If ∥X∥ψ2 ⩽ α, its tail decays at least as fast as e− c(x/α) , which

justifies the name sub-Gaussian. See [79].

  10

     We omitted the dimensions m and M , since they will always be inferred from the context. Same for the next

definition.





                                                        15

Definition 3.7 (SORS sketch). Let P ∈ Rm×M be the operator that uniformly randomly selects

m rows of a matrix (with replacement). Let H ∈ RM ×M be a deterministic orthogonal matrix

such that maxij |Hij | ⩽ √βM . Let D ∈ RM ×M be a diagonal matrix with its diagonal populated by

independent

     q      Rademacher random variables (i.e., Dii is 1 or -1 with equal probability). We call

S= M   m P HD a subsampled orthogonal matrix with random signs (SORS) with parameter β,

denoted S ∈ SORS(β).



    A more recent direction in randomized sketching concerns constructing S that is an approx-

imate isometry on an infinite set V . When V is a linear subspace, the corresponding S has the

name subspace embedding, and relevant theory is abundant (see e.g., [81, 55] for reviews). When

V is a general set, developed theories (see e.g., [79, 64, 42]) state we can bound the sketching

dimension for sketching operators defined in Definition 3.6 and Definition 3.7, as long as we can

control the Gaussian width of the set.

    Here we use the covering number bound developed in Section 2 to bound the Gaussian width

of bounded regular sets through the Dudley integral, which then derives sketching dimension

bounds for regular sets using a sub-Gaussian sketch or an SORS sketch, so that



                                  ∥Sx∥ ≈ ∥x∥ for all x ∈ V.



In particular, we compute this bound for V being polynomial images, as well as the image of

ℓ ◦ p where ℓ is a general Lipschitz map and p is a polynomial.

     Among others, one possible downstream task of dimension reduction is optimization:



                                          min ∥f (x)∥ ,                                     (11)

                                           x



where f : Rn → RM (M ≫ n) is the residual function we wish to bring close to zero by

choosing x. One example is f is an overdetermined polynomial system, with more equations

than unknowns, where we seek an approximate solution x. Of particular interest is the following:



                                        min ∥ℓ ◦ p(x)∥2 ,                                   (12)

                                      x∈U ⊆Rn



where p : Rn → RN is a polynomial map whose coordinate functions are of degree at most

d, and ℓ : RN → RM is a Lipschitz function. When ℓ is the identity, this is the polynomial

optimization problem, including low rank matrix and tensor decomposition, completion, etc.

Adding the ℓ function allows us to deal with non-ℓ2 loss functions. For example, if we want

a robust optimization using the Huber loss (ℓ2 when near the origin and ℓ1 when far away)

[39], we can take ℓ to be an entrywise function taking the square-root of Huber loss in each

coordinate. We will provide guarantees of sketching dimension so that ∥Sℓ ◦ p(x)∥ ≈ ∥ℓ ◦ p(x)∥

for all x ∈ U . This allows us to optimize the reduced problem instead of the original problem.

For more on how randomized dimensionality reduction can accelerate optimization algorithms,

please see Remarks 3.8 and 3.10 below, as well as e.g., [16, 17, 18, 9, 34, 67, 28].



3.2.2   New Results on Dimension Reduction using Covering Number

Consider the problem (12), and denote f = ℓ ◦ p for convenience. In order to obtain a guarantee

on the dimension reduction, we seek sketch operators S such that with high probability over S,



                             ∥Sf (x)∥ ≈ ∥f (x)∥      for all inputs x.                      (13)



The paper [50] provided such a result when ℓ = Id, S is the count sketch matrix, and under

additional assumptions on the polynomial system p. Compared to [50], our framework applies

whenever Im(π ◦ f ) is regular. We also allow other common random ensembles (sub-Gaussian

and SORS) and require no further assumptions on p. By switching to sub-Gaussian and SORS



                                                16

ensembles, our sketching dimension bound also improves [50] by significantly reducing the poly-

logarithmic factors.

    Next we specify exactly what is meant by ∥Sf (x)∥ ≈ ∥f (x)∥ in (13). For convenience, write

x = (1 ± ε)y if (1 − ε)y ⩽ x ⩽ (1 + ε)y. Roughly speaking, the next definition requires that

when one of ∥Sf (x)∥ and ∥f (x)∥ is very small, the other must also be very small; and when

they are both large, they are close to each other.

Definition 3.8 ((ε, δ, τ ) sketch). Let f be a function defined on U . Given a tolerance level

τ ∈ (0, 1) and some ε, δ ∈ (0, 1), we say that a random matrix S is an (ε, δ, τ ) sketch of f on

U , if with probability at least 1 − δ over S, the followings hold for all x ∈ U : (i) ∥Sf (x)∥ ⩽ τ

implies ∥f (x)∥ ⩽ (1 + ε)τ ; (ii) ∥f (x)∥ ⩽ τ implies ∥Sf (x)∥ ⩽ (1 + ε)τ ; and (iii) ∥Sf (x)∥ > τ

implies ∥Sf (x)∥ = (1 ± ε) ∥f (x)∥.

Remark 3.9. If S is an (ε, δ, τ ) sketch of f , then it is useful for the downstream task of opti-

mization (11), because minimizing ∥Sf (x)∥ is almost equivalent to minimizing ∥f (x)∥. Indeed,

let x∗ be the obtained minimizer of ∥Sf (x)∥. Then either ∥Sf (x∗ )∥ ⩽ τ , so that ∥f (x∗ )∥ is also

satisfactorily small, or that x∗ is almost an optimal solution of the unsketched problem since



          ∥f (x)∥ ⩾ (1 − ε)−1 ∥Sf (x)∥ ⩾ (1 − ε)−1 ∥Sf (x∗ )∥ ⩾ (1 + ε)(1 − ε)−1 ∥f (x∗ )∥



for all x ∈ U .

Remark 3.10. Consider the reduced problem of minimizing ∥Sf (x)∥ using Gauss-Newton

method. In each iteration, we solve



                               ∆x∗S = argmin ∥SJ · ∆x + Sf (x)∥ ,                              (14)

                                         ∆x



where J is the Jacobian of f at x, and update x ← x + ∆x∗S . Many sketched optimization

algorithms generate S anew for each solve of (14), so that local to current iterate x, with high

probability, ∆x∗S is a good candidate for the unsketched, exact Gauss-Newton step vector that

solves

                               ∆x∗ = argmin ∥J · ∆x + f (x)∥ .                              (15)

                                           ∆x

    By contrast, our theory would enable the drawing of a sketch S that satisfies (13) and

remains unchanged in every iteration of the optimization. What are the potential benefits of

this? Using the local strategy, in each iteration there is a chance of failure that ∆x∗S is not

a faithful approximation to ∆x∗ . In addition, there are errors committed to the algorithm by

using ∆x∗S in each iteration. Both the failure chance and the error can accumulate during the

optimization run. We refer the readers to [67] for an investigation on this matter.

    Since ∥Sf (x)∥ = (1 ± ε)∥f (x)∥ is equivalent to ∥Sπ ◦ f (x)∥ = (1 ± ε), our task is then to

sketch the set W = Im(π ◦ f ). For sketching an arbitrary set W , [64, 42] and [25] respectively

proved a bound on sketching dimension m in order for ∥Sx∥ = (1 ± ε)∥x∥ for all x ∈ W with

high probability, when S is respectively SORS(β) and subG(α) (see also [79]). The bounds are

expressed in the Gaussian width of W , so our goal is then to control the Gaussian width of this

set. Recall the Gaussian width of a set W ⊆ RM is defined as



                                 ω(W ) = Eg∼N (0,I M ) sup ⟨g, x⟩ .                            (16)

                                                      x∈W



It is related to covering numbers through the Dudley’s integral:

                                       Z diam(W ) p

                             ω(W ) ⩽ 2             log N (W, ε) dε.                            (17)

                                          0



Next, we give our result for generalized polynomial optimization (12). A cleaner bound when

ℓ = Id comes afterwards.



                                                17

Remark 3.11. In fact, when g is a vector of independent mean zero sub-Gaussian random

variables, the corresponding “width” defined as in (16) can also be bounded by the integral (17)

with a potentially constant in front. In particular, we will use this generalization in Section 3.3,

where g is populated with Rademacher random variables, the corresponding width is called the

Rademacher complexity. For more background, we refer the readers to [79, 58].



Theorem 3.12. Let U ⊆ Rn and p : U → RN be a polynomial map with coordinate functions

pi of degree at most d and supx∈U |pi (x)| ⩽ t for each i. Let ℓ : RN → RM be Lipschitz. Fix

ε, τ, δ ∈ (0, 1). Denote λ = max(c, dN t ∥ℓ∥Lip τ −1 ). Then S ∈ Rm×M is a (ε, δ, τ ) sketch of ℓ ◦ p

on U if



      1. S ∈ subG(α) and

                                  h                                         i

                      m ⩾ c α2 ε−2 n · log λα + λε (M + log(1/δ))/n + log(1/δ) ; or

                                                  p

                                                                                                          (18)



      2. S ∈ SORS(β) and

                                       m ⩾ c ∆ · log2 ∆ · log(N/δ)                                        (19)

                                     √ 

          where ∆ = β 2 ε−2 n · log λ M log(1/δ).



Proof. For any ∥ℓ∥Lip = θ > 0, we can stretch ℓ and p appropriately so that ∥ℓ∥Lip = 1 and the

coordinate functions of p are bounded by tθ. Since the claimed bound only involves the product

t ∥ℓ∥Lip , without loss of generality we prove the assertions assuming ℓ is 1 Lipschitz.

     Denote f = ℓ ◦ p and V = p(U ). Denote F = f (U ) ∩ rB M for some r > 0 chosen later,

and denote G = f (U ) \ F . Note that π ◦ ℓ is r−1√Lipschitz on ℓ−1 (G), so diam(π(G)) ⩽

diam((π ◦ ℓ)(ℓ−1 (G) ∩ V )) ⩽ r−1 diam(V ) ⩽ 2r−1 t N . Thus, using Theorem 2.6 and the

Dudley integral (17), the Gaussian width of π(G) is bounded by

                        Z diam(π(G)) p                       Z diam(π(G)) p

            ω(π(G)) ⩽ c               log N (π(G), ε) dε ⩽ c               log N (V, rε) dε

                         0                                    0

                        √                 √                             dN · r−1 t

                                                                                 

                                                                 1/2

                    ⩽ c n · diam(π(G)) π + diam(π(G)) log

                                                                       diam(π(G))

                        √      1/2

                                              −1

                                                    

                    ⩽ c n log      max c, dN r t .



In the second line, we first applied Theorem 2.6 to bound the covering number, which is legitimate

since rε ⩽ diam(V ). Then  n we applied   Lemma D.1 to bound the integral. In the last line, we

                                     √ o

used diam(π(G)) ⩽ min 2, 2r t N and separated the log1/2 term into a sum of two log1/2

                                 −1



terms. A maximum is used in the last line to handle the cases where dN r−1 t < 1. By [25,

Corollary 5.4]11 and Theorem 2.6, we get that for S ∈ subG(α) and any δα,G ∈ (0, 1), if

                                                                    

                    m ⩾ c α2 ε−2 n log max dN r−1 t, c + log(1/δα,G ) =: c mα,G ,

                                                     

                                                                                                          (20)



then ∥Sy∥ = (1 ± ε) ∥y∥ for all y ∈ G with probability at least 1 − δα,G . By [42, Theorem 9],

for S ∈ SORS(β), if

                             m ⩾ c ∆r (log2 ∆r ) log(N/δβ,G ) := mβ,G ,                      (21)

                                                  −1

where ∆r = β 2 ε−2 n log(max c, dN r−1 t ) log δβ,G

                              

                                                     , then ∥Sy∥ = (1 ± ε) ∥y∥ for all y ∈ G with

probability at least 1 − δβ,G for all δβ,G ∈ (0, 1).

    Next we handle the set F . Our goal is to increase the sketching dimension m to control the

operator norm of S, so that with r ≪ τ , for all y ∈ F , we have ∥Sy∥ ⩽ τ with high probability.

 11

      Results therein guarantee ∥Sy∥2 = (1 ± ε) ∥y∥2 , which implies ∥Sy∥ = (1 ± ε) ∥y∥ for ε ∈ (0, 1).





                                                         18

                                                                                          1

    First consider S ∈ subG(α). Let u > 0 to be specified later, and we choose r = αu       τ.

Then for all y ∈ F , in order for ∥Sy∥ > τ , we must have ∥S∥ > αu. Let c1 , c2 be appropriate

constants in Lemma D.2. By Lemma D.2, for arbitrary δα,F ∈ (0, 1), if we take u such that

                            (c1 u2 − c2 )−1 (M + log(1/δα,F )) ⩽ α2 ε−2 n,                   (22)

then ∥S∥ > αu happens with probability at most δα,F provided that m ⩾ α2 ε−2 n. Note that

(22) is guaranteed if                                        

                                         q

                                      −1

                       u ⩾ c3 1 + εα      (M + log(1/δα,F ))/n                       (23)



for some c3 > 0. The corresponding value of r−1 is

                                     q                    

                    −1       −1

                   r ⩾ c3 τ      α + ε (M + log(1/δα,F ))/n ⩾ c3 ατ −1 .                     (24)



                 b = √mS has a unit variance, their sub-Gaussian norm α is lower bounded

Since entries of S

by an absolute constant. In particular, by choosing c3 sufficiently large, we can guarantee that

r < τ , and thus F ⊆ (τ · B N ). Therefore, with δα,F = δα,G = δ/2, the union bound shows that

with m = c mα,G , in which r is given by (24), we simultaneously have

                       ∥Sy∥ = (1 ± ε/2) ∥y∥ for y ∈ G ⊇ (τ · B M )c , and

                                                                                             (25)

                                 ∥Sy∥ ⩽ τ for y ∈ F ⊆ (τ · B M ).

The conditions above thus shows that for all x ∈ U , when ∥f (x)∥ ⩽ τ ,∥Sf (x)∥ ⩽ (1 + ε)τ , and

when ∥Sf (x)∥ > τ , ∥Sf (x)∥ = (1±ε) ∥f (x)∥. Finally, if ∥f (x)∥ > (1+ε)τ , then ∥Sf (x)∥ > (1−

ε/2)(1 + ε)τ > τ since ε < 1. The contrapositive completes the proof that S is a (ε, δ, τ ) sketch

of f . The dimension bound (18) is a simplification of mα,G using the fact that log(λα) = Ω(1)

with proper choice of lower bounding constant c in the definition

                                                             √     of λ.              √

     Next we deal with S ∈ SORS(β). We choose r = τ / M . Note that ∥S∥ ⩽ M . This

guarantees for all y ∈ F , ∥Sy∥ ⩽ τ . Plugging this r into (21) and setting δβ,G = δ, we see that

condition (25) hold with probability at least 1 − δ when m satisfies the bound in (19). Hence,

S is a (ε, δ, τ ) sketch of f as claimed.                                                       ■

    The bounds in Theorem 3.12 can be greatly simplified if in fact we have a polynomial opti-

mization problem (ℓ = Id), as shown next. In particular, we no longer have any M dependence

in the sketching dimension nor any t dependence from the coordinate functions of p.

Corollary 3.13. Let p : Rn → RN be a polynomial map with coordinate functions of degree at

most d. Denote N ′ = min N, nd . Then for any ε, δ ∈ (0, 1), S ∈ Rm×M is a (ε, δ, 0) sketch of

p if

    1. S ∈ subG(α) and                                               

                               m ⩾ c α2 ε−2 n · log(ndN ′ ) + log(1/δ) ; or                  (26)

    2. S ∈ SORS(β) and

                                        m ⩾ c ∆ · log2 ∆ · log(N ′ /δ)                       (27)

       where ∆ = β 2 ε−2 n · log(ndN ′ ) log(1/δ).

Proof. Following the computation of Gaussian width in the  n previous  proof, this time V =

                                                                n+d

                                                                    o

π(Im(p)) and it is contained in a subspace of dimension min N, d       = O(N ′ ). Then

                                     Z 2p                   p

                     ω(π(Im(p))) ⩽ 2     log N (V, ε) dε ⩽ c n log(ndN ′ ),

                                        0

where in the last step we used Lemma 2.15. Thus, using [25, Corollary 5.4], we get the desired

result. The bound for S ∈ SORS(β) follows directly from [42, Theorem 9] using the bound on

the Gaussian width above.                                                                   ■



                                                     19

Remark 3.14. We emphasize that our sketching bounds based on Theorem 2.6 are (essentially)

oblivious to ℓ ◦ p. They only require a bound on the Lipschitz constant of ℓ, a degree bound on

the coordinate functions of p, and a bound on the coordinate functions on U . In comparison,

there are existing works [29, 42] that in principle could be used to give global guarantees (13) by

a similar argument. However, these require nontrivial geometric descriptors of the image p(U ),

such as the reach and the volume, which often cannot be estimated efficiently.



3.3    Generalization Error of Neural Networks

Covering numbers are also relevant to learning theory. For a thorough and relatively reader-

friendly introduction to the subject, see e.g., [58]. The generalization error of a classification

algorithm measures the gap between accuracy on the training set and on unseen test data.

Suppose the data feature x and label y follow a distribution (x, y) ∼ D. For a classifier f and

loss function ℓ, the expected risk of f is defined as



                                    R(f ; ℓ) = E(x,y)∼D ℓ(f (x), y).



When provided an i.i.d. sample S = {(xi , yi )}ni=1 from D, the empirical risk is

                                                         n

                                                      1X

                                    RS (f ; ℓ) =         ℓ(f (xi ), yi ).

                                                      n

                                                         i=1



We wish to control the generalization error



                                GES (F; ℓ) := sup R(f ; ℓ) − RS (f ; ℓ),                            (28)

                                                  f ∈F



so we can expect good performance on unseen test data. For more details, see [4, 79].

    There is a long history in finding optimal bounds for generalization errors. One of the best

studied setups is the binary classification case, where f ∈ F has a range {−1, 1}, y ∈ {−1, 1},

and the loss function is ℓbin (f (x), y) = 1f (x)̸=y . For such a setup, it is known that (see e.g., [79,

Theorem 8.4.4])                                       p

                                    GES (F; ℓ) ⩽ c VCdim(F)/n

with high probability, where VCdim(F) is the VC dimension of F and n is the sample size.

Hence, many bounds for VC dimensions of many hypothesis classes have been proposed, such

as deep neural networks with piecewise polynomial activations [4, Theorem 8.8] and [6].

    Instead we consider another popular setup, common in multi-label classification, where the

output of f and the loss function ℓ are continuous. A key tool to control the generalization error

in the continuous setup is the Rademacher complexity:

                                                               n

                                                       1X

                              RS (F; ℓ) = Eσ sup          σi · ℓ(f (xi ), yi ),                     (29)

                                                  f ∈F n     i=1



where entries σi of σ are independent Rademacher random variables (σi = ±1 with equal

probability). By [58, Theorem 3.3], if ℓ has a range in [0, 1], then with probability at least 1 − δ

over the sample S, the generalization error of F can be bounded by

                                                         r

                                                             log(2/δ)

                            GES (F; ℓ) ⩽ 2RS (F; ℓ) + 3               .                         (30)

                                                                 2n

The Rademacher complexity (29) is analogous to the Gaussian width (16). Indeed, it can also

be bounded through the Dudley integral (see Remark 3.11):

                                                 Z √n p

                                            −1

                          RS (F; ℓ) ⩽ c n              log N (ℓ ◦ F(X), ε) dε,                      (31)

                                                  0





                                                       20

where X = (x1 | . . . |xn ) ⊆ Rd×n , f (X) = (f (x1 )| . . . |f (xn )) ∈ RD×n and



                                    F(X) = {f (X) : f ∈ F} ⊆ RD×n .



In (31), we are also assuming that ℓ takes values in [0, 1].

     In the sequel, we derive generalization bounds for deep neural networks by controlling this

covering number by Theorem 2.6. We cover fully connected or convolutional layers, with rational

or ReLU activations. For rational activations analyzed in Section 3.3.1, we show the image F(X)

is a regular set. Then for ReLU activations analyzed in Section 3.3.2, we approximate F(X) by

the image of a rational network and apply the results in Section 3.3.1.



3.3.1    Generalization Error of Rational Neural Networks

Here we bound the generalization error of rational neural networks [12]. These are networks

having rational functions (i.e., ratio of polynomials) as their activations. They can approximate

ReLU networks [59, 12, 75]. Beyond that, rational activations are naturally trainable since they

are parameterized by coefficients. As such, it has been observed that rational networks can

be performant and accelerate training process in data-driven applications compared to other

activations [12, 38]. We recall the definition of a rational function.



Definition 3.15. We say that a function ρ from an open dense subset of Rd to R is a rational

function if ρ(x) = p(x)/q(x) for some polynomials p and q. If deg(p) ⩽ α and deg(q) ⩽ β, we

denote ρ ∈ Rβα . We say that a map f from an open dense subset of Rd to RD is in Rβα if all

coordinate functions of f are in Rβα .



    The next definitions formalize the two classes of networks to be analyzed.



Definition 3.16 (rational fully connected neural network). For i = 1, . . . , L, let ρi ∈ Rβαii be

rational activation functions; let Ai ∈ Rdi ×di−1 be weight matrices; and let bi ∈ Rdi be bias

vectors. The rational fully connected neural network is the composed map from Rd0 to RdL :

                                    h                                  i

                          f (x) = ρL AL . . . ρ1 (A1 x + b1 ) . . . + bL .                   (32)



Denote d = (d0 , . . . , dL ), α = (α1 , . . . , αL ), and β = (β1 , . . . , βL ). We denote this hypothesis

class as RatNN(L, α, β, d). Denote the function of the first i layers as fi = ρi ◦ Ai ◦ . . ..



Definition 3.17 (rational convolutional neural network). For i = 1, . . . , L, let ρi ∈ Rβαii be

rational activation functions; let Ki ∈ Rci ×ci−1 ×k×k be convolution kernels12 that map input in

Rdi−1 to Rdi , denoted by x 7→ Ki x; and let bi ∈ Rdi be bias vectors. The rational convolutional

neural network is the composed map from Rd0 to RdL :

                                     h                                  i

                           f (x) = ρL KL . . . ρ1 (K1 x + b1 ) . . . + bL .                  (33)



Denote d = (d0 , . . . , dL ), c = (c0 , . . . , cL ), α = (α1 , . . . , αL ), and β = (β1 , . . . , βL ). We denote

this hypothesis class as RatCNN(L, α, β, c, d). Denote the function of the first i layers as fi =

ρi ◦ Ki ◦ . . ..



    Our next theorem upper bounds the covering number of F(X) for four hypothesis spaces

within RatNN(L, s1, s1, d) and RatCNN(L, s1, s1, c, d). We denote these hypothesis spaces as

                                                                    T

FRatNN and FRatCNN with fixed activations, as well as the variants FRatNN      T

                                                                          and FRatCNN  with

trainable activations.

  12

     Here di represents the total size of the “image” with ci channels, and Ki possibly involves strides and zero or

constant paddings.





                                                        21

Theorem 3.18. Let the hypothesis classes be defined as in the above paragraph. Denote N the

number of parameters in the network and suppose Im(ρL ) ∈ [−t, t]. Then for F = FRatNN or

 T

FRatNN and any ε ∈ (0, diam(F(X))],

                                                                               YL−1 

                                                                          5/2 L

                sup      N (F(X), ε) ⩽ N log(t/ε) + (N + 1) log c N (ndL ) s        dj ,                (34)

                                                                                             j=1

              X∈Rd0 ×n



                                                  T

where c can possibly be different for FRatNN and FRatNN                         T

                                                        . For F = FRatCNN or FRatCNN and

any ε ∈ (0, diam(F(X))],

                                                                         YL−1 

                                                             5/2 L 2(L−1)

      sup N (F(X), ε) ⩽ N log(t/ε) + (N + 1) log c N (ndL ) s k               cj ,   (35)

                                                                                                  j=1

       X∈Rd0 ×n



                                                   T

where c can possibly be different for FRatCNN and FRatCNN .



     Theorem 3.18 relies on Theorem 2.6. Indeed, below we show that F(X) is a (K, N ) regular

set for bounded K. Let Λ be a tuple of all involved parameters. It consists of the entries of

Ai , Ki , bi , and in the case the activations are trainable, also the coefficients in each ρi . Obviously,

each choice of Λ defines a network f Λ ∈ F. Define the evaluation map X ∗ (Λ) := f Λ (X) ∈ RdL ×n

and similarly X ∗i (Λ) := fiΛ (X) for the first i layers. Note that X ∗ is a rational map in Λ. By

Lemma 2.15, we just need a degree bound on the coordinate functions of X ∗ to control K.



proof of Theorem 3.18. First note that X ∗ is well defined on all Λ such that Im(ρL ) ∈ [−t, t].

                                                                     p (Λ)

Note that F(X) = Im(X ∗ ) is a regular set. Indeed, let X ∗ (Λ)j = qjj (Λ) , j = 1, . . . , ndL . By

Lemma E.2, each pj and qj has a degree at most df , which is computed therein. By Lemma 2.15,

F(X) is ((2ndL df + 1)N +1 , N ) regular. Using Theorem 2.6, we have

                                                                  !

                                                 c N t(ndL )3/2

                      N (F(X), ε) ⩽ N log                             + (N + 1) log(c ndL df ).

                                                        ε



Plugging in the bound on df in Lemma E.2 for corresponding F gives the claimed result.                    ■



    Combining Lemma 2.15 and (30), we derive the following generalization error bounds on the

four hypothesis spaces with a Lipschitz loss function.



Corollary 3.19. Let the hypothesis spaces be the same as in Theorem 3.18. Suppose the loss

function ℓ is Lipschitz with constant ∥ℓ∥Lip 13 and range [0, H], and Im(ρL ) ∈ [−t, t]. Denote N

                                        n            √ o

the number of parameters and α = min H, t ∥ℓ∥Lip dL . Then



                                                        r          s               

                                                            N √         tW ∥ℓ∥ Lip 

                             sup      RS (F; ℓ) ⩽ c α            π + log    √         ,                 (36)

                          X∈Rdin ×p                         n              α n



where W is the number in the second log(·) term in (34) and (35) for the corresponding class

F.

     In particular, write D = maxi⩽L−1 di for RatNN and its trainable variant, and D =

k 2 maxi⩽L−1 ci for RatCNN and its trainable variant. Suppose (∗): t, H, and ∥ℓ∥Lip are O(1)

and log dL , log n are O(L log(sD)). Then

                                                                  

                           sup RS (F; ℓ) = O n−1/2 · N L log(sD) .

                                                      p

                                                                                        (37)

                              X∈Rd0 ×n



  13

       We mean ℓ is Lipschitz with constant ∥ℓ∥Lip in x for each y.





                                                            22

    If in fact the classification loss is ℓ(x, y) = CrossEntropy(softmax(f (x)), y), where yi = 1

for data in class i and yi = 0 otherwise, then under (∗):

                                                                           

                      sup RS (F; ℓ) = O n−1/2 · (t + log dL ) N L log(sD) .

                                                               p

                                                                                              (38)

                        X∈Rd0 ×n



Equation (30) then gives a bound for the generalization error for all cases above.



Remark 3.20. Assumption (∗) in Corollary 3.19 is a mild assumption in applications involving

nontrivial networks. For example, suppose L = 10, D = 10, s = 3. Then order for log n >

2L log(sD) to hold one would require n ⩾ 3020 ≈ 3.5 × 1029 many data samples. This is far

beyond realistic sizes of training sets.



proof of Corollary 3.19. Since ℓ is Lipschitz on [0, H], ℓ/H is Lipschitz on [0, 1] with norm

∥ℓ∥Lip /H. Using the Dudley integral (31),



                Z √n s                               Z α √n u

                                                            v                                             !

                                           

              H               ℓ(F(X), y)            H H u                                           H

RS (F; ℓ) ⩽ c         log N              , ε dε ⩽ c         tlog N                          F(X),        ε dε.

              n 0                 H                 n 0                                           ∥ℓ∥Lip



Bounding the covering number in the last term by Theorem 3.18 with14



                                        log N (F(X), ε) ⩽ c N log(tW/ε),



and further bounding the integral using Lemma D.1, we get

                                       r        s                

                                         N √          tW  ∥ℓ∥Lip 

                       RS (F; ℓ) ⩽ c α        π + log      √        .

                                         n                α n



This completes the proof for the first part. In the other two parts, we have α = O(1). The second

part then follows directly by plugging in the value of W in first part. For the third part, recall

                  ∂ℓ

that for all y, | ∂x | ⩽ 1 and since f (x) ∈ [−t, t]dL , ℓ(x, y) ∈ [0, log(dL et /e−t )] = [0, 2t + log dL ].

              √ i

So ∥ℓ∥Lip ⩽ dL and H ⩽ 2M + log dL . Plugging this into the result from the first part we

obtain the claim.                                                                                         ■



Remark 3.21. How good are the generalization bounds in Corollary 3.19? To our knowledge,

there exists no prior result in our exact setting. However, compared to the bound in [4, Theorem

8.4] for hypotheses f that require only b arithmetic and comparison operations, setting t =

O(1), s = O(1),                                                                   −1/2 · LD 2 ) to

    −1/2

               √ and di = D for i ∈ [L], we improved that bound from O(n

O(n       · LD log D). The improvement is even more remarkable for convolutional networks,

where b the number of flops needed to evaluate f is far greater than N . Although these bounds

are derived under a different setup and are not directly comparable, we take this comparison as

a certificate of the nontriviality of Corollary 3.19.



    Note that this section did not require boundedness of the data X, nor boundedness of weight

matrices A or kernels K, nor Lipschitz properties of the activations. All we used is a bound of

the final output, Im(ρL ). That is necessary anyways for F(X) to have a finite covering number.



3.3.2       Generalization Error of ReLU Networks

Now we shift attention to ReLU-activated neural networks. We only treat fully connected

networks here, since the purpose is to demonstrate another quick application of Theorem 2.6.

  14

       The relaxed bound using the last term is sufficient for obtaining the desired big-O scaling.





                                                          23

    The standard setup for generalization error analysis of ReLU network is the following. The

network is fixed of shape (L, d) where d = (d0 , . . . , dL ), with d0 being the input dimension and

dL being the output dimension. The hypothesis class consists of networks with bounded weights

and biases. Here we take ∥(Ai |bi )∥∞ ⩽ ωi . The input data x is also assumed to be bounded.

We take ∥x∥∞ ⩽ 1. This ensures the output of the network is a bounded set. Finally, the

loss function ℓ is Lipschitz. Denote ω = (ω1 , . . . , ωL ), and we denote the hypothesis class as

F = ReLU(L, d, ω). Our bound on the Rademacher complexity, and hence the generalization

error, is the following.



Theorem 3.22 (generalization error or ReLU network). Let F = ReLU(L, d, ω) with di ⩾ 2,

                                                            o [0, H]. Denote N the

and ωi ⩾ 2. Suppose ℓ is a Lipschitznloss function having range                    number of

                                                √ QL                   −1

                                                                                √ QL

parameters in the network, α = min H, ∥ℓ∥Lip dL i=1 ωi , and β = α ∥ℓ∥Lip dL i=1 ωi .

Then



          sup            RS (F; ℓ) ⩽

  X∈Rd0 ×n , ∥X∥max ⩽1



                                                           L

                                                                                                 !1/2

                               p                           X                          p     

                            c α N/n ·    log β + log n +         log di + L log+ log+ β n/dL            ,

                                                           i=1



where log+ (x) = max {0, log(x)}. In particular, if d = d1, ω = ω1, and suppose the loss

function is such that ∥ℓ∥Lip and H are O(1) constants, and the data size satisfies log n =

O(L log(dL)) (see Remark 3.20), then the bound simplifies to

                                                                   

                                   RS (F; ℓ) = O n−1/2 · dL log(dLω) .

                                                             p

                         sup                                                           (39)

                    X∈Rd×n , ∥X∥max ⩽1





Proof sketch (see Appendix F for full details). We use rational functions to approximate the

ReLU function at each layer (Lemma F.1). This is possible since the input to each layer is

bounded. By controlling approximation errors at each layer, we obtain a rational network that

approximates the original ReLU network (Lemma F.2 and Lemma F.3). We cover the image of

the ReLU network by covering the image of this approximating rational map. Using our result

in the rational network case, namely (36) in Corollary 3.19, leads to a bound on Rademacher

complexity of the ReLU network.                                                            ■



    Let us compare the simplified bound (39) to existing literature. The result in [6] for VC

        √ of networks with ReLU activations implies a generalization error bound of order

dimension

n−1/2 · N L log N . Assuming ω = O(1) for the binary classification√problem in order for the

output to be within [−1, 1], our bound (39) is also of order n−1/2 · N L log N , matching the

result in [6] for the binary case. Despite differences in the setups (binary vs. continuous), we

interpret this comparison as confirming the quality of bounds in Theorem 3.22.

    Other works have studied the same setup as ours. See [51] for an overview of some prior

results. Bounds obtained there were later improved in [52] by a different approach. To our

knowledge, [52] represents the current state-of-the-art for ReLU networks. Suppose log L =

O(log d) and ω = Ω(d), which is the case if entries of A in the hypothesis space are allowed to

have a magnitude of 1. Then the bound (39) matches the one in [52].



Remark 3.23. Intuitively, one might not expect our approach based on rational function ap-

proximations to produce a result comparable to the state-of-the-art for ReLU networks. When

we use a rational function in Rss to approximate the ReLU function, then the bound we obtain is

controlling the worst case generalization error for FRatNN over arbitrary fixed activations in Rss .

Such networks are expected to be more complicated than ReLU-activated networks of the same

structure. Nonetheless, our main result Theorem 2.6 does lead to a good result here.



                                                  24

4      Conclusion

In this paper, we derived a covering number bound N (V, ε) for bounded regular sets V (Defini-

tion 2.1), which include images of polynomial maps, real algebraic varieties, and more generally

semialgebraic sets in Euclidean space. The bound (Theorem 2.6) improves the best known prior

general result in [84]. As an immediate corollary, we bounded the volume of tubular neighbor-

hoods of polynomial images (Corollary 2.20), as well as varieties and semialgebraic sets. Our

main result on the covering number (Theorem 2.6) is asymptotically tight as ε → 0, and we ex-

pect the dependencies on other quantities in the bound are also in their optimal form in general.

Compared to existing covering number bounds developed for smooth manifolds, ours for regular

sets only requires an inspection of the number of variables and the degree of the involved poly-

nomials, and does not require nontrivial information such as the volume or reach of V . Indeed,

the paper’s proof by slicing leverages global properties of algebraic varieties, rather than local

properties of manifolds.

    We applied Theorem 2.6 to a number of computational domains. Firstly we bounded the

covering number on tensors of low CP rank (Theorem 3.1). That result is near optimal in the

low CP rank regime (r ⩽ mini ni ), often of most interest in practical tensor methods. Moreover,

we applied Theorem 2.6 to sketching images of polynomials (and other regular sets), applied it

to nonlinear polynomial optimization problems, and bounding the generalization error of neural

networks. In polynomial optimization, for S a sub-Gaussian random projection or subsampled

orthogonal matrix with random signs (Theorem 3.12), we derived a sketching dimension bound

ensuring that S is an (ε, δ, τ ) sketch operator (Definition 3.8) of ℓ ◦ p for a Lipschitz residual

function ℓ. This bound is greatly simplified when ℓ is identity (Corollary 3.13). For rational neu-

ral networks of depth L and width d (fully connected or convolutional) with possibly trainable

activations (which can greatly reduce training time), we derived a bound on its generalization

error that is independent of the norms of weight matrices and that of the input vector (The-

                                    √

orem 3.18). The bound is O(dL/ n) up to logarithmic factors. We also tested our theory by

deriving a generalization error bound on ReLU networks (Theorem 3.22) using the approxima-

tion properties of rational functions. Under reasonable assumptions, that result matches the

best prior result to our knowledge [52], and shows dependence on the choice of architecture

of the network. In general, we expect that several more useful applications of Theorem 2.6 in

applied and computational mathematics should be possible.



Acknowledgements. The authors are grateful to Saugata Basu and Nicolas Boumal for helpful

pointers to the literature. Y.Z. was supported in part by a Graduate Continuing Fellowship and

a National Initiative for Modeling and Simulation (NIMS) graduate student fellowship at UT

Austin. J.K. was supported in part by NSF DMS 2309782, NSF DMS 2436499, NSF CISE-IIS

2312746, DE SC0025312, and start-up grants from the College of Natural Science and Oden

Institute at UT Austin.





References

 [1]   Dimitris Achlioptas. “Database-friendly random projections: Johnson-Lindenstrauss with

       binary coins”. In: Journal of Computer and System Sciences 66.4 (2003), pp. 671–687.

 [2]   Nir Ailon and Bernard Chazelle. “Approximate nearest neighbors and the fast Johnson-

       Lindenstrauss transform”. In: Proceedings of the thirty-eighth annual ACM symposium on

       Theory of Computing. 2006, pp. 557–563.

 [3]   Animashree Anandkumar, Rong Ge, Daniel J Hsu, Sham M Kakade, Matus Telgarsky,

       et al. “Tensor decompositions for learning latent variable models.” In: J. Mach. Learn.

       Res. 15.1 (2014), pp. 2773–2832.







                                                25

 [4]   Martin Anthony and Peter L. Bartlett. Neural Network Learning: Theoretical Foundations.

       1st ed. Cambridge University Press, 1999.

 [5]   Peter L. Bartlett, Dylan J. Foster, and Matus J. Telgarsky. “Spectrally-normalized margin

       bounds for neural networks”. In: Advances in Neural Information Processing Systems 30

       (2017).

 [6]   Peter L. Bartlett, Nick Harvey, Christopher Liaw, and Abbas Mehrabian. “Nearly-tight

       VC-dimension and pseudodimension bounds for piecewise linear neural networks”. In: The

       Journal of Machine Learning Research 20.1 (2019), pp. 2285–2301.

 [7]   Saugata Basu and Antonio Lerario. “Hausdorff approximations and volume of tubes of

       singular algebraic sets”. In: Mathematische Annalen (2022), pp. 1–31.

 [8]   Saugata Basu, Richard Pollack, and Marie-Françoise Roy. Algorithms in Real Algebraic

       Geometry. 2nd. Vol. 10. Springer, 2006.

 [9]   Albert S. Berahas, Raghu Bollapragada, and Jorge Nocedal. “An investigation of Newton-

       sketch and subsampled Newton methods”. In: Optimization Methods and Software 35.4

       (2020), pp. 661–680.

[10]   Jacek Bochnak, Michel Coste, and Marie-Françoise Roy. Real Algebraic Geometry. Vol. 36.

       Springer Science & Business Media, 2013.

[11]   Stéphane Boucheron, Gábor Lugosi, and Pascal Massart. Concentration Inequalities: A

       Nonasymptotic Theory of Independence. Oxford University Press, 2013.

[12]   Nicolas Boullé, Yuji Nakatsukasa, and Alex Townsend. “Rational neural networks”. In:

       Advances in Neural Information Processing Systems 33 (2020), pp. 14243–14253.

[13]   Paul Breiding, Sara Kalisnik Verovsek, Bernd Sturmfels, and Madeleine Weinstein. “Learn-

       ing algebraic varieties from samples”. In: Revista Matemática Complutense 31.3 (2018),

       pp. 545–593.

[14]   Peter Bürgisser and Felipe Cucker. Condition: The Geometry of Numerical Algorithms.

       Vol. 349. Springer Berlin Heidelberg, 2013.

[15]   Gunnar Carlsson and Mikael Vejdemo-Johansson. Topological Data Analysis with Appli-

       cations. Cambridge University Press, 2021.

[16]   Coralia Cartis, Tyler Ferguson, and Lindon Roberts. “Scalable derivative-free optimization

       for nonlinear least-squares problems”. In: arXiv preprint arXiv:2007.13243 (2020).

[17]   Coralia Cartis, Jaroslav Fowkes, and Zhen Shao. “Randomised subspace methods for

       non-convex optimization, with applications to nonlinear least-squares”. In: arXiv preprint

       arXiv:2211.09873 (2022).

[18]   Coralia Cartis and Lindon Roberts. “Scalable subspace methods for derivative-free nonlin-

       ear least-squares optimization”. In: Mathematical Programming 199.1-2 (2023), pp. 461–

       524.

[19]   Isaac Chavel. Riemannian Geometry: A Modern Introduction. Vol. 98. Cambridge Univer-

       sity Press, 2006.

[20]   Justin Chen and Joe Kileel. “Numerical implicitization”. In: Journal of Software for Al-

       gebra and Geometry 9.1 (2019), pp. 55–63.

[21]   Diego Cifuentes and Ankur Moitra. “Polynomial time guarantees for the Burer-Monteiro

       method”. In: Advances in Neural Information Processing Systems 35 (2022), pp. 23923–

       23935.

[22]   John Dalbec and Bernd Sturmfels. “Introduction to Chow forms”. In: Invariant Methods

       in Discrete and Computational Geometry: Proceedings of the Curaçao Conference, 13–17

       June, 1994. Springer. 1995, pp. 37–58.



                                               26

[23]   Sandra Di Rocco, Parker B Edwards, David Eklund, Oliver Gäfvert, and Jonathan D

       Hauenstein. “Computing geometric feature sizes for algebraic manifolds”. In: SIAM Jour-

       nal on Applied Algebra and Geometry 7.4 (2023), pp. 716–741.

[24]   Sandra Di Rocco, David Eklund, and Oliver Gäfvert. “Sampling and homology via bot-

       tlenecks”. In: Mathematics of Computation 91.338 (2022), pp. 2969–2995.

[25]   Sjoerd Dirksen. “Dimensionality reduction with subgaussian matrices: a unified theory”.

       In: Foundations of Computational Mathematics 16.5 (2016), pp. 1367–1396.

[26]   Emilie Dufresne, Parker Edwards, Heather Harrington, and Jonathan Hauenstein. “Sam-

       pling real algebraic varieties for topological data analysis”. In: 2019 18th IEEE Inter-

       national Conference On Machine Learning And Applications (ICMLA). 2019, pp. 1531–

       1536.

[27]   Martin Ehler and Frank Filbir. “Metric entropy, n-widths, and sampling of functions on

       manifolds”. In: Journal of Approximation Theory 225 (2018), pp. 41–57.

[28]   Tolga Ergen and Mert Pilanci. “Random projections for learning non-convex models”. In:

       NeurIPS 2019 Workshop on Beyond First Order Methods in Machine Learning (2019).

[29]   Herbert Federer. “Curvature measures”. In: Transactions of the American Mathematical

       Society 93.3 (1959), pp. 418–491.

[30]   Shmuel Friedland. “Entropy of holomorphic and rational maps: A survey”. In: Dynamics,

       Ergodic Theory, and Geometry Dedicated to Anatole Katok. Cambridge University Press.

       2007, pp. 113–128.

[31]   Andrei Gabrielov and Nicolai Vorobjov. “Approximation of definable sets by compact fam-

       ilies, and upper bounds on homotopy and homology”. In: Journal of the London Mathe-

       matical Society 80.1 (2009), pp. 35–54.

[32]   Israel M. Gelfand, Mikhail M. Kapranov, and Andrei V. Zelevinsky. Discriminants, Re-

       sultants, and Multidimensional Determinants. Birkhäuser, 1994.

[33]   Lee-Ad Gottlieb, Aryeh Kontorovich, and Robert Krauthgamer. “Adaptive metric dimen-

       sionality reduction”. In: Theoretical Computer Science 620 (2016), pp. 105–118.

[34]   Robert Gower, Dmitry Kovalev, Felix Lieder, and Peter Richtárik. “RSN: Randomized

       subspace Newton”. In: Advances in Neural Information Processing Systems 32 (2019).

[35]   Adityanand Guntuboyina and Bodhisattva Sen. “Covering numbers for convex functions”.

       In: IEEE Transactions on Information Theory 59.4 (2012), pp. 1957–1965.

[36]   Cullen A. Haselby, Mark A. Iwen, Deanna Needell, Michael Perlmutter, and Elizaveta Re-

       brova. “Modewise operators, the tensor restricted isometry property, and low-rank tensor

       recovery”. In: Applied and Computational Harmonic Analysis 66 (2023), pp. 161–192.

[37]   Yiyun He, Thomas Strohmer, Roman Vershynin, and Yizhe Zhu. “Differentially private

       low-dimensional representation of high-dimensional data”. In: arXiv preprint arXiv:2305.17148

       (2023).

[38]   Zhongzhan Huang, Senwei Liang, Hong Zhang, Haizhao Yang, and Liang Lin. “On fast

       simulation of dynamical system with neural vector enhanced numerical solver”. In: Scien-

       tific Reports 13.1 (2023), p. 15254.

[39]   Peter J. Huber. “Robust estimation of a location parameter”. In: Breakthroughs in Statis-

       tics: Methodology and Distribution. 1992, pp. 492–518.

[40]   Leonid D. Ivanov. “Variazii mnozestv i funkzii [Variations of sets and functions]”. In: Izdat.

       “Nauka”, Moscow (1975).

[41]   Mark A. Iwen, Deanna Needell, Elizaveta Rebrova, and Ali Zare. “Lower memory obliv-

       ious (tensor) subspace embeddings with fewer random bits: Modewise methods for least

       squares”. In: SIAM Journal on Matrix Analysis and Applications 42.1 (2021), pp. 376–416.



                                                 27

[42]   Mark A. Iwen, Benjamin Schmidt, and Arman Tavakoli. “On fast Johnson–Lindenstrauss

       embeddings of compact submanifolds of RN with boundary”. In: Discrete & Computational

       Geometry (2022), pp. 1–58.

[43]   Frédéric Jean. “Entropy and complexity of a path in sub-Riemannian geometry”. In:

       ESAIM: Control, Optimisation and Calculus of Variations 9 (2003), pp. 485–508.

[44]   William B Johnson, Joram Lindenstrauss, et al. “Extensions of Lipschitz mappings into a

       Hilbert space”. In: Contemporary mathematics 26.189-206 (1984), p. 1.

[45]   Tamara G Kolda and Brett W Bader. “Tensor decompositions and applications”. In: SIAM

       review 51.3 (2009), pp. 455–500.

[46]   J. M. Landsberg and Giorgio Ottaviani. “Equations for secant varieties of Veronese and

       other varieties”. In: Annali di Matematica Pura ed Applicata 192.4 (2013), pp. 569–606.

[47]   Tam Le and Makoto Yamada. “Persistence Fisher kernel: A Riemannian manifold kernel for

       persistence diagrams”. In: Advances in Neural Information Processing Systems 31 (2018).

[48]   Namgil Lee and Andrzej Cichocki. “Fundamental tensor operations for large-scale data

       analysis using tensor network formats”. In: Multidimensional Systems and Signal Process-

       ing 29 (2018), pp. 921–960.

[49]   Eitan Levin, Joe Kileel, and Nicolas Boumal. “Finding stationary points on bounded-

       rank matrices: A geometric hurdle and a smooth remedy”. In: Mathematical Programming

       199.1-2 (2023), pp. 831–864.

[50]   Xingguo Li, Jarvis Haupt, and David Woodruff. “Near optimal sketching of low-rank tensor

       regression”. In: Advances in Neural Information Processing Systems 30 (2017).

[51]   Shan Lin and Jingwei Zhang. “Generalization bounds for convolutional neural networks”.

       In: arXiv preprint arXiv:1910.01487 (2019).

[52]   Philip M. Long and Hanie Sedghi. “Generalization bounds for deep convolutional neural

       networks”. In: International Conference on Learning Representations. 2019.

[53]   Martin Lotz. “On the volume of tubular neighborhoods of real algebraic varieties”. In:

       Proceedings of the American Mathematical Society 143.5 (2015), pp. 1875–1889.

[54]   Ulrike von Luxburg and Olivier Bousquet. “Distance-based classification with Lipschitz

       functions”. In: Journal of Machine Learning Researy 5 (2004), pp. 669–695.

[55]   Per-Gunnar Martinsson and Joel A. Tropp. “Randomized numerical linear algebra: Foun-

       dations and algorithms”. In: Acta Numerica 29 (2020), pp. 403–572.

[56]   Ernst W Mayr. “Some complexity results for polynomial ideals”. In: Journal of Complexity

       13.3 (1997), pp. 303–325.

[57]   John Milnor. “On the Betti numbers of real varieties”. In: Proceedings of the American

       Mathematical Society 15.2 (1964), pp. 275–280.

[58]   Mehryar Mohri, Afshin Rostamizadeh, and Ameet Talwalkar. Foundations of Machine

       Learning. MIT Press, 2018.

[59]   Alejandro Molina, Patrick Schramowski, and Kristian Kersting. “Padé activation units:

       End-to-end learning of flexible activation functions in deep networks”. In: arXiv preprint

       arXiv:1907.06732 (2019).

[60]   Liviu I. Nicolaescu. Lectures on the Geometry of Manifolds. World Scientific, 2020.

[61]   Partha Niyogi, Stephen Smale, and Shmuel Weinberger. “Finding the homology of sub-

       manifolds with high confidence from random samples”. In: Discrete & Computational

       Geometry 39.1-3 (2008), pp. 419–441.

[62]   Olga Arsen’evna Oleinik. “Estimates of the Betti numbers of real algebraic hypersurfaces”.

       In: Matematicheskii Sbornik 70.3 (1951), pp. 635–640.



                                               28

[63]   Román Orús. “A practical introduction to tensor networks: Matrix product states and

       projected entangled pair states”. In: Annals of physics 349 (2014), pp. 117–158.

[64]   Samet Oymak, Benjamin Recht, and Mahdi Soltanolkotabi. “Isometric sketching of any

       set via the Restricted Isometry Property”. In: Information and Inference: A Journal of

       the IMA 7.4 (2018), pp. 707–726.

[65]   Alain Pajor. “Metric entropy of the Grassmann manifold”. In: Convex Geometric Analysis

       34.181-188 (1998), pp. 0942–46013.

[66]   Ivan Georgievich Petrovskii and Olga Arsen’evna Oleinik. “On the topology of real al-

       gebraic surfaces”. In: Izvestiya Rossiiskoi Akademii Nauk. Seriya Matematicheskaya 13.5

       (1949), pp. 389–402.

[67]   Mert Pilanci and Martin J. Wainwright. “Newton sketch: A near linear-time optimization

       algorithm with linear-quadratic convergence”. In: SIAM Journal on Optimization 27.1

       (2017), pp. 205–245.

[68]   Holger Rauhut, Reinhold Schneider, and Zeljka Stojanac. “Low rank tensor recovery via

       iterative hard thresholding”. In: Linear Algebra and its Applications 523 (2017), pp. 220–

       262.

[69]   Malte Roeer. “On the finite dimensional approximation of the Kuratowski-embedding for

       compact manifolds”. In: arXiv preprint arXiv:1305.1529 (2013).

[70]   Mark Rudelson and Roman Vershynin. “On sparse reconstruction from Fourier and Gaus-

       sian measurements”. In: Communications on Pure and Applied Mathematics 61.8 (2008),

       pp. 1025–1045.

[71]   Rolf Schneider and Wolfgang Weil. Stochastic and Integral Geometry. Vol. 1. Springer,

       2008.

[72]   Nicholas D. Sidiropoulos, Lieven De Lathauwer, Xiao Fu, Kejun Huang, Evangelos E.

       Papalexakis, and Christos Faloutsos. “Tensor Decomposition for Signal Processing and

       Machine Learning”. In: IEEE Transactions on Signal Processing 65.13 (2017), pp. 3551–

       3582.

[73]   Jonathan W. Siegel and Jinchao Xu. “Sharp bounds on the approximation rates, metric

       entropy, and n-widths of shallow neural networks”. In: Foundations of Computational

       Mathematics (2022).

[74]   Stanislaw J. Szarek. “Metric entropy of homogeneous spaces”. In: Quantum Probability

       Banach Center Publications (1998), pp. 395–410.

[75]   Matus Telgarsky. “Neural networks and rational functions”. In: International Conference

       on Machine Learning. PMLR. 2017, pp. 3387–3393.

[76]   René Thom. “Sur l’homologie des variétés algébriques réelles”. In: Differential and Com-

       binatorial Topology (1965), pp. 255–265.

[77]   Vladimir M. Tikhomirov. “ε-entropy and ε-capacity of sets in functional spaces”. In: Se-

       lected Works of AN Kolmogorov: Volume III: Information Theory and the Theory of Al-

       gorithms (1993), pp. 86–170.

[78]   Madeleine Udell and Alex Townsend. “Why are big data matrices approximately low

       rank?” In: SIAM Journal on Mathematics of Data Science 1.1 (2019), pp. 144–160.

[79]   Roman Vershynin. High-Dimensional Probability: An Introduction With Applications in

       Data Science. Vol. 47. Cambridge University Press, 2018.

[80]   Anatoli G. Vitushkin. “The relation of variations of a set to the metric properties of its

       complement”. In: Dokl. Akad. Nauk SSSR (N.S.) 114 (1957), pp. 686–689.







                                                 29

[81]   David P. Woodruff. “Sketching as a tool for numerical linear algebra”. In: Foundations

       and Trends® in Theoretical Computer Science 10.1-2 (2014), pp. 1–157.

[82]   Han Lun Yap, Michael B. Wakin, and Christopher J. Rozell. “Stable manifold embed-

       dings with structured random matrices”. In: IEEE Journal of Selected Topics in Signal

       Processing 7.4 (2013), pp. 720–730.

[83]   Yosef Yomdin. “Semialgebraic complexity of functions”. In: Journal of Complexity 21.1

       (2005), pp. 111–148.

[84]   Yosef Yomdin and Georges Comte. Tame Geometry with Application in Smooth Analysis.

       Springer, 2004.

[85]   Tong Zhang. “Covering number bounds of certain regularized linear function classes”. In:

       Journal of Machine Learning Research 2 (2002), pp. 527–550.

[86]   Yifan Zhang and Joe Kileel. “Moment estimation for nonparametric mixture models

       through implicit tensor decomposition”. In: SIAM Journal on Mathematics of Data Sci-

       ence 5.4 (2023), pp. 1130–1159.

[87]   Yifan Zhang and Edgar Solomonik. “On stability of tensor networks and canonical forms”.

       In: arXiv preprint arXiv:2001.01191 (2020).









A      Proofs of Properties of Regular sets

                                                                  k

We begin by introducing necessary notations. Let A ∈ GN be parametrized by A = (x, P ),

where x ∈ RN −k is the affine vector and P ∼ = Rk the tangent space of A. For each x, denote

 k = µk (x, ·) the O(N ) invariant measure on Gk (the Grassmannian of k dimensional linear

νN      N                                         N

subspaces of RN ), and for each P , denote λN −k = µkN (·, P ) the Lebesgue measure on P ⊥ .

    The following lemma shows an expected result. Let k ⩽ m ⩽ n, and E ⊆ Gkn be a νnk -null

set. Then for almost all f ∈ Gmn of higher dimension, almost all k dimensional subspaces of f

are not an element of E.

Lemma A.1. Let E ⊆ Gkn be such that νnk (E) = 0. Then for each m ⩾ k, there is a νnm null set

F in Gm                                                                           k [f ](E ) = 0

                             / F , the set Ef = e ∈ Gkn : e ⊆ f, e ∈ E satisfies νm

       n , so that for all f ∈                                                            f

       k [f ] is the uniform measure of Gk on f .

where νm                                   m



Proof. Let U = (u1 | . . . |um ) be an element in the Stiefel manifold Stm

                                                                         n . Define two projection

maps Pn,k : Stm

              n → G  k and P

                     n          n,m : Stm

                                        n → G m by

                                              n



                                 Pn,k (U ) = span {u1 , . . . , uk } ,

                                 Pn,m (U ) = span {u1 , . . . , um } .

                                   m

Let ρm                                                                         m

     n be the uniform measure on Stn . Then the pushforward measure (Pn,k )∗ ρn is the uniform

          k

measure νn up to a constant scalar. Denote νm the uniform measure on O(m). Since the map

Pn,m is a Riemannian submersion, by the co-area formula [19],

              Z           Z                   Z            Z

          0 = 1E dνnk = c 1P −1 (E) dρmn =  c    dν m

                                                    n (f )    1P −1 (E)∩Pn,m

                                                                         −1

                                                                             (f ) dνm .

                                 n,k                                      n,k

                                                   Gm

                                                    n              O(m)



Thus, there is a null set F ⊆ Gm                     / F , the second integral is 0. Fix any f ∈

                               n such that for all f ∈                                         /F

               m                                                       −1

and V 0 ∈ Stn a basis of f . We isometrically identify the fiber Pn,m (f ) with O(m) through

     −1 (f ) ∋ U 7→ V ⊤ U ∈ O(m). Define the map ϕ : O(m) → Gk [f ] by

ι : Pn,m               0                                           m

                                                        

                                                          Ik

                                 ϕ(H) = range V 0 H              .

                                                           0



                                                  30

Note the pushforward measure ϕ∗ νm is the uniform measure νm k [f ] up to a constant scalar. Now,



      Z                                   Z                                      Z

                −1        −1                      −1          −1         k                k

  0=        ι(Pn,k (E) ∩ Pn,m (f ))dνm = c ϕ ◦ ι(Pn,k (E) ∩ Pn,m (f ))dνm [f ] = 1Ef dνm    [f ].

         O(m)



The last step follows since e ∈ Ef if and only if one can find a basis of e being the first k column

                    −1         −1 (f ). Thus, we have found the desired null set F .

of an element in Pn,k  (E) ∩ Pn,m                                                                  ■



    We now use the tool Lemma A.1 to prove the lemmas in Section 2.2.



Lemma 2.2. Let V be (K, n) regular in RN . Then for µ-almost all planes L in RN of codi-

mension m ⩽ n, the set L ∩ V is (K, n − m) regular in L ∼

                                                        = RN −m .

                                                          N −n      ′

Proof. For any n′ ⩾ m, denote En′ the null set in µN           consists of all planes at which the

conditions in Definition 2.1 fails for V . By definition,

                                           Z             Z

                           N −n′               N −n′

                      0 = µN (En′ ) = dνN            (P ) 1(x,P )∈En′ dλn′ (x).



            N −n′

Thus, for νN     -almost all P , the set IP = {x : (x, P ) ∈ En′ } has λn′ measure 0. Denote by F

                 N −n′                                                                            −m

the null set of νN     such that the above fail to hold. By Lemma A.1, there is a set H ⊆ GN   N

                                                   ′             −n ′                       N −n′

of full measure, such that for Q ∈ H, the set FQn := {P ∈ GN   N      : P ⊆ Q, P ∈ F } has νN −m [Q]

measure 0. Finally, fix Q ∈ H, and for an affine vector y of Q, denote Jy,P = {z ∈ Q/P :

                             ′

(y + z) ∈ IP }. For P ∈ / FQn , by the Fubini theorem,

                                            Z             Z

                          0 = λn′ (IP ) =       dλm (y)       1y+z∈IP dλn′ −m (z).



                                                                                     ′

Thus, for almost all y, set Jy,P has a λn′ −m measure 0 for all P ∈/ FQn . Denote this set of

good y vectors by RQ . Denote T = {(y, Q) : Q ∈ H, y ∈ RQ }, and for each L = (y, Q) ∈ T ,

                                  ′                                           −m

                                       / Jy,P }. We deduce from above that µN

                             / FQn , z ∈

denote SL = {(y + z, P ) : P ∈                                              N    (T c ) = 0 and

   −n′

µN             c

 N −m [L]((SL ) ) = 0. Since by definition, SL ∩ En′ = ∅, all planes in SL are generic to V . This

means for all L′ ∈ SL of codimension r > n − m in L, it has a codimension of m + r > n in RN ,

so L′ ∩ (L ∩ V ) = L′ ∩ V = ∅. And for all L′ ∈ SL of codimension r > n − m in L, it has a

codimension of m + r ⩽ n in RN , so L′ ∩ (L ∩ V ) = L′ ∩ V has at most K connected components.

The assertion is thus proved.                                                                   ■



Lemma 2.3. Any (K, 0) regular set is a collection of at most K discrete points.



Proof. Let V ⊆ RN be a (K, 0) regular set. Towards a contradiction, assume there is a path

connected component A of V such that diam(A) > 0. For such A, there exist some ε, δ > 0 such

that there is a set E ⊆ G1N of measure ε so that the projection of A onto any element P ∈ E

has a diameter of at least δ. Denote the unit tangent vector of P by p̂. By continuity, for each

P ∈ E, there is an interval FP ∈ R of length at least δ such that (up̂, P ⊥ ) ∩ A ̸= ∅ for all u ∈ FP .

                                                                               −1

The collection of such (up̂, P ⊥ ) has a measure of at least εδ > 0 in µN   N     . This violates the

assumption that V is (K, 0) regular.                                                                ■





B     Additional Proofs in Section 2.3

Throughout this section, let L = (u, P ) be an affine subspace of RN we use to intersect with

the set to be proved to be regular. We denote m the codimension of L. Let e1 , . . . , em be an

orthonormal basis of P ⊥ . For a subset S of Euclidean space, let CC(S) denote the number of

path connected components of S with respect to the Euclidean topology.



                                                    31

Lemma 2.16 (varieties are regular). Let V ⊆ RN be a variety defined by {∀j, fj = 0}, where

fj are polynomials of degree at most d, d ⩾ 2. Suppose V has dimension at most n. Then



   (a) V is ((2d)N , n) regular.

   (b) V ∩ (c · B N ) is ((2d)N +1 , n) regular for all c > 0.

   (c) π(V ) is ((2d + 1)N +1 , n) regular. If V is a cone, then the second regularity parameters

       may be changed from n to n − 1.



Proof. We will only prove (c) since the rest will be automatic once we prove Lemma 2.18 and

take b therein to be respectively 0 and 1.

    For (c), consider S = {(y, w) : ∥y∥2 w = 1, y ∈ V, π(y) ∈ L} in RN × R. The equations for

S read



                                  ⟨y, ei ⟩2 = ⟨u, ei ⟩2 ∥y∥2 ,         i = 1, . . . , m;

                                             fj (y) = 0,          for all j;

                                                         2

                                                   ∥y∥ w = 1.



The polynomials all have degree at most d′ = max {3, d}. Thus, for all d ⩾ 2, CC(S) ⩽

d′ (2d′ − 1)N ⩽ (2d + 1)N +1 . For m > n, we have S = ∅ for Zariski generic L again by

[22, Theorem 1.1]. Since π is continuous on S with image π(V ) ∩ L, we conclude π(V ) is

((2d + 1)N +1 , n) regular. As in the proof of Lemma 2.15, if V is a cone then we can replace n

by n − 1 in the second regularity parameter.                                                  ■



Lemma 2.17 (images of rational maps are regular). Let f be a rational map from an open

dense subset of Rn to RN whose coordinate functions are ratios of polynomials of degree at most

d (see Definition 3.15). Then Im(f ) is ((2N d + 1)n+1 , n) regular.

                             (x)

Proof. Suppose f (x) = ( pq11(x)             N (x)

                                 , . . . , pqN     ) for polynomials pi and qi of degrees at most d (where

                                          QN(x)

f is defined). Let S = {(x, w) : w i=1 qi (x) = 1, f (x) ∈ L} in Rn × R. Then S is the solution

set to

                                                       YN

                        ⟨g(x), ei ⟩ = ⟨u, ei ⟩                qi (x), i = 1, . . . , m;

                                                          i=1

                                                    YN

                                                w         qi (x) = 1,

                                                       i=1



where g(x) is obtained by clearing denominators in f (x), that is,

                                     Y                         Y       

                       g(x) := p1 (x)    qi (x), . . . , pN (x)   qi (x) .

                                                i̸=1                           i̸=N



Here the polynomial equations have degree at most dN + 1. Thus POMT implies CC(S) ⩽

(dN + 1)(2dN + 1)n ⩽ (2dN + 1)n+1 . Again, S = ∅ Zariski generically if m > n, because Im(f )

is contained in an algebraic variety of dimension at most n. Since (x, w) 7→ f (x) is continuous

on S with image Im(f ) ∩ L, it follows Im(f ) is ((2dN )n+1 , n) regular.                     ■



Lemma 2.18 (semialgebraic sets are regular). Let U ⊆ RN be a semialgebraic set defined

by {∀k, pk = 0} ∩ {∀ℓ, qℓ ⩽ 0} ∩ {∀t, rt < 0}15 , where pk , qℓ , rt are polynomials of degree at

most d. Suppose U has dimension at most n and there are b inequality constraints. Then U is

((2d)N min (2d)b , 7b N, (c b2 )N , n) regular16 .

           



  15

     In general, a semialgebraic set is a finite union of such U defined here. It is trivial to show that the union of

a (K1 , n1 ) regular set and a (K2 , n2 ) regular set is (K1 + K2 , max {n1 , n2 }) regular.

  16

     The term 7b N can be improved with N replaced with the dimension of the variety defined by polynomials pk .





                                                             32

Proof. First, note that U ∩ L is a semialgebraic set with b inequality constraints. As shown

in the proof of [84, Theorem 4.8], to get an upper bound on CC(U ∩ L), we may assume that

all b inequalities are of form qℓ (y) ⩽ 0 by passing to a subset of U ∩ L with at least as many

components. Now the set S = {(y, w) : qℓ (y) ⩽ 0 ∀ℓ ∈ [b], y ∈ U ∩ L} in RN × Rb is a

semialgebraic set defined by



                                 ⟨y, ei ⟩ = ⟨u, ei ⟩ ,    i = 1, . . . , m;

                                        pk (y) = 0,      for all k;

                                       qℓ (y) ⩽ 0 ℓ = 1, . . . , b.



Using [8, Theorem 7.38], we can bound CC(S) ⩽ dim(V ′ ) · 7b (2d)N uniformly over m, where

V ′ is the variety defined by polynomials pk , and dim(V ′ ) ⩽ N . On the other hand, we can

introduce b dummy variables and replace the qℓ inequalities with



                                           qℓ (y) + ωℓ2 = 0.



Then POMT gives CC(S) ⩽ (2d)N +b . Finally, the results in [31] states that CC(S) ⩽ (2d)N ·

(c b2 )N . The constant c to the best of our knowledge has no clear specification. As the continuous

map (y, w) 7→ y sends S onto U ∩L. Thus, CC(U ∩L) ⩽ CC(S) ⩽ (2d)N min 7b , (2d)b , (c b2 )N .

Again, when m > n and L is Zariski generic, S = ∅ because a semialgebraic set of dimension

at most n is contained in a variety of dimension at most n. Hence the proof is complete.           ■





C     Additional Proofs in Section 3.1

Lemma 3.3. Let E and F be two points on the Grassmannian manifold Gkn . Let P E , P F be

                                                           E − P F ∥2 ⩽ ε, then for any basis QE

the orthogonal projections to E and F , respectively. If ∥P√

of E, there is a basis QF of F such that ∥QE − QF ∥2 ⩽ 2ε.

Proof. Following the classic theory of principal angles, we can find an orthonormal basis U =

(u1 | . . . |uk ) of E and V = (v 1 | . . . |v k ) of F such that



                                         P E P F = U DV ⊤ ,



where D is a nonnegative diagonal matrix satisfying U ⊤ V = D (in particular di = ⟨ui , v i ⟩ ∈

[0, 1]). Following the arguments in [65], for di < 1, define

                                   −di ui + v i             −ui + di v i

                              ũi = q           , and ṽ i = q           .

                                      1 − d2i                 1 − d2i



Then the rank at most 2k matrix P E − P F has the SVD

                                     X q                            

                       PE − PF =           1 − d2i ũi v ⊤         ⊤

                                                         i + ui ṽ i   .

                                         i: di <1



Without loss of generality, let us assume ∥P E − P F ∥ =√ε. The above then implies that ε ⩽ 1,

and consequently the norm condition implies mini di ⩾ 1 − ε2 .

   Now for any basis QE of E, let M be the k × k orthogonal matrix such that QE = U M .

The candidate basis for F is QF = V M . Indeed, with this choice of QF , we have

                                                              1/2  √           1/2

           ∥QE − QF ∥2 = ∥U − V ∥2 = ∥(U − V )⊤ (U − V )∥2 = 2 ∥I − D∥2

                             √       p      1/2 √

                          ⩽ 2 1 − 1 − ε2         ⩽ 2ε.



Thus the proof is complete.                                                                        ■



                                                    33

D     Additional Proofs in Section 3.2

Lemma D.1. For 0 ⩽ a ⩽ b ⩽ c, we have

                      Z bp

                                           √     p        b

                            log(c/ε) dε ⩽ b π + ε log(c/ε) .

                              a                                         a



Proof. Integration by parts gives

                   Z bp                                               a

                                                     1 √

                                                            r

                                       p         b                  c

                        log(c/ε) dε = ε log(c/ε) + c π erf      log      ,

                     a                           a   2              ε b

                                          Rx       2

where erf is the error function erf(x) = 0 √2π e−y dy. So the error function term is upper

bounded by

                              0

                                                  √ p

                     r

                            c                              

                 erf    log      = P |N (0, 1)| ⩾ 2 log(c/b) ⩽ 2e− log(c/b) .

                            ε b

Plugging into the exact integration, we get the claimed result.                                   ■



    The following result is classic, see for example [79], but it is more convenient in our context.

Lemma D.2. Let S ∈ Rm×M be a matrix p          in subG(α). There exist some absolute constants

c1 , c2 > 0, so that for any δ ∈ (0, 1) and u > c2 /c1 ,



                                         P (∥S∥ ⩾ αu) ⩽ δ



provided that

                               m ⩾ (c1 u2 − c2 )−1 (c2 M + log(1/δ)).

Proof. We follow the proof in [79, Theorem 4.4.5]. Using a standard net argument, we know

that for t ⩾ 0,

                                ∥S∥ =    max     ⟨x, Sy⟩ ⩾ t

                                          x∈Bm ,y∈BM



happens with probability at most



                p(t) := 9m+M · 2 exp − c1 m(t/α)2 ⩽ exp(c2 (M + m) − c1 m(t/α)2 ).

                                                 



Taking t = αu with u2 > c2 /c1 , we see that p(αu) ⩽ δ as long as m satisfies the condition in

the statement.                                                                              ■





E    Additional Proofs in Section 3.3.1

In this section, we list the lemmas used to prove Theorem 3.18 as well as Corollary 3.19 together

with their proofs. We denote Σn Rβα denotes a sum of n rational functions in Rβα .



Lemma E.1. Suppose X ∗i (Λ) ∈ Rθθ and the rational function ρi+1 ∈ Rss are fixed. Then for

RatNN (32)

                                               s(1+d θ)

                                 X ∗i+1 (Λ) ∈ Rs(1+dii θ) ;                           (40)

and for RatCNN (33),

                                                        s(1+c k2 θ)

                                      X ∗i+1 (Λ) ∈ Rs(1+cii k2 θ) .                            (41)

If instead the rational activation is trainable with variable coefficients, then for RatNN (32)

                                                        s(1+d θ)+1

                                      X ∗i+1 (Λ) ∈ Rs(1+dii θ)+1 ;                             (42)



and for RatCNN (33),

                                                     s(1+c k2 θ)+1

                                     X ∗i+1 (Λ) ∈ Rs(1+cii k2 θ)+1 .                           (43)



                                                   34

Proof. First we prove the non-trainable case. For rational neural networks, Ai+1 X ∗i (Λ) + bi+1 ∈

                                                                                         s(d θ+1)

Σdi Rθθ+1 + R01 ⊆ Rddii θθ+1 + R01 ⊆ Rddii θθ+1 . Then X ∗i+1 (Λ) ∈ Rss ◦ Rddii θθ+1 ⊆ Rs(dii θ+1) proving the

first assertion.

      For convolutional case, denote K pq for p ∈ [ci+1 ] and q ∈ [ci ] the kernel in Rk×k        P . Denote

X i (Λ)q ∈ Rdi the qth channel of the input X ∗i (Λ) ∈ Rci ×di . Then K pq ∗ X ∗i (Λ)q ∈ k2 Rθθ+1 ⊆

   ∗

    2                                                               2               2

Rkk2 θθ+1 . Summing over q ∈ [ci ], we have Ki X ∗i (Λ) ∈ ci Rkk2 θθ+1 ⊆ Rccii kk2 θθ+1 . Finally X ∗i+1 (Λ) ∈

                                                             P

           2                 s(1+c k2 θ)

Rss ◦ (Rccii kk2 θθ+1 + R01 ) ⊆ Rs(1+cii k2 θ) proving assertion 2.

     For cases where the activation is trainable, the coefficients in ρi+1 simply raise the degree

of both numerator and denominator by 1. Thus the next two assertions follow directly.           ■



Lemma E.2. Suppose the activations in RatNN or RatCNN are in Rss and k ⩾ 2, di ⩾ 2 for

all i ⩽ L − 1. If the activations are not trainable, then for RatNN,

                                                ♯

                                  X ∗ (Λ) ∈ Rdd♯ , d♯ = 2d1 . . . dL−1 sL ;



and for RatCNN,

                                            ∗

                              X ∗ (Λ) ∈ Rdd∗ , d∗ = 2c1 . . . cL−1 sL k 2(L−1) .

If the activations are trainable, then respectively



                d♯ = 2(1 + s−1 )d1 . . . dL−1 sL , d∗ = 2(1 + s−1 )c1 . . . cL−1 sL k 2(L−1) .

                                                         ∆i

Proof. For non-trainable RatNN case, suppose X ∗i (Λ) ∈ R∆ i

                                                             , and repeatedly apply (40), we get



                                      ∆1 = s, ∆i+1 = s(1 + di ∆i ).



Thus ∆L = s + s2 dL−1 + s3 dL−1 dL−2 + . . . + sL dL−1 . . . d1 . Since s ⩾ 1 and di ⩾ 2 for i ⩽ L − 1,

the ratios between adjacent terms are at least 2. Thus ∆L ⩽ d♯ as claimed. By comparing

                                                                                                     2

(41) and (40), the convolution map Ki can be viewed as a linear map of dimension Rci ×ci−1 k .

Thus, the formula for d∗ follows from the same argument. Finally, for RatNN with trainable

activations, the recursion relation becomes



                                 ∆1 = s + 1, ∆i+1 = s(1 + di ∆i ) + 1.



So ∆L = (s + 1)(1 + sdL−1 + s2 dL−1 dL−2 + . . . + sL−1 dL−1 . . . d1 ) ⩽ (1 + s−1 ) · 2d1 . . . dL−1 sL .

The conclusion for RatCNN follows similarly.                                                           ■





F     Additional Proofs in Section 3.3.2

In this section we give the full proof of Theorem 3.22. Notations and detailed setup are defined in

Section 3.3.2. Our main strategy is to approximate the ReLU function at each layer using rational

activations, and then apply our result on rational neural networks to control the covering number

of the image F(X). This is followed by the standard Dudley integral argument to control the

Rademacher complexity. We start by results on rational approximations. The following result

is essentially the same as Lemma 1 in [12], modified to adapt to our context.

                                                                                            1+∆

Lemma F.1. (Lemma 1 in [12], modified) For any t > 0 and ε > 0, there exists ρ ∈ R∆             ,

          6     2

where ∆ ⩽ π2 log+ (4t/ε), such that ∥ρ − ReLU∥L∞ (−t,t) ⩽ ε, and Im(ρ) ⊆ [0, t] on [−t, t].

Proof. The assertion is obviously true if ε ⩾ t, where we can take ρ to be a constant function.

Consider ε ∈ (0, t). By Lemma 1 in [12], for any δ ∈ (0, 1), there exists a rational map ρ0 being

a composition of k maps in R23 such that |ρ0 (x)| ⩽ 1 on [−1, 1] and ∥ρ0 − ReLU∥L∞ (−1,1) ⩽ δ,

where

                        log(2/π 2 ) + 2 log log(4/δ)     log(6/π 2 ) + 2 log log(4/δ)

                                                    

                 k=                                    ⩽                              .

                                    log 3                            log 3



                                                     35

Therefore, the degree of ρ0 is bounded by



                                                 6

                                          3k ⩽      log2 (4/δ).

                                                 π2



Now set δ = ε/t, and define ρ(x) = tρ0 (x/t), then |ρ(x)| ⩽ t on [−t, t] and for any x ∈ [−t, t],

we have

                      |ρ(x) − ReLU(x)| = t|ρ0 (x/t) − ReLU(x/t)| ⩽ ε.



This finishes the proof.                                                                              ■



     When the ReLU activation is approximated be a rational map at layer i, this approximation

error will propagate to later layers. Next we control this propagation error. We first fix some

notations. For i ∈ [L], we denote the bound on the input to layer i by ℓi−1 . That is, for network

f , ∥fi−1 (X)∥max ⩽ ℓi−1 . By convention, since the data is bounded as ∥X∥max ⩽ 1, we define

ℓ0 = 1. As illustrated previously, we replace ReLU activations in f by rational approximations.

We denote the rational approximation in layer i as ρi . we will use Lemma F.1 to construct these

      Q thus we are guaranteed that |ρi (x)| ⩽ ωi ℓi−1 on x ∈ [−ωi ℓi−1 , ωi ℓi−1 ]. Hence we have

ρi , and

ℓi ⩽ j<i ωj . We denote the resulting rational network by fˆ. The following lemma controls the

propagation error.



Lemma F.2. Let everything be defined as above. If ∥fi−1 (x)− fˆi−1 (x)∥∞ ⩽ δi−1 for all ∥x∥∞ ⩽

1 and ∥ρi − ReLU∥∞ ⩽ εi on [−ωi ℓi−1 , ωi ℓi−1 ], then ∥fi (x) − fˆi (x)∥∞ ⩽ εi + ωi δi−1 for all

∥x∥∞ ⩽ 1.



Proof. This result is standard, and similar results may be found in many other works. We

include one here to make the narration self-contained. The calculation is



             δi := sup ∥fi (x) − fˆi (x)∥∞

                    ∥x∥∞ ⩽1



                  ⩽ sup ∥ρi (Ai fˆi−1 (x) + bi ) − ReLU(Ai fˆi−1 (x) + bi )∥∞

                    ∥x∥∞ ⩽1



                        + sup ∥ ReLU(Ai fˆi−1 (x) + bi ) − ReLU(Ai fi−1 (x) + bi )∥∞

                           ∥x∥∞ ⩽1



                  ⩽εi + ωi δi−1 .



In the second line we used ∥Ai fˆi−1 (x) + bi ∥∞ ⩽ ωi ℓi−1 . The result is thus proved.               ■



   In the next lemma, we control the degree of the coordinate functions of rational network fˆ,

which is similar to Lemma E.2.

                                                             1+∆i

Lemma F.3. Suppose rational activations ρi at layer i is in R∆ i

                                                                  as suggested in Lemma F.1.

     ˆ     θL           QL            QL−1

Then fL ∈ RθL where θL = i=1 (1 + ∆i ) j=1 (1 + dj ).



                   1+∆1

Proof. Since ρ1 ∈ R∆ 1

                        , we have fˆ1 (x) = ρ1 (A1 x + b1 ) ∈ R∆  1+∆1

                                                                   1

                                                                       as a function in Λ. Let

θ1 = 1 + ∆1 . Then fˆ1 ∈ Rθ1 . Now fˆ2 (x) = ρ2 (A2 fˆ1 (x) + b1 ) ∈ R∆2 2 ◦ (Σd1 Rθθ11 + R01 ) ⊆

                           θ 1                                         1+∆



 (1+d θ )(1+∆ )

R(1+d11 θ11 )(1+∆22 )−1 ∈ Rθθ22 , where θ2 = (1 + d1 θ1 )(1 + ∆2 ). Inductively repeating this argument,

we have fˆL ∈ RθθLL , where θi+1 = (1 + di θi )(1 + ∆i+1 ) with θ0 = 0. Since 1 + di θi ⩽ (1 + di )θi ,

we have θL ⩽ L

                   Q                QL−1

                      i=1 (1 + ∆i )   j=1 (1 + dj ) as claimed.                                       ■



   Now we combine everything together to prove Theorem 3.22. We will need to choose the

quality of approximation at each layer.



                                                   36

Theorem 3.22 (generalization error or ReLU network). Let F = ReLU(L, d, ω) with di ⩾ 2,

                                                            o [0, H]. Denote N the

and ωi ⩾ 2. Suppose ℓ is a Lipschitznloss function having range                    number of

                                                √ QL                   −1

                                                                                √ QL

parameters in the network, α = min H, ∥ℓ∥Lip dL i=1 ωi , and β = α ∥ℓ∥Lip dL i=1 ωi .

Then



          sup            RS (F; ℓ) ⩽

  X∈Rd0 ×n , ∥X∥max ⩽1



                                                                  L

                                                                                                              !1/2

                               p                                  X                          p     

                            c α N/n ·          log β + log n +          log di + L log+ log+ β n/dL                  ,

                                                                  i=1



where log+ (x) = max {0, log(x)}. In particular, if d = d1, ω = ω1, and suppose the loss

function is such that ∥ℓ∥Lip and H are O(1) constants, and the data size satisfies log n =

O(L log(dL)) (see Remark 3.20), then the bound simplifies to

                                                                   

                                   RS (F; ℓ) = O n−1/2 · dL log(dLω) .

                                                             p

                         sup                                                           (39)

                    X∈Rd×n , ∥X∥max ⩽1





Proof. We will only prove the first bound. The simplified bound is an easy check. We continue

to use notations εi and δi as defined in Lemma F.2. We set the approximation error of the first

layer to be |ρ1 (x) − ReLU(x)| ⩽ ε for all x ∈ (−ω1 , ω1 ). The value of ε will be chosen later. By

definition, δ1 = ε. For later layers, we choose εi = δi−1 . From Lemma F.2, we have



                                                                            L

                                                                            Y

                          δi ⩽ (1 + ωi )δi−1 , i ⩾ 2, and δL ⩽ ε ·                (1 + ωi ).

                                                                            i=2



By Lemma F.1, the required degree of each ρi (with respect to Λ) is then bounded as



            1+∆i                        6                                           6

      ρi ∈ R∆    , where ∆i ⩽              log2+ (4ωi ℓi−1 /δi−1 ), i ⩾ 2, and ∆1 ⩽ 2 log2+ (4ω1 /ε).

              i                         π2                                         π

                                                                      d

By Lemma F.3, the final approximation network is a rational map fˆ ∈ Rdff (with respect to Λ),

where

                                    YL           L−1

                                                 Y

                               df =    (1 + ∆i )    (1 + dj ).

                                                i=1             j=1



These rational networks approximating networks in F = ReLU(L, d, ω) form a new       hypothesis

                  b For any f ∈ F, one can find fˆ ∈ Fb so that ∥f (x)− fˆ(x)∥∞ ⩽ ε QL (1+ωi ),

class, denoted as F.                                                                 i=2

for all ∥x∥∞ ⩽ 1. Therefore,

                                         n

                                   1X

           RS (F; ℓ) = Eσ sup         ℓ(f (xi ), yi ) · σi

                              f ∈F n    i=1

                                  n

                              1   X

                     = Eσ               ℓ(fσ (xi ), yi ) · σi

                              n

                                  i=1

                                   n 

                              1   X                                          

                     = Eσ                ℓ(fσ (xi ), yi ) − ℓ(fˆσ (xi ), yi ) · σi + ℓ(fˆσ (xi ), yi ) · σi

                              n

                                  i=1

                     ⩽ Eσ ∥ℓ∥Lip ∥fσ − fˆσ ∥∞ + RS (F;

                                                    b ℓ)

                                 L

                                 Y

                     ⩽ ∥ℓ∥Lip ε · (1 + ωi ) + RS (F;

                                                  b ℓ).

                                        i=2





                                                           37

In the second line fσ is the maximizer of the inner product given σ, which exists since the

parameter space is compact. In the third line fˆσ is some

                                                      n function  from Fb that

                                                                           o achieves the

                                                               √ QL

approximation error discussed before. With α = min H, ∥ℓ∥Lip dL i=1 ωi , following the

proof of Corollary 3.19, we have

                                        r         s             

                                         N  √           W ∥ℓ∥Lip

                         RS (F;

                             b ℓ) ⩽ c α     π + log       √     ,

                                         n                α n

                                                                Q         

                                                                    L              5/2 d . Sim-

where N is the number of parameters in the network, and W = N       i=1 ωi (ndL )       f

plifying this expression, we get

                                v

                                                            L

                                u                                                 !

                                                  ∥ℓ∥

                                                         X

                                                     Lip

                                u

                b ℓ) ⩽ c n−1/2 αtN log(n) + log

           RS (F;                                         +   log(di ωi (1 + ∆i )) .

                                                    α

                                                                i=1



                                                                                            QL

We are left to choose ε and plug in the bound for ∆i . We choose ε small so that ∥ℓ∥Lip ε    i=2 (1+

ωi ) = n−1/2 α. Then for i ⩾ 2

                       Qi                       L                          L

           ωi ℓi−1       j=1 ωj       ∥ℓ∥Lip √ Y                 ∥ℓ∥Lip √ Y

                   ⩽ Qi−1           ·         n   (1 + ωk ) ⩽ ωi         n   (1 + ωj ).

            δi−1      j=2 (1 + ωj )

                                        α                          α

                                               k=2                         j=1

                                                         √ Q         

Since ωi ⩾ 2, log(1 + ∆i ) = O 1 + log+ log+ (α−1 ∥ℓ∥Lip · n · L  ω

                                                               i=1 i )  for i ⩾ 2. One can verify

that this is also true for ∆1 . Replacing ∆i by the bound above leads to the claimed result. ■



Remark F.4. There are recent results on rational approximations to other activation functions,

such as tanh [12]. Therefore Theorem 2.6 is applicable to networks with other activations too.









                                                38

