# Algebraic Decomposition and Deterministic Compression in LLM Training A discussion exploring alternatives to gradient-based training using lossless compression schemes, locality-sensitive hashing, and algebraic structures (lattices, type systems, category theory, elliptic curves) that could enable true incremental learning without the "holographic effect." --- ## Part 1: Deterministic Compression vs. Sampling/Quantization ### The Problem Current LLM training suffers from a fundamental mismatch: - **Input**: Discrete tokens (finite vocabulary, combinatorial structure) - **Processing**: Continuous floating-point operations - **Output**: Discrete tokens (via sampling/argmax) Each new parameter affects almost the entire graph, effects are discrete and thus imprecise, and there's a limit to precision based on memory bandwidth. This raises the question: if language is inherently discrete, why use approximation-based methods? ### Lossy vs. Lossless Approaches | Type | Examples | Characteristics | |------|----------|-----------------| | **Lossy** | DCT (JPEG, MP3), wavelets (Dirac) | Approximation, quantization | | **Lossless** | Huffman, arithmetic coding, LZ77/78, RLE, FLAC, PNG | Exact reconstruction, algebraic | For discrete data like human language or computer code, approximation may be the wrong approach if we want to minimize computation, memory copying, and rounding errors. ### Research in Deterministic/Algebraic Directions #### 1. Minimum Description Length / Kolmogorov Complexity The most principled connection to compression. Solomonoff induction states: the best model is the shortest program generating the data. This IS deterministic. Work by Rissanen and Grünwald on MDL formalized this. The limitation: computing Kolmogorov complexity is uncomputable in general, so we approximate. #### 2. Hopfield Networks and Modern Associative Memory Classical Hopfield networks store patterns via outer products—algebraically exact for capacity up to ~0.14N patterns. Recent work (Ramsauer et al., 2020) connects modern Hopfield networks to transformer attention. These have more algebraic flavor—energy minimization with discrete attractors. #### 3. Transformers as Weighted Finite Automata Theoretical work (Merrill, Sabharwal, and others) analyzes what formal languages transformers can represent. If a transformer IS a finite automaton, there might be ways to construct/train it more directly. Related: whether transformers can be represented as tensor networks with exact decompositions. #### 4. Sparse and Binary Networks Binary neural networks (Courbariaux et al.), ternary quantization—keeping weights in {-1, 0, +1}. These ARE discrete, but typically still trained via gradient descent with straight-through estimators. Not truly algebraic training. #### 5. Program Synthesis / Neuro-Symbolic AI If language models are "compressed programs," why not search program space directly? Work on neural program induction, differentiable interpreters. The DREAMCODER system (Ellis et al.) learns compositional libraries. More algebraic, but doesn't scale to LLM-level complexity yet. #### 6. Arithmetic Coding Connection A well-trained language model IS optimal compression via arithmetic coding. If a model assigns probability p(x_i | x_{