The cursor over the children of an active call #
An active call of the Boolean tensor contraction recursion of [OAI26k] (§D.4.5–§D.4.7,
pp. 62–64) evaluates, for each node t of positive multiplicity, each interpolation point k,
each exponent tuple β of weight below the node's precision and each group g < r, one child
network. This file walks these indices with a cursor: the state is (t, k, β, g), and
cursorNext advances the group, then the exponents (Cslib.BudgetTuples.budgetNext), then the
point, then the node, resetting the inner indices to their first values. The nodes are numbered
0, …, T - 1; node t has the weights ws t and the budget ps t.
cursorList lists the indices in this order, nested from the node outwards. Under positive counts,
weights and budgets, the walk from cursorStart follows it: the list starts at cursorStart
(head?_cursorList), each entry is followed by its successor (isChain_cursorList) and the last
one has none (cursorNext_getLast?). cursorList_walk states this by index, in the form a loop
over counted children consumes. One step reads only the current node's weights and budget and the
next node's number of modes (cursorNext_eq_cursorStep), and it is polynomial-time
(computableInPolyTime_cursorStep), so the children are enumerated with polynomial delay.
Accumulating. absorbAt folds a child's value into the accumulator of the call: it multiplies
it into the product over the groups, adds the product to the sum over the exponent tuples after the
last group, and stores the sum after the last tuple. Along cursorList this stores, for each node
and point in order, the sum over the tuples of the products over the groups (runAcc_cursorList),
seen through any map to a commutative semiring that respects the operations, such as the value of
a coefficient list. With the weights listed along the modes, that sum is the sum over the mode
budget of the right side of (D.16) (sumAt_eq_sum_filter).
Main definitions #
Cslib.Circuits.Frontier.ChildCursor.cursorList: the indices(t, k, β, g)in order.Cslib.Circuits.Frontier.ChildCursor.cursorStart,Cslib.Circuits.Frontier.ChildCursor.cursorNext: the cursor.Cslib.Circuits.Frontier.ChildCursor.cursorStep,Cslib.Circuits.Frontier.ChildCursor.encStepInput: one step from the data of the nodes, and its input encoding.Cslib.Circuits.Frontier.ChildCursor.absorbAt,Cslib.Circuits.Frontier.ChildCursor.runAcc,Cslib.Circuits.Frontier.ChildCursor.sumAt: the accumulator of a call and the stored values.
Main results #
Cslib.Circuits.Frontier.ChildCursor.head?_cursorList,Cslib.Circuits.Frontier.ChildCursor.isChain_cursorList,Cslib.Circuits.Frontier.ChildCursor.cursorNext_getLast?,Cslib.Circuits.Frontier.ChildCursor.cursorList_walk: the cursor walks the list.Cslib.Circuits.Frontier.ChildCursor.isChain_flatMap: a chain of nonempty chained blocks.Cslib.Circuits.Frontier.ChildCursor.computableInPolyTime_cursorStep: polynomial delay.Cslib.Circuits.Frontier.ChildCursor.runAcc_cursorList,Cslib.Circuits.Frontier.ChildCursor.sumAt_eq_sum_filter: the stored values are the sums over the mode budget.
References #
- OpenAI, The Exponential Time Hypothesis is False, §D.4.5–§D.4.7, pp. 62–64.
Chains of blocks #
A chain of nonempty blocks. The concatenation of nonempty chains is a chain when the last entry of each block is related to the first entry of the next.
The cursor #
A state of the cursor: the node, the point, the exponents and the group.
The indexed walk, in the form a counted loop consumes: the first child is cursorStart,
child c + 1 is the successor of child c, and the last child has no successor.
Polynomial time #
One step of the cursor, from the counts (T, n, r), the current node's weights and budget, and
the next node's number of modes: cursorNext with the data of the nodes read off.
The inputs of cursorStep: the counts in unary, the weights and the budget in binary, the next
number of modes in unary, and the state with its exponents in binary.
The cursor step is polynomial-time: the children are enumerated with polynomial delay.
Accumulating the values of the children #
The accumulator of a call: the product over the groups so far, the sum over the exponent tuples so far, and the stored values, one per node and point.
Absorb the value y of the child at s: multiply it into the product over the groups;
after the last group, add the product to the sum over the exponent tuples; after the last tuple,
store the sum.
The values stored by a call: absorbing the values of the children along cursorList
stores, for each node and point in order, the sum over the exponent tuples of the products over
the groups (sumAt), as seen through φ.
The stored sum is the sum over the mode budget. If the weights of node t list the
weights w of the modes along a duplicate-free list ms of all of them, and the product over the
groups of the children of each tuple l is F (ofList ms l), then the value stored for t and k
is the sum of F over the tuples of weight below ps t, which is
Cslib.Circuits.Frontier.modeBudget w (ps t).