Documentation

CslibFrontier.Computability.Circuit.Frontier.ThresholdTop

Frontier lower bounds for circuits with unbounded-weight threshold tops #

The ledger extension of the frontier method (Cslib.Circuits.Frontier.Ledger) absorbs unbounded fan-in gates that aggregate in a finite commutative monoid M with log |M| = o(n). That approach cannot handle an unbounded-fan-in real-weighted linear threshold gate (perceptron) reading all n + g wires of a bounded-fan-in program with arbitrary real weights: irrational or exponentially growing weights generate 2^{Θ(n)} distinct partial sums, and fixing the values on a frontier edge cut leaves a two-party halfspace (Greater-Than) rather than a monochromatic combinatorial rectangle.

This module proves that the full 4.575972 n median-switched Gaussian frontier lower bound nevertheless holds for arbitrary-real-weight multi-perceptron tops (ThresholdTop) over bounded fan-in programs (THR ∘ THR_t ∘ Circuit, or any Boolean combination G of t unbounded-weight linear threshold units reading all inputs and internal gates):

  1. Order-rank compression of two-party halfspaces (card_isHalfspaceComb_le). A two-party halfspace decide (φ a + ψ b < 0) on α × β is determined by the strict rank map z ↦ #{w : α ⊕ β | g w < g z} < |α| + |β| of g = Sum.elim φ (-ψ). Consequently, across all unbounded real weights, at most 2^{2^t} (|α| + |β|)^{t (|α| + |β|)} functions on α × β are Boolean combinations of t two-party halfspaces (IsHalfspaceComb).
  2. Existence of small-bias targets (exists_halfspaceCombBias, exists_halfspaceCombBias_family). Union-bounding Hoeffding's inequality over spanned rectangles of sizes k₁, k₂ ≥ K shows that when (2 (t + 1) (n + 1) : ℝ) ≤ b^2 K and 2^t + 3 n + 2 ≤ 2 K, sets S ⊆ Bool^n of bias at most b against every t-halfspace combination on K × K-large rectangles (HalfspaceCombBias) exist; for instance K_n = 2 (t + 1) (n + 1)^3 + 2^t and b_n = 1 / (n + 1) → 0.
  3. Realized-edge peeling on the unconstrained live network (eventually_agreement_thresholdTop_le_of_layoutBound, eventually_agreement_thresholdTop_le_switched). Erasing no gates (special := False) turns a program p of fan-in at most two into liveCircuit p, whose constraint network accepts every input unambiguously (accepted = univ). On every state rectangle peers τ x = rectangle X A B, every wire of p depends on X alone or on Xᶜ alone, reducing T.eval p I on A × B to IsHalfspaceComb t. Bounding the realized edges at each step inside component W simultaneously by the frontier width and by |readIn W| eliminates disconnected-component blowup via the convex combination min (A (s + 1 - n_W)) n_W ≤ (A / (1 + A)) (s + 1), yielding agreement at most 1/2 + b_n + exp (-γ n) whenever s ≤ (1 + 2π / (3 arccos (5/6)) - ε) n.
  4. Single-cut sign-rank bound and Forster corollary (signRank_thresholdTop_le, eventually_lt_innerSize_thresholdTop_hardForm). Across any single vertex cut P of the live network, integer order-ranks shifted by 1/2 factor a sign-representation of a single threshold unit (t = 1) through 2 |U|^{|edgeCut P|} dimensions (Communication.signRank_le_card_of_mul), without topological perturbation. Paired with Forster's bilinear theorem (Forster.lean) and Lindsey's lemma on the nonconstructively chosen bilinear form hardForm n, every THR ∘ B₂ circuit (including direct input skip-wires) computing hardForm n needs more than (1 + π / (6 arccos (5/6)) - ε) n ≈ 1.893993 n inner gates.

The frontier lower-bound extensions to arbitrary-real-weight threshold tops developed here — combining order-rank compression on realized state rectangles with componentwise edge peeling, and combining cut-wise shifted order-rank factorizations with Forster's theorem on graphs — are original to this library.

