Guarantees on Dynamical System Distinguishability for LLM Token Generation

binary hypothesis testingdynamical systemsembedding model transferlarge language modelssequence length scalingstatistical distinguishabilitytoken embeddings
## Abstract Recent research has demonstrated that responses from large language models (LLMs) can be identified by modeling token embeddings as trajectories of a black-box dynamical system (DS). This approach compares prediction residuals between two DSs to classify outputs, achieving empirical success across various benchmarks. However, the theoretical foundations remain largely unexplored—why this method works, how its performance scales with token sequence length, and under what conditions it generalizes across different embedding models. This paper addresses these gaps by formalizing the classification task as a binary hypothesis test between two stochastic linear dynamical systems. We first show that the total variation distance between the stationary marginal distributions of the two DSs can be arbitrarily small even when their underlying dynamics differ substantially. This result establishes a fundamental accuracy floor for any classifier that ignores token dynamics. We then prove that the misclassification probability of DS-based classification decays exponentially with sequence length L, where the decay rate is governed by a dynamical discriminability quantity δ² that captures the spectral distance between the two systems. Furthermore, we characterize cross-embedding generalization by introducing an approximate intertwining condition between embedding models. We establish a lower bound on transferable discriminability in terms of the smallest singular value of the intertwining map. Collectively, these results provide a rigorous explanation for the empirical performance of DS-based classification and motivate further investigation into applying dynamical systems theory to analyze AI systems—an inversion of the more common approach of using AI to model dynamical systems.

via ArXiv LG

Related