Polynomial truncation order from a contraction over A_P #
Theorem D.1 of [OAI26k] (p. 53) contracts networks whose entries lie in
B_{P,ℓ} = (ℤ / 2 ^ P)[V] / (V ^ ℓ). This file states its interface for described networks
(Cslib.Circuits.Frontier.TruncatedContractionAlgorithm) and assembles it
(Cslib.Circuits.Frontier.TruncatedContractionAlgorithm.ofCore) from a native contraction over
A_P = (ℤ / 2 ^ P)[U] / (f) of the specialized networks, at the modulus
f = FastContraction.modulus m of a network with m edges.
The interface. One native certificate computes the truncated contraction
(DescribedNetwork.truncContraction) from (P, ℓ, r, G), with P and ℓ in unary. For all
constants C, D and d there is K such that, on every network admissible at a size s ≥ 2
with constant C, precision 1 ≤ P ≤ D s (⌊log₂ s⌋ + 1) and truncation order
1 ≤ ℓ ≤ D (s + 1) ^ d, it takes time at most
K (n + 1) ^ K 2 ^ (K s / √⌊log₂ s⌋) and space at most K (n + 1) ^ K, for the encoded length n
of the input. This is the shape of Cslib.Complexity.CountingSimulation.ContractionAlgorithm.
The assembly branches on whether the modulus has enough residues for the
N = (ℓ - 1) k + 1 interpolation points (Cslib.Circuits.Frontier.truncGuard):
- if
N ≤ 2 ^ deg f, it runs the reduction of truncation orderℓtoA_P(engineCertificate) around the given contraction overA_P(Cslib.Circuits.Frontier.fastTruncCertificate); - otherwise it sums directly (
truncDirectCertificate).
On admissible inputs with at most C s vertices, at least s edges and polynomial ℓ, the first
branch is eventually taken. The modulus already has degree
2 * 3 ^ ⌊log₂ (4 ⌊log₂ m⌋ + 2)⌋, which eventually exceeds every fixed multiple of log₂ m.
The explicit sufficient threshold is max (C D) (2 ^ (2 ^ (d + 2)))
(Cslib.Circuits.Frontier.truncGuard_of_polynomial_le). Below it, direct summation costs a
constant factor. The older and smaller linear-order threshold is also retained.
The logarithmic factor in precision and the polynomial truncation range strengthen the stated range of Theorem D.1. These extensions are proved here; they are not attributed to its statement.
The hypotheses on the contraction over A_P are those of the interface planned in #1538 for
milestone E1: it is correct on every network at the modulus of its number of edges, and meets the
bound of the interface on the networks admissible for it. The assembly also asks that the
specialized networks of admissible networks be admissible for it, and that the entries be computed
within time poly(L) 2 ^ O(s) and polynomial space for the encoded length L of the network (for
the small sizes). The reduction itself is ours, not the manuscript's; see
CslibFrontier/Computability/Circuit/Frontier/TensorNetwork/Truncated.lean.
Main definitions #
Cslib.Circuits.Frontier.TruncatedContractionAlgorithm: the interface.Cslib.Circuits.Frontier.truncGuard: whether the modulus has enough residues.Cslib.Circuits.Frontier.fastTruncCertificate: the reduction at the modulus of the network.Cslib.Circuits.Frontier.TruncatedContractionAlgorithm.ofCore: the assembly.
Main results #
Cslib.Circuits.Frontier.truncGuard_polyTime: the guard is polynomial-time.Cslib.Circuits.Frontier.truncGuard_of_le: admissible inputs pass the guard from some size on.Cslib.Circuits.Frontier.fastTruncCertificate_correct: the reduction is correct on guarded inputs.
References #
- OpenAI, The Exponential Time Hypothesis is False, Theorem D.1 (p. 53).
The interface of Theorem D.1 at truncation order ℓ for described networks. One native
certificate computes the truncated contraction from (P, ℓ, r, G), with P and ℓ in unary. For
all constants C, D, d there is K such that, on every network admissible at a size s ≥ 2
with constant C, precision 1 ≤ P ≤ D s (⌊log₂ s⌋ + 1) and order 1 ≤ ℓ ≤ D (s + 1) ^ d, its
time is at most
K (n + 1) ^ K 2 ^ (K s / √⌊log₂ s⌋) and its space at most K (n + 1) ^ K, where n is the
encoded length of the input. Outside admissible inputs the certificate need only be correct.
- certificate : GenericRAM.NativeCertificate (fun (x : ℕ × ℕ × ℕ × DescribedNetwork T) => match x with | (P, ℓ, fst, G) => DescribedNetwork.truncContraction entry P ℓ G) (encTrunc encT) (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encNat)
The native truncated contraction.
- bound_polynomial (C D d : ℕ) : ∃ (K : ℕ), ∀ (s P ℓ r : ℕ) (G : DescribedNetwork T), 2 ≤ s → 1 ≤ P → P ≤ D * s * (Nat.log 2 s + 1) → 1 ≤ ℓ → ℓ ≤ D * (s + 1) ^ d → Admissible C s (r, G) → self.certificate.time (P, ℓ, r, G) ≤ K * (((encTrunc encT) (P, ℓ, r, G)).length + 1) ^ K * 2 ^ (K * s / (Nat.log 2 s).sqrt) ∧ self.certificate.space (P, ℓ, r, G) ≤ K * (((encTrunc encT) (P, ℓ, r, G)).length + 1) ^ K
Its time and space for logarithmically larger precision and any fixed polynomial truncation order. All constants are chosen before the instance.
The linear precision and truncation range of Theorem D.1 is a special case of the enlarged range.
The guard #
The guard is polynomial-time.
Admissible inputs pass the guard from some size on. With at most C s vertices, at least
s edges and ℓ ≤ D s, the guard holds once s ≥ 4 (C D + 1): the modulus has degree at least
4 ⌊log₂ m⌋, so more than m ^ 4 / 16 ≥ C D s ^ 2 + 1 residues.
Every fixed polynomial truncation order eventually passes the same interpolation guard. The threshold is independent of the network, its precision and its encoding length.
The fast branch #
The input of the reduction at the modulus of the network.
The reduction at the modulus of the network: the native reduction of truncation order ℓ
to contractions over A_P, with the modulus FastContraction.modulus m for m edges.
The reduction is correct on guarded inputs, for a contraction over A_P that is correct
at the modulus of the number of edges.
The assembly #
Theorem D.1 at truncation order ℓ, from a contraction over A_P. Let cc be a native
contraction over A_P of specialized networks that is correct on every network at the modulus
FastContraction.modulus m of its number m of edges (hval) and meets the interface's bound on
the networks admissible for it (hcore, for an admissibility CoreAdm). Suppose that the networks
specialized at the digit points of admissible networks are admissible for it (htransfer), that
admissible networks have between s and C s edges and at most C s vertices (hshape), and
that the entries take time K (L + 1) ^ K 2 ^ (K s) and space K (L + 1) ^ K on admissible
networks of encoded length L (hentry). Then branching on truncGuard to the reduction around
cc or to direct summation is a truncated contraction algorithm.