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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Composition Rules
|
| 2 |
+
# Each rule specifies how formalisms compose. Type-checked: input and output
|
| 3 |
+
# signatures must match for a composition to be valid. The matching engine uses
|
| 4 |
+
# these rules to decompose a paper's claimed-novel concept into a composition of
|
| 5 |
+
# known formalisms.
|
| 6 |
+
#
|
| 7 |
+
# Schema:
|
| 8 |
+
# id: stable identifier
|
| 9 |
+
# name: human-readable name (lowercase, underscorized)
|
| 10 |
+
# description: what the rule does, in plain language
|
| 11 |
+
# signature:
|
| 12 |
+
# operation: the mathematical operation type(s) accepted or produced
|
| 13 |
+
# domain: input domain type(s)
|
| 14 |
+
# codomain: output codomain type(s)
|
| 15 |
+
# objective_family: objective type(s) accepted or produced
|
| 16 |
+
# input_constraints:
|
| 17 |
+
# formalism_ids: optional list of specific formalisms this rule applies to
|
| 18 |
+
# meso_types: optional list of meso types this rule accepts
|
| 19 |
+
# macro_types: optional list of macro types this rule accepts
|
| 20 |
+
# output_signature:
|
| 21 |
+
# operation: the resulting operation type
|
| 22 |
+
# codomain: the resulting codomain type
|
| 23 |
+
# objective_family: the resulting objective family (if modified)
|
| 24 |
+
# meso_type: the resulting meso type
|
| 25 |
+
# macro_type: the resulting macro type
|
| 26 |
+
# preserves: properties that survive the transformation
|
| 27 |
+
# introduces: new properties the transformation adds
|
| 28 |
+
# examples:
|
| 29 |
+
# - concrete example of the composition
|
| 30 |
+
# status: seed | verified | deprecated
|
| 31 |
+
#
|
| 32 |
+
# Composition rule families:
|
| 33 |
+
# 1. Neuralization primitives (~5)
|
| 34 |
+
# 2. Kernelization primitives (~3)
|
| 35 |
+
# 3. Structural wrappers (~4)
|
| 36 |
+
# 4. Objective transforms (~3)
|
| 37 |
+
# TOTAL: ~15 rules
|
| 38 |
+
|
| 39 |
+
composition_rules:
|
| 40 |
+
|
| 41 |
+
# =============================================================================
|
| 42 |
+
# 1. NEURALIZATION PRIMITIVES
|
| 43 |
+
# "Neuralize": replace a fixed function/operator with a learned parameterized map
|
| 44 |
+
# =============================================================================
|
| 45 |
+
|
| 46 |
+
- id: neuralize
|
| 47 |
+
name: neuralize
|
| 48 |
+
decomposes_to: [gradient_descent, sgd]
|
| 49 |
+
description: >
|
| 50 |
+
Replace a fixed function (kernel, distance metric, projection matrix) with a
|
| 51 |
+
learned parameterized map φ_θ typically implemented as a deep neural network.
|
| 52 |
+
The structural operation stays the same; the function implementing it becomes
|
| 53 |
+
a learnable composition of linear+nonlinear transforms optimized by SGD.
|
| 54 |
+
input_constraints:
|
| 55 |
+
meso_types:
|
| 56 |
+
- kernel_method
|
| 57 |
+
- linear_projection
|
| 58 |
+
- spectral_method
|
| 59 |
+
- optimal_transport
|
| 60 |
+
macro_types:
|
| 61 |
+
- eigenvalue_problem
|
| 62 |
+
- optimization
|
| 63 |
+
output_signature:
|
| 64 |
+
meso_type: none # neural network is implementation detail, not meso type
|
| 65 |
+
preserves: true # the underlying mathematical operation
|
| 66 |
+
preserves:
|
| 67 |
+
- "the mathematical operation (project, decompose, match, transform)"
|
| 68 |
+
- "the objective family (correlation, divergence, energy, etc.)"
|
| 69 |
+
- "the domain and codomain types"
|
| 70 |
+
introduces:
|
| 71 |
+
- "differentiable parameterization: φ_θ replaces fixed function"
|
| 72 |
+
- "SGD-based fitting instead of closed-form solution"
|
| 73 |
+
- "non-convex optimization landscape"
|
| 74 |
+
- "scale: can handle higher-dimensional inputs"
|
| 75 |
+
examples:
|
| 76 |
+
- "Kernel CCA → Deep CCA: replace kernel k(x,y) with learned encoders f_θ(x), g_φ(y)"
|
| 77 |
+
- "Kernel PCA → Autoencoder: replace kernel with encoder-decoder pair"
|
| 78 |
+
- "MMD → Deep MMD: replace fixed kernel with learned feature extractor"
|
| 79 |
+
status: seed
|
| 80 |
+
|
| 81 |
+
- id: attention_wrap
|
| 82 |
+
name: attention_wrap
|
| 83 |
+
decomposes_to: [softmax_attention, boltzmann_distribution]
|
| 84 |
+
description: >
|
| 85 |
+
Wrap a pairwise operation in a softmax-normalized weighted aggregation.
|
| 86 |
+
For any function s(x_i, x_j) that scores compatibility between elements,
|
| 87 |
+
produce output as Σ_j softmax(s(x_i, x_j))·v(x_j). This is the transformer's
|
| 88 |
+
core operation: a Boltzmann-weighted sum over a set of values.
|
| 89 |
+
input_constraints:
|
| 90 |
+
formalisms: [] # any scoring function can be attention-wrapped
|
| 91 |
+
output_signature:
|
| 92 |
+
operation: aggregate
|
| 93 |
+
codomain: vector
|
| 94 |
+
objective_family: none
|
| 95 |
+
preserves:
|
| 96 |
+
- "the scoring function s(x_i, x_j) as the core computation"
|
| 97 |
+
- "the value function v(x_j)"
|
| 98 |
+
introduces:
|
| 99 |
+
- "Boltzmann / softmax partition function as normalizer: Z_i = Σ_j exp(s(q_i, k_j))"
|
| 100 |
+
- "set-to-vector aggregation that is permutation-equivariant"
|
| 101 |
+
- "variable-length input handling"
|
| 102 |
+
examples:
|
| 103 |
+
- "dot-product attention: s(q,k) = q·k/√d → softmax → weighted sum of values"
|
| 104 |
+
- "kernel attention: s(q,k) = k(q,k) → a kernel smoother with learnable parameters"
|
| 105 |
+
- "self-attention = attention_wrap(dot-product) over same sequence"
|
| 106 |
+
status: seed
|
| 107 |
+
|
| 108 |
+
- id: residualize
|
| 109 |
+
name: residualize
|
| 110 |
+
decomposes_to: [residual_connection]
|
| 111 |
+
description: >
|
| 112 |
+
Add identity skip connection: y = F(x) + x. This is a structural
|
| 113 |
+
transformation that makes the function learn perturbations around identity
|
| 114 |
+
rather than the full mapping. Mathematically equivalent to applying an
|
| 115 |
+
Euler discretization of an ODE with step size 1.
|
| 116 |
+
input_constraints: {} # any vector-to-vector transform
|
| 117 |
+
output_signature:
|
| 118 |
+
operation: transform
|
| 119 |
+
codomain: vector
|
| 120 |
+
preserves: true
|
| 121 |
+
preserves:
|
| 122 |
+
- "the wrapped function F(x)"
|
| 123 |
+
- "dimensionality: output dim = input dim"
|
| 124 |
+
introduces:
|
| 125 |
+
- "identity skip path: gradient can bypass F, mitigating vanishing gradients"
|
| 126 |
+
- "ODE interpretation: x_{t+1} = x_t + F(x_t) as Euler step"
|
| 127 |
+
- "the function learns F(x) = H(x) - x rather than H(x) directly"
|
| 128 |
+
examples:
|
| 129 |
+
- "ResNet block = residualize(convolution + batch_norm + ReLU)"
|
| 130 |
+
- "Transformer sublayer = residualize(multi_head_attention) then residualize(FFN)"
|
| 131 |
+
- "Residual flow in normalizing flows"
|
| 132 |
+
status: seed
|
| 133 |
+
|
| 134 |
+
- id: normalize
|
| 135 |
+
name: normalize
|
| 136 |
+
decomposes_to: [layer_normalization, batch_normalization]
|
| 137 |
+
description: >
|
| 138 |
+
Apply standardization: x' = γ·(x - μ)/σ + β. Removes first and second
|
| 139 |
+
moment variation across a specified axis (batch, layer, instance, group).
|
| 140 |
+
This is a whitening operation restricted to the first two moments.
|
| 141 |
+
input_constraints: {} # any numeric tensor
|
| 142 |
+
output_signature:
|
| 143 |
+
operation: transform
|
| 144 |
+
codomain: vector
|
| 145 |
+
preserves: false # moments change
|
| 146 |
+
preserves:
|
| 147 |
+
- "dimensionality"
|
| 148 |
+
- "the subsequent computation's functional form"
|
| 149 |
+
introduces:
|
| 150 |
+
- "zero mean, unit variance along normalization axis (before γ,β)"
|
| 151 |
+
- "learnable affine parameters γ, β"
|
| 152 |
+
- "stabilized gradient flow during training"
|
| 153 |
+
examples:
|
| 154 |
+
- "LayerNorm(x) before self-attention in Transformer"
|
| 155 |
+
- "BatchNorm between conv layers in ResNet"
|
| 156 |
+
status: seed
|
| 157 |
+
|
| 158 |
+
- id: encode_decode
|
| 159 |
+
name: encode_decode
|
| 160 |
+
decomposes_to: [pca, vae]
|
| 161 |
+
description: >
|
| 162 |
+
Bottleneck compression: x → encode → z (latent) → decode → x̂.
|
| 163 |
+
The encoder maps to a lower-dimensional latent; the decoder reconstructs.
|
| 164 |
+
This is the universal autoencoder pattern. Information-theoretically,
|
| 165 |
+
it's rate-distortion with λ controlling the bottleneck width.
|
| 166 |
+
input_constraints: {} # any domain type
|
| 167 |
+
output_signature:
|
| 168 |
+
operation: transform
|
| 169 |
+
codomain: vector
|
| 170 |
+
objective_family: reconstruction # ||x - x̂||² or cross-entropy
|
| 171 |
+
preserves:
|
| 172 |
+
- "the identity map through the bottleneck (x ≈ decode(encode(x)))"
|
| 173 |
+
introduces:
|
| 174 |
+
- "latent representation z in R^d (typically d < input dim)"
|
| 175 |
+
- "information bottleneck: the latent discards everything not needed for reconstruction"
|
| 176 |
+
- "if stochastic: variational bound (ELBO) on log p(x)"
|
| 177 |
+
examples:
|
| 178 |
+
- "Autoencoder = neuralize(encode_decode)"
|
| 179 |
+
- "VAE = encode_decode + KL regularizer on latent"
|
| 180 |
+
- "U-Net = encode_decode with skip connections between corresponding resolutions"
|
| 181 |
+
status: seed
|
| 182 |
+
|
| 183 |
+
# =============================================================================
|
| 184 |
+
# 2. KERNELIZATION PRIMITIVES
|
| 185 |
+
# =============================================================================
|
| 186 |
+
|
| 187 |
+
- id: kernelize
|
| 188 |
+
name: kernelize
|
| 189 |
+
decomposes_to: [kernel_pca, kernel_cca, kernel_ridge_regression]
|
| 190 |
+
description: >
|
| 191 |
+
Lift a linear method to a nonlinear one by replacing inner products ⟨x, y⟩
|
| 192 |
+
with a positive-definite kernel k(x, y). This is the kernel trick: the
|
| 193 |
+
method stays algebraically identical but now operates in a reproducing
|
| 194 |
+
kernel Hilbert space (RKHS) implicitly defined by the feature map φ.
|
| 195 |
+
Equivalent to: apply linear method to φ(x) without ever computing φ(x).
|
| 196 |
+
input_constraints:
|
| 197 |
+
meso_types:
|
| 198 |
+
- linear_projection
|
| 199 |
+
- spectral_method
|
| 200 |
+
macro_types:
|
| 201 |
+
- eigenvalue_problem
|
| 202 |
+
- optimization
|
| 203 |
+
output_signature:
|
| 204 |
+
meso_type: kernel_method
|
| 205 |
+
macro_type: eigenvalue_problem # kernel matrices are eigen-decomposed
|
| 206 |
+
preserves: true
|
| 207 |
+
preserves:
|
| 208 |
+
- "the algebraic form of the method"
|
| 209 |
+
- "the objective family"
|
| 210 |
+
- "convexity (when the original method is convex)"
|
| 211 |
+
introduces:
|
| 212 |
+
- "implicit feature map φ: X → H (RKHS)"
|
| 213 |
+
- "kernel Gram matrix K_{ij} = k(x_i, x_j) as sufficient statistic"
|
| 214 |
+
- "O(N³) or O(N²) complexity (unless Nyström / random features)"
|
| 215 |
+
- "Mercer condition: k must be positive-definite"
|
| 216 |
+
examples:
|
| 217 |
+
- "PCA → Kernel PCA: K = k(x_i, x_j), eigen-decompose centered K"
|
| 218 |
+
- "CCA → Kernel CCA: eigenproblem on K_x^{-1/2} K_x K_y K_y^{-1/2}"
|
| 219 |
+
- "Ridge regression → Kernel ridge regression: α = (K + λI)^{-1} y"
|
| 220 |
+
- "Fisher LDA → Kernel FDA"
|
| 221 |
+
status: seed
|
| 222 |
+
|
| 223 |
+
- id: random_fourier_features
|
| 224 |
+
name: random_fourier_features
|
| 225 |
+
decomposes_to: [fourier_transform, kernel_pca]
|
| 226 |
+
description: >
|
| 227 |
+
Approximate a shift-invariant kernel k(x,y) = k(x-y) by sampling random
|
| 228 |
+
Fourier features: z(x) = √(2/D) · [cos(ω₁·x + b₁), ..., cos(ω_D·x + b_D)]
|
| 229 |
+
where ω_d ~ p(ω) (the kernel's spectral density). Then k(x,y) ≈ z(x)·z(y).
|
| 230 |
+
This linearizes the kernel method: kernelized methods become linear methods
|
| 231 |
+
in the random feature space, recovering O(ND) complexity.
|
| 232 |
+
input_constraints:
|
| 233 |
+
meso_types:
|
| 234 |
+
- kernel_method
|
| 235 |
+
formalisms: [] # any shift-invariant kernel
|
| 236 |
+
output_signature:
|
| 237 |
+
meso_type: linear_projection # method is now linear in z(x)
|
| 238 |
+
preserves: true
|
| 239 |
+
preserves:
|
| 240 |
+
- "the method's algebraic form (now linear in z(x))"
|
| 241 |
+
- "the objective family"
|
| 242 |
+
introduces:
|
| 243 |
+
- "explicit D-dimensional feature map approximating RKHS"
|
| 244 |
+
- "O(ND) complexity instead of O(N²) or O(N³)"
|
| 245 |
+
- "approximation error O(D^{-1/2}) by Bochner's theorem + Hoeffding"
|
| 246 |
+
examples:
|
| 247 |
+
- "RFF for RBF kernel: ω ~ N(0, σ^{-2} I)"
|
| 248 |
+
- "Deep sets / point cloud methods that use RFF as positional encoding"
|
| 249 |
+
- "Transformer sinusoidal position encoding (closely related)"
|
| 250 |
+
status: seed
|
| 251 |
+
|
| 252 |
+
- id: nystrom
|
| 253 |
+
name: nystrom_approximation
|
| 254 |
+
decomposes_to: [svd, kernel_pca]
|
| 255 |
+
description: >
|
| 256 |
+
Low-rank approximation of a kernel Gram matrix by subsampling m landmark
|
| 257 |
+
points: K ≈ K_{nm} K_{mm}^{-1} K_{mn}. Reduces complexity from O(N³) to
|
| 258 |
+
O(Nm² + m³). The Nyström method is the quadrature-based numerical
|
| 259 |
+
approximation of the integral eigenproblem underlying the kernel expansion.
|
| 260 |
+
input_constraints:
|
| 261 |
+
meso_types:
|
| 262 |
+
- kernel_method
|
| 263 |
+
output_signature:
|
| 264 |
+
preserves: true
|
| 265 |
+
preserves:
|
| 266 |
+
- "the kernel method's structure"
|
| 267 |
+
- "the objective family"
|
| 268 |
+
introduces:
|
| 269 |
+
- "low-rank approximation: m landmarks, rank at most m"
|
| 270 |
+
- "O(Nm² + m³) complexity"
|
| 271 |
+
- "approximation quality depends on landmark selection"
|
| 272 |
+
examples:
|
| 273 |
+
- "Nyström kernel PCA"
|
| 274 |
+
- "Nyström kernel ridge regression"
|
| 275 |
+
- "Landmark-based spectral clustering"
|
| 276 |
+
status: seed
|
| 277 |
+
|
| 278 |
+
# =============================================================================
|
| 279 |
+
# 3. STRUCTURAL WRAPPERS
|
| 280 |
+
# =============================================================================
|
| 281 |
+
|
| 282 |
+
- id: diffuse
|
| 283 |
+
name: diffuse
|
| 284 |
+
decomposes_to: [diffusion_sde, langevin_dynamics]
|
| 285 |
+
description: >
|
| 286 |
+
Wrap a sampling/generative process in a forward noising + reverse denoising
|
| 287 |
+
SDE. Forward: dx = f(x,t)dt + g(t)dW incrementally destroys structure.
|
| 288 |
+
Reverse: dx = [f(x,t) - g(t)²∇_x log p_t(x)]dt + g(t)dW reconstructs.
|
| 289 |
+
The core component is score matching: learn s_θ(x,t) ≈ ∇_x log p_t(x).
|
| 290 |
+
The generative model = reverse-time SDE driven by learned score.
|
| 291 |
+
input_constraints: {} # any data distribution
|
| 292 |
+
output_signature:
|
| 293 |
+
operation: sample
|
| 294 |
+
meso_type: diffusion_process
|
| 295 |
+
macro_type: stochastic_process
|
| 296 |
+
preserves: false
|
| 297 |
+
introduces:
|
| 298 |
+
- "continuous-time stochastic process: Itô SDE"
|
| 299 |
+
- "score function s(x,t) = ∇_x log p_t(x) as central object"
|
| 300 |
+
- "denoising score matching: ||s_θ(x_t,t) - ∇ log p(x_t|x_0)||²"
|
| 301 |
+
- "probability flow ODE for deterministic sampling (same marginals)"
|
| 302 |
+
- "ancestral sampling via SDE discretization (Euler-Maruyama, etc.)"
|
| 303 |
+
examples:
|
| 304 |
+
- "DDPM = diffuse(Gaussian forward + learned reverse)"
|
| 305 |
+
- "Score-based SDE = diffuse with VP/VE/sub-VP SDEs"
|
| 306 |
+
- "Cold diffusion = diffuse with arbitrary degradation (not just Gaussian)"
|
| 307 |
+
status: seed
|
| 308 |
+
|
| 309 |
+
- id: contrastivize
|
| 310 |
+
name: contrastivize
|
| 311 |
+
decomposes_to: [infonce, contrastive_learning, mutual_info_max]
|
| 312 |
+
description: >
|
| 313 |
+
Convert a generative/similarity objective into a contrastive one:
|
| 314 |
+
pull positive pairs together, push negative pairs apart. The core
|
| 315 |
+
operation is maximize I(x; y) or its lower bound via noise-contrastive
|
| 316 |
+
estimation. Any embedding method can be contrastivized by defining
|
| 317 |
+
positive pairs (e.g., augmentations of same instance) and negative
|
| 318 |
+
pairs (other instances).
|
| 319 |
+
input_constraints:
|
| 320 |
+
meso_types:
|
| 321 |
+
- joint_embedding
|
| 322 |
+
- linear_projection
|
| 323 |
+
output_signature:
|
| 324 |
+
meso_type: joint_embedding
|
| 325 |
+
objective_family: information # mutual information lower bound
|
| 326 |
+
preserves: false
|
| 327 |
+
preserves:
|
| 328 |
+
- "the encoder architecture"
|
| 329 |
+
introduces:
|
| 330 |
+
- "InfoNCE loss: -log(exp(sim(z_i, z_i^+)/τ) / Σ_j exp(sim(z_i, z_j)/τ))"
|
| 331 |
+
- "temperature parameter τ controlling hardness"
|
| 332 |
+
- "negative sampling strategy"
|
| 333 |
+
- "uniformity + alignment decomposition (Wang & Isola 2020)"
|
| 334 |
+
examples:
|
| 335 |
+
- "SimCLR = contrastivize(ResNet encoder) with image augmentations"
|
| 336 |
+
- "CLIP = contrastivize(dual encoder) with image-text pairs"
|
| 337 |
+
- "SimSiam = contrastivize without negatives (stop-gradient trick)"
|
| 338 |
+
status: seed
|
| 339 |
+
|
| 340 |
+
- id: adversarize
|
| 341 |
+
name: adversarize
|
| 342 |
+
decomposes_to: [gan, wasserstein_distance, js_divergence]
|
| 343 |
+
description: >
|
| 344 |
+
Convert an optimization (typically generative) into a two-player
|
| 345 |
+
minimax game: min_θ max_φ V(θ, φ). Player G (generator) minimizes;
|
| 346 |
+
Player D (discriminator/critic) maximizes. At Nash equilibrium (if
|
| 347 |
+
reached), G's distribution matches the target. This is functionally
|
| 348 |
+
equivalent to minimizing a divergence (JS, Wasserstein, etc.) but
|
| 349 |
+
the adversarial formulation replaces the explicit density with a
|
| 350 |
+
learned critic.
|
| 351 |
+
input_constraints:
|
| 352 |
+
formalisms: [] # any generative model
|
| 353 |
+
output_signature:
|
| 354 |
+
meso_type: game_theoretic
|
| 355 |
+
objective_family: adversarial
|
| 356 |
+
preserves: false
|
| 357 |
+
preserves:
|
| 358 |
+
- "the generator architecture"
|
| 359 |
+
introduces:
|
| 360 |
+
- "minimax objective: min_G max_D V(D,G)"
|
| 361 |
+
- "learned divergence: the critic D implicitly defines the loss"
|
| 362 |
+
- "mode collapse risk (especially with JS-GAN)"
|
| 363 |
+
- "training instability from non-stationary objectives"
|
| 364 |
+
examples:
|
| 365 |
+
- "GAN = adversarize(Gaussian latent generator + CNN discriminator)"
|
| 366 |
+
- "WGAN = adversarize with Wasserstein critic + gradient penalty"
|
| 367 |
+
- "Adversarial autoencoder = adversarize(AE latent regularizer)"
|
| 368 |
+
status: seed
|
| 369 |
+
|
| 370 |
+
- id: regularize
|
| 371 |
+
name: regularize
|
| 372 |
+
decomposes_to: [ridge_regression, lasso, elastic_net]
|
| 373 |
+
description: >
|
| 374 |
+
Add a penalty term to the objective: L_total = L_task + λ·R(θ).
|
| 375 |
+
Common R: L2 (weight decay — Gaussian prior), L1 (sparsity — Laplace prior),
|
| 376 |
+
dropout (stochastic regularization — approximate Bayesian model averaging),
|
| 377 |
+
spectral norm (Lipschitz constraint).
|
| 378 |
+
input_constraints: {} # any optimization
|
| 379 |
+
output_signature:
|
| 380 |
+
preserves: false
|
| 381 |
+
preserves:
|
| 382 |
+
- "the task objective L_task"
|
| 383 |
+
- "the optimization algorithm"
|
| 384 |
+
introduces:
|
| 385 |
+
- "regularization penalty λ·R(θ)"
|
| 386 |
+
- "bias-variance tradeoff via λ"
|
| 387 |
+
- "Bayesian interpretation: R(θ) = -log p(θ)"
|
| 388 |
+
examples:
|
| 389 |
+
- "Weight decay = regularize(SGD, L2)"
|
| 390 |
+
- "LASSO = regularize(OLS, L1)"
|
| 391 |
+
- "Elastic Net = regularize(OLS, L1+L2)"
|
| 392 |
+
- "Dropout = regularize with stochastic binary mask"
|
| 393 |
+
status: seed
|
| 394 |
+
|
| 395 |
+
# =============================================================================
|
| 396 |
+
# 4. OBJECTIVE TRANSFORMS
|
| 397 |
+
# =============================================================================
|
| 398 |
+
|
| 399 |
+
- id: predict_in_codomain
|
| 400 |
+
name: predict_in_codomain
|
| 401 |
+
decomposes_to: [cca, kernel_cca]
|
| 402 |
+
description: >
|
| 403 |
+
Instead of predicting in the original data space, predict in a transformed
|
| 404 |
+
(typically lower-dimensional or structured) latent space. The prediction
|
| 405 |
+
target is not x_{t+1} but z_{t+1} = f(x_{t+1}) where f is an encoder.
|
| 406 |
+
This is the core operation in JEPA and related architectures. It is
|
| 407 |
+
equivalent to applying a projection before a prediction objective.
|
| 408 |
+
input_constraints: {} # any predictive model
|
| 409 |
+
output_signature:
|
| 410 |
+
preserves: true
|
| 411 |
+
preserves:
|
| 412 |
+
- "the predictive architecture"
|
| 413 |
+
- "the objective form (MSE, contrastive, etc.)"
|
| 414 |
+
introduces:
|
| 415 |
+
- "encoder f mapping to latent space"
|
| 416 |
+
- "prediction target is f(x_target) not x_target"
|
| 417 |
+
- "the encoder acts as a regularizer: irrelevant variation is projected out"
|
| 418 |
+
- "connection to CCA: if encoders maximize correlation and predictor is linear"
|
| 419 |
+
examples:
|
| 420 |
+
- "JEPA = predict_in_codomain(joint_embedding) = CCA in latent space"
|
| 421 |
+
- "BYOL = predict_in_codomain(contrastive without negatives)"
|
| 422 |
+
- "World models / Dreamer: predict in latent dynamics space"
|
| 423 |
+
status: seed
|
| 424 |
+
|
| 425 |
+
- id: minimize_energy
|
| 426 |
+
name: minimize_energy
|
| 427 |
+
decomposes_to: [free_energy_min, hopfield_network, boltzmann_distribution]
|
| 428 |
+
description: >
|
| 429 |
+
Reframe the problem as energy minimization over a scalar field E(x).
|
| 430 |
+
The solution is x* = argmin E(x). Training = shape the energy landscape
|
| 431 |
+
so that desired configurations are low-energy and undesired ones are
|
| 432 |
+
high-energy. This is the universal statistical physics framing of
|
| 433 |
+
learning: any loss function is an energy function, and any optimizer
|
| 434 |
+
is doing energy minimization.
|
| 435 |
+
input_constraints: {} # any optimization
|
| 436 |
+
output_signature:
|
| 437 |
+
objective_family: energy
|
| 438 |
+
meso_type: energy_model
|
| 439 |
+
preserves: false # reframes the objective
|
| 440 |
+
preserves:
|
| 441 |
+
- "the optimal point x*"
|
| 442 |
+
- "the gradient field ∇E(x) (visible in Langevin sampling)"
|
| 443 |
+
introduces:
|
| 444 |
+
- "energy landscape E(x) as central object"
|
| 445 |
+
- "Boltzmann distribution: p(x) ∝ exp(-βE(x))"
|
| 446 |
+
- "free energy: F = -β^{-1} log ∫ exp(-βE(x)) dx"
|
| 447 |
+
- "sampling = Langevin dynamics on E(x)"
|
| 448 |
+
examples:
|
| 449 |
+
- "Hopfield network = minimize_energy(associative memory)"
|
| 450 |
+
- "Energy-Based Models (EBM): directly parameterize E_θ(x)"
|
| 451 |
+
- "Score-based models: s_θ(x) = -∇_x E_θ(x)"
|
| 452 |
+
status: seed
|
| 453 |
+
|
| 454 |
+
- id: variational_bound
|
| 455 |
+
name: variational_bound
|
| 456 |
+
decomposes_to: [elbo, variational_inference, kl_divergence_min]
|
| 457 |
+
description: >
|
| 458 |
+
Replace an intractable marginal likelihood log p(x) with a tractable
|
| 459 |
+
lower bound (ELBO): log p(x) ≥ E_q[log p(x|z)] - KL(q(z|x) || p(z)).
|
| 460 |
+
The bound is tight when q(z|x) = p(z|x). The gap is exactly KL(q||p(z|x)).
|
| 461 |
+
This is the fundamental operation behind VAEs, variational inference,
|
| 462 |
+
and any method that replaces exact inference with amortized inference.
|
| 463 |
+
input_constraints:
|
| 464 |
+
meso_types:
|
| 465 |
+
- variational
|
| 466 |
+
- probabilistic_inference
|
| 467 |
+
output_signature:
|
| 468 |
+
objective_family: divergence
|
| 469 |
+
preserves: false
|
| 470 |
+
preserves:
|
| 471 |
+
- "the generative model p(x|z) and prior p(z)"
|
| 472 |
+
introduces:
|
| 473 |
+
- "inference network q(z|x) (amortized inference)"
|
| 474 |
+
- "ELBO as surrogate objective"
|
| 475 |
+
- "reparameterization trick for gradient estimation"
|
| 476 |
+
- "KL gap: tightness depends on q's expressiveness"
|
| 477 |
+
examples:
|
| 478 |
+
- "VAE = variational_bound(encode_decode with stochastic latent)"
|
| 479 |
+
- "IWAE: tighter bound with importance weighting"
|
| 480 |
+
- "β-VAE: β-weighted KL term for disentanglement"
|
| 481 |
+
status: seed
|