Main definitions #

Main results #

References #

Two-party halfspace combinations and order-rank compression #

def Cslib.Circuits.Frontier.IsHalfspaceComb (t : ℕ) {α : Type u_1} {β : Type u_2} (f : α → β → Bool) :

f : α → β → Bool is a Boolean combination of t two-party real halfspaces when there are real potentials φ r : α → ℝ and ψ r : β → ℝ (r : Fin t) and a combiner G : (Fin t → Bool) → Bool such that f a b = G (fun r => decide (φ r a + ψ r b < 0)).

theorem Cslib.Circuits.Frontier.IsHalfspaceComb.comp {t : ℕ} {α : Type u_1} {β : Type u_2} {α' : Type u_3} {β' : Type u_4} {f : α → β → Bool} (hf : IsHalfspaceComb t f) (ha : α' → α) (hb : β' → β) :
IsHalfspaceComb t fun (a' : α') (b' : β') => f (ha a') (hb b')

IsHalfspaceComb is preserved under precomposition on both sides.

theorem Cslib.Circuits.Frontier.IsHalfspaceComb.not {t : ℕ} {α : Type u_1} {β : Type u_2} {f : α → β → Bool} (hf : IsHalfspaceComb t f) :
IsHalfspaceComb t fun (a : α) (b : β) => !f a b

Negating the output preserves IsHalfspaceComb.

theorem Cslib.Circuits.Frontier.isHalfspaceComb_one_decide_le {α : Type u_1} {β : Type u_2} (φ : α → ℝ) (ψ : β → ℝ) (θ : ℝ) :
IsHalfspaceComb 1 fun (a : α) (b : β) => decide (θ ≤ φ a + ψ b)

Weak inequalities decide (θ ≤ φ a + ψ b) are 1-halfspace combinations via negation.

theorem Cslib.Circuits.Frontier.card_isHalfspaceComb_le (t : ℕ) (α : Type u_1) (β : Type u_2) [Fintype α] [Fintype β] [DecidableEq α] [DecidableEq β] [DecidablePred (IsHalfspaceComb t)] :
{f : α → β → Bool | IsHalfspaceComb t f}.card ≤ 2 ^ 2 ^ t * (Fintype.card α + Fintype.card β) ^ (t * (Fintype.card α + Fintype.card β))

Number of t-halfspace combinations on α × β. Over finite types α and β with m = |α| + |β|, at most 2 ^ (2 ^ t) * m ^ (t * m) functions α → β → Bool belong to IsHalfspaceComb t, independent of the real weights.

Bias against t-halfspace combinations on large rectangles #

def Cslib.Circuits.Frontier.HalfspaceCombBias (t : ℕ) {ι : Type u_1} {U : Type u_2} (S : Set (ι → U)) (K : ℕ) (b : ℝ) :

S ⊆ (ι → U) has t-halfspace-combination bias at most b above side threshold K when, on every combinatorial rectangle rectangle X A B with K ≤ |A| and K ≤ |B|, every f : (X → U) → (↥Xᶜ → U) → Bool satisfying IsHalfspaceComb t f agrees and disagrees with S within 2 b |rectangle X A B|.

theorem Cslib.Circuits.Frontier.HalfspaceCombBias.mono {t : ℕ} {ι : Type u_1} {U : Type u_2} {S : Set (ι → U)} {K K' : ℕ} {b : ℝ} (h : HalfspaceCombBias t S K b) (hK : K ≤ K') :

HalfspaceCombBias is monotone in the side threshold K.

theorem Cslib.Circuits.Frontier.halfspaceCombBias_one_half (t : ℕ) {ι : Type u_1} {U : Type u_2} [Finite ι] [Finite U] (S : Set (ι → U)) (K : ℕ) :
HalfspaceCombBias t S K (1 / 2)

Every set has HalfspaceCombBias at most 1/2.

