The native machine of the fast contraction algorithm #
The stack recursion of Cslib.Circuits.Frontier.FastContraction.scheme, for a child builder mk,
as one native machine for the contraction modulo 2 ^ P of an explicit network (r, G), with the
precision P in binary:
the root descriptors are tables (T = List ℕ), read by the entry procedure tableEntry. The
encodings, the leaf certificate (FastContraction.leafCertificate ce, from a native certificate
ce of any entry procedure), the root network (FastContraction.rootNet) and its polynomial-time
construction are stated for every type of root descriptors.
The root. The precision is first capped at the encoded length of the network
(ExplicitTensorNetwork.capPrecision), which does not change the residue. The root call
(FastContraction.root) has the scale s = m, the number of edges of G, depth 0, edge bound
m + 1, the capped precision p, the tables of G as descriptors (FastContraction.rootNet) and
the modulus f = X ^ (2 ⬝ 3 ^ t) + X ^ (3 ^ t) + 1 (FastContraction.modulus), irreducible modulo
2 (Cslib.irreducible_trinomial), whose 2 ⬝ 3 ^ t > 4 ⌊log₂ m⌋ + 2 binary digits give the
interpolation points of every call of the schedule.
The fuel and the fallback. The number of calls of the recursion depends, through the schedule's
constant, on the ratio of the precision to the number of edges, which the machine does not know in
advance. So the machine runs the recursion for a fixed clock 2 ^ (K₀ (m + p) / √⌊log₂ (m + p)⌋)
(FastContraction.fuel), and returns the constant coordinate of the root's value when the run has
returned a value tagged with depth 0, and direct summation otherwise
(FastContraction.fastValue).
A value tagged 0 is the root's value for every fuel (FastContraction.eq_value_of_run). So for
a predicate WF on calls, if the step of every well-formed active call is correct
(FastContraction.StepCorrect) and well-formedness passes to the children
(FastContraction.WFChildren), the result is the contraction modulo 2 ^ P on every input whose
root call satisfies WF, whether or not the clock suffices (FastContraction.fastValue_eq); the
clock matters only for the running time.
Main definitions #
Cslib.Circuits.Frontier.FastContraction.encCall,encFrame,encValue: the encodings.Cslib.Circuits.Frontier.FastContraction.leafCertificate: direct summation at the leaves.Cslib.Circuits.Frontier.FastContraction.modulus,rootNet,root,fuel: the root call and the clock.Cslib.Circuits.Frontier.FastContraction.fastValue: the result of the machine.Cslib.Circuits.Frontier.FastContraction.fastCertificate: the machine, given polynomial-time components of the scheme.
Main results #
Cslib.Circuits.Frontier.FastContraction.irreducible_modulus: the modulus is irreducible modulo2.Cslib.Circuits.Frontier.FastContraction.val_rootNet: the root computes the contraction ofG.Cslib.Circuits.Frontier.FastContraction.getD_mod_of_val_eq: reading off the constant coordinate.Cslib.Circuits.Frontier.FastContraction.fastValue_eq: if the step of an active call is correct and well-formedness passes to the children, the machine is correct on the inputs with a well-formed root, whether or not the clock suffices.Cslib.Circuits.Frontier.FastContraction.root_polyTime,Cslib.Circuits.Frontier.FastContraction.fuel_polyTime: the root and the clock in polynomial time.
References #
- OpenAI, The Exponential Time Hypothesis is False, Appendix D.4.7 (p. 64).
Encodings #
The leaves #
The depth of a call is polynomial-time.
The input of direct summation at a call, ((p, fl), D), is polynomial-time.
The leaf certificate: direct summation over the coefficient lists of A_p, with the native
evaluator of the vertex descriptors built from a native certificate ce of the entry procedure of
the roots, tagged with the depth.
The time of a leaf: the depth, the input of direct summation, and direct summation.
The space of a leaf.
The root #
The exponent t of the modulus, with 2 ^ (t + 1) > 4 ⌊log₂ m⌋ + 2.
The modulus X ^ (2 ⬝ 3 ^ t) + X ^ (3 ^ t) + 1, by its coefficients below the leading
one.
The modulus has 2 ⬝ 3 ^ t coefficients.
The modulus is the trinomial X ^ (2 ⬝ 3 ^ t) + X ^ (3 ^ t) + 1 over ℤ.
The modulus is irreducible modulo 2: its reduction is Cslib.trinomial t.
The root descriptors of a network as vertex descriptors; for an explicit network, its tables.
The clock of a capped input (p, r, G): 2 ^ (K₀ (m + p) / √⌊log₂ (m + p)⌋).
The root computes the contraction of G: in A_p, the contraction of the tables read as
constants is the image of the contraction of G.
Reading off the constant coordinate. If a coefficient list has the value of a natural
number k in A_p, with f of positive degree, its constant coordinate is k modulo 2 ^ p.
The root and the clock in polynomial time #
The exponent of the modulus is polynomial-time, in unary from unary.
3 ^ t ≤ (4 ⌊log₂ m⌋ + 2) ^ 2 for the exponent t of the modulus.
The modulus is polynomial-time, from the number of edges in unary.
The root descriptors as vertex descriptors are polynomial-time.
The root call is polynomial-time, from a capped input.
The clock is polynomial-time, from a capped input.
The result #
The result of the machine on an input (P, r, G): with the capped precision p, the
constant coordinate of a returned root value modulo 2 ^ p if the run returns a value tagged
0, and direct summation otherwise.
The machine is correct on well-formed inputs, whether or not the clock fuel suffices. If
the step of an active call is correct and well-formedness passes to the children, then on every
input whose root is well-formed the result is the contraction modulo 2 ^ P.
The machine #
The clocked run from a capped input, as one native machine, given polynomial-time components of the scheme.
The constant coordinate of a value modulo 2 ^ p, for the capped precision p.
Whether a value is tagged 0.
The fast machine: cap the precision and run the recursion; on a value tagged 0, read
off its constant coordinate, and otherwise sum directly. It computes fastValue.
The time of the fast machine, unfolded: the capped run twice, the input, and the decoding or direct summation.
The space of the fast machine, unfolded.