Contraction at truncation order ℓ, by evaluation and interpolation #
Theorem D.1 of [OAI26k] (p. 53) contracts Boolean tensor networks whose entries lie in
B_{P,ℓ} = (ℤ / 2 ^ P)[V] / (V ^ ℓ). This file gives that contraction for described networks
(DescribedNetwork T) and reduces it to contractions over A_P = (ℤ / 2 ^ P)[U] / (f) of networks
with the same ports, by evaluating V at points of A_P and interpolating.
Entries and the contraction. An entry is a list of natural numbers, its coefficients of
1, V, V ^ 2, … (Mathlib's Polynomial.ofCoeffList). The contraction over ℕ[V] of the entries
(DescribedNetwork.polyContraction) has, below V ^ ℓ and modulo 2 ^ P, the coefficients of
the contraction in B_{P,ℓ} (DescribedNetwork.truncContraction): they depend only on the images
of the entries in B_{P,ℓ}, their coefficients below ℓ modulo 2 ^ P
(DescribedNetwork.truncContraction_congr). So truncContraction is the B_{P,ℓ} contraction of
the canonical lifts of the entries, as in §D.4.1 (p. 58).
Evaluation. Cutting the entries to ℓ coefficients (cutCoeffs,
DescribedNetwork.truncContraction_cutCoeffs)
bounds the degree of the contraction over ℕ[V] by (ℓ - 1) k for k vertices
(DescribedNetwork.natDegree_polyContraction_le). The network specialized at a point ζ of
A_P (DescribedNetwork.specNet) has the same ports, and its entry at a vertex is the value at
ζ of the first ℓ coefficients of the original entry, by Horner's rule (specEntry). Its
contraction in A_P is the contraction over ℕ[V] evaluated at ζ
(DescribedNetwork.val_contraction_specNet).
Interpolation. Let f be irreducible modulo 2. At n points of A_P with unit differences,
the Lagrange interpolant of the values (GaloisRingArith.interp) is a polynomial of degree below
n agreeing with the contraction at the points. When (ℓ - 1) k < n it is the contraction, so the
constant coordinates of its first ℓ coefficients, modulo 2 ^ P, are the truncated contraction
(interpRecover, DescribedNetwork.interpRecover_eq_truncContraction). The binary digits of
0, …, n - 1 are such points once n ≤ 2 ^ deg f (isUnit_val_sub_digits).
The reduction (DescribedNetwork.interpContract). Given a contraction core over A_P of the
specialized networks, contract the network specialized at each of the (ℓ - 1) k + 1 digit
points and interpolate. If core is correct at those inputs, this is the truncated contraction
(DescribedNetwork.interpContract_eq). This route is not the manuscript's, which embeds the
entries into A = O[V] / (V ^ ℓ) and computes there throughout the recursion (§D.4.1, p. 57, and
the proof of Theorem D.1, §D.4.7, p. 64); it reduces truncation order ℓ to ℓ = 1 over A_P
and leaves the recursion unchanged.
This file proves correctness only. The native machine running the reduction, with the time and space bounds of Theorem D.1, is not formalized here (#1538).
Main definitions #
Cslib.Circuits.Frontier.cutCoeffs: the firstℓcoefficients.Cslib.Circuits.Frontier.DescribedNetwork.polyContraction: the contraction overℕ[V].Cslib.Circuits.Frontier.DescribedNetwork.truncContraction: the contraction inB_{P,ℓ}.Cslib.Circuits.Frontier.specEntry,Cslib.Circuits.Frontier.DescribedNetwork.specNet: the network specialized at a point.Cslib.Circuits.Frontier.interpRecover: reading the truncated contraction off an interpolant.Cslib.Circuits.Frontier.DescribedNetwork.interpContract: the reduction toℓ = 1overA_P.
Main results #
Cslib.Circuits.Frontier.DescribedNetwork.truncContraction_congr: the contraction depends only on the entries inB_{P,ℓ}.Cslib.Circuits.Frontier.DescribedNetwork.natDegree_polyContraction_le: the degree bound.Cslib.Circuits.Frontier.DescribedNetwork.val_contraction_specNet: specialization is evaluation.Cslib.Circuits.Frontier.interpRecover_eq: recovery from values at points with unit differences, forfirreducible modulo2.Cslib.Circuits.Frontier.DescribedNetwork.interpRecover_eq_truncContraction: the truncated contraction from the specialized contractions, forfirreducible modulo2.Cslib.Circuits.Frontier.DescribedNetwork.interpContract_eq: the reduction is correct.
References #
- OpenAI, The Exponential Time Hypothesis is False, Theorem D.1 (p. 53), §D.4.1 (pp. 57–58) and §D.4.7 (p. 64).
Entries as polynomials in V #
The contraction in B_{P,ℓ} #
The map ℕ[V] → (ℤ / 2 ^ P)[V] / (V ^ ℓ) onto B_{P,ℓ}.
The contraction over ℕ[V] of a network whose entries are lists of coefficients of
1, V, V ^ 2, ….
The contraction in B_{P,ℓ} = (ℤ / 2 ^ P)[V] / (V ^ ℓ), as its ℓ coefficients in
[0, 2 ^ P): the coefficients below ℓ of the contraction over ℕ[V], modulo 2 ^ P.
The image of the contraction over ℕ[V] in B_{P,ℓ} is the contraction of the images.
The contraction depends only on the entries in B_{P,ℓ}: entries whose coefficients
below ℓ agree modulo 2 ^ P have the same truncated contraction.
Cutting the entries to their first ℓ coefficients does not change the truncated
contraction.
The degree bound: if every entry has at most ℓ coefficients, the contraction over
ℕ[V] has degree at most (ℓ - 1) k for k vertices.
Specialization at a point of A_P #
The descriptor of a vertex of a network specialized at a point: the original descriptor with
the precision P, the truncation order ℓ, the coefficients fl of the modulus and the point
ζ, a coefficient list of A_P = (ℤ / 2 ^ P)[U] / (f).
Constant coefficient lists represent the polynomial of the coefficients in A_p.
A specialized entry is the evaluation at the point of the polynomial of the first ℓ
coefficients.
The network specialized at a point ζ: the same ports, with each descriptor t
replaced by (t, P, ℓ, fl, ζ).
The contraction of a specialized network, for any evaluator, is that of the original network with the evaluator read at the specialized descriptors.
Specialization is evaluation: the contraction in A_P of the network specialized at ζ
is the contraction over ℕ[V] of the entries cut to ℓ coefficients, evaluated at ζ.
Recovery by interpolation #
An irreducible modulus has positive degree.
Recovery from values at points with unit differences. Let f be irreducible modulo 2.
If Z over ℕ has degree below the number of points, the points have unit differences in A_P,
and ys are the values of Z at them, then reading off the interpolant gives the coefficients of
Z below ℓ modulo 2 ^ P.
The binary digits are interpolation points of A_P. The binary digits below
e = fl.length of 0, …, n - 1, for n ≤ 2 ^ e and f irreducible modulo 2, have unit
differences in A_P.
The number (ℓ - 1) k + 1 of interpolation points for truncation order ℓ and k
vertices.
The truncated contraction from the specialized contractions. Let f be irreducible modulo
2. At points with unit differences in A_P, more than (ℓ - 1) k of them, if ys are the
contractions in A_P of the network specialized at the points, reading off the interpolant gives
the truncated contraction.
The reduction to ℓ = 1 over A_P: contract, with core, the network specialized at
each of the (ℓ - 1) k + 1 binary-digit points of A_P for the modulus fl, and read the
truncated contraction off the interpolant. The input of core is the precision, the modulus, the
number r of rows and the specialized network.
The reduction is correct. If f is irreducible modulo 2, A_P has at least
(ℓ - 1) k + 1 residues, and core computes the contraction in A_P of the network specialized
at each digit point, then interpContract is the truncated contraction.