theorem Cslib.Circuits.Frontier.exists_halfspaceCombBias {ι : Type u_1} [Fintype ι] (t K : ℕ) {b : ℝ} (hb : 0 < b) (hKb : 2 * (↑t + 1) * (↑(Fintype.card ι) + 1) ≤ b ^ 2 * ↑K) (hKt : ↑(2 ^ t + 3 * Fintype.card ι + 2) ≤ 2 * ↑K) :
∃ (S : Set (ι → Bool)), HalfspaceCombBias t S K b

Sets of small t-halfspace-combination bias exist. Let n = |ι|, b > 0, (2 (t + 1) (n + 1) : ℝ) ≤ b ^ 2 * K, and (2 ^ t + 3 * n + 2 : ℝ) ≤ 2 * K. Then some set S ⊆ (ι → Bool) satisfies HalfspaceCombBias t S K b.

theorem Cslib.Circuits.Frontier.exists_halfspaceCombBias_family (t : ℕ) :
∃ (S : (n : ℕ) → Set (Fin n → Bool)), (∀ᶠ (n : ℕ) in Filter.atTop, HalfspaceCombBias t (S n) (2 * (t + 1) * (n + 1) ^ 3 + 2 ^ t) (1 / (↑n + 1))) ∧ ((fun (n : ℕ) => Real.log ↑(2 * (t + 1) * (n + 1) ^ 3 + 2 ^ t)) =o[Filter.atTop] fun (n : ℕ) => ↑n) ∧ Filter.Tendsto (fun (n : ℕ) => 1 / (↑n + 1)) Filter.atTop (nhds 0)

Families meeting HalfspaceCombBias with bias tending to zero. For any fixed t : ℕ, there is a family S_n ⊆ Bool^n (selected nonconstructively via Classical.choose from the counting witness exists_halfspaceCombBias) with HalfspaceCombBias t (S n) (2 (t + 1) (n + 1)^3 + 2^t) (1 / (n + 1)), log K_n = o(n), and b_n → 0.

Unbounded-real-weight threshold tops over bounded-fan-in programs #

structure Cslib.Circuits.Frontier.ThresholdTop (U : Type u) (n g t : ℕ) :

A threshold top of t unbounded-real-weight linear threshold units reading all n + g wires of a program p : Program σ n g, combined by combine : (Fin t → Bool) → Bool.

  • weight : Fin t → Wire n g → U → ℝ

    Real contribution weight r w u when wire w carries value u : U.

  • bias : Fin t → ℝ

    Additive real bias of threshold unit r.

  • combine : (Fin t → Bool) → Bool

    Outer Boolean combiner of the t threshold units.

noncomputable def Cslib.Circuits.Frontier.ThresholdTop.eval {σ : Signature} {U : Type u} {n g t : ℕ} (T : ThresholdTop U n g t) (p : Program σ n g) (I : Interpretation σ U) (x : Fin n → U) :

Evaluate T on the wire trace of p under interpretation I and input x.

Live-network wire splicing and realized-edge peeling #

theorem Cslib.Circuits.Frontier.eventually_agreement_thresholdTop_le_of_layoutBound {A : ℝ} (hA : 0 < A) (hlayout : LayoutBound 3 A) {ε : ℝ} (hε : 0 < ε) :
∃ γ > 0, ∀ (U : Type u) [Finite U] [Nontrivial U] (t K : ℕ → ℕ) (b : ℕ → ℝ) (S : (n : ℕ) → Set (Fin n → U)), (∀ᶠ (n : ℕ) in Filter.atTop, HalfspaceCombBias (t n) (S n) (K n) (b n)) → ((fun (n : ℕ) => Real.log ↑(K n)) =o[Filter.atTop] fun (n : ℕ) => ↑n) → ∀ᶠ (n : ℕ) in Filter.atTop, ∀ (σ : Signature) (I : Interpretation σ U) (g : ℕ) (p : Program σ n g) (T : ThresholdTop U n g (t n)), p.FanInAtMost 2 → ↑p.innerGates.card ≤ (1 + 1 / A - ε) * ↑n → agreement (S n) {x : Fin n → U | T.eval p I x = true} ≤ 1 / 2 + b n + Real.exp (-(γ * ↑n))

