About
The book, its author, and related research.
About the BookExpand / collapse
Learn Generative AI Without LLM Complexity
A comprehensive introduction using a Tiny Inference Model (TIM).
The book explores encoding, learning, and inference using the Tiny Inference Model (TIM), a deliberately small system whose operations and choices readers can inspect directly. The emphasis is on understanding fundamental processes without starting with the complexity of large language models.
View Table of Contents
- Forewordii
- AI Disclosure Statementv
- A Note on AI and Ethicsvii
- 1 Introduction1
2 What Is a Generative AI System?12
- 2.0.1 Optional Pre-Learning14
- 2.0.2 Inference16
- 3 Pedagogical Structure of the Book19
4 The AI Process: Training and Inference22
- 4.1 OPTIONAL PRE-LEARNING23
- 4.2 Inference24
- 4.3 The Same General Process at Different Scales25
5 The Tiny Inference Model27
- 5.1 The Logical Structure of TIM27
- 5.2 The TIM Domain28
5.3 Two Characterizations of the Same Domain31
- 5.3.1 LOW RES: A Learned Domain Characterization31
- 5.3.2 HIGH RES: A Directly Supplied Domain Characterization32
- 5.4 Inference33
- 5.5 Why TIM Uses Two Resolution Modes34
- 5.6 TIM’s Logical Structure35
6 Encoding36
- 6.1 Alternative Encodings40
6.2 Encoding in Large Language Models45
- 6.2.1 A Large Language Model Tokenization Example46
7 Learning49
- 7.1 Recursive Least Squares Learning50
- 7.2 Prediction51
- 7.3 Difference52
- 7.4 Parameter Update52
- 7.5 Freezing the Parameter Weights54
- 7.6 Alternative Learning Techniques and Representations54
8 Generating the Learned Weights58
8.1 Generating the Training Data59
- 8.1.1 The True Terrain59
- 8.1.2 Generating Noisy Training Observations61
- 8.1.3 The Nine-Parameter Representation65
- 8.2 Encoding65
- 8.3 Recursive Least Squares67
8.4 Reading the TIM Learning Excel Sheet74
- 8.4.1 Training Data74
- 8.4.2 Encoding Area76
- 8.4.3 Learning and Weight Updates77
- 8.4.4 Parameter Uncertainty77
- 8.5 Conclusion78
9 The “Generative” in Generative AI79
- 9.1 Defining Generative AI81
- 9.2 What Makes an AI System Generative ?81
9.3 The Prompt-Dependent Portion84
- 9.3.1 GENERATE INCREMENTAL RESULT (OR FINAL RESULT)85
- 9.3.2 SHOULD WE STOP?85
- 9.4 The Prompt-Independent Portion86
- 9.5 The Generation Loop86
- 9.6 Incremental Construction88
- 9.7 Goal-Directed Generation88
- 9.8 Conclusion: The Generation Loop89
- 10 The TIM Inference Prompt91
11 The HTML/JavaScript Implementation of TIM97
- 11.1 The TIM Application97
- 11.2 Inference98
- 11.3 Training100
- 11.4 Visualization102
- 11.5 LLM Prompt Generator104
- 11.6 Documentation105
- 11.7 Using an LLM to Explore the TIM Source Code106
- 11.8 Validation of TIM’s Output Route107
12 The Generation Loop in Two Lines of Code110
- 12.1 Where Is the Complexity111
- 12.2 Generation and Incorporation112
- 12.3 The Forest Concept112
13 Generation Loops in LLM-Based Systems114
- 13.1 The Token-Generation Loop115
- 13.2 The Thought-Generation Loop115
- 13.3 Nested Generation Loops116
13.4 A Simple Example118
- 13.4.1 The Mathematical Problem118
- 13.4.2 How the Two Generation Loops Produce the Answer120
- 13.4.3 The Nested Structure122
- 13.5 The Same General Structure123
- 13.6 Comparison with TIM124
- 13.7 A Forest Concept124
- 14 TIM and LLMs: Similarities and Differences126
15 Church, Functional Composition, and Recursive Self-Improvement130
- 15.1 Church’s Functional Formulation of Computation130
- 15.2 Church’s Lambda Calculus in Modern Terms131
- 15.3 Functional Composition133
- 15.4 Recursive Composition134
- 15.5 From Recursive Composition to Capability135
- 15.6 Self-Improvement Is an Increase in Capability136
- 15.7 Recursive Self-Improvement137
- 15.8 What Church Does and Does Not Tell Us138
- 15.9 A Note on Church and Turing140
- 15.10A Forest Concept140
16 Repurposing and Dual Use143
16.1 Case Study: Dual Use145
- 16.1.1 Greatest Unobstructed View146
- 16.1.2 Least Visible Location148
- 16.2 What the Experiments Demonstrate151
- 17 What has TIM Taught Us?153
- 18 Conclusion164
- A Using AI as a Learning Tool166
- B Batch and Recursive Calculation of an Average168
- C Derivation of Ordinary Least Squares for a Straight Line172
- D Derivation of Recursive Least Squares for a Straight Line178
E A Practical Introduction to Vectors and Matrices188
- E.1 Scalars189
- E.2 Vectors189
- E.3 Matrices190
- E.4 Matrix Dimensions190
- E.5 The Transpose191
- E.6 Vector Addition and Scalar Multiplication192
- E.7 The Dot Product193
- E.8 Matrix Multiplication194
- E.9 The Identity Matrix196
- E.10 The Matrix Inverse196
- E.11 The Pseudoinverse198
- E.12 Matrix Differentiation200
- E.13 The Matrix Tools Needed for Least Squares201
- E.14 Matrix Partitioning202
- F Matrix Derivation of Ordinary and Recursive Least Squares204
G Recursive Least Squares for a Nine-Parameter Surface227
- G.1 The Complete Recursive Calculation236
- G.2 Initializing the RLS Recursion241
- G.3 Training the Nine-Parameter Tiny Inference Model (TIM)244
- G.4 Generating the Training Locations245
- G.5 Calculating the True Terrain245
- G.6 Adding Measurement Noise246
- G.7 Specification of Measurement Noise247
- G.8 Example Training Observations247
- G.9 Different Training Sets Produce Different Learned Models248
- G.10 Probabilistic Training and Deterministic Trained Models250
- G.11 A Probabilistic Model Can Produce Deterministic Outputs251
- G.12 Derivation of Relative and Absolute Parameter Uncertainty254
H Inference Using the Tiny Inference Model261
- H.1 The Prompt262
- H.2 Candidate Generation263
- H.3 Constraints263
- H.4 Costs265
- H.5 Candidate Selection266
- H.6 The Generation Loop267
- H.7 Stopping Conditions268
- H.8 What Is and Is Not Learned During Inference269
- H.9 Summary269
I Expanding a Trained Model Without Retraining from Scratch271
- I.1 Case 1: Additional Training Data272
- I.2 Case 2: Expanding the Domain273
- I.3 Case 3: Increasing the Number of Characterization Parameters274
- I.4 Partitioning the Least-Squares Problem276
- I.5 Using What the Existing Model Has Already Learned277
- I.6 Estimating the Newly Added Parameters278
- I.7 What Must Be Retained279
- I.8 Partitioning and Segregated Information280
- I.9 Conclusion281
J Independent Replication by General-Purpose LLMs.282
- J.1 Independent LLM Replication Test282
- K TIM JAVASCRIPT CODE287
L Programming with LAMBDA in Excel and Google Sheets292
- L.1 A LAMBDA Is a Function293
- L.2 Naming a Function294
- L.3 LET: Giving Names to Intermediate Results295
- L.4 The Result Convention297
- L.5 A Function Can Return an Array299
- L.6 Iteration Without Explicit Loops300
- L.7 MAP: Many to Many301
- L.8 REDUCE: Many to One302
- L.9 Functions Can Call Other Functions304
- L.10 LAMBDA as a Programming Model305
- L.11 Excel and Google Sheets306
- M TIM EXCEL LAMBDA CODE307
N Other Small and Inspectable AI Models314
- N.1 Related Educational Models315
- N.2 A Pedagogical Progression316
- About the Author319
About the AuthorExpand / collapse
Leonard Brown began his career in mathematical modelling of inertial navigation systems, Kalman filtering, and under-characterized estimation (representing a high-dimensional system using a deliberately simplified model) before moving into quantitative finance, where he worked in derivatives and financial markets at J.P. Morgan. He holds a Bachelor of Science in Electrical Engineering (BSEE) from the Indiana Institute of Technology and an MBA from the UCLA Anderson School of Management.
Throughout his career, Mr. Brown has sought to make complex technical subjects understandable through two complementary approaches: identifying their underlying principles and building working, inspectable computer models that demonstrate those principles in practice.
He taught advanced financial derivatives at New York University’s School of Continuing and Professional Studies (NYU SCPS, now NYU SPS) and served as Head of Exotics and Hybrids Derivatives Education at J.P. Morgan. In teaching derivatives, for example, he emphasized the relatively simple concept of risk-neutral expectations (weighted averages) rather than relying on the complex mathematical machinery of stochastic calculus. He reinforced these explanations by constructing working models that allowed students to observe and explore the underlying mechanisms. Together, these approaches made sophisticated derivatives theory accessible to a much broader audience.
He applied the same philosophy to generative AI. His background in inertial navigation, mathematical modelling, and recursive estimation led him to consider whether the fundamental processes of generative AI could be explained without the complexity of large language models. Rather than beginning with LLM technology, he sought to identify the underlying principles and build a small, fully inspectable system that demonstrated those principles in operation. That approach ultimately led to the development of the Tiny Inference Model (TIM), a nine-parameter generative AI system that does not rely on LLM technology. As with his approach to teaching derivatives, his objective was to make generative AI, its underlying mechanisms, capabilities, limitations, and broader implications accessible to a much wider audience.
Consistent with his approach to teaching, the book combines accessible explanations with mathematical rigor. A detailed understanding of the mathematics is not required to grasp the fundamental concepts of generative AI presented in the book; a conceptual understanding is sufficient. Moreover, the more advanced mathematics is largely confined to the learning process, particularly the recursive least squares (RLS) algorithm. Encoding requires only elementary mathematics, while the generation loop itself is computationally straightforward.
For readers who wish to explore the mathematics in greater depth, the mathematical appendices develop the necessary concepts step by step from first principles, with minimal assumptions about the reader’s mathematical background. For example, the appendices begin with the calculation of simple averages and progressively develop the mathematics underlying TIM’s matrix recursive least squares learning algorithm. Although some readers may find the early steps elementary or repetitive, this deliberate approach is intended to make the material accessible to readers with widely differing mathematical backgrounds. Readers can therefore understand not only how the system learns, but why the mathematics works, examining the complete learning process rather than treating it as a black box.
Additionally, all mathematical appendices are available for download in AI-readable formats, enabling readers to use AI tools to explore the material, request explanations, and work through mathematical concepts at their own pace and level of understanding.
Building on this foundation, the book explores broader questions concerning the reuse and repurposing of AI systems, computational universality, and recursive self-improvement. Underlying these discussions is the conviction that important decisions about the development, use, and regulation of AI should be grounded in knowledge and understanding of the fundamental principles of generative AI, rather than assumptions and speculation.
Mr. Brown makes no claim to be an expert in artificial intelligence, particularly large language models. His aim was not to replicate an LLM's capabilities, but to reproduce, on a deliberately small scale, some of the fundamental processes associated with LLMs—encoding, learning, and inference—using a system whose operations can be directly observed, examined, and understood.
Now retired, he pursues independent research into generative AI and accounting, a discipline whose underlying mathematical structure is far richer and more interesting than its everyday practice might suggest. His accounting research, documented in working papers available on SSRN, has included deriving double-entry accounting from first principles and developing more effective and efficient mathematical representations of double-entry accounting. Consistent with his approach to teaching and research, most of these papers are accompanied by working computer models that demonstrate the underlying principles.
Developing TIM and writing Learn Generative AI Without LLM Complexity proved to be an extraordinary learning experience, and he hopes readers will find it equally rewarding.
Additional materials, interactive demonstrations, and working implementations are available at 9ParmAI.com.
Research and PublicationsExpand / collapse
Selected working papers by Leonard Brown are grouped below by research area. The paper titles link directly to their SSRN abstract pages. Where available, accompanying working models can be linked alongside the papers.
Artificial Intelligence and AI Safety (3 papers)
- Securing Bounded-Domain LLM Systems Using Deterministic Natural-Language Security Gateways SSRN 7381439 · 2026
- Alignment of Ends Does Not Guarantee Acceptable Means SSRN 7463401 · 2026
- How AI Self-Optimization Can Occur Without Anticipation, Retrospection, or Intentionality SSRN 7489478 · 2026
Derivatives and Quantitative Finance (2 papers)
- A DIY Configurable Asymmetric Heavy-Tailed Distribution SSRN 6630058 · 2026
- Commodity Forward Curves as Marginal Costs of Guaranteed Delivery Across Time SSRN 7329042 · 2026
Mathematical Foundations and Representations of Accounting (5 papers)
Presented chronologically to show the development of the accounting research.
-
A Mathematical Derivation of the Rules Governing Debits and Credits: The Foundation of Double-Entry Bookkeeping
SSRN 5072107 · 2024 · Early research — subsequently withdrawn
An early step toward the author's later accounting framework. This paper was withdrawn after the author identified a conceptual limitation in its treatment of stock and flow variables. It is included to document the progression of the research toward the subsequent closed-flow approach.
- Deriving Closed-Flow Accounting Systems from First Principles SSRN 6428219 · 2026
- Double-Entry Accounting Relationships: A Derivation from First Principles SSRN 6971478 · 2026
- Single-Entry Bookkeeping: Definitional Ambiguities SSRN 7331018 · 2026
- A Single Matrix Representation of Closed-Flow Accounting SSRN 7330938 · 2026