The contraction recursion and its correctness #
This file assembles the recursive contraction algorithm of [OAI26k] (§D.4.7, p. 64) from its active calls, and proves it correct by induction from the leaves.
One node (TensorNetwork.nodeSplitting). For a network whose edges run from rows to columns,
a packing Q of its edges into packets of 2 ^ a slots, and a nonzero grid point t of
valuation i < a, group the vertices by their symbol in coordinate i of Q (packingGroup).
The packing bridge packingGroup_src_tgt orients the groups, so the Cauchy matrix at
T = t + α ζ has the mode splitting TensorNetwork.cauchyModeSplitting (§D.4.5, p. 62). At a call
with input precision p, TensorNetwork.callSplitting is this splitting for the network reduced
modulo 2 ^ p_t, p_t = p + 8 h D_t + 8 M (a + 1): the schedule's
ContractionSchedule.nodePrecision at the valuation of t, the precision of Lemma D.5.
One call from its children. If every value v t k reduces modulo 2 ^ p_t to the sum over
the mode tuples of the products of the contractions of the children (the right side of (D.16)),
then interpolation and tapered recovery return the contraction modulo 2 ^ p
(TensorNetwork.exists_recoverFromValues_eq_add_of_children). The children's contractions may
come from any contraction oracle (TensorNetwork.ContractionOracle) that is correct modulo the
precision it is given: a child over B ⧸ (2 ^ p_t) is lifted to B along a section of the
reduction and renumbered by Fin (TensorNetwork.finLift,
TensorNetwork.ContractionOracle.evalLift), and the oracle's value then reduces to its contraction
(TensorNetwork.ContractionOracle.mk_evalLift). The value of
an active node is TensorNetwork.nodeValue, the values of a call are TensorNetwork.callValues,
and the recovered value is TensorNetwork.callValue
(TensorNetwork.exists_callValue_eq_add).
The recursion (TensorNetwork.contractRec). A call receives a network on Fin n vertices
and Fin m edges, its sides, its depth d and its precision p. A schedule gives the
parameters a, u, h and the degree bound Δ of a call from its depth and its number of edges
(CallParams), or none at a leaf; the manuscript's schedule is
ContractionSchedule.callParams. The call is active when its guard holds (CallParams.Guard):
the parameters meet the hypotheses of Lemma D.5 (CallParams.Admissible, with u ≤ a and enough
interpolation points), and the network runs from rows to columns with at most Δ ports at each
end of each vertex (TensorNetwork.RowsToColumnsLE). It packs the edges with
PacketPacking.packing (Lemma D.3, r = 64), takes the first M (2 L - 1) + 1 of a fixed family
of interpolation points, and evaluates each child by a recursive call at depth d + 1 and precision
p_t. A leaf, an inactive call, and a child that does not have fewer edges than its parent are
evaluated by the contraction itself, the direct summation of the manuscript's leaves. The recursion
is well founded on the number of edges.
Correctness (TensorNetwork.exists_contractRec_eq_add). For interpolation points with unit
differences, every call returns the contraction modulo 2 ^ p, for every schedule: the manuscript's
"induction from the leaves" (p. 64) becomes strong induction on the number of edges. So the
parameter schedule (D.4)–(D.6) matters only for the running time, which this file does not treat.
Under the first inequality of (D.6), every child has at most M / 16 edges
(TensorNetwork.mul_card_edges_child_callSplitting_le, from Lemma D.3 (3)), so an active call with
an edge never falls back for its children, and when 2 L ≤ Δ the lifted children again run from
rows to columns within the degree bound (TensorNetwork.rowsToColumnsLE_finLift_child). In the
manuscript's ring B = O = ℤ_(2)[U] / (f), the binary-coordinate lifts are such points
(AdjoinRoot.isUnit_integerDigitLift_sub).
Main definitions #
Cslib.Circuits.Frontier.TensorNetwork.RowsToColumnsLE: a network from rows to columns with a degree bound.Cslib.Circuits.Frontier.TensorNetwork.nodeSplitting,Cslib.Circuits.Frontier.TensorNetwork.callSplitting: the mode splitting at an active node.Cslib.Circuits.Frontier.TensorNetwork.finLift: a child lifted toBand numbered byFin.Cslib.Circuits.Frontier.TensorNetwork.ContractionOracle: values for child calls, withContractionOracle.CorrectandContractionOracle.evalLift.Cslib.Circuits.Frontier.TensorNetwork.nodeValue,Cslib.Circuits.Frontier.TensorNetwork.callValues,Cslib.Circuits.Frontier.TensorNetwork.callValue: one active call from an oracle.Cslib.Circuits.Frontier.TensorNetwork.CallParams: the parameters of a call, withCallParams.Admissibleand the guardCallParams.Guard.Cslib.Circuits.Frontier.TensorNetwork.contractRec: the recursion.
Main results #
Cslib.Circuits.Frontier.TensorNetwork.exists_recoverFromValues_eq_add_of_children: one call is correct when its values are the sums of the products of the children's contractions.Cslib.Circuits.Frontier.TensorNetwork.callSplitting_side,Cslib.Circuits.Frontier.TensorNetwork.callSplitting_group,Cslib.Circuits.Frontier.TensorNetwork.callSplitting_packet: the fields of the splitting.Cslib.Circuits.Frontier.TensorNetwork.exists_callValue_eq_add: one call is correct for a correct oracle.Cslib.Circuits.Frontier.TensorNetwork.mul_card_edges_child_callSplitting_le: under (D.6), the children have at mostM / 16edges.Cslib.Circuits.Frontier.TensorNetwork.ModeSplitting.rowsToColumnsLE_child,Cslib.Circuits.Frontier.TensorNetwork.rowsToColumnsLE_finLift_child: the children keep the degree bound.Cslib.Circuits.Frontier.TensorNetwork.contractRec_eq_callValue,Cslib.Circuits.Frontier.TensorNetwork.contractRec_of_sched_eq_none: an active call and a leaf.Cslib.Circuits.Frontier.TensorNetwork.exists_contractRec_eq_add,Cslib.Circuits.Frontier.TensorNetwork.mk_contractRec: the recursion returns the contraction modulo2 ^ p.
References #
- OpenAI, The Exponential Time Hypothesis is False, Lemma D.3 (pp. 58–59), §D.4.4–§D.4.7, pp. 60–64.
Node precisions #
A node of positive multiplicity has valuation below u.
Networks from rows to columns #
Every edge of N runs from a row (side v = true) to a column, and every vertex has at most
Δ ports at each end: the bipartite form and the degree bound Δ of the networks of the
recursion (§D.4.2, p. 58).
Edges start at rows.
Edges end at columns.
Every vertex is the source of at most
Δedges.Every vertex is the target of at most
Δedges.
Instances For
The modes of an active node #
The modes of an active node (§D.4.5). For a network whose edges run from rows to columns,
a packing Q of its edges, and a nonzero grid point t of valuation i < a, the mode splitting
of the Cauchy matrix at T = t + α ζ with the vertices grouped by their symbol in coordinate i
of Q (cauchyModeSplitting, oriented by packingGroup_src_tgt).
The child identity at an active node ((D.16)): the deformed contraction along the Cauchy
matrix at T = t + α ζ is the sum, over the mode tuples of weight below p, of the products over
the groups of the contractions of the children of nodeSplitting.
One call from its children #
The mode splitting at the active node t and the point z of a call with input precision
p: nodeSplitting for the network reduced modulo 2 ^ p_t, at the reduction of z.
The rows of the splitting at an active node are the rows of the call.
The groups at an active node of valuation i are the symbols in coordinate i of the
packing.
The packets of the splitting at an active node are the packets of the packing.
Correctness of one active call from its children ([OAI26k], §D.4.4–§D.4.7). Let
N have entries in B, edges from rows to columns, and a packing Q into packets of 2 ^ a
slots. Let 1 ≤ u ≤ M, u ≤ a and 3 M ≤ h u ≤ 3 M + u for M edges, and let the
n > M (2 L - 1) points ζ k have unit differences. If at every node t of positive
multiplicity each value v t k reduces modulo 2 ^ p_t to the sum, over the mode tuples of
weight below p_t, of the products over the groups of the contractions of the children of
callSplitting at ζ k (the right side of (D.16)), then the recovered value agrees with the
contraction modulo 2 ^ p.
Lifting child networks #
A network over B ⧸ (2 ^ p) on finite types, lifted to B along a section of the reduction
(TensorNetwork.mapFun) and numbered by Fin (TensorNetwork.reindex): the network that a child
call receives.
The contraction of a lifted network reduces to the contraction.
Lifting keeps a network running from rows to columns, with its degree bound.
Contraction oracles #
An oracle is correct when each of its values agrees with the contraction modulo the
precision 2 ^ p it is given.
The value of an oracle on a network over B ⧸ (2 ^ p) on finite types, at precision p: the
query on the lifted network finLift N.
A correct oracle evaluates a lifted network: its value reduces modulo 2 ^ p to the
contraction.
One call from an oracle #
The value at an active node ((D.16)): the sum, over the mode tuples of weight below p_t,
of the products over the groups of the oracle's values on the children of callSplitting at z.
A child has its old vertices as rows and its packets as columns.
For a correct oracle, the value at an active node reduces modulo 2 ^ p_t to the right side of
(D.16).
The values of an active call at the nodes and interpolation points: nodeValue at the nodes
of positive multiplicity, and zero elsewhere.
One active call (§D.4.7): interpolate and recover (recoverFromValues) the values
callValues computed from the oracle. The call returns the recovered value when it lies in B,
and zero when it does not. For a correct oracle, and parameters and points meeting the hypotheses
of exists_callValue_eq_add, the recovered value lies in B and the call returns the contraction
modulo 2 ^ p.
Correctness of one active call for a correct oracle: under the hypotheses of
exists_recoverFromValues_eq_add_of_children, the call returns the contraction modulo 2 ^ p.
The children of an active call #
Children run from rows to columns within the degree bound. If every vertex of N has at
most Δ ports at each end, and the packets have 2 ^ a slots with 2 · 2 ^ a ≤ Δ, then each
child runs from its old vertices to its packets with at most Δ ports at each vertex: old
vertices keep their degrees, and a packet vertex has at most 2 L ports (§D.4.6, p. 63).
Children have at most M / 16 edges under the size hypothesis 2 Δ D² ≤ M of (D.6),
D = 64 ^ (2 a), for the packing of Lemma D.3 with r = 64 and maximum degree Δ: each group has
at most 2 M / 64 ports on each side (PacketPacking.row_ports_packing_le), and a child has one
edge per port of its group. The source (§D.4.6, p. 63) bounds a child by 6M/r = 3M/32 < M/8
edges from the 3M/r port bound of Lemma D.3 (3); PacketPacking.packing has the sharper port
bound 2M/r.
The lifted children of an active call run from rows to columns within the degree bound
Δ, when the call does and its packets have 2 · 2 ^ a ≤ Δ slots: the networks the child calls
receive meet the network part of their guard (CallParams.Guard).
The recursion #
The parameters of a call with M edges and n interpolation points are admissible when
they meet the hypotheses of Lemma D.5, 1 ≤ u ≤ M, u ≤ a and 3 M ≤ h u ≤ 3 M + u, and there
are more than M (2 L - 1) points.
Instances For
The guard of an active call on a network N with m edges, its sides side and n
interpolation points: the parameters θ are admissible, and N runs from rows to columns with
at most Δ = θ.degree ports at each end of each vertex, the degree bound under which Lemma D.3
makes the children smaller (mul_card_edges_child_callSplitting_le). Correctness does not use the
degree bound.
- admissible : θ.Admissible m N₀
The parameters are admissible.
Instances For
The contraction recursion ([OAI26k], §D.4.7). A call at depth d on a network N
with m edges, sides side and precision p asks the schedule for its parameters. When there
are none, or the guard fails (CallParams.Guard), it returns the contraction (direct
summation). Otherwise it is an active call (callValue) with the packing of Lemma D.3 (r = 64)
and the first M (2 L - 1) + 1 points of pts, whose children are recursive calls at depth
d + 1; a child that does not have fewer edges returns its contraction.
An active call of the recursion: when the schedule gives parameters whose guard holds, the
call is callValue with the packing of Lemma D.3, the first M (2 L - 1) + 1 points, and
recursive calls at depth d + 1 for the children with fewer edges.
A leaf of the recursion, where the schedule gives no parameters, is evaluated directly.
Correctness of the recursion ([OAI26k], §D.4.7, p. 64: correctness "by induction
from the leaves"). For interpolation points with unit differences, every call returns the
contraction modulo 2 ^ p, for every schedule and depth.
The recursion computes the contraction modulo 2 ^ p.