Average-case lower bound for ThresholdTop under LayoutBound 3 A. Fix A > 0 with LayoutBound 3 A. For every ε > 0 there is γ > 0 such that for every finite nontrivial alphabet U, every t : ℕ → ℕ, K : ℕ → ℕ with log K_n = o(n), b : ℕ → ℝ, and S_n ⊆ U^n eventually satisfying HalfspaceCombBias (t n) (S n) (K n) (b n), for all large n, every program p : Program σ n g of fan-in at most 2 with (p.innerGates.card : ℝ) ≤ (1 + 1/A - ε) n and every T : ThresholdTop U n g (t n) (with arbitrary unbounded real weights!) has agreement (S n) {x | T.eval p I x = true} ≤ 1 / 2 + b n + exp (-γ n).

Unconditional median-switched average-case bounds (4.575972 n) #

theorem Cslib.Circuits.Frontier.eventually_agreement_thresholdTop_le_switched {ε : ℝ} (hε : 0 < ε) :
∃ γ > 0, ∀ (U : Type u) [Finite U] [Nontrivial U] (t K : ℕ → ℕ) (b : ℕ → ℝ) (S : (n : ℕ) → Set (Fin n → U)), (∀ᶠ (n : ℕ) in Filter.atTop, HalfspaceCombBias (t n) (S n) (K n) (b n)) → ((fun (n : ℕ) => Real.log ↑(K n)) =o[Filter.atTop] fun (n : ℕ) => ↑n) → ∀ᶠ (n : ℕ) in Filter.atTop, ∀ (σ : Signature) (I : Interpretation σ U) (g : ℕ) (p : Program σ n g) (T : ThresholdTop U n g (t n)), p.FanInAtMost 2 → ↑p.innerGates.card ≤ (1 + 2 * Real.pi / (3 * Real.arccos (5 / 6)) - ε) * ↑n → agreement (S n) {x : Fin n → U | T.eval p I x = true} ≤ 1 / 2 + b n + Real.exp (-(γ * ↑n))

Median-switched average-case bound for ThresholdTop (4.575972 n). Below (L₃ - ε) n inner gates, where L₃ = 1 + 2π / (3 arccos (5 / 6)) ≈ 4.575972, every fan-in-two program topped with t_n arbitrary-real-weight linear threshold units agrees with any HalfspaceCombBias target S_n on at most 1/2 + b_n + exp (-γ n) of the inputs.

theorem Cslib.Circuits.Frontier.eventually_agreement_thresholdTop_le_457597 {ε : ℝ} (hε : 0 < ε) :
∃ γ > 0, ∀ (U : Type u) [Finite U] [Nontrivial U] (t K : ℕ → ℕ) (b : ℕ → ℝ) (S : (n : ℕ) → Set (Fin n → U)), (∀ᶠ (n : ℕ) in Filter.atTop, HalfspaceCombBias (t n) (S n) (K n) (b n)) → ((fun (n : ℕ) => Real.log ↑(K n)) =o[Filter.atTop] fun (n : ℕ) => ↑n) → ∀ᶠ (n : ℕ) in Filter.atTop, ∀ (σ : Signature) (I : Interpretation σ U) (g : ℕ) (p : Program σ n g) (T : ThresholdTop U n g (t n)), p.FanInAtMost 2 → ↑p.innerGates.card ≤ (457597 / 100000 - ε) * ↑n → agreement (S n) {x : Fin n → U | T.eval p I x = true} ≤ 1 / 2 + b n + Real.exp (-(γ * ↑n))

Rational (4.57597 - ε) n average-case bound for ThresholdTop.

Single-cut sign-rank bound and Forster's theorem #

theorem Cslib.Circuits.Frontier.signRank_le_two_of_isHalfspaceComb_one {α : Type u_1} {β : Type u_2} [Finite α] [Finite β] {f : α → β → Bool} (hf : IsHalfspaceComb 1 f) :

