Weighted threshold programs and one-dimensional capacity #
This file fixes the definitions of the one-dimensional capacity method for threshold circuits of unbounded depth.
Rectangles #
TwoSidedRectangleFree f K says that under every split of the coordinates into U and its
complement, every rectangle P × Q on which f is constant (with either value) has a side
with fewer than K elements. The one-sided Cutwidth.RectangleFree only excludes rectangles
on which f is identically 1.
Change counts #
ChangesAtMost Ψ T is the discrete form of "Ψ : ℝ → β has at most T + 1 interval pieces":
along every nondecreasing sequence of reals, the value of Ψ changes at most T times. A
threshold function t ↦ [λ t + c ≥ 0] changes at most once, and a multilevel threshold
function with T transitions changes at most T times. PiecesAtMost Φ M is the
constructive form used for runs of threshold gates: Φ is constant on the level sets of a
monotone rank function with fewer than M values.
Threshold programs #
Program n s is a straight-line program of s weighted threshold gates on n Boolean inputs,
with arbitrary real weights, arbitrary depth, and arbitrary fan-in and fan-out. Gate j reads
every input x i with weight inputWeight j i and every earlier gate k < j with weight
gateWeight j k, and outputs 1 exactly when its weighted sum plus bias j is nonnegative.
Integer weights are a special case. Booleans enter the sums as 0 and 1. A gate is
input-reading when its input weight vector is nonzero (Program.inputGates); gates that read
only other gates are not counted by the bounds of this development.
Program.evalFrom evaluates the gates when some gates are overridden by given values and the
other gates receive arbitrary real input contributions in place of their weighted input sums;
the ordinary evaluation Program.eval overrides nothing and uses the true weighted sums. The
override form expresses a run of gates as a function of one real parameter.
ActivationProgram n s replaces the threshold of each gate by an arbitrary activation
ℝ → Bool applied to the weighted sum of its inputs and earlier gates. A threshold gate is the
activation t ↦ [t + bias ≥ 0], which changes once; exact-threshold, interval, symmetric, and
modular gates on weighted sums change finitely often, at mixed costs.
Block decompositions #
A BlockDecomposition f H presents f as the output of a sequence of histories
history i : {0,1}ⁿ → H, starting from a constant one. Each step is one-dimensional (the next
history is a function of the previous one and of a single weighted sum ⟨w, x⟩, with at most
T changes in the weighted sum for each previous history) or a summary (under every split, the
next history depends on the first side only through a value with at most V possibilities).
Its cost multiplies 4T over the one-dimensional steps with T ≥ 1 and V over the summary
steps.
f is two-sided K-rectangle-free when, under every split of the coordinates into U
and its complement, every rectangle P × Q on which f is constant has a side with fewer than
K elements.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Ψ changes at most T times: along every nondecreasing sequence z of reals, every set
of positions i with Ψ (z i) ≠ Ψ (z (i + 1)) has at most T elements. This is the discrete
form of having at most T + 1 interval pieces.
Equations
Instances For
Φ has at most M pieces: it is constant on the level sets of a monotone rank function
π : ℝ → ℕ with values below M. The level sets are intervals.
Equations
Instances For
A weighted real threshold straight-line program with n inputs and s gates. Gate j
reads every input and every earlier gate, with arbitrary real weights; depth and fan-out are
unrestricted.
The weight of input
iin gatej(inputWeight j i).The weight of gate
kin gatej(gateWeight j k); only the entries withk < jare read.The bias of gate
j.- output : Fin s
The output gate.
Instances For
The gate values when every gate in fixed takes the value given by η, and every other
gate j receives the real input contribution z j in place of its weighted input sum: such a
gate is 1 exactly when z j + ∑_{k < j} gateWeight j k * (gate k) + bias j ≥ 0.
Equations
Instances For
The gate values of the program on the input x: gate j is 1 exactly when
∑ i, inputWeight j i * x i + ∑_{k < j} gateWeight j k * (gate k) + bias j ≥ 0.
Equations
- C.eval x = C.evalFrom ∅ (fun (x : Fin s) => false) fun (j : Fin s) => Algebraic.Threshold.weightedSum (C.inputWeight j) x
Instances For
The input-reading gates: those with a nonzero input weight vector.
Equations
- C.inputGates = {j : Fin s | C.inputWeight j ≠ 0}
Instances For
A split of the gates into B consecutive runs, numbered by the monotone map run, such
that every gate of run i reads the inputs along the direction dir i: its input weight
vector is a real multiple of dir i. A gate that reads no input fits every direction.
The run of each gate.
Runs are consecutive in the gate order.
There are at most
Bruns.The direction of each run.
Every gate reads the inputs along the direction of its run.
Instances For
The number of input-reading gates in run i.
Instances For
A straight-line program of s gates with arbitrary activations on n Boolean inputs: gate
j outputs activation j (∑ i, inputWeight j i * x i + ∑_{k < j} gateWeight j k * (gate k)).
Weights are arbitrary reals; depth and fan-out are unrestricted.
The weight of input
iin gatej(inputWeight j i).The weight of gate
kin gatej(gateWeight j k); only the entries withk < jare read.The activation of gate
j, applied to its weighted sum.- output : Fin s
The output gate.
Instances For
The gate values of the program on the input x.
Equations
- C.eval x j = C.activation j (Algebraic.Threshold.weightedSum (C.inputWeight j) x + ∑ k : Fin s, if _h : k < j then C.gateWeight j k * ↑(C.eval x k).toNat else 0)
Instances For
The program computes f at its output gate.
Instances For
The input-reading gates: those with a nonzero input weight vector.
Equations
- C.inputGates = {j : Fin s | C.inputWeight j ≠ 0}
Instances For
The capacity cost of a block: 4T for a one-dimensional block with T ≥ 1 changes, 1
for one without changes, and V for a summary block.
Equations
Instances For
A step of kind κ from the history prev to the history next.
- One-dimensional with
Tchanges: for some weight vectorwand someΦ,next x = Φ (prev x) ⟨w, x⟩, where everyΦ ηchanges at mostTtimes. - Summary with
Vvalues: for every splitU, someσon the first side withVvalues and someΦsatisfynext (glue U p q) = Φ (prev (glue U p q)) (σ p) q.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A decomposition of f into blocks: histories history 0, …, history length, the first
constant, each obtained from the previous one by a step of the given kind, and f read off the
last history.
- length : ℕ
The number of blocks.
The kind of each block.
The history after the first
iblocks.- output : H → Bool
The output read from the final history.
Before any block, the history is constant.
Each block is a step of its kind.
The final history determines
f.
Instances For
The capacity cost of a block decomposition: the product of the costs of its blocks.