
Deep Dive
The Blackbox Myth: Determinism in AI
September 18, 2025 · 6 min read · By Yusuf Tunc Karadut
The "blackbox" narrative is convenient but wrong. AI models are sequences of math operations. The perceived randomness isn't mystical; it's floating-point arithmetic behaving exactly as designed. Control the arithmetic, control the output.
Where the "Randomness" Actually Comes From
Deep learning runs on matrix multiplication: billions of additions and multiplications using the IEEE 754 floating-point standard. Here's the problem: floating-point addition isn't associative. (a + b) + c ≠ a + (b + c) when you're rounding at each step. Add numbers in a different order, get a different answer.
Modern inference spreads computation across multiple GPUs using Tensor Parallelism. Partial results get combined via All-Reduce operations. The order of that combination depends on how many GPUs you're using, which communication algorithm the library picks, and how threads happen to schedule. Different order, different rounding, different result.
The variations are tiny, around 10⁻⁸. But neural networks are non-linear. A microscopic difference in one token's logit can flip which token gets selected. Since LLMs are autoregressive (each token depending on all previous tokens), one flip cascades. The butterfly effect, but in token space.
The Fix: Tree-Based Invariant Kernels
Recent work on Tree-Based Invariant Kernels (TBIK) solves this. The approach enforces a fixed hierarchical binary tree topology for all reduction operations, regardless of hardware configuration. Same arithmetic sequence every time. Run it on 2 GPUs or 8 GPUs, producing bit-identical results.
This matters beyond reproducibility. It bridges training and inference environments, prevents the precision mismatches that destabilize reinforcement learning pipelines, and enables proper regression testing. You can build golden sets. You can cache. You can treat f(x) = y as an engineering contract, not a prayer. The principles here are also broadly applicable to other runtime environments.
Anthropic's interpretability research demonstrates that model internals can be decomposed into understandable components. Templeton, Conerly, Marcus et al. extracted millions of interpretable features from Claude 3 Sonnet, showing that what appears opaque can be systematically analyzed.
Sources
Chen, Y., et al. (2025)
Understanding and Mitigating Numerical Sources of Nondeterminism in LLM Inference
arXiv:2506.09501Templeton, A., Conerly, T., Marcus, J., et al. (2024)
Scaling Monosemanticity: Extracting Interpretable Features from Claude 3 Sonnet
Anthropic Research