Sign-rank of a two-party halfspace (t = 1). Every 1-halfspace combination over finite domains has sign-rank at most 2.

theorem Cslib.Circuits.Frontier.signRank_thresholdTop_le {σ : Signature} {U : Type u} [Fintype U] {n g : ℕ} (T : ThresholdTop U n g 1) (p : Program σ n g) (I : Interpretation σ U) (P : Set (Compiler.Vertex (liveCircuit p fun (x : Fin g) => False))) :
(Communication.signRank fun (a : ↑((liveNetwork p (fun (x : Fin g) => False) U).readIn P) → U) (b : ↑((liveNetwork p (fun (x : Fin g) => False) U).readIn P)ᶜ → U) => T.eval p I ((Equiv.piEquivPiSubtypeProd (fun (x : Fin n) => x ∈ (liveNetwork p (fun (x : Fin g) => False) U).readIn P) fun (x : Fin n) => U).symm (a, b))) ≤ 2 * Fintype.card U ^ ((liveNetwork p (fun (x : Fin g) => False) U).edgeCut P).ncard

Single-cut sign-rank bound for ThresholdTop (t = 1). Across any vertex cut P of liveNetwork p (fun _ => False) U, letting X = readIn P, the single-perceptron top T : ThresholdTop U n g 1 has communication sign-rank at most 2 * |U| ^ |edgeCut P| across (X, Xᶜ).

theorem Cslib.Circuits.Frontier.eventually_lt_innerSize_thresholdTop_hardForm_of_layoutBound {A : ℝ} (hA : 0 < A) (hlayout : LayoutBound 3 A) {ε : ℝ} (hε : 0 < ε) :
∀ᶠ (n : ℕ) in Filter.atTop, ∀ (σ : Signature) (I : Interpretation σ Bool) (g : ℕ) (p : Program σ n g) (T : ThresholdTop Bool n g 1), p.FanInAtMost 2 → (∀ (x : Fin n → Bool), T.eval p I x = hardForm n x) → (1 + 1 / (4 * A) - ε) * ↑n < ↑p.innerGates.card

Single-cut hardForm lower bound for ThresholdTop (t = 1) under LayoutBound 3 A. Every fan-in-two program p topped with a single arbitrary-real-weight linear threshold unit T (including direct input skip-wires) computing the nonconstructively chosen bilinear form hardForm n (selected via Classical.choose) needs more than (1 + 1 / (4 A) - ε) n inner gates.

theorem Cslib.Circuits.Frontier.eventually_lt_innerSize_thresholdTop_hardForm {ε : ℝ} (hε : 0 < ε) :
∀ᶠ (n : ℕ) in Filter.atTop, ∀ (σ : Signature) (I : Interpretation σ Bool) (g : ℕ) (p : Program σ n g) (T : ThresholdTop Bool n g 1), p.FanInAtMost 2 → (∀ (x : Fin n → Bool), T.eval p I x = hardForm n x) → (1 + Real.pi / (6 * Real.arccos (5 / 6)) - ε) * ↑n < ↑p.innerGates.card

Median-switched hardForm lower bound for ThresholdTop (1.893993 n). Every fan-in-two program p topped with a single arbitrary-real-weight linear threshold unit T (including direct input skip-wires) computing the nonconstructively chosen bilinear form hardForm n needs more than (1 + π / (6 * arccos (5 / 6)) - ε) * n inner gates.

theorem Cslib.Circuits.Frontier.eventually_lt_innerSize_thresholdTop_hardForm_189399 {ε : ℝ} (hε : 0 < ε) :
∀ᶠ (n : ℕ) in Filter.atTop, ∀ (σ : Signature) (I : Interpretation σ Bool) (g : ℕ) (p : Program σ n g) (T : ThresholdTop Bool n g 1), p.FanInAtMost 2 → (∀ (x : Fin n → Bool), T.eval p I x = hardForm n x) → (189399 / 100000 - ε) * ↑n < ↑p.innerGates.card

Rational (1.89399 - ε) n lower bound for ThresholdTop (t = 1) on hardForm n.