One-hot weights turn a readout into a coordinate evaluation.
ProvedContinuousUniversality.readoutCM_oneHotaether-catalogmachinelearning
One-hot weights turn a readout into a coordinate evaluation.
theorem ContinuousUniversality.readoutCM_oneHot[DecidableEq ι] [DecidableEq κ] (i₀ : ι) (a₀ : κ) (x : Seq ι κ) :
readoutCM (fun i a => if i = i₀ ∧ a = a₀ then (1:ℝ) else 0) x = x i₀ a₀ := by sorry
Formalization Note Transplanted verbatim from the Aether Catalog source MachineLearning/TransformerUniversality/ContinuousUniversality.lean; the statement is byte-identical to the source declaration, elaborated with autoImplicit disabled in the platform environment.
Preamble
-- Thm stub generated from MachineLearning/TransformerUniversality/ContinuousUniversality.lean
import Mathlib
import Definitions.Def_MachineLearning_TransformerUniversality_ContinuousUniversality
/-!
# Genuine continuous universality on compact sequence domains
`Catalog/MachineLearning/TransformerArchitecture.lean` proves *exact* universality on a finite
domain, and `FiniteLookupSeparation.lean` shows that a quantized finite lookup table can never
be a continuous universal approximator (its uniform error against the identity on `[0,1]` is
at least `1/(2N)`). This file supplies the missing genuine continuous statement.
The architecture considered here is the closure of the linear-attention *readouts*
`x ↦ ∑ i a, w i a * x i a` under sums and products; products model multiplicative
(gated / feed-forward) mixing layers, and the whole class is the `ℝ`-subalgebra
`attentionAlgebra` of `C(X, ℝ)` generated by the readouts.
Main results:
* `attentionAlgebra_separatesPoints` — readouts already separate sequences;
* `attention_uniform_universal` — **uniform universal approximation**: every continuous
real-valued functional of a sequence is uniformly `ε`-approximated on every compact set of
sequences by an element of `attentionAlgebra`;
* `attention_seq2seq_uniform_universal` — the sequence-to-sequence version, uniform in all
output positions and features simultaneously.
Taken with the separation theorem, this delimits the situation exactly: exact finite lookup is
*not* the continuous theorem, and the continuous theorem needs the multiplicative structure,
not just attention selection.
-/
open scoped BigOperators
open ContinuousUniversality
variable {ι κ : Type*} [Fintype ι] [Fintype κ]Formal statement
theorem ContinuousUniversality.readoutCM_oneHot[DecidableEq ι] [DecidableEq κ] (i₀ : ι) (a₀ : κ) (x : Seq ι κ) :
readoutCM (fun i a => if i = i₀ ∧ a = a₀ then (1:ℝ) else 0) x = x i₀ a₀ := by sorrySource