May 23, 2026
While large-scale models such as LLMs and diffusion models have achieved practical success, public institutions have emphasized the importance of explainability in AI. Existing methods for explaining AI, however, are not designed to provide completely faithful explanations of the behavior of large-scale AI systems. Although a completely faithful and interpretable explanation of the behavior of an AI system might be useful for AI governance, it has not been known whether providing such an explanation is theoretically possible. In this paper, we mathematically prove a fundamental quadrilemma in explaining AI, stating that AI and its explanation cannot satisfy the following four conditions simultaneously: 1) the complexity of the operation environment, 2) the goodness of the AI’s performance, 3) the interpretability of the AI’s explanation, and 4) the complete faithfulness of the AI’s explanation. This quadrilemma suggests that, in most applications where we cannot change the environment or sacrifice good AI performance and an interpretable explanation, we should give up complete faithfulness of explanations and should instead aim to explain only the parts that are important for applications. As a consequence, the quadrilemma implies that AI governance should be designed on the premise that the faithfulness of AI explanations is always incomplete.
With the major successes of GPT-2 [1] and latent diffusion models [2] as milestones, large-scale AI systems such as large language models (LLMs) and diffusion models have achieved success on various tasks, including question-answering and text-to-image generation. These AI systems define input-output relations that return desirable outputs to user inputs, either deterministically or stochastically. As large-scale AI systems achieve industrial success even on complex tasks, public institutions have emphasized the importance of explainability in AI (e.g., NIST, US [3], European Data Protection Supervisor, EU [4]). However, existing methods for explaining AI are not designed to provide a completely faithful explanation of the behavior of a practical AI system so that the explanation can describe the whole behavior of the AI system and distinguish it from any other AI systems. For example, some provide numerical sequences corresponding to only a part of the properties of practical AI systems used for complex tasks such as general-purpose chat AI, for example local properties or scalarized outputs (e.g., SHAP [5] and its derivative studies [6], integrated gradients [7], integrated Hessians [8], NormLIME [9], Grad-CAM [10] and its derivative methods [11]–[13], counterfactual explanations [14], and algorithmic recourse [15]), some generate text describing a part of such properties (e.g., [16]–[18]), others construct surrogate models whose performance is reduced for the sake of explanation (e.g., LIME [19], Anchors [20], GLocalX [21], GLEAMS [22], and decision-tree-based methods [23]–[26]). The lack of faithfulness in AI explanations has often been recognized as a current problem [27], [28]. If a practical AI system could be equipped with an interpretable explanation that is completely faithful to its behavior, AI governance might become easier. However, whether providing such an explanation is possible in principle has not been clarified. Therefore, this paper asks the following research question: under a complex environment, does there exist a pair consisting of an AI system with sufficiently good performance for practical use and its explanation that is completely faithful to its behavior and interpretable to humans?
This paper answers the above research question negatively. Specifically, with our novel inequality, we mathematically show that there is a fundamental quadrilemma stating that an AI system and its explanation cannot simultaneously satisfy the following four conditions (See Figure 1 for the conceptual diagram).
Complexity of the operation environment: The AI operates under an environment in which the true input-output relation is complex.
Goodness of the AI’s performance: The AI’s performance is sufficiently good.
Interpretability of the AI’s explanation: The explanation is interpretable to humans.
Complete faithfulness of the AI’s explanation: The explanation is completely faithful to the behavior of the AI.
Although this quadrilemma is logically a negative statement, it provides guidance for the field of AI explanation as to which conditions should be prioritized and which condition should be sacrificed. More specifically, in applications involving natural language or image generation, such as recent large-scale AI systems, it is unavoidable to operate in environments where the true input-output relation is complex. Moreover, the goodness of performance and the interpretability of explanations cannot be sacrificed. Therefore, in many cases, one should give up the requirement that explanations be completely faithful to AI behavior. This conclusion justifies the direction of existing AI explanation methods, which are not designed to provide completely faithful explanations. The quadrilemma in this paper suggests that future research on AI explanation methods should not attempt to provide completely faithful explanations of AI behavior, but should instead be designed to explain only those parts of AI behavior that are important for applications, and that industry and public institutions should design AI governance on the premise that AI explanations will continue to be unfaithful.
One significant strength of this paper is that the quadrilemma is given mathematically as a form of an inequality without ambiguity. While the incompleteness of definitions of the relevant concepts has often been regarded as a problem in the field of AI explanation (e.g., [29], [30]), in this paper, in contrast, the necessary conditions for the four conditions appearing in the quadrilemma are all mathematically formulated, which enables avoiding ambiguity in our result. Specifically, the necessary conditions for the four conditions are formulated as follows. Firstly, the goodness of AI performance is formulated by using perplexity, which is a basic performance metric in natural language processing. Secondly, the complete faithfulness of an AI explanation is formulated by requiring not only that the explanation uniquely specify the behavior of the AI, but also that, under an appropriate interpretation program, the concrete probability distribution of the output can be approximately computed to arbitrary precision from the explanation and the input string. This is because, if simple injectivity from behaviors to strings were adopted as the definition of complete faithfulness, then meaningless assignments to strings would be allowed as long as there were no duplicates. Thirdly, as a necessary condition for the interpretability of an explanation, we adopt the shortness of the explanation. The shortness of the explanation is not sufficient, but necessary for the explanation to be interpretable since human capacity to read and remember text is limited [31] [32] (See also Appendix 6). The trick here is that, generally speaking, we can prove an impossibility, like a quadrilemma, by refuting a necessary condition only, without proving the original condition. This trick releases us from the difficulty in formulating the interpretability of explanations directly, which has often been pointed out in the field of AI explanation [29], [30]. As a result, we can substitute the shortness, which is easy to handle mathematically, for the interpretability in proving the quadrilemma. Fourthly, we use Kolmogorov complexity, a classical information-theoretic measure, to quantify the complexity of the operation environment. The nontrivial issue is which object’s Kolmogorov complexity to use. Interestingly, this study proves that naïvely choosing the Kolmogorov complexity \(C (P (\cdot \mid \cdot))\) of the conditional probability mass function \(P (\cdot \mid \cdot)\) of the operation environment as a measure of the complexity of the operation environment fails to describe the limitations on AI performance and explanation shortness. To avoid this problem, this paper adopts the true expectation of conditional Kolmogorov complexity, \(\operatorname{\mathbb{E}}_{X, Y \sim P} C (Y \mid X)\), as the measure of the complexity of the operation environment.
Under the above formulations of the four conditions, this paper proves an inequality stating that the sum of the expected logarithmic conditional perplexity and the length of a completely faithful explanation is, up to terms of logarithmic order or smaller, cannot be smaller than the true expectation of conditional Kolmogorov complexity. This means that, under a complex environment in which the true expectation of conditional Kolmogorov complexity is very large, either the expected logarithmic conditional perplexity becomes large, meaning AI’s poor performance, or the length of a completely faithful explanation becomes long, meaning losing interpretability of the explanation; thus, the quadrilemma arises. This inequality suggests that, unless one sacrifices AI performance, one must give up the complete faithfulness of explanations.
The contributions of this paper are as follows.
We prove a novel inequality showing a fundamental quadrilemma in explaining AI, stating that AI and its explanation cannot satisfy the following four conditions simultaneously: 1) the complexity of the operation environment, 2) the goodness of the AI’s performance, 3) the interpretability of the AI’s explanation, and 4) the complete faithfulness of the AI’s explanation.
We apply the derived inequality to practical applications and show that giving up complete faithfulness of AI explanations is unavoidable. We further justify, from the derived inequality, that explaining only part of the behavior of an AI system or using a surrogate model as an explanation can serve as a solution.
We demonstrate that the Kolmogorov complexity of the conditional probability mass function of the environment cannot describe the limitation on the goodness of AI performance and the interpretability of completely faithful explanations, and that instead we need to use the expectation of conditional Kolmogorov complexity as a measure of the complexity of the operating environment.
There are studies that discuss trade-offs concerning AI explanations, but to the best of the authors’ knowledge, there is no paper that discusses a trade-off among the complexity of the environment, AI performance, faithfulness of explanations, and interpretability. Zhang et al. [33] show, within the scope of removal-based explanations such as SHAP [5], the impossibility of simultaneously satisfying interpretability, consistency, and efficiency under a situation in which an interpretable function class is given in advance. However, the class of explanations is limited to removal-based explanations, and the interpretable class must be specified separately. Moreover, they do not clarify the trade-off with the performance of the AI that is explained by such explanations. Bilodeau et al. [34] also theoretically show limitations only within the scope of feature attribution methods such as SHAP [5], but their result is not a limitation on general explanation methods and does not clarify the trade-off with AI performance. Moreover, these studies do not analyze explanations that are completely faithful to AI behavior. Bressan et al. [35] discuss the trade-off between the height of a tree and approximation performance for a method that explains a model by a decision tree whose branching conditions are written in the form of indicator functions of subsets, and Frost et al. [36] discuss trade-offs of explanations based on decision lists. However, neither directly handles AI systems with stochastic input-output behavior, such as recent LLMs and diffusion models. In addition, explanations by decision trees or decision lists do not necessarily take into account explanations that are simplified by being structured with subroutines. The present study differs from previous studies in that it does not restrict the type of explanation, and shows a trade-off that takes into account all of the complexity of the environment, AI performance, complete faithfulness of explanations, and interpretability of explanations, in a setting that also includes stochastic input-output behavior.
This paper explains AI behavior from the viewpoints of Kolmogorov complexity and perplexity. Both are information-theoretically natural quantities. For example, Proposition 6 of Shportko [37] includes a relation between them, but it is in the context of steganography and does not directly provide implications for explainability. The relationship between LLMs and Kolmogorov complexity has recently been suggested in many studies [37]–[41], but to the best of the authors’ knowledge, there is no study that directly shows the impossibility of explanations based on this relationship.
The remainder of this paper is organized as follows. Section 3 formulates the problem setting considered in this paper and the four conditions appearing in the quadrilemma. Section 4 presents the inequality that gives the quadrilemma as the main result of this paper and explains its implications. It also explains that a naive method fails. Section 5 clarifies the limitations of the present method and suggests directions for future work.
The goal of this paper is to derive a quadrilemma concerning AI explanations. In this section, after giving a comprehensive definition of AI that includes LLMs and diffusion models, we mathematically rigorously define the four conditions appearing in the quadrilemma. We first introduce mathematical notation.
Notation: The set of nonnegative integers is denoted by \(\mathbb{N}\), the set of rational numbers by \(\mathbb{Q}\), and the set of real numbers by \(\mathbb{R}\). The set of natural numbers less than \(n\) is denoted by \(\mathbb{N}_{<n}\). That is, \(\mathbb{N}_{<n}=\{0,1,\ldots,n-1\}\). General sets are denoted by calligraphic letters such as \(\mathcal{X}\) and \(\mathcal{Y}\). For a set \(\mathcal{A}\), its cardinality is denoted by \(|\mathcal{A}|\). The set of all finite sequences consisting of elements of \(\mathcal{A}\) is denoted by \(\mathcal{A}^*\). That is, \(\mathcal{A}^* := \mathcal{A}^0 \cup \mathcal{A}^1 \cup \cdots\). Finite sequences are written in bold italic letters such as \(\boldsymbol{a}\), and their length is denoted by \(|\boldsymbol{a}|\). When we want to explicitly write the elements of a sequence, we write, for example, \(\boldsymbol{a}=(a_0,a_1,\ldots,a_{m-1})\). The concatenation of a string \(\boldsymbol{a}\) and a string \(\boldsymbol{b}\) is written as \(\boldsymbol{a}\cdot\boldsymbol{b}\). The empty sequence, that is, the sequence of length zero, is written as \(()\).
We first need to define AI mathematically. To make the scope of the theory as broad as possible, we want the definition of AI to be as broad as possible. Therefore, in this paper, we define AI as an input-output relation, defined on a computer, that is appropriate for solving the task we want to solve. For example, in the case of a general-purpose chat AI, the input is a string obtained by arranging the history of prompts entered by the user with tags, and the output is a string desired by the user. That is, a chat AI is an appropriate input-output relation whose input set is a set of strings and whose output set is a set of strings. In the case of text-to-image AI, the input is a prompt string, and the output is a vector representing integer values of each pixel of an image. That is, a text-to-image AI is an appropriate input-output relation whose input set is a set of strings and whose output set is a set of integer-valued vectors. We also want to include not only deterministic input-output relations but also stochastic input-output relations using pseudo-random numbers, as in LLMs and diffusion models. Here, the important point is that all functions constituting AI are computable. A function being computable means, intuitively, that it is a function that can be described by a finite string called a program. For a more detailed definition, see Appendix 7. Although the definition is cumbersome, the reasons for restricting the class of functions considered to computable functions are the following two points.
Since AI is a function implemented on a computer, it necessarily belongs to the class of computable functions, and it is sufficient to consider only that class.
The set of all general functions is uncountable, whereas explanations are finite strings, and the set of finite strings over a finite alphabet is at most countable. Therefore, assigning individual explanations to all general functions is trivially impossible, leaving no further room for consideration.
Based on the above considerations, we define a stochastic input-output AI composed of computable functions as follows. Let \(\Sigma\) be a finite alphabet with at least two elements, used by the computation model when defining computability. For the countable sets appearing below, we assume that encoding functions into \(\Sigma^*\) have been fixed, each of which is injective and has a computable (decidable) image, and that computability is defined based on these encodings. When \(f\) is a partial computable function with source set \(\mathcal{X}\) and target set \(\mathcal{Y}\), we write \(f:\subseteq \mathcal{X}\xrightarrow{\mathsf{comp}}\mathcal{Y}\). The domain of \(f\) is written as \(\operatorname{\mathsf{dom}}f\). If \(x \in \operatorname{\mathsf{dom}}f\) then we write \(f (x) \downarrow\).
Definition 1 (Stochastic input-output AI). Let the input space, or source set, be \(\mathcal{X}\) and the output space, or target set, be \(\mathcal{Y}\), and suppose that \(\mathcal{X}\) and \(\mathcal{Y}\) are at most countable. A stochastic input-output AI with domain \(\mathcal{X}'\subseteq\mathcal{X}\) that uses sequences of \(n\)-element uniform random numbers is a pair \(A=(f,\tau)\) consisting of a partial computable function \(f:\subseteq \big(\mathbb{N}_{<n}\big)^*\times\mathcal{X}\xrightarrow{\mathsf{comp}}\mathcal{Y}\), called the main function in this paper, which receives a random-number sequence and an input and returns an output, and a partial computable function \(\tau:\subseteq \big(\mathbb{N}_{<n}\big)^*\times\mathcal{X}\xrightarrow{\mathsf{comp}}\{0,1\}\), called the random-sequence acceptance decision function in this paper, satisfying the following properties.
Consistency between the main function and the domain. If \(\boldsymbol{x}\in\mathcal{X}\setminus\mathcal{X}'\), then for every \(\boldsymbol{u}\in\big(\mathbb{N}_{<n}\big)^*\), \((\boldsymbol{u},\boldsymbol{x})\notin\operatorname{\mathsf{dom}}f\).
Definability of the accepted random-sequence set. \(\operatorname{\mathsf{dom}}\tau\supseteq\big(\mathbb{N}_{<n}\big)^*\times\mathcal{X}'\). In particular, for every \(\boldsymbol{x}\in\mathcal{X}'\), the accepted random-sequence set \(\mathcal{T}_{\boldsymbol{x}} := \Big\{\boldsymbol{u}\in\big(\mathbb{N}_{<n}\big)^* \;\Big|\; \tau(\boldsymbol{u},\boldsymbol{x})\downarrow = 1 \Big\}\) can be defined. By definition, note that \(\mathcal{T}_{\boldsymbol{x}}\) is a computable set.
Prefix-freeness and constructive stopping guarantee of the accepted random-sequence set. For every \(\boldsymbol{x}\in\mathcal{X}'\), the accepted random-sequence set \(\mathcal{T}_{\boldsymbol{x}}\subseteq(\mathbb{N}_{<n})^*\) is prefix-free. Furthermore, there exists a computable function \(N_{\mathrm{stop}}:\mathcal{X}'\times\mathbb{N}\xrightarrow{\mathsf{comp}}\mathbb{N}\) such that, for every \(\boldsymbol{x}\in\mathcal{X}'\) and every \(k\in\mathbb{N}\), the following holds: \[1- \sum_{\substack{\boldsymbol{u}\in\mathcal{T}_{\boldsymbol{x}}\\ |\boldsymbol{u}|\le N_{\mathrm{stop}}(\boldsymbol{x},k)}} n^{-|\boldsymbol{u}|} \le |\Sigma|^{-k}.\]
Consistency between the domain of the main function and the accepted random-sequence set. If \(\boldsymbol{x}\in\mathcal{X}'\) and \(\boldsymbol{u}\in\mathcal{T}_{\boldsymbol{x}}\), then \((\boldsymbol{u},\boldsymbol{x})\in\operatorname{\mathsf{dom}}f\).
The above definition of stochastic input-output AI may look cumbersome at first glance, but its naturalness can be seen by considering the intended operation. Roughly speaking, when the input is \(\boldsymbol{x}\), uniform random numbers are repeatedly sampled and concatenated, and at the point when the random-number sequence enters the accepted random-sequence set, that random-number sequence and the original input \(\boldsymbol{x}\) are fed into the main function. More formally, the intended operation of stochastic input-output AI is described as follows.
Definition 2 (Intended operation of stochastic input-output AI). Let \(\mathcal{X}\) be the input space and \(\mathcal{Y}\) be the output space, and let \(A=(f,\tau)\) be a stochastic input-output AI with domain \(\mathcal{X}'\subseteq\mathcal{X}\). When \(A\) receives \(\boldsymbol{x}\in\mathcal{X}'\) as input, it can produce a stochastic output according to the following procedure, using an oracle \(\mathsf{Uniform}_{<n}\) that gives at each time a value regarded as a sample from the discrete uniform distribution on \(\{0,1,\ldots,n-1\}\). Here, \(\mathcal{T}_{\boldsymbol{x}}\) is the accepted random-sequence set determined by \(\tau\), as defined in Definition 1.
Input: A uniform-distribution oracle \(\mathsf{Uniform}_{<n}\) and a string input \(\boldsymbol{x}\in\mathcal{X}\).
Step 1: Initialize \(\boldsymbol{u}\gets ()\) as the empty string.
Step 2: If \(\boldsymbol{u}\in\mathcal{T}_{\boldsymbol{x}}\), then let \(f\) accept \(\boldsymbol{u}\), output \(f(\boldsymbol{u},\boldsymbol{x})\), and terminate (undefined if \(f(\boldsymbol{u},\boldsymbol{x})\uparrow\)).
Step 3: \(u_\mathsf{new}\gets\mathsf{Uniform}_{<n}\).
Step 4: \(\boldsymbol{u}\gets\boldsymbol{u}\cdot u_\mathsf{new}\). Then go to Step 2.
The above stochastic operation is called the intended operation of the stochastic input-output AI \(A\).
Remark 1 (Relation to pseudo-random number generators). Ideally, the uniform random oracle \(\mathsf{Uniform}_{<n}\) is a true random number generator that independently generates a random number following the true uniform distribution supported on \(\{0,1,\ldots,n-1\}\) at each time. In implementation, however, it is not realistic to use a true random number generator as the uniform random oracle \(\mathsf{Uniform}_{<n}\), and pseudo-random numbers are used. For example, the Mersenne Twister, a representative pseudo-random algorithm, can be regarded as a uniform random oracle with \(n=2^{32}\).
We now confirm that AI systems used in practice are examples of stochastic input-output AI.
Example 1 (Stochastic input-output AI includes deterministic input-output relations, diffusion models, and LLMs). Definition 1 includes deterministic input-output relations, AI models such as diffusion models that consume a fixed number of pseudo-random numbers, and AI models such as LLMs in which the number of consumed pseudo-random numbers is determined depending on the values of the pseudo-random numbers generated so far. More specifically:
Deterministic functions: Any deterministic input-output function represented by a partial computable function is a kind of stochastic input-output AI. Specifically, by setting \(\mathcal{T}_{\boldsymbol{x}}=\{()\}\) for every \(\boldsymbol{x}\in\mathcal{X}'\), one obtains a deterministic input-output relation.
Diffusion models: In the case of diffusion models, the number of consumed uniform random numbers is often fixed. For a diffusion model consuming \(\ell\) uniform random numbers, by setting \[\mathcal{T}_{\boldsymbol{x}}=\Big\{\boldsymbol{u}\in\big(\mathbb{N}_{<n}\big)^* \;\Big| \;|\boldsymbol{u}|=\ell\Big\}\] and defining an appropriate main function, it is formulated as a stochastic input-output AI.
Large language models: In the case of large language models, the number of consumed random numbers is not predetermined. Rather, a fixed number of random numbers is consumed each time one output token is determined, and the number of consumed random numbers differs depending on the number of output tokens. In addition, a termination condition that can be determined by computation is set in advance, such as the generation of an EOS (end of sentence) token. Whether the termination condition is satisfied is determined only by the random-number sequence \(\boldsymbol{u}\) generated so far and the input \(\boldsymbol{x}\). Therefore, when the input is \(\boldsymbol{x}\), by setting \[\mathcal{T}_{\boldsymbol{x}} = \left\{\boldsymbol{u}\in\big(\mathbb{N}_{<n}\big)^* \;\middle| \;\begin{align} &\text{\boldsymbol{u},\boldsymbol{x} satisfy the termination condition,} \\ &\text{and for every proper prefix \boldsymbol{u}' of \boldsymbol{u}, \boldsymbol{u}',\boldsymbol{x} do not satisfy the termination condition}\end{align}\right\}\] and defining an appropriate main function, it is formulated as a stochastic input-output AI.
The stochastic behavior of the input and output of a stochastic input-output AI can be completely described by a conditional probability mass function.
Definition 3 (Conditional probability mass function determined by stochastic input-output AI). For a stochastic input-output AI \(A\), we write \(Q_A\) for the conditional probability mass function obtained when the procedure in Definition 2 is executed using a true discrete uniform random number generator as \(\mathsf{Uniform}_{<n}\). Here, \(Q_A(\cdot\mid\cdot):\mathcal{X}'\times\mathcal{Y}\xrightarrow{\mathsf{comp}}[0,1]\), and the probability mass function of the output when \(\boldsymbol{x}\in\mathcal{X}'\) is used as input is denoted by \(Q_A(\cdot\mid\boldsymbol{x}):\mathcal{Y}\xrightarrow{\mathsf{comp}}[0,1]\).
Moreover, noting that the probability that any \(\boldsymbol{u}\in\mathcal{T}_{\boldsymbol{x}}\subsetneq\big(\mathbb{N}_{<n}\big)^*\) is accepted is \(n^{-|\boldsymbol{u}|}\), the concrete value of \(Q_A(\cdot\mid\cdot)\) is given as follows: \[Q_A(\boldsymbol{y}\mid\boldsymbol{x}) = \sum_{\boldsymbol{u}\in\mathcal{T}_{\boldsymbol{x}}} n^{-|\boldsymbol{u}|}\mathbb{1}\big(f(\boldsymbol{u},\boldsymbol{x})=\boldsymbol{y}\big).\]
Remark 2 (Meaning of satisfying Kraft’s inequality with equality). Once \(\mathcal{T}_{\boldsymbol{x}}\) is prefix-free, Kraft’s inequality \(\sum_{\boldsymbol{u}\in\mathcal{T}_{\boldsymbol{x}}}n^{-|\boldsymbol{u}|}\le 1\) is necessarily satisfied. This inequality being satisfied with equality, namely \(\sum_{\boldsymbol{u}\in\mathcal{T}_{\boldsymbol{x}}}n^{-|\boldsymbol{u}|}=1,\) is a necessary and sufficient condition for the algorithm defined by Definition 1 to halt with probability \(1\) and for \(Q_A(\cdot\mid\boldsymbol{x})\) to be a probability mass function rather than a genuine sub-probability.
Now, as stated above, the behavior of a stochastic input-output AI \(A\) is described by the conditional probability mass function \(Q_A(\cdot\mid\cdot)\) that it determines. Thus, formally speaking, explaining a stochastic input-output AI means explaining \(Q_A(\cdot\mid\cdot)\). Therefore, it is important to know what function class \(Q_A(\cdot\mid\cdot)\) belongs to. In fact, the conditional probability mass function determined by a stochastic input-output AI \(A\) is always computable.
Proposition 1 (The conditional probability mass function determined by stochastic input-output AI is computable). For every stochastic input-output AI \(A\), \(Q_A(\cdot\mid\cdot)\) is always a computable function.
For the above reasons, in what follows, it is sufficient for this paper to consider only explanations of computable conditional probability mass functions.
Remark 3 (The above framework is not limited to black-box explanation). Since \(Q_A(\cdot\mid\cdot)\) is the stochastic behavior of the input-output relation, explaining it may at first appear to be possible only by treating the AI as a black box. However, if the numerical values of internal states are directly concatenated to the output \(\boldsymbol{y}\) and defined as a new output, the following discussion can be interpreted, without modification, as a discussion of limitations in the case where internal states as well as the input-output relation are explained.
Formulation of AI performance based on perplexity: As an evaluation criterion for stochastic input-output AI, perplexity is widely used, especially in the field of natural language processing (e.g., [1], [42], [43]). This paper also adopts the logarithm of conditional perplexity and its expectation as evaluation criteria.
Definition 4 (Perplexity). Let the input space be \(\mathcal{X}\) and the output space be \(\mathcal{Y}\). Given an input \(\boldsymbol{x}\in\mathcal{X}\) and an output \(\boldsymbol{y}\in\mathcal{Y}\), the perplexity of a conditional probability mass function \(Q(\cdot\mid\cdot)\) is defined as \(\frac{1}{Q(\boldsymbol{y}\mid\boldsymbol{x})}.\) When a true distribution \(P\) on \(\mathcal{X}\times\mathcal{Y}\) is given, the expected logarithmic perplexity is defined as \(\operatorname{\mathbb{E}}_{\boldsymbol{X},\boldsymbol{Y}\sim P} -\log Q(\boldsymbol{Y}\mid\boldsymbol{X})\).
Remark 4 (On the definition of perplexity). In cases such as large language models where the input space \(\mathcal{X}\) can be written as \(\mathcal{X}=\Lambda^*\) using an alphabet \(\Lambda\), the quantity \(\frac{1}{\sqrt[|\boldsymbol{y}|]{Q(\boldsymbol{y}\mid\boldsymbol{x})}},\) which normalizes the above definition of perplexity by the output length \(|\boldsymbol{y}|\), is also often used as the definition of perplexity. However, in this paper, we adopt Definition 4 as a more straightforward form that can be applied to more general data formats.
Formulation of completely faithful explanations: We consider how to define whether an explanation of the conditional probability mass function \(Q_A\) determined by an AI is completely faithful. When we say that an explanation of a function is completely faithful to the behavior of that function, the explanation should uniquely identify the behavior of that function and distinguish it from others. In addition, since a random string is meaningless as an explanation, a completely faithful explanation should be described formally enough that, when interpreted by an appropriate formal rule fixed in advance, the concrete values of the function can be recovered. A formal rule must be able to be written as a program, so a completely faithful explanation should be able to compute the concrete values of the function when interpreted by a computable function. Based on this idea, we define a completely faithful explanation as follows.
Definition 5 (Interpretation function and completely faithful explanation). Let \(\Sigma\) be the alphabet natively handled by the computation model used when discussing computability. Let \(\Lambda\) be a finite set of characters used for explanations, typically characters used by humans in natural language. Let \(\operatorname{\mathsf{Enc}}^{\mathsf{PF}}_\Lambda:\Lambda\twoheadrightarrow\Sigma^*\) be a prefix-free encoding function for \(\Lambda\). In particular, assume that \(\operatorname{\mathsf{Enc}}^{\mathsf{PF}}_\Lambda\) is injective, its image is computable, and its image is prefix-free. Also assume that \(\operatorname{\mathsf{Enc}}^{\mathsf{PF}}_\Lambda\) is chosen efficiently so that \(L_\Lambda := \max\Big\{\big|\operatorname{\mathsf{Enc}}^{\mathsf{PF}}_\Lambda(\lambda)\big| \;\Big| \;\lambda\in\Lambda\Big\}\) is small. For a string \(\boldsymbol{e}=e_0 e_1 \cdots e_{r-1}\in\Lambda^*\), define \[\operatorname{\mathsf{Enc}}_\Lambda(\boldsymbol{e}):= \operatorname{\mathsf{Enc}}^{\mathsf{PF}}_\Lambda(e_0) \cdot \operatorname{\mathsf{Enc}}^{\mathsf{PF}}_\Lambda(e_1) \cdot \cdots \cdot \operatorname{\mathsf{Enc}}^{\mathsf{PF}}_\Lambda(e_{r-1}).\]
Let \(\mathcal{Z}\) be an at most countable set. Fix a computable interpretation function \(\operatorname{\mathsf{Interpret}}:\subseteq \Lambda^*\times\mathbb{N}\times\mathcal{Z}\xrightarrow{\mathsf{comp}}\mathbb{Q}\) which interprets an explanation written using characters in \(\Lambda\) as a conditional probability mass function under \(\operatorname{\mathsf{Enc}}_\Lambda\). A string \(\boldsymbol{e}\in\Lambda^*\) is a completely faithful explanation of a function \(f:\mathcal{Z}\xrightarrow{\mathsf{comp}}\mathbb{R}\) under the interpretation function \(\operatorname{\mathsf{Interpret}}\) if, for every \(z\in\mathcal{Z}\) and every \(k\in\mathbb{N}\), \[\big|\operatorname{\mathsf{Interpret}}(\boldsymbol{e},k,z)-f(z)\big|<|\Sigma|^{-k}\] holds. The length of the explanation is defined as its length as a string, namely \(|\boldsymbol{e}|\).
Example 2 (Example of \(\Lambda\)). As an example, one can take \(\Lambda\) to be the set of characters included in Unicode, and take \(\operatorname{\mathsf{Enc}}_\Lambda\) to be an encoding method such as UTF-8. In this case, \(L_\Lambda=32\). If only ASCII characters are used, then \(L_\Lambda=7\).
Formulation of the complexity of the AI operation environment by Kolmogorov complexity: In quantifying the complexity of the operation environment of AI, it is information-theoretically natural to use Kolmogorov complexity [44]–[47]. However, it is not obvious which object’s Kolmogorov complexity should be used. When the input-output relation is stochastic, one might naively want to consider the Kolmogorov complexity of the conditional probability mass function. However, as rigorously discussed in Appendix 9, the Kolmogorov complexity of the conditional probability mass function is not directly related to AI performance and the interpretability of AI explanations. Therefore, we use conditional Kolmogorov complexity as the indicator.
Definition 6 (Conditional plain Kolmogorov complexity). Fix an alphabet \(\Sigma\) and a universal conditional function \(U\) under a pairing function \(\langle \bullet, \bullet \rangle\). For their definitions, see Appendix 7. Let \(\mathcal{X}\) and \(\mathcal{Y}\) be at most countable sets, and fix encoding functions \(\operatorname{\mathsf{Enc}}_{\mathcal{X}}:\mathcal{X}\twoheadrightarrow\Sigma^* \quad\text{and}\quad \operatorname{\mathsf{Enc}}_{\mathcal{Y}}:\mathcal{Y}\twoheadrightarrow\Sigma^*\) for them. For \(x\in\mathcal{X}\) and \(y\in\mathcal{Y}\), the conditional plain Kolmogorov complexity \(C_U(y\mid x)\in\mathbb{N}\) is defined by \[C_U(y\mid x) := \min\{|\boldsymbol{p}| \mid U(\langle \operatorname{\mathsf{Enc}}_{\mathcal{X}}(x), \boldsymbol{p}\rangle)\downarrow=\operatorname{\mathsf{Enc}}_{\mathcal{Y}}(y)\}.\]
Remark 5 (Plain Kolmogorov complexity and prefix-free Kolmogorov complexity). The above \(C_U(f)\) is called plain Kolmogorov complexity, whereas in information theory, prefix-free Kolmogorov complexity, denoted by \(K_U(f)\), is often used because it has better properties. These quantities are closely related, but they are different, and this should be noted.
In this section, we state the main theorem of this paper, which gives a quantitative relation among the expected conditional perplexity of stochastic generative AI, the expectation of conditional Kolmogorov complexity, and computer-interpretable explanations, and then explain its meaning. As already stated, the behavior of a stochastic input-output AI \(A\) is completely described by the conditional probability mass function \(Q_A\) that it determines. Therefore, it suffices to show an inequality expressing the relation between the expected logarithmic perplexity of \(Q_A\), which represents the performance of \(A\), and the length of an explanation of \(Q_A\), which is a string that can reproduce the behavior of \(A\). This is obtained as follows.
Theorem 1 (Fundamental Quadrilemma). Fix a universal Turing machine for defining plain Kolmogorov complexity, and let \(\Sigma\) be the alphabet it natively handles. Fix one interpretation function whose character set is \(\Lambda\), and let \(L_\Lambda\) be the maximum code length when encoding \(\Lambda\). Then there exists a constant \(c\) such that, for every stochastic input-output AI \(A\) and the conditional probability mass function \(Q_A(\cdot\mid\cdot):\mathcal{X}\times\mathcal{Y}\xrightarrow{\mathsf{comp}}[0,1]\) that it determines, the following two statements hold.
(i) For every \(x\in\mathcal{X}\), \(y\in\mathcal{Y}\), and every \(\boldsymbol{e}_x\in\Lambda^*\) that is a completely faithful explanation of the probability mass function \(Q_A(\cdot\mid x)\), the following holds: \[-\log Q_A(y\mid x) + L_\Lambda|\boldsymbol{e}_x| + 2 \log(L_\Lambda|\boldsymbol{e}_x|+1) \ge C_U(y\mid x)+c.\]
(ii) Suppose that for every \(x\in\mathcal{X}\), a completely faithful explanation \(\boldsymbol{e}_x\in\Lambda^*\) of \(Q_A(\cdot\mid x)\) is given. For every probability distribution \(P\in\mathcal{P}(\mathcal{X}\times\mathcal{Y})\), the following holds: \[\operatorname{\mathbb{E}}_{X,Y\sim P}[-\log Q_A(Y\mid X)] + \operatorname{\mathbb{E}}_{X,Y\sim P}\left[ L_\Lambda|\boldsymbol{e}_X| + 2 \log(L_\Lambda|\boldsymbol{e}_X|+1) \right] \ge \operatorname{\mathbb{E}}_{X,Y\sim P}C_U(Y\mid X)+c.\]
Note that \(c\) does not depend on \(A\), \(x\), or \(y\).
Remark 6 (Interpretation of the Fundamental Quadrilemma theorem). Theorem 1 suggests that it is impossible to achieve all of the following simultaneously.
The AI operation environment has a complex input-output relation, that is, \(\mathbb{E}_{X,Y\sim P}C_U(Y\mid X)\) is large.
AI performance is high, that is, the expected perplexity \(\mathbb{E}_{X,Y\sim P}[-\log Q(Y\mid X)]\) is small.
A completely faithful explanation \(\boldsymbol{e}_{x}\) of the AI is given for all \(x \in \mathcal{X}\).
The AI explanation is short, that is, \(\mathbb{E}_{X,Y\sim P}|\boldsymbol{e}_X|\) is small.
Note that the theorem states about local explanations \(e_x\) for all \(x \in \mathcal{X}\), a global explanation (an explanation of \(Q\), instead of \(Q(\cdot \mid x)\)) must be longer than any \(e_x\) up to constant, so the quadrilemma holds for a global explanation.
Some might suspect that \(\operatorname{\mathbb{E}}_{X,Y\sim P}[-\log Q_A(Y\mid X)]\) may be close to \(\operatorname{\mathbb{E}}_{X,Y\sim P}C_U(Y\mid X)\), resulting in no implications on \(|\boldsymbol{e}_x|\), but it is not generally true. See Proposition 7 in Appendix for details.
Although the constraint appears to become weaker when \(L_\Lambda\) is large, the fact that \(L_\Lambda\) cannot be made small means that the number of elements of the character set \(\Lambda\) is large, and therefore the cognitive efficiency per character for humans decreases. Thus, in substance, this does not relax the constraint.
Remark 7 (Implications of the Quadrilemma theorem). The Quadrilemma theorem claims the necessity of giving up one of the four conditions. In environments where large-scale AI is applied, the complexity of the input-output relation is usually unavoidable. Moreover, one cannot sacrifice the shortness of explanations, which is a necessary condition for interpretability. Therefore, one must give up either the goodness of AI performance or the complete faithfulness of explanations. In the usual situation, where one pursues good AI performance, it is necessary to give up the complete faithfulness of explanations. Rather, the field of AI explanation should proceed by pursuing useful explanations that are not completely faithful. In exceptional situations where a surrogate model is acceptable, AI performance is sacrificed, and therefore complete faithfulness of AI explanations may be achievable. This is also part of the implication of the Quadrilemma theorem.
Remark 8 (Relationship between explanation length and interpretability). This paper is based on the premise that an excessively long explanation is not interpretable, regardless of its content. For a quantitative discussion, see Appendix 6.
One might point out that even a long explanation could be interpretable if it is regular. For example, an explanation obtained by concatenating the length-two string 01 one million times would be interpretable even though it is long.
However, in such a case, there should exist an extremely short equivalent explanation that uses the regularity, such as \[\texttt{ans = ""; for i in range(10 ** 6): ans = ans + "01"; return ans}.\]
According to the Fundamental Quadrilemma, as long as the other three conditions are satisfied, no short explanation exists. Therefore, the existence of a long but regular and interpretable explanation is also ruled out.
Remark 9 (Necessity of considering the complexity of the AI operation environment and the difficulty of computing its indicator). It is inevitable that the complexity of the AI operation environment appears in the quadrilemma. If the true input-output relation is the identity function, then an AI with the best performance and a completely faithful and interpretable explanation of its behavior are trivially obtained. On the other hand, when the operation environment is complex, computing a quantity that characterizes the complexity of that environment also becomes extremely difficult, and is practically impossible. The quantity used as the complexity indicator in this paper, \(\operatorname{\mathbb{E}}_{X,Y\sim P}C_U(Y\mid X)\), also has little hope of being computable in practice. Separately from this, Kolmogorov complexity also has a computability problem. Since the environment itself is complex, computing its complexity is, in principle, a difficult problem. Nevertheless, Theorem 1 is suggestive. If an AI that achieves the true input-output relation and is written by a short program were realized, then \(\operatorname{\mathbb{E}}_{X,Y\sim P}C_U(Y\mid X)\) would be small, and the quadrilemma would not be a problem. However, considering the history in which text generation could not achieve sufficient performance until the advent of large-scale language models, one can formulate the hypothesis that such a situation will not occur. This hypothesis, however, is not something that can be confirmed by numerical computation, and it will likely be shown empirically as AI develops in the future.
In this study, we mathematically showed that there exists a quadrilemma stating that AI and its explanation cannot simultaneously satisfy the following four conditions: the complexity of the environment in which the AI operates, the goodness of AI performance, the interpretability of the AI explanation, and the complete faithfulness of the AI explanation. This quadrilemma suggests that, in most applications where we cannot change the environment or sacrifice good AI performance and an interpretable explanation, we should give up complete faithfulness of explanations.
Despite our theorem’s significance, this study has the following limitations, which provide promising directions for future work.
Quantification of faithfulness of explanations: This study treats only the case where explanations are completely faithful to AI behavior. Relaxing this condition, quantifying the faithfulness of explanations that are not completely faithful, and deriving limitations on such explanations may be useful and interesting future work.
Time-complexity constraints: This study used Kolmogorov complexity that takes into account only computability, and did not take time-complexity constraints into account. Recent models based on Transformers [48] and models using diffusion strategies [2] share the feature that the same parameters are reused many times. In other words, they have many parameters, but their time complexity is even larger. Based on this observation, it may be interesting future work to consider limitations of explainability when the true input-output relation has a lower bound on time complexity.
This section provides specific discussions on the human capacity to recognize a series of letters and discusses why it matters. For example, for open-weight models, the source code and checkpoint can be regarded as explanations that completely faithfully describe the behavior of the model. However, even if a small 7B-parameter model is boldly quantized to 8 bits, the parameters amount to 56 billion bits, which exceeds human memory capacity [32] and reading capacity [31]. From the above consideration, we see that the shortness of explanations is sufficient as a necessary condition for interpretability of explanations to exclude trivial explanations based on checkpoints. Regarding reading speed, for English, there exists a statistical result of 238 words per minute for nonfiction text, with 4.6 characters per word, which corresponds to approximately 4 billion bits per year. If a model with 1B parameters, which can be regarded as having a small number of parameters as of 2026, uses the standard bf16 format, then it has 16 billion bits. Therefore, even reading through the checkpoint parameters is extremely difficult for humans. If one requires not only reading but also memorizing, it becomes even more difficult. The world record for memorizing the decimal expansion of pi, which is data in which regularities are difficult to find, is 70,000 digits [32], which is at most 233 thousand bits. This suggests that the source code and checkpoints, namely the weight parameters, of open-weight models such as the Llama, Qwen, DeepSeek, and GLM series are complete explanations, but humans cannot memorize them, nor even read through them. Thus, they are not interpretable. This is because even a 7B model, which can be regarded as extremely small as of 2026, becomes 28 billion bits even after 4-bit quantization, which far exceeds the amount that a human could read even by reading 24 hours a day throughout an entire year.
We define several concepts concerning computable functions. For details, see [49] for computability including multiple computation models, and [50], [51] for Kolmogorov complexity. This paper basically defines Kolmogorov complexity following the style of [51], but note that whereas [51] directly formulates it for functions with natural-number inputs and outputs, this paper formulates it for functions with string inputs and outputs. These can be regarded as equivalent by using a standard bijection between the set of natural numbers and the set of finite strings.
Definition 7 (Computable function). Let \(\Sigma\) be a finite set with at least two elements. A function \(f\) is a partial computable function with source set \(\mathcal{X}=\Sigma^*\) and target set \(\mathcal{Y}=\Sigma^*\) if there exist a set \(\operatorname{\mathsf{dom}}f\subseteq\mathcal{X}\), called the domain, and a function \(M\) implemented in some computation model such that the following hold.
If \(\boldsymbol{x}\in\operatorname{\mathsf{dom}}f\), then \(f(\boldsymbol{x})\in\mathcal{Y}\) is defined, and when \(M\) receives \(\boldsymbol{x}\) as input, it outputs \(\boldsymbol{y}=f(\boldsymbol{x})\) and halts.
If \(\boldsymbol{x}\in\mathcal{X}\setminus\operatorname{\mathsf{dom}}f\), then \(f(\boldsymbol{x})\) is undefined, and when \(M\) receives \(\boldsymbol{x}\) as input, it does not halt.
In this case, we write \(f:\subseteq\mathcal{X}\xrightarrow{\mathsf{comp}}\mathcal{Y}\), and write the domain \(\mathcal{X}'\) as \(\operatorname{\mathsf{dom}}f\). Moreover, we write \(f(\boldsymbol{x})\downarrow\) to mean \(\boldsymbol{x}\in\operatorname{\mathsf{dom}}f\), and write \(f(\boldsymbol{x})\downarrow=\boldsymbol{y}\) to mean that \(f(\boldsymbol{x})\downarrow\) and \(f(\boldsymbol{x})=\boldsymbol{y}\). When \(\operatorname{\mathsf{src}}f\) denotes the source domain of \(f\), we write \(f(\boldsymbol{x})\uparrow\) to mean \(\boldsymbol{x}\in\operatorname{\mathsf{src}}f\setminus\operatorname{\mathsf{dom}}f\). If \(\operatorname{\mathsf{dom}}f=\operatorname{\mathsf{src}}f\), then \(f\) is called a total computable function, and we write \(f:\mathcal{X}\xrightarrow{\mathsf{comp}}\mathcal{Y}\).
The computability defined above is known to be equivalent no matter which of the usual sufficiently powerful computation models is considered. This is the Church–Turing thesis. Computability is standardly defined using Turing machines, but note that an equivalent definition is obtained by using a standard programming language, e.g., C, Python, etc., when working with unlimited time and memory. Here, \(f (\boldsymbol{x}) \uparrow\) corresponds to the situation when the function \(f\) implemented in such a programming language does not halt owing to, e.g., an infinite loop. Since AIs are a composition of functions implemented in those programming languages, we can say that AIs are computable functions in the sense of the above definition.
Definition 8 (Equivalence of partial computable functions). Fix the source set \(\mathcal{X}=\Sigma^*\) and the target set \(\mathcal{Y}=\Sigma^*\). For two partial computable functions \(f, g: \subseteq \mathcal{X} \xrightarrow{\mathsf{comp}}\mathcal{Y}\), define the equality \(f=g\) to mean that \(\operatorname{\mathsf{dom}}f = \operatorname{\mathsf{dom}}g\) and that, for every \(x \in \operatorname{\mathsf{dom}}f\), \(f (x) \downarrow = g (x) \downarrow\).
The computability, or decidability, of a subset of the string set \(\Sigma^*\) is defined by the computability of its indicator function.
Definition 9 (Computability of a string set). A subset \(\mathcal{A}\subseteq\Sigma^*\) is computable, or decidable, if there exists a total computable function \(\chi:\Sigma^*\to\Sigma^*\) such that \[\boldsymbol{x}\in\mathcal{A}\Leftrightarrow \chi(\boldsymbol{x})\ne ()\] holds.
So far, we have defined computability for functions that take strings as inputs and return strings as outputs. For functions between general sets, computability can also be discussed through encodings that convert their elements into strings. However, since the set of all strings is countable, only at most countable sets can be handled. Functions whose target set is the entire set of real numbers are defined later.
First, it is necessary to map the elements of the sets under consideration to strings.
Definition 10 (Encoding function). For an at most countable set \(\mathcal{Z}\), a function \(\operatorname{\mathsf{Enc}}_{\mathcal{Z}}: \mathcal{Z} \to \Sigma^*\) is an encoding function if \(\operatorname{\mathsf{Enc}}_{\mathcal{Z}}\) is injective and its image \(\operatorname{\mathsf{Enc}}_{\mathcal{Z}} (\mathcal{Z}) := \{\operatorname{\mathsf{Enc}}_{\mathcal{Z}} \mid z \in \mathcal{Z}\}\) is a computable, or decidable, set.
Here, the image being computable, or decidable, means that it is possible to decide by computation whether a given string is a valid code.
Definition 11 (Computability of general functions). Let \(\Sigma\) be a finite set with at least two elements, let \(\mathcal{X}\) and \(\mathcal{Y}\) be at most countable sets, and fix encoding functions \(\operatorname{\mathsf{Enc}}_{\mathcal{X}}:\mathcal{X}\twoheadrightarrow\Sigma^*\), \(\operatorname{\mathsf{Enc}}_{\mathcal{Y}}:\mathcal{Y}\twoheadrightarrow\Sigma^*\) for them. These functions are injective, and their images are computable, or decidable. Then a function \(f\) is a partial computable function with source set \(\mathcal{X}\) and target set \(\mathcal{Y}\) if there exists a set \(\operatorname{\mathsf{dom}}f\subseteq\mathcal{X}\), called the domain, such that \(f (x) \in \mathcal{Y}\) is defined for every \(x \in \operatorname{\mathsf{dom}}f\), and there exists a partial computable function on strings \(\tilde{f}: \subseteq \Sigma^* \xrightarrow{\mathsf{comp}}\Sigma^*\) such that the equality of partial computable functions \(\tilde{f} \big(\operatorname{\mathsf{Enc}}_{\mathcal{X}} (\bullet) \big) = \operatorname{\mathsf{Enc}}_{\mathcal{Y}} \big(f (\bullet)\big)\) holds. Concretely, this means the following: \[\left\{ \begin{align} &\tilde{f} \big(\operatorname{\mathsf{Enc}}_{\mathcal{X}} (x) \big) \downarrow = \operatorname{\mathsf{Enc}}_{\mathcal{Y}} \big(f (x)\big) & \quad \text{if } x &\in \operatorname{\mathsf{dom}}f, \\ &\tilde{f} \big(\operatorname{\mathsf{Enc}}_{\mathcal{X}} (x) \big) \uparrow & \text{if } x &\in \mathcal{X} \setminus \operatorname{\mathsf{dom}}f. \end{align} \right.\] When \(f\) is a partial computable function with source set \(\mathcal{X}\) and target set \(\mathcal{Y}\), we write \(f:\subseteq\mathcal{X}\xrightarrow{\mathsf{comp}}\mathcal{Y}\). Moreover, we write \(f(x)\downarrow\) to mean \(x\in\operatorname{\mathsf{dom}}f\), and write \(f(x)\downarrow=y\) to mean that \(f(x)\downarrow\) and \(f(x)=y\). When \(\operatorname{\mathsf{src}}f\) denotes the source set of \(f\), we write \(f(x)\uparrow\) to mean \(x\in\operatorname{\mathsf{src}}f\setminus\operatorname{\mathsf{dom}}f\). If \(\operatorname{\mathsf{dom}}f=\operatorname{\mathsf{src}}f\), then \(f\) is called a total computable function, and we write \(f:\mathcal{X}\xrightarrow{\mathsf{comp}}\mathcal{Y}\).
In practical applications, it is natural to consider multiple inputs and outputs. Moreover, as discussed later, even when dealing with functions that are originally single-input functions, the treatment of multiple inputs is indispensable if they have real-valued outputs. Since this paper deals with probability mass functions, it is indispensable to specify how real-valued functions are handled.
On the other hand, the objects most directly handled by computation models are single-input, single-output partial functions that receive one string and return one string, so it is necessary to convert multiple variables into a single string. The nontrivial issue in doing so is the separation between strings. For example, suppose that distinct variable values \(x_1, x_2, x_3, x_4\) are converted into strings \(\boldsymbol{x}_1 = \mathtt{0}, \boldsymbol{x}_2 = \mathtt{01}, \boldsymbol{x}_3 = \mathtt{010}, \boldsymbol{x}_4 = \mathtt{1010}\). Then the concatenation \(\boldsymbol{x}_2 \cdot \boldsymbol{x}_3\) of \(\boldsymbol{x}_2\) and \(\boldsymbol{x}_3\) and the concatenation \(\boldsymbol{x}_1 \cdot \boldsymbol{x}_4\) of \(\boldsymbol{x}_1\) and \(\boldsymbol{x}_4\) are both \(\mathtt{01010}\), so \((x_1, x_4)\) and \((x_2, x_3)\) cannot be distinguished. This is because the delimiter position is not determined. To avoid this situation, it suffices to fix a convention that assigns the preceding string to an element of a prefix-free set. We first define prefix-free sets.
Definition 12 (Prefix-free set, self-delimiting encoding function, and pairing). A set of strings \(\mathcal{F} \subseteq \Sigma^*\) is prefix-free if, for every \(\boldsymbol{c} \in \mathcal{F}\) and every \(\boldsymbol{z} \in \Sigma^* \setminus \{()\}\), \(\boldsymbol{c} \cdot \boldsymbol{z} \notin \mathcal{F}\). A total computable function \(\overline{\bullet}: \Sigma^* \mathrel{\ooalign{\xrightarrow[\mkern 4mu]{\mathsf{comp}\mkern 4mu}\cr \hidewidth\rightarrow\mkern 4mu}} \Sigma^*\), where \(\bullet\) is a placeholder, is a self-delimiting encoding function if \(\overline{\bullet}\) is an injective computable function whose image is a computable, or decidable, prefix-free set. Using a self-delimiting encoding function \(\overline{\bullet}\), define the pairing \(\langle \boldsymbol{x}_{0}, \boldsymbol{x}_{1}, ..., \boldsymbol{x}_{n-2}, \boldsymbol{x}_{n-1} \rangle \in \Sigma^*\) of finitely many strings \(\boldsymbol{x}_{0}, \boldsymbol{x}_{1}, ..., \boldsymbol{x}_{n-2}, \boldsymbol{x}_{n-1} \in \Sigma^*\) by \(\langle \boldsymbol{x}_{0}, \boldsymbol{x}_{1}, ..., \boldsymbol{x}_{n-2}, \boldsymbol{x}_{n-1} \rangle := \overline{\boldsymbol{x}_{0}} \cdot \overline{\boldsymbol{x}_{1}} \cdot \cdots \cdot \overline{\boldsymbol{x}_{n-2}} \cdot \boldsymbol{x}_{n-1}\). Note that \(\overline{\bullet}\) is not applied to \(\boldsymbol{x}_{n-1}\).
Proposition 2 (A self-delimiting encoding function enables unique decomposition). The \(n\)-variable pairing function determined by a self-delimiting encoding function \(\overline{\bullet}\) is an injection from \((\Sigma^*)\) to \(\Sigma^*\). Moreover, there exists a partial computable function \(\pi_i^n: \subseteq \Sigma^* \to \Sigma^*\), called the projection onto the \(i\)-th element, such that \[\begin{cases} \pi_i^n (\boldsymbol{z}) \downarrow = \boldsymbol{x}_i \;& \text{if \exists! (\boldsymbol{x}_{0}, \boldsymbol{x}_{1}, ..., \boldsymbol{x}_{n-2}, \boldsymbol{x}_{n-1}) \in (\Sigma^*)^n, \boldsymbol{z} = \langle \boldsymbol{x}_{0}, \boldsymbol{x}_{1}, ..., \boldsymbol{x}_{n-2}, \boldsymbol{x}_{n-1} \rangle,} \\ \pi_i^n (\boldsymbol{z}) \uparrow \;& \text{otherwise}. \end{cases}\]
Proof. We show the injectivity of the pairing function in the case \(n = 2\). Suppose that \(\langle \boldsymbol{x}_0, \boldsymbol{x}_1 \rangle = \langle \boldsymbol{x}'_0, \boldsymbol{x}'_1 \rangle =: \boldsymbol{z}\), that is, \(\overline{\boldsymbol{x}_0} \cdot \boldsymbol{x}_1 = \overline{\boldsymbol{x}'_0} \cdot \boldsymbol{x}'_1 = \boldsymbol{z}\). Since \(\overline{\boldsymbol{x}_0}\) and \(\overline{\boldsymbol{x}'_0}\) both belong to a prefix-free set and are both prefixes of \(\boldsymbol{z}\), we have \(\overline{\boldsymbol{x}_0} = \overline{\boldsymbol{x}'_0}\). By the injectivity of \(\overline{\bullet}\), it follows that \(\boldsymbol{x}_0 = \boldsymbol{x}'_0\). Together with \(\overline{\boldsymbol{x}_0} \cdot \boldsymbol{x}_1 = \overline{\boldsymbol{x}'_0} \cdot \boldsymbol{x}'_1\), this also implies \(\boldsymbol{x}_1 = \boldsymbol{x}'_1\). Thus, in the two-variable case, the pairing function is injective. For a general \(n\)-variable pairing, since \(\langle \boldsymbol{x}_{0}, \boldsymbol{x}_{1}, ..., \boldsymbol{x}_{n-2}, \boldsymbol{x}_{n-1} \rangle = \langle \boldsymbol{x}_{0}, \langle\boldsymbol{x}_{1}, ..., \langle \boldsymbol{x}_{n-2}, \boldsymbol{x}_{n-1} \rangle \cdots \rangle\rangle\), injectivity is easily shown by mathematical induction. The projection functions are obtained by the following algorithm.
Projection function from a pairing
Input: \(\boldsymbol{z} \in \Sigma^*\).
Step 1: \(\boldsymbol{t} \gets \boldsymbol{z}\).
Step 2: \(j \gets 0\):
Step 3: \(i \gets 1\):
Step 4: If \(\boldsymbol{t}_{<i} := t_0 t_1 \cdots t_{i-1} \in \overline{\Sigma^*}\), then go to Step 7.
Step 5: If \(i = |\boldsymbol{t}|\), then go to an infinite loop.
Step 6: \(i \gets i + 1\) then go to Step 4.
Step 7: \(\boldsymbol{x}_i := \boldsymbol{t}_{<i}, \boldsymbol{t} \gets \boldsymbol{t}_{\ge i}, j \gets j + 1\), then go to Step 3.
Step 8: \(\boldsymbol{x}_{n-1} := \boldsymbol{t}\).
Step 9: Output \(\boldsymbol{x}_i\) and terminate.
◻
Because of the above property, when handling multiple variables, after encoding them, one can apply a self-delimiting encoding function and construct a pairing, thereby applying the discussion of computability for functions that take strings as inputs.
Definition 13 (Computability for multiple inputs and multiple outputs). In the case of multiple inputs and outputs, the input and output can be regarded as elements of product sets. More specifically, suppose that the source set is \[\mathcal{X}=\mathcal{X}_0\times\mathcal{X}_1\times\cdots\times\mathcal{X}_{m-1},\] and that, for \(i=0,1,\ldots,m-1\), \(\mathcal{X}_i\) is an at most countable set with an encoding function \(\operatorname{\mathsf{Enc}}_i:\mathcal{X}_i \mathrel{\ooalign{\xrightarrow[\mkern 4mu]{\mathsf{comp}\mkern 4mu}\cr \hidewidth\rightarrow\mkern 4mu}} \Sigma^*\). Then, for \(x=(x_0,x_1,\ldots,x_{m-1})\in\mathcal{X}\), define \(\operatorname{\mathsf{Enc}}_{\mathcal{X}}\) by \[\begin{align} \operatorname{\mathsf{Enc}}_{\mathcal{X}}(x) & := \langle \operatorname{\mathsf{Enc}}_0(x_0), \operatorname{\mathsf{Enc}}_1(x_1),\cdots,\operatorname{\mathsf{Enc}}_{m-2}(x_{m-2}), \operatorname{\mathsf{Enc}}_{m-1}(x_{m-1}) \rangle \\ & = \overline{\operatorname{\mathsf{Enc}}_0(x_0)} \cdot \overline{\operatorname{\mathsf{Enc}}_1(x_1)}\cdot\cdots\cdot\overline{\operatorname{\mathsf{Enc}}_{m-2}(x_{m-2})}\cdot\operatorname{\mathsf{Enc}}_{m-1}(x_{m-1}) \end{align}\] and apply Definition 11. The case of multiple outputs is handled similarly.
Next, consider real-valued functions. Since computers cannot directly handle real numbers themselves, outputting rational numbers that approximate them to arbitrary precision is regarded as equivalent to outputting real numbers.
Definition 14 (Computability of real-valued functions). Let \(\mathcal{X}\) be an at most countable set, and fix an encoding function \(\operatorname{\mathsf{Enc}}_{\mathcal{X}}:\mathcal{X}\twoheadrightarrow\Sigma^*\). For a partial real-valued function \(f:\subseteq\mathcal{X}\to\mathbb{R}\), a partial computable function \(\tilde{f}:\subseteq\mathbb{N}\times\mathcal{X}\xrightarrow{\mathsf{comp}}\mathbb{Q}\) is a computable arbitrary-precision approximation function of \(f\) if \(\operatorname{\mathsf{dom}}\tilde{f}=\mathbb{N}\times\operatorname{\mathsf{dom}}f\) and, for every \(x\in\operatorname{\mathsf{dom}}f\) and every \(k\in\mathbb{N}\), \[|\tilde{f}(k,x)-f(x)|\le |\Sigma|^{-k}\] holds. When \(f\) has a computable arbitrary-precision approximation function, \(f\) is called a partial computable real-valued function on the source set \(\mathcal{X}\), and we write \(f:\subseteq\mathcal{X}\xrightarrow{\mathsf{comp}}\mathbb{R}\). The other notations follow Definition 11.
The interest of this paper lies in explaining AI. This means obtaining a string that represents AI in some sense. Therefore, we want to represent computable functions by strings. This is made possible by universal functions. Universal functions can emulate other computable functions from strings corresponding to them, namely programs.
However, in order to handle conditions correctly, we define not a universal function in the usual sense in the context of computability theory, but a universal conditional function.
Definition 15 (Universal conditional function). A partial computable function \(U:\subseteq\Sigma^*\xrightarrow{\mathsf{comp}}\Sigma^*\) is a universal conditional partial computable function if there exists a decidable prefix-free set \(\operatorname{\mathsf{Programs}}_U \subseteq \Sigma^*\) such that, for every partial computable function \(f:\subseteq\Sigma^*\xrightarrow{\mathsf{comp}}\Sigma^*\), there exists a string \(\boldsymbol{p} \in \operatorname{\mathsf{Programs}}_U\) for which the equality of partial functions \(U (\overline{\bullet} \cdot \boldsymbol{p} \cdot \diamond) = f (\overline{\bullet} \cdot \diamond)\) holds, including their domains. More concretely, this means that, for every \(\boldsymbol{x}, \boldsymbol{w} \in \Sigma^*\), the following holds: \[\begin{cases} U(\overline{\boldsymbol{x}} \cdot \boldsymbol{p} \cdot \boldsymbol{w}) \downarrow = f(\overline{\boldsymbol{x}} \cdot \boldsymbol{w}) \downarrow & \quad \text{if \overline{\boldsymbol{x}} \cdot \boldsymbol{w} \in \operatorname{\mathsf{dom}}f}, \\ U(\overline{\boldsymbol{x}} \cdot \boldsymbol{p} \cdot \boldsymbol{w}) \uparrow & \quad \text{if \overline{\boldsymbol{x}} \cdot \boldsymbol{w} \notin \operatorname{\mathsf{dom}}f}. \end{cases}\]
Remark 10 (Difference from ordinary universal functions). Definition 15 imposes stronger conditions than the definition of universal functions in contexts other than Kolmogorov complexity. In the usual context, a partial computable function \(W:\subseteq\Sigma^*\xrightarrow{\mathsf{comp}}\Sigma^*\) is a universal function if, for every partial computable function \(f:\subseteq\Sigma^*\xrightarrow{\mathsf{comp}}\Sigma^*\), there exists a string \(\boldsymbol{q}\in\Sigma^*\) such that the equality of partial computable functions \(W(\overline{\boldsymbol{q}} \cdot \bullet)=f\) holds. A universal conditional function is a universal function. Concretely, by the partial computability of the inverse of \(\overline{\bullet}\), for every \(f: \subseteq \Sigma^* \xrightarrow{\mathsf{comp}}\Sigma^*\), a partial function \(f': \subseteq \Sigma^* \xrightarrow{\mathsf{comp}}\Sigma^*\) satisfying \(f'(\overline{\bullet}) = f\) is partial computable. Then, by the universality of \(U\), there exists \(\boldsymbol{p} \in \operatorname{\mathsf{Programs}}_U\) such that, for every \(\boldsymbol{x}, \boldsymbol{w} \in \Sigma^*\), \(U (\overline{\boldsymbol{x}} \cdot \boldsymbol{p} \cdot \boldsymbol{w}) = f' (\overline{\boldsymbol{x}} \cdot \boldsymbol{w})\). Taking \(\boldsymbol{w} = ()\), we obtain \(U (\overline{\boldsymbol{x}} \cdot \boldsymbol{p}) = f' (\overline{\boldsymbol{x}})\). By the construction of \(f'\), \(f' (\overline{\boldsymbol{x}}) = f (\boldsymbol{x})\), and hence the universality of \(U\) in the ordinary sense follows.
Conversely, a universal function is not, in general, a universal conditional function. However, if the existence of a universal function is assumed, then it is easy to construct a universal conditional function. Concretely, when \(W\) is a universal function, construct \(U\) so that \(U (\overline{\boldsymbol{x}} \cdot \overline{\boldsymbol{q}} \cdot \boldsymbol{w}) = W \Big(\overline{\overline{\boldsymbol{x}} \cdot \boldsymbol{w}} \cdot \boldsymbol{q}\Big)\). By the universality of \(W\), for every partial computable function, there exists \(\boldsymbol{q} \in \Sigma^*\) such that \(W (\overline{\bullet} \cdot \boldsymbol{q}) = f (\bullet)\). Therefore, for every \(\boldsymbol{x}, \boldsymbol{w}\), taking \(\bullet = \overline{\boldsymbol{x}} \cdot \boldsymbol{w}\), we have \(W \Big(\overline{\overline{\boldsymbol{x}} \cdot \boldsymbol{w}} \cdot \boldsymbol{q}\Big) = f (\overline{\boldsymbol{x}} \cdot \boldsymbol{w})\). Thus, by the construction of \(U\), \(U (\overline{\boldsymbol{x}} \cdot \overline{\boldsymbol{q}} \cdot \boldsymbol{w}) = W \Big(\overline{\overline{\boldsymbol{x}} \cdot \boldsymbol{w}} \cdot \boldsymbol{q}\Big) = f (\overline{\boldsymbol{x}} \cdot \boldsymbol{w})\).
Universal functions and universal conditional functions associate computable functions \(f\) with strings \(\boldsymbol{p}\in\Sigma^*\); note that this association is not one-to-one, but one-to-many. The string \(\boldsymbol{p}\) can be interpreted as a program implementing \(f\). However, note that \(\boldsymbol{p}\) here is a string written in characters used by the computer, and natural language is not directly taken into account. Recall that, in the main text, we introduced interpretation functions in order to take natural-language strings into account.
Definition 16 (Plain Kolmogorov complexity of strings). Let \(U: \subseteq \Sigma^* \xrightarrow{\mathsf{comp}}\Sigma^*\) be a universal partial computable function. For \(\boldsymbol{x}, \boldsymbol{y} \in \Sigma^*\), define the conditional plain Kolmogorov complexity \(C_U (\boldsymbol{y} \mid \boldsymbol{x}) \in \mathbb{N}\) by \[C_U (\boldsymbol{y} \mid \boldsymbol{x}) = \min \Big\{|\boldsymbol{p}| \;\Big| \;U (\overline{\boldsymbol{x}} \cdot \boldsymbol{p}) \downarrow = \boldsymbol{y} \Big\}.\] Moreover, define the unconditional plain Kolmogorov complexity of \(\boldsymbol{y} \in \Sigma^*\) by \(C_U (\boldsymbol{y}) := C_U \big(\boldsymbol{y} \;\big| \;() \big)\).
Proposition 3 (Invariance theorem for plain Kolmogorov complexity). Consider two universal partial computable functions \(U, U': \subseteq \Sigma^* \xrightarrow{\mathsf{comp}}\Sigma^*\). There exists a constant \(c_{U, U'} \in \mathbb{N}\) such that, for every \(\boldsymbol{x}, \boldsymbol{y} \in \Sigma^*\), \(C_{U'} (\boldsymbol{y} \mid \boldsymbol{x}) \le C_{U} (\boldsymbol{y} \mid \boldsymbol{x}) + c_{U', U}\). Note that \(c_{U', U}\) does not depend on \(\boldsymbol{x}, \boldsymbol{y}\).
Remark 11 (The value of Kolmogorov complexity does not essentially depend on the choice of universal conditional function). As asserted by the invariance theorem above, even if one changes the universal conditional function in the definition of Kolmogorov complexity, the value changes only by an amount that does not depend on \(\boldsymbol{x}\) or \(\boldsymbol{y}\). In this sense, the value of Kolmogorov complexity does not essentially depend on the choice of universal conditional function.
Proof of Proposition 3. By the universality of \(U'\), there exists \(\boldsymbol{p}_U \in \operatorname{\mathsf{Programs}}_{U'} (U)\) such that, for every \(\boldsymbol{x}, \boldsymbol{w} \in \Sigma^*\), \(U'(\overline{\boldsymbol{x}} \cdot \boldsymbol{p}_U \cdot \boldsymbol{w}) = U (\overline{\boldsymbol{x}} \cdot \boldsymbol{w})\). Moreover, by the definition of \(C_U (\boldsymbol{y} \mid \boldsymbol{x})\), there exists \(\boldsymbol{p}_{\boldsymbol{y} \mid \boldsymbol{x}} \in \Sigma^*\) such that \(U (\overline{\boldsymbol{x}} \cdot \boldsymbol{p}_{\boldsymbol{y} \mid \boldsymbol{x}}) \downarrow = \boldsymbol{y}\) and \(|\boldsymbol{p}_{\boldsymbol{y} \mid \boldsymbol{x}}| = C_U (\boldsymbol{y} \mid \boldsymbol{x})\). Therefore, \(U'(\overline{\boldsymbol{x}} \cdot \boldsymbol{p}_U \cdot \boldsymbol{p}_{\boldsymbol{y} \mid \boldsymbol{x}}) = U (\overline{\boldsymbol{x}} \cdot \boldsymbol{p}_{\boldsymbol{y} \mid \boldsymbol{x}}) = \boldsymbol{y}\). Thus, the following holds: \[C_{U'} (\boldsymbol{y} \mid \boldsymbol{x}) \le |\boldsymbol{p}_U \cdot \boldsymbol{p}_{\boldsymbol{y} \mid \boldsymbol{x}}| = |\boldsymbol{p}_U| + |\boldsymbol{p}_{\boldsymbol{y} \mid \boldsymbol{x}}| = |\boldsymbol{p}_U| + C_U (\boldsymbol{y} \mid \boldsymbol{x})\] Since \(\boldsymbol{p}_U\) does not depend on \(\boldsymbol{x}, \boldsymbol{y}\), the proof is complete by taking \(c_{U', U} = |\boldsymbol{p}_U|\). ◻
Definition 17 (Plain Kolmogorov complexity of functions). For at most countable sets \(\mathcal{X}, \mathcal{Y}, \mathcal{Z}\), fix encoding functions \(\operatorname{\mathsf{Enc}}_{\mathcal{X}}:\mathcal{X}\twoheadrightarrow \Sigma^*, \operatorname{\mathsf{Enc}}_{\mathcal{Y}}:\mathcal{Y}\twoheadrightarrow \Sigma^*, \operatorname{\mathsf{Enc}}_{\mathcal{Z}}:\mathcal{Z}\twoheadrightarrow \Sigma^*\) that are injective and whose images are computable. For a partial computable function \(f:\subseteq\mathcal{Z}\xrightarrow{\mathsf{comp}}\mathcal{Y}\), define the plain Kolmogorov complexity \(C_U(f)\) of \(f\) by \[C_U(f) :=\min \Big\{|\boldsymbol{p}| \;\Big| \;\boldsymbol{p}\in\operatorname{\mathsf{Programs}}_{U} (f)\Big\}.\] Here, \(\operatorname{\mathsf{Programs}}_{U} (f) \subseteq \Sigma^*\) is defined by \[\begin{align} & \boldsymbol{p} \in \operatorname{\mathsf{Programs}}_{U} (f) \\ & \Leftrightarrow \begin{cases} U \Big(\overline{\operatorname{\mathsf{Enc}}_{\mathcal{Z}} (z)} \cdot \boldsymbol{p}\Big) \downarrow = \operatorname{\mathsf{Enc}}_{\mathcal{Y}} \big(f(z)\big) & \text{if z \in \operatorname{\mathsf{dom}}f}, \\ U \Big(\overline{\operatorname{\mathsf{Enc}}_{\mathcal{Z}} (z)} \cdot \boldsymbol{p}\Big) \uparrow & \text{if z \in \mathcal{Z} \setminus \operatorname{\mathsf{dom}}f}. \\ \end{cases} \end{align}\]
For \(x \in \mathcal{X}\), define the conditional plain Kolmogorov complexity \(C_U (f \mid x)\) by \[C_U (f \mid x)=\min \Big\{|\boldsymbol{p}| \;\Big| \;\boldsymbol{p} \in \operatorname{\mathsf{Programs}}_{U} (f \mid x) \Big\}.\] Here, \(\operatorname{\mathsf{Programs}}_{U} (f \mid x) \subseteq \Sigma^*\) is defined by \[\begin{align} & \boldsymbol{p} \in \operatorname{\mathsf{Programs}}_{U} (f \mid x) \\ & \Leftrightarrow \begin{cases} U \Big(\overline{\operatorname{\mathsf{Enc}}_{\mathcal{Z}} (z)} \cdot \overline{\operatorname{\mathsf{Enc}}_{\mathcal{X}} (x)} \cdot \boldsymbol{p}\Big) \downarrow = \operatorname{\mathsf{Enc}}_{\mathcal{Y}} \big(f(z)\big) & \text{if z \in \operatorname{\mathsf{dom}}f}, \\ U \Big(\overline{\operatorname{\mathsf{Enc}}_{\mathcal{Z}} (z)} \cdot \overline{\operatorname{\mathsf{Enc}}_{\mathcal{X}} (x)} \cdot \boldsymbol{p}\Big) \uparrow & \text{if z \in \mathcal{Z} \setminus \operatorname{\mathsf{dom}}f}. \\ \end{cases} \end{align}\]
In what follows, under a fixed injective encoding function \(\operatorname{\mathsf{Enc}}_{\mathbb{Q}}: \mathbb{Q}\to \Sigma^*\) for rational numbers whose image is computable, or decidable, for every string \(\boldsymbol{a} \in \Sigma^*\), real number \(r \in \mathbb{R}\), and natural number \(k \in \mathbb{N}\), define \(\boldsymbol{a} \approx_{k} r\) by \(\boldsymbol{a} \approx_{k} r \Leftrightarrow \exists \tilde{r} \in \mathbb{Q}, \operatorname{\mathsf{Enc}}_{\mathbb{Q}} (\tilde{r}) = \boldsymbol{a} \text{ and } |r - \tilde{r}| \le |\Sigma|^{-k}\). This means that the rational number represented by \(\boldsymbol{a}\) is an approximation to the real number \(r\) with accuracy \(|\Sigma|^{-k}\).
Definition 18 (Definition of Kolmogorov complexity for real-valued functions). Let \(f:\subseteq\mathcal{X}\xrightarrow{\mathsf{comp}}\mathbb{R}\). Define the set of programs \(\operatorname{\mathsf{Programs}}_{U} (f) \subseteq \Sigma^*\) that implement arbitrary-precision approximations of \(f\) by \[\begin{align} & \boldsymbol{p} \in \operatorname{\mathsf{Programs}}_{U} (f) \\ & \Leftrightarrow \begin{cases} U \Big(\overline{\operatorname{\mathsf{Enc}}_{\mathcal{Z}} (z)} \cdot \overline{\operatorname{\mathsf{Enc}}_{\mathcal{\mathbb{N}}} (k)} \cdot \boldsymbol{p}\Big) \downarrow \approx_k f(z) & \text{for all k \in \mathbb{N}, if z \in \operatorname{\mathsf{dom}}f}, \\ U \Big(\overline{\operatorname{\mathsf{Enc}}_{\mathcal{Z}} (z)} \cdot \overline{\operatorname{\mathsf{Enc}}_{\mathcal{\mathbb{N}}} (k)} \cdot \boldsymbol{p}\Big) \uparrow & \text{for all k \in \mathbb{N}, if z \in \mathcal{Z} \setminus \operatorname{\mathsf{dom}}f}. \\ \end{cases} \end{align}\] Here, \(\operatorname{\mathsf{Enc}}_{\mathbb{N}}\) and \(\operatorname{\mathsf{Enc}}_{\mathbb{Q}}\) are fixed computable injective encodings of \(\mathbb{N}\) and \(\mathbb{Q}\), respectively. Then \[C_U(f):=\min\{|\boldsymbol{p}|\mid \boldsymbol{p}\in\operatorname{\mathsf{Programs}}_U(f)\}\] is called the plain Kolmogorov complexity of \(f\). For \(z\in\mathcal{Z}\) and a fixed encoding function \(\operatorname{\mathsf{Enc}}_{\mathcal{Z}}:\mathcal{Z} \mathrel{\ooalign{\xrightarrow[\mkern 4mu]{\mathsf{comp}\mkern 4mu}\cr \hidewidth\rightarrow\mkern 4mu}} \Sigma^*\), define \(\operatorname{\mathsf{Programs}}_{U} (f \mid x) \subseteq \Sigma^*\) by \[\begin{align} & \boldsymbol{p} \in \operatorname{\mathsf{Programs}}_{U} (f \mid x) \\ & \Leftrightarrow \begin{cases} U \Big(\overline{\operatorname{\mathsf{Enc}}_{\mathcal{Z}} (z)} \cdot \overline{\operatorname{\mathsf{Enc}}_{\mathcal{\mathbb{N}}} (k)} \cdot \overline{\operatorname{\mathsf{Enc}}_{\mathcal{X}} (x)} \cdot \boldsymbol{p}\Big) \downarrow \approx_k f(z) & \text{for all k \in \mathbb{N}, if z \in \operatorname{\mathsf{dom}}f}, \\ U \Big(\overline{\operatorname{\mathsf{Enc}}_{\mathcal{Z}} (z)} \cdot \overline{\operatorname{\mathsf{Enc}}_{\mathcal{\mathbb{N}}} (k)} \cdot \overline{\operatorname{\mathsf{Enc}}_{\mathcal{X}} (x)} \cdot \boldsymbol{p}\Big) \uparrow & \text{for all k \in \mathbb{N}, if z \in \mathcal{Z} \setminus \operatorname{\mathsf{dom}}f}. \\ \end{cases} \end{align}\] and define \[C_U (f \mid x):=\min \Big\{|\boldsymbol{p}| \;\Big| \;\boldsymbol{p} \in \operatorname{\mathsf{Programs}}_{U} (f \mid x) \Big\}.\] This is called the plain conditional Kolmogorov complexity of \(f\) conditioned on \(x\).
The definition of plain Kolmogorov complexity is straightforward, but its properties are not convenient for computation. An operation that receives two programs \(\boldsymbol{p}_1, \boldsymbol{p}_2\) operating on a universal partial computable function and uses them as internal functions of another function will frequently appear later. Since \(\boldsymbol{p}_1\) and \(\boldsymbol{p}_2\) are not prefix-free, if they are simply concatenated and passed to another function as \(\boldsymbol{p}_1 \cdot \boldsymbol{p}_2\), the function receiving them cannot correctly decompose them into \(\boldsymbol{p}_1\) and \(\boldsymbol{p}_2\). Therefore, one must always make one of them self-delimiting before passing them, as in \(\overline{\boldsymbol{p}_1} \cdot \boldsymbol{p}_2\) or \(\overline{\boldsymbol{p}_2} \cdot \boldsymbol{p}_1\). This increases string length, and hence formulas for evaluating the plain Kolmogorov complexity of composed functions tend to become complicated.
The above problem does not arise if it is known that \(\boldsymbol{p}_1\) and \(\boldsymbol{p}_2\) each belong to some computable, or decidable, prefix-free set. This is because, when \(\boldsymbol{p}_1 \cdot \boldsymbol{p}_2\) is passed to another function, the receiving function can use prefix-freeness to computably decompose \(\boldsymbol{p}_1 \cdot \boldsymbol{p}_2\) into \(\boldsymbol{p}_1\) and \(\boldsymbol{p}_2\) internally; more formally, a well-defined projection function exists and is computable. For this reason, in order to make it easy to evaluate the quantities related to Kolmogorov complexity, it is convenient to use prefix-free Kolmogorov complexity, which restricts the domain to prefix-free sets. We now define prefix-free Kolmogorov complexity.
Definition 19 (Conditional prefix-free partial computable function). A partial computable function \(f: \subseteq \Sigma^* \xrightarrow{\mathsf{comp}}\Sigma^*\) is a conditional prefix-free partial computable function if, for every \(\boldsymbol{x} \in \Sigma^*\), the set \(\operatorname{\mathsf{dom}}f(\overline{\boldsymbol{x}} \cdot \bullet) := \{\boldsymbol{w} \in \Sigma^* \mid f(\overline{\boldsymbol{x}} \cdot \boldsymbol{w}) \downarrow \}\) is prefix-free.
Definition 20 (Universal conditional prefix-free function). A conditional prefix-free partial computable function \(V: \subseteq \Sigma^* \xrightarrow{\mathsf{comp}}\Sigma^*\) is a universal conditional prefix-free function if there exists a prefix-free computable set \(\mathsf{PFPrograms}_{V}\) such that, for every conditional prefix-free partial computable function \(f\), there exists \(\boldsymbol{p} \in \mathsf{PFPrograms}_{V}\) for which the equality of partial functions \(V (\overline{\bullet} \cdot \boldsymbol{p} \cdot \diamond) = f(\overline{\bullet} \cdot \diamond)\) holds, including their domains. More concretely, for every \(\boldsymbol{x}, \boldsymbol{w} \in \Sigma^*\), the following holds: \[\begin{cases} V(\overline{\boldsymbol{x}} \cdot \boldsymbol{p} \cdot \boldsymbol{w}) \downarrow = f(\overline{\boldsymbol{x}} \cdot \boldsymbol{w}) \downarrow & \quad \text{if \overline{\boldsymbol{x}} \cdot \boldsymbol{w} \in \operatorname{\mathsf{dom}}f}, \\ V(\overline{\boldsymbol{x}} \cdot \boldsymbol{p} \cdot \boldsymbol{w}) \uparrow & \quad \text{if \overline{\boldsymbol{x}} \cdot \boldsymbol{w} \notin \operatorname{\mathsf{dom}}f}. \end{cases}\]
Definition 21 (Prefix-free Kolmogorov complexity). Fix one universal conditional prefix-free function \(V: \subseteq \Sigma^* \xrightarrow{\mathsf{comp}}\Sigma^*\). For every \(\boldsymbol{x}, \boldsymbol{y} \in \Sigma^*\), define the conditional prefix-free Kolmogorov complexity \(K_V (\boldsymbol{y} \mid \boldsymbol{x}) \in \mathbb{N}\) by \[K_V (\boldsymbol{y} \mid \boldsymbol{x}) := \min \Big\{|\boldsymbol{p}| \;\Big| \;\boldsymbol{p} \in \Sigma^*, V(\overline{\boldsymbol{x}} \cdot \boldsymbol{p}) \downarrow = \boldsymbol{y} \Big\}.\] Moreover, for every \(\boldsymbol{y} \in \Sigma^*\), define the prefix-free Kolmogorov complexity \(K_V (\boldsymbol{y}) \in \mathbb{N}\) by conditioning on the empty string \(()\), that is, \(K_V (\boldsymbol{y}) := K_V \big(\boldsymbol{y} \;\big| \;() \big)\).
An invariance theorem also holds for prefix-free Kolmogorov complexity.
Proposition 4 (Invariance theorem for prefix-free Kolmogorov complexity). Consider two universal conditional prefix-free functions \(V, V': \subseteq \Sigma^* \xrightarrow{\mathsf{comp}}\Sigma^*\). There exists a constant \(c_{V, V'} \in \mathbb{N}\) such that, for every \(\boldsymbol{x}, \boldsymbol{y} \in \Sigma^*\), \(K_{V'} (\boldsymbol{y} \mid \boldsymbol{x}) \le K_{V} (\boldsymbol{y} \mid \boldsymbol{x}) + c_{V', V}\). Note that \(c_{V', V}\) does not depend on \(\boldsymbol{x}, \boldsymbol{y}\).
Proof. This is shown in the same way as Proposition 3. ◻
Definition 22 (Prefix-free Kolmogorov complexity of general elements). Let \(\mathcal{X}, \mathcal{Y}\) be at most countable sets, and fix their encoding functions \(\operatorname{\mathsf{Enc}}_{\mathcal{X}}: \mathcal{X} \to \Sigma^*\) and \(\operatorname{\mathsf{Enc}}_{\mathcal{Y}}: \mathcal{Y} \to \Sigma^*\). Both are assumed to be injective and to have computable, or decidable, images. Also fix one universal conditional prefix-free partial computable function \(V: \subseteq \Sigma^* \xrightarrow{\mathsf{comp}}\Sigma^*\). For every \(x \in \mathcal{X}\) and \(y \in \mathcal{Y}\), define the conditional prefix-free Kolmogorov complexity \(K_V (y \mid x) \in \mathbb{N}\) by \(K_V (y \mid x) = K_V \big(\operatorname{\mathsf{Enc}}_{\mathcal{Y}} (y) \;\big| \;\operatorname{\mathsf{Enc}}_{\mathcal{X}} (x) \big)\). Moreover, for every \(y \in \mathcal{Y}\), define the prefix-free Kolmogorov complexity \(K_V (y) \in \mathbb{N}\) by \(K_V (\operatorname{\mathsf{Enc}}_{\mathcal{Y}}(y))\).
Next, we define the prefix-free Kolmogorov complexity of real-valued functions.
Definition 23 (Prefix-free Kolmogorov complexity of real-valued functions). Let \(\mathcal{X}, \mathcal{Z}\) be at most countable sets, and fix their encoding functions \(\operatorname{\mathsf{Enc}}_{\mathcal{X}}: \mathcal{X} \to \Sigma^*\) and \(\operatorname{\mathsf{Enc}}_{\mathcal{Z}}: \mathcal{Z} \to \Sigma^*\). Also fix an encoding \(\operatorname{\mathsf{Enc}}_{\mathbb{Q}}: \mathbb{Q}\to \Sigma^*\) for rational numbers. All of these are assumed to be injective and to have computable, or decidable, images. For a real-valued function \(f: \subseteq \mathcal{Z} \to \mathbb{R}\), define the set of programs \(\mathsf{PFPrograms}_{V} (f \mid x) \subsetneq \Sigma^*\) that output arbitrary-precision approximations of \(f\) conditioned on \(x \in \mathcal{X}\) by \[\begin{align} & \boldsymbol{p} \in \mathsf{PFPrograms}_{V} (f \mid x) \Leftrightarrow \\ & \begin{cases} \forall k \in \mathbb{N}, V (\overline{\operatorname{\mathsf{Enc}}_{\mathcal{Z}} (z)} \cdot \overline{\operatorname{\mathsf{Enc}}_{\mathbb{N}}(k)} \cdot \overline{\operatorname{\mathsf{Enc}}_{\mathcal{X}} (x)} \cdot \boldsymbol{p}) \downarrow \;\approx_{k} f(z) & \text{if z \in \operatorname{\mathsf{dom}}f}, \\ \forall k \in \mathbb{N}, V (\overline{\operatorname{\mathsf{Enc}}_{\mathcal{Z}} (z)} \cdot \overline{\operatorname{\mathsf{Enc}}_{\mathbb{N}}(k)} \cdot \overline{\operatorname{\mathsf{Enc}}_{\mathcal{X}} (x)} \cdot \boldsymbol{p}) \uparrow &\text{otherwise.} \end{cases} \end{align}\] Then define the conditional prefix-free Kolmogorov complexity \(K_{V} (f \mid x)\) of \(f\) conditioned on \(x \in \mathcal{X}\) by \(K_{V} (f \mid x) = \min \{|\boldsymbol{p}| \mid \boldsymbol{p} \in \mathsf{PFPrograms}_{V} (f \mid x) \}\).
Moreover, for a real-valued function \(f: \subseteq \mathcal{Z} \to \mathbb{R}\), define the set of programs \(\mathsf{PFPrograms}_{V} (f) \subsetneq \Sigma^*\) that output arbitrary-precision approximations of \(f\) by \[\begin{align} & \boldsymbol{p} \in \mathsf{PFPrograms}_{V} (f) \Leftrightarrow \\ & \begin{cases} \forall k \in \mathbb{N}, V (\overline{\operatorname{\mathsf{Enc}}_{\mathcal{Z}} (z)} \cdot \overline{\operatorname{\mathsf{Enc}}_{\mathbb{N}}(k)} \cdot \boldsymbol{p}) \downarrow \;\approx_{k} f(z) & \text{if z \in \operatorname{\mathsf{dom}}f}, \\ \forall k \in \mathbb{N}, V (\overline{\operatorname{\mathsf{Enc}}_{\mathcal{Z}} (z)} \cdot \overline{\operatorname{\mathsf{Enc}}_{\mathbb{N}}(k)} \cdot \boldsymbol{p}) \uparrow &\text{otherwise.} \end{cases} \end{align}\] Then define the prefix-free Kolmogorov complexity \(K_V (f) \in \mathbb{N}\) of \(f\) by \(K_V (f) = \min \{|\boldsymbol{p}| \mid \boldsymbol{p} \in \mathsf{PFPrograms}_{V} (f) \}\).
Proposition 5 (Relation between plain Kolmogorov complexity and prefix-free Kolmogorov complexity). Let \(U: \subseteq \Sigma^* \to \Sigma^*\) be a universal partial computable function, and let \(V: \subseteq \Sigma^* \to \Sigma^*\) be a universal conditional prefix-free partial computable function. For the input space, or source set, \(\mathcal{X}\) and the output space, or target set, \(\mathcal{Y}\), fix encoding functions \(\operatorname{\mathsf{Enc}}_{\mathcal{X}}: \mathcal{X} \twoheadrightarrow \Sigma^*\) and \(\operatorname{\mathsf{Enc}}_{\mathcal{Y}}: \mathcal{Y} \twoheadrightarrow \Sigma^*\) that are injective and whose images are computable. Then there exist constants \(c_{U, V}, c_{V, U} \in \mathbb{N}\) such that, for every \(x \in \mathcal{X}\) and \(y \in \mathcal{Y}\), the following hold: \[\label{eqn:CtoK} C_U (y \mid x) \le K_V (y \mid x) + c_{U,V}.\tag{1}\]
\[\label{eqn:KtoC} K_V (y \mid x) \le C_U (y \mid x) + 2 \log_{|\Sigma|} \Big(C_U (y \mid x) + 1\Big) + c_{V,U}.\tag{2}\] Note that \(c_{U,V}, c_{V,U}\) do not depend on \(\boldsymbol{x}, \boldsymbol{y}\).
Proof. Even in the case of general \(\mathcal{X}, \mathcal{Y}\), Kolmogorov complexity is ultimately defined on \(\Sigma^*\), so it suffices to show the case \(\mathcal{X} = \mathcal{Y} = \Sigma^*\) and \(\operatorname{\mathsf{Enc}}_{\mathcal{X}} = \operatorname{\mathsf{Enc}}_{\mathcal{Y}} = \mathrm{id}_{\Sigma^*}\). In what follows, we consider only the case \(x = \boldsymbol{x} \in \Sigma^*\) and \(y = \boldsymbol{y} \in \Sigma^*\).
Proof of 1 To upper-bound \(C_U (\boldsymbol{y} \mid \boldsymbol{x})\), it suffices to construct \(\boldsymbol{p}'\) such that \(U(\overline{\boldsymbol{x}} \cdot \boldsymbol{p}') \downarrow = \boldsymbol{y}\). By the definition of prefix-free Kolmogorov complexity, there exists \(\boldsymbol{p}^* \in \Sigma^*\) satisfying \(V (\overline{\boldsymbol{x}} \cdot \boldsymbol{p}^*) \downarrow = \boldsymbol{y}\) and \(|\boldsymbol{p}^*| = K_V (\boldsymbol{y} \mid \boldsymbol{x})\). By the partial computability of \(V\) and the universality of \(U\), there exists \(\boldsymbol{p}_V \in \Sigma^*\) such that \(U (\overline{\boldsymbol{x}} \cdot \boldsymbol{p}_V \cdot \boldsymbol{p}^*) = V (\overline{\boldsymbol{x}} \cdot \boldsymbol{p}^*) = \boldsymbol{y}\). Therefore, by the definition of plain Kolmogorov complexity, the following holds: \[C_U (\boldsymbol{y} \mid \boldsymbol{x}) \le |\boldsymbol{p}_V \cdot \boldsymbol{p}^*| = |\boldsymbol{p}_V| + |\boldsymbol{p}^*| = |\boldsymbol{p}_V| + K_V (\boldsymbol{y} \mid \boldsymbol{x}).\]
Since \(\boldsymbol{p}_V\) does not depend on \(\boldsymbol{x}, \boldsymbol{y}\), the proof is complete by taking \(c_{U,V} = |\boldsymbol{p}_V|\).
Proof of 2
To upper-bound \(K_V (\boldsymbol{y} \mid \boldsymbol{x})\), it suffices to construct \(\boldsymbol{p}'\) such that \(V(\overline{\boldsymbol{x}} \cdot \boldsymbol{p}') \downarrow = \boldsymbol{y}\). First, by the definition of plain Kolmogorov complexity, there exists \(\boldsymbol{p}^* \in \Sigma^*\) satisfying \(U (\overline{\boldsymbol{x}} \cdot \boldsymbol{p}^*) \downarrow = \boldsymbol{y}\) and \(|\boldsymbol{p}^*| = C_U (y \mid x)\). Fix two distinct elements belonging to \(\Sigma\) and identify them with \(0\) and \(1\). Fix one self-delimiting function \(\overline{\bullet}^*: \Sigma^* \xrightarrow{\mathsf{comp}}\Sigma^*\) by \(\overline{\boldsymbol{w}}^* := 1^{\left|\operatorname{\mathsf{Enc}}^*_\mathbb{N}{|\boldsymbol{w}|}\right|-1} \cdot 0 \cdot \operatorname{\mathsf{Enc}}^*_\mathbb{N}{|\boldsymbol{w}|} \cdot \boldsymbol{w}\). Here, \(1^{\left|\operatorname{\mathsf{Enc}}^*_\mathbb{N}{|\boldsymbol{w}|}\right|-1}\) denotes the string obtained by repeating the character \(1\) exactly \(\Big|\operatorname{\mathsf{Enc}}^*_\mathbb{N}{|\boldsymbol{w}|}\Big|-1\) times. Note that \(|\overline{\boldsymbol{w}}^*| = |\boldsymbol{w}| + 2 \lceil \log_{|\Sigma|} (\min \{|\boldsymbol{w}|, 1\}) \rceil \le |\boldsymbol{w}| + 2 \log_{|\Sigma|} (|\boldsymbol{w}|+1) + 1\). Define a partial computable function \(f: \subseteq \Sigma^* \xrightarrow{\mathsf{comp}}\Sigma^*\) whose domain is prefix-free as follows.
Input: \(\boldsymbol{z} \in \Sigma^*\).
Step 1: Find \(\boldsymbol{x}, \boldsymbol{p} \in \Sigma^*\) such that \(\boldsymbol{z} = \overline{\boldsymbol{x}}^* \cdot \overline{\boldsymbol{p}}^*\). By the computability and prefix-freeness of the image of \(\overline{\bullet}^*\), if such \(\boldsymbol{x}, \boldsymbol{p} \in \Sigma^*\) exist, then they are unique and can be found by computation. If it is determined by computation that no such \(\boldsymbol{x}, \boldsymbol{p} \in \Sigma^*\) exist, intentionally enter an infinite loop; that is, set \(f(\boldsymbol{z}) \uparrow\).
Step 2: Compute \(U (\overline{\boldsymbol{x}} \cdot \boldsymbol{p})\); here we use the fact that \(U\) is partial computable. If \(U (\overline{\boldsymbol{x}} \cdot \boldsymbol{p}) \uparrow\), this corresponds to an infinite loop, and hence \(f(\boldsymbol{z}) \uparrow\). If \(U (\overline{\boldsymbol{p}} \cdot \boldsymbol{x}) \downarrow\), let \(\boldsymbol{y} = U (\overline{\boldsymbol{x}} \cdot \boldsymbol{p})\).
Step 3: Output \(\boldsymbol{y}\) then terminate.
Then, if \(U(\overline{\boldsymbol{x}} \cdot \boldsymbol{p}) \downarrow\), we have \(U(\overline{\boldsymbol{x}} \cdot \boldsymbol{p}) \downarrow = f(\overline{\boldsymbol{x}} \cdot \overline{\boldsymbol{p}}) \downarrow\). By the universality of \(V\), there exists \(\boldsymbol{p}_f \in \mathsf{PFPrograms}_{V}\) such that, for every \(\boldsymbol{x}, \boldsymbol{p} \in \Sigma^*\), \(V(\overline{\boldsymbol{x}} \cdot \boldsymbol{p}_f \cdot \overline{\boldsymbol{p}}) = f(\overline{\boldsymbol{x}} \cdot \overline{\boldsymbol{p}})\). Taking \(\boldsymbol{p} = \boldsymbol{p}^*\), we have \(V(\overline{\boldsymbol{x}} \cdot \boldsymbol{p}_f \cdot \overline{\boldsymbol{p}^*}) = f(\overline{\boldsymbol{x}} \cdot \overline{\boldsymbol{p}^*}) = U (\overline{\boldsymbol{x}} \cdot \boldsymbol{p}^*) = \boldsymbol{y}\). Therefore, by the definition of prefix-free Kolmogorov complexity, the following holds: \[\begin{align} K_V (\boldsymbol{y} \mid \boldsymbol{x}) &\le |\boldsymbol{p}_f \cdot \overline{\boldsymbol{p}^*}| \\ &\le |\boldsymbol{p}_f| + |\boldsymbol{p}^*| + 2 \log_{|\Sigma|} (|\boldsymbol{p}^*| + 1) + 1 \\ &= |\boldsymbol{p}_f| + C_U (\boldsymbol{y} \mid \boldsymbol{x}) + 2 \log_{|\Sigma|} (C_U (\boldsymbol{y} \mid \boldsymbol{x}) + 1) + 1. \end{align}\] Since \(\boldsymbol{p}_f\) does not depend on \(\boldsymbol{x}, \boldsymbol{y}\), the proof is complete by taking \(c_{V,U} = |\boldsymbol{p}_f| + 1\). ◻
Proposition 6. Let \(U: \subseteq \Sigma^* \to \Sigma^*\) be a universal partial computable function, and let \(V: \subseteq \Sigma^* \to \Sigma^*\) be a universal conditional prefix-free partial computable function. Let \(\mathcal{X}, \mathcal{Z}\) be at most countable sets, and fix their encoding functions \(\operatorname{\mathsf{Enc}}_{\mathcal{X}}: \mathcal{X} \to \Sigma^*\) and \(\operatorname{\mathsf{Enc}}_{\mathcal{Z}}: \mathcal{Z} \to \Sigma^*\). Also fix an encoding \(\operatorname{\mathsf{Enc}}_{\mathbb{Q}}: \mathbb{Q}\to \Sigma^*\) for rational numbers. All of these are assumed to be injective and to have computable, or decidable, images. Then there exists a constant \(c_{V, U}\) such that, for every real-valued function \(f: \subseteq \mathcal{Z} \to \mathbb{R}\) and every \(x \in \mathcal{X}\), the following holds: \[K_V (f \mid x) \le C_U (f \mid x) + 2 \log_{|\Sigma|} \Big(C_U (f \mid x) + 1\Big) + c_{V,U}.\]
Proof. This can be proved in the same way as Proposition 5. ◻
Proof. Let \(A=(f,\tau)\) be a stochastic input-output AI. Fix \(x\in\mathcal{X}'\) and \(y\in\mathcal{Y}\). By definition, \[Q_A(y\mid x) = \sum_{\boldsymbol{u}\in\mathcal{T}_x} n^{-|\boldsymbol{u}|}\mathbb{1}(f(\boldsymbol{u},x)=y).\]
First, we confirm that \(Q_A(\cdot\mid x)\) is a probability mass function. Since \(\mathcal{T}_x\) is prefix-free, Kraft’s inequality gives \[\sum_{\boldsymbol{u}\in\mathcal{T}_x}n^{-|\boldsymbol{u}|}\le 1.\] On the other hand, the constructive stopping guarantee gives, for every \(k\in\mathbb{N}\), \[1- \sum_{\substack{\boldsymbol{u}\in\mathcal{T}_x\\ |\boldsymbol{u}|\le N_{\mathrm{stop}}(x,k)}} n^{-|\boldsymbol{u}|} \le |\Sigma|^{-k}.\] Therefore, by letting \(k\to\infty\), we obtain \[\label{eqn:AIStop} \sum_{\boldsymbol{u}\in\mathcal{T}_x}n^{-|\boldsymbol{u}|}=1.\tag{3}\] Note that the monotone convergence theorem can be used to justify this limiting operation. Thus, the intended operation halts with probability \(1\), and \(Q_A(\cdot\mid x)\) is a probability mass function rather than a sub-probability mass function.
Next, we show that \(Q_A(y\mid x)\) is computable. For \(N\in\mathbb{N}\), define the finite partial sum \[S_N(y\mid x) := \sum_{\substack{\boldsymbol{u}\in\mathcal{T}_x\\ |\boldsymbol{u}|\le N}} n^{-|\boldsymbol{u}|}\mathbb{1}(f(\boldsymbol{u},x)=y).\] Since the set \(\{\boldsymbol{u}\in(\mathbb{N}_{<n})^*\mid |\boldsymbol{u}|\le N\}\) is finite, the above sum is a finite sum. Furthermore, since \(\tau\) is total computable on \((\mathbb{N}_{<n})^*\times\mathcal{X}'\), membership \(\boldsymbol{u}\in\mathcal{T}_x\) can be decidably computed. Moreover, if \(\boldsymbol{u}\in\mathcal{T}_x\), then by the consistency between the domain of the main function and the accepted random-sequence set in Definition 1, \((\boldsymbol{u},x)\in\operatorname{\mathsf{dom}}f\). Therefore, \(f(\boldsymbol{u},x)\) can be computed in finite time. Hence, \(S_N(y\mid x)\) is a rational number computable from \(x,y,N\).
For every \(N\), \[\begin{align} 0 &\le Q_A(y\mid x)-S_N(y\mid x)\\ &= \sum_{\substack{\boldsymbol{u}\in\mathcal{T}_x\\ |\boldsymbol{u}|>N}} n^{-|\boldsymbol{u}|}\mathbb{1}(f(\boldsymbol{u},x)=y)\\ &\le \sum_{\substack{\boldsymbol{u}\in\mathcal{T}_x\\ |\boldsymbol{u}|>N}} n^{-|\boldsymbol{u}|}\\ &= 1- \sum_{\substack{\boldsymbol{u}\in\mathcal{T}_x\\ |\boldsymbol{u}|\le N}} n^{-|\boldsymbol{u}|}. \end{align}\] Here, the last equality follows from 3 . For any accuracy \(k\in\mathbb{N}\), by the construction of \(N_{\mathrm{stop}}\), \[1- \sum_{\substack{\boldsymbol{u}\in\mathcal{T}_x\\ |\boldsymbol{u}|\le N_{\mathrm{stop}}(x,k)}} n^{-|\boldsymbol{u}|} \le |\Sigma|^{-k}.\] Therefore, \[0\le Q_A(y\mid x)-S_{N_{\mathrm{stop}}}(x,k)(y\mid x) \le |\Sigma|^{-k}.\] Thus, by computing \(S_{N_{\mathrm{stop}}(x,k)}(y\mid x)\) from \((k,x,y)\), one can approximate \(Q_A(y\mid x)\) within error \(|\Sigma|^{-k}\). Therefore, \(Q_A(y\mid x)\) is computable to arbitrary precision from \(x,y\). That is, \[Q_A(\cdot\mid\cdot):\mathcal{X}'\times\mathcal{Y}\xrightarrow{\mathsf{comp}}[0,1]\] is a computable conditional probability mass function. ◻
Remark 12 (Constructive stopping guarantee in LLMs). In practical LLMs, a maximum generation length is usually set. In this case, there exists a finite upper bound on random-number consumption that is computable from the input, and therefore the constructive stopping guarantee automatically holds.
Lemma 1 (Shannon–Fano–Elias coding). There exist conditional prefix-free computable functions \(\mathsf{SFE}_{\mathsf{Enc}}: \subseteq \Sigma^* \xrightarrow{\mathsf{comp}}\Sigma^*\) and \(\mathsf{SFE}_{\mathsf{Dec}}: \subseteq \Sigma^* \xrightarrow{\mathsf{comp}}\Sigma^*\) satisfying the following.
Conditions satisfied by \(\mathsf{SFE}_{\mathsf{Enc}}: \subseteq \Sigma^* \xrightarrow{\mathsf{comp}}\Sigma^*\): For every computable conditional probability mass function \(Q: \mathcal{X} \times \mathcal{Y} \xrightarrow{\mathsf{comp}}[0, 1]\), every \(x \in \mathcal{X}\), and every \(\boldsymbol{q} \in \mathsf{PFPrograms}_{V} \Big(Q(\bullet \mid x) \;\Big| \;x\Big)\), the following hold.
For every \(y \in \mathcal{Y}\) satisfying \(Q (y \mid x) > 0\), \(\mathsf{SFE}_{\mathsf{Enc}} \Big(\overline{\operatorname{\mathsf{Enc}}_\mathcal{X} (x)} \cdot \overline{\operatorname{\mathsf{Enc}}_\mathcal{Y} (y)} \cdot \boldsymbol{q} \Big) \downarrow\). In this case, \(\boldsymbol{c}_{y \mid x, \boldsymbol{q}} := \mathsf{SFE}_{\mathsf{Enc}} \Big(\overline{\operatorname{\mathsf{Enc}}_\mathcal{X} (x)} \cdot \overline{\operatorname{\mathsf{Enc}}_\mathcal{Y} (y)} \cdot \boldsymbol{q} \Big)\) can be regarded as a new code for \(y\).
For every \(y \in \mathcal{Y}\) satisfying \(Q (y \mid x) > 0\), the code length satisfies the inequality \(|\boldsymbol{c}_{y \mid x, \boldsymbol{q}}| \le - \log_{|\Sigma|} Q (y \mid x) + 4\).
The code set \(\mathcal{C}_{x, \boldsymbol{q}} := \Big\{\boldsymbol{c}_{y \mid x, \boldsymbol{q}} \;\Big| \;y \in \mathcal{Y}, Q (y \mid x) > 0 \Big\}\) is prefix-free.
Conditions satisfied by \(\mathsf{SFE}_{\mathsf{Dec}}: \subseteq \Sigma^* \xrightarrow{\mathsf{comp}}\Sigma^*\): For every computable conditional probability mass function \(Q: \mathcal{X} \times \mathcal{Y} \xrightarrow{\mathsf{comp}}[0, 1]\), every \(x \in \mathcal{X}\), and every \(\boldsymbol{q} \in \mathsf{PFPrograms}_{V} \Big(Q(\bullet \mid x) \;\Big| \;x\Big)\), the following holds.
In this paper, the above coding scheme is called Shannon-Fano-Elias coding. \(\mathsf{SFE}_{\mathsf{Enc}}\) and \(\mathsf{SFE}_{\mathsf{Dec}}\) are the encoder and decoder in Shannon-Fano-Elias coding, respectively.
Proof. The idea of Shannon-Fano-Elias coding is as follows. Using the fact that the image of \(\operatorname{\mathsf{Enc}}_{\mathcal{Y}}\) is computable, or decidable, order the elements of \(\mathcal{Y}\) lexicographically and, based on this order, use \(\boldsymbol{q}\) to construct the cumulative distribution function \(F: \mathbb{N}\to [0, 1]\) with sufficient precision. For each element \(y \in \mathcal{Y}\), take the fractional representation of a finite base-\(|\Sigma|\) decimal \(c_{i} = 0.c_{i,1} c_{i,2} \cdots c_{i,N_i}\) that lies inside the cumulative-distribution interval \(\Big[F (i), F (i + 1)\Big)\) corresponding to its lexicographic index \(i\), and output it as the code \(\boldsymbol{c}_{y \mid x, \boldsymbol{q}}\) for \(y\). At this time, choose it so that the interval \(\Big[c_{i}, \overline{c}_{i}\Big)\) of real numbers truncated to the finite decimal \(c_{i}\), where \(\overline{c}_{i} := c_i + |\Sigma|^{-k_i}\), is always completely contained in the cumulative-distribution interval corresponding to \(y\), that is, so that \(\Big[c_{i}, \overline{c}_{i}\Big) \subset \Big[F (i), F (i + 1)\Big)\). This guarantees the prefix-freeness of the code set \(\mathcal{C}_{x, \boldsymbol{q}} := \Big\{\boldsymbol{c}_{y \mid x, \boldsymbol{q}} \;\Big| \;y \in \mathcal{Y} \Big\}\). Indeed, for \(i \ne i'\), the property of the cumulative distribution function implies \(\Big[F (i), F (i + 1)\Big) \cap \Big[F (i'), F (i' + 1)\Big) = \{\}\), and from this it follows that \(\Big[c_{i}, \overline{c}_{i}\Big) \cap \Big[c_{i'}, \overline{c}_{i'}\Big) = \{\}\). This clearly implies that neither code is a prefix of the other. Therefore, what must be done is to choose \(c_i\) concretely, with as few digits as possible, and so that \(\Big[c_{i}, \overline{c}_{i}\Big) \subset \Big[F (i), F (i + 1)\Big)\). This can be achieved by the following algorithm using \(\boldsymbol{q}\), which approximates \(Q\) to arbitrary precision.
Computation algorithm for \(\mathsf{SFE}_{\mathsf{Enc}}\)
Input: \(\overline{\operatorname{\mathsf{Enc}}_{\mathcal{X}} (x)} \cdot \overline{\operatorname{\mathsf{Enc}}_{\mathcal{Y}} (y)} \cdot \boldsymbol{q}\).
Step 1: Using prefix-freeness, separate the input into \(\overline{\operatorname{\mathsf{Enc}}_{\mathcal{X}} (x)} \in \overline{\operatorname{\mathsf{Enc}}_{\mathcal{X}} (\mathcal{X})}\), \(\overline{\operatorname{\mathsf{Enc}}_{\mathcal{Y}} (y)} \in \overline{\operatorname{\mathsf{Enc}}_{\mathcal{Y}} (\mathcal{Y})}\), and \(\boldsymbol{q} \in \mathsf{PFPrograms}_{V}\). If they cannot be separated correctly, enter an infinite loop intentionally.
Step 2: Using the computability, or decidability, of the image of \(\operatorname{\mathsf{Enc}}_{\mathcal{Y}}\), obtain \(\operatorname{\mathsf{Enc}}_{\mathcal{Y}} (y)\) from \(\overline{\operatorname{\mathsf{Enc}}_{\mathcal{Y}} (y)}\).
Step 3: By scanning the elements of \(\Sigma^*\) in lexicographic order, obtain the first \(i\) elements \(\boldsymbol{y}_0, \boldsymbol{y}_1, ..., \boldsymbol{y}_i\) in the lexicographic ordering of the set \(\operatorname{\mathsf{Enc}}_{\mathcal{Y}} (\mathcal{Y}) \subseteq \Sigma^*\). Here, \(i\) is determined by \(\boldsymbol{y}_i = \operatorname{\mathsf{Enc}}_{\mathcal{Y}} (y)\). In what follows, define \(y_j \in \mathcal{Y}\) by \(\operatorname{\mathsf{Enc}}_{\mathcal{Y}} (y_j) = \boldsymbol{y}_j\) for \(j = 0, 1, ..., i\).
Step 4: Using \(\boldsymbol{q}\), iterate \(k = 0, 1, ...\) in ascending order, compute an approximation \(\tilde{Q}_i^{(k)}\) of \(Q (y_i \mid x)\) with accuracy \(\pm |\Sigma|^{-k}\), and find \(k^* = \min \Big\{ k \in \mathbb{N}\;\Big| \;\tilde{Q}_i^{(k)} \ge |\Sigma|^{-(k-3)} - |\Sigma|^{-k}\Big\}\). Such a \(k^*\) necessarily exists, because \(\tilde{Q}_i^{(k)} \to Q (y_i \mid x) > 0\) and \(|\Sigma|^{-(k-3)} - |\Sigma|^{-k} \to 0\) as \(k \to +\infty\).
Step 5: Using \(\boldsymbol{q}\), compute an approximation \(\tilde{F}_i^{(k^*)}\) of \(F_{i} := \sum_{j=0}^{i - 1} Q (y_j \mid x)\) with accuracy \(\pm |\Sigma|^{-k^*}\).
Step 6: Let \(c_i\) be obtained by rounding up \(\tilde{F}_i^{(k^*)} + 2|\Sigma|^{-k^*}\) after the \((k^*+1)\)-st digit after the decimal point, and let the first \(k\) digits after the decimal point, \(\boldsymbol{c}_{Q, y \mid x} = c_{i,1} c_{i,2} \cdots c_{i,k^*} \in \Sigma^{k^*}\), be the code for \(y\). In formulas, let \(c_i = \min_{\boldsymbol{c}_{i} \in \Sigma^*} \Big\{c \;\Big| \;c = \sum_{\ell=1}^{k^*} c_{i, \ell} |\Sigma|^{-\ell}, \;c \ge \tilde{F}_i^{(k^*)} + 2 |\Sigma|^{-k^*}\Big\}\), and let \(\boldsymbol{c}_i = \arg \min_{\boldsymbol{c}_{i} \in \Sigma^*} \Big\{c \;\Big| \;c = \sum_{\ell=1}^{k^*} c_{i, \ell} |\Sigma|^{-\ell}, \;c \ge \tilde{F}_i^{(k^*)} + 2 |\Sigma|^{-k^*}\Big\}\).
Step 7: Output \(\boldsymbol{c}_{y \mid x, \boldsymbol{q}} = \boldsymbol{c}_i\).
We prove that \(\mathsf{SFE}_{\mathsf{Enc}}\) defined above satisfies the desired properties. The prefix-freeness of the domain of \(\mathsf{SFE}_{\mathsf{Enc}}\) is guaranteed by Step 1. What remains to prove is the code-length condition \(k^* < - \log_{|\Sigma|} Q (y \mid x) + 4\), and the sufficient condition for prefix-freeness of the code set, namely \(\Big[c_i, c_i + |\Sigma|^{-k^*}\Big) \subseteq \Big[F_i, F_{i+1}\Big)\). By the definition of \(k^*\), \[\label{eqn:KStar} \tilde{Q}_i^{(k^*)} \ge |\Sigma|^{-(k^*-3)} - |\Sigma|^{-k^*}\tag{4}\] and \[\label{eqn:KStar-1} \tilde{Q}_i^{(k^*-1)} < |\Sigma|^{-(k^*-4)} - |\Sigma|^{-(k^*-1)}\tag{5}\] hold. First, by Equation 5 and the fact that \(\tilde{Q}_i^{(k^*-1)}\) is a \(\pm |\Sigma|^{-(k^*-1)}\) approximation, \[Q (y \mid x) \le \tilde{Q}_i^{(k^*-1)} + |\Sigma|^{-(k^*-1)} < \Big(|\Sigma|^{-(k^*-4)} - |\Sigma|^{-(k^*-1)}\Big) + |\Sigma|^{-(k^*-1)} \le |\Sigma|^{-(k^*-4)}.\] Therefore, \(|\boldsymbol{c}_{i}| = k^* < - \log_{|\Sigma|} Q (y \mid x) + 4\) holds.
It remains to prove the sufficient condition for prefix-freeness, namely \(\Big[c_i, c_i + |\Sigma|^{-k^*}\Big) \subseteq \Big[F_i, F_{i+1}\Big)\). Here, \(F_i = \sum_{j=0}^{i-1} Q (y_j \mid x)\) and \(F_{i+1} = F_i + Q (y_i \mid x)\). In what follows, we prove the stronger statement \[\label{eqn:SFEMargin} \Big[c_i, c_i + |\Sigma|^{-k^*}\Big) \subseteq \Big[F_i + |\Sigma|^{-k^*}, F_{i+1} - |\Sigma|^{-k^*}\Big).\tag{6}\] For this purpose, it suffices to prove \(c_i \ge F_i + |\Sigma|^{-k^*}\) and \(\overline{c}_i := c_i + |\Sigma|^{- k^*} \le F_{i+1} - |\Sigma|^{- k^*}\). First, by the construction of \(c_i\), \(c_i \ge \tilde{F}_{i}^{(k^*)} + 2|\Sigma|^{-{k^*}}\), and by the fact that \(\tilde{F}_{i}^{(k^*)}\) is a \(\pm |\Sigma|^{-{k^*}}\) approximation, it follows that \(c_i \ge F_i + |\Sigma|^{-{k^*}}\). Similarly, since the increase in the rounding-up operation in the construction of \(c_i\) is less than \(|\Sigma|^{-k^*}\), we have \(c_i < \tilde{F}_{i}^{(k^*)} + 2|\Sigma|^{-k^*} + |\Sigma|^{-k^*} = \tilde{F}_{i}^{(k^*)} + 3|\Sigma|^{-k^*}\). Furthermore, by the fact that \(\tilde{F}_{i}^{(k^*)}\) is a \(\pm |\Sigma|^{-{k^*}}\) approximation, the following can be said: \[\begin{align} \overline{c}_i := c_i + |\Sigma|^{- k^*} &< \Big(\tilde{F}_{i}^{(k^*)} + 3 |\Sigma|^{-k^*}\Big) + |\Sigma|^{- k^*} \\ &\le \Big(\big(F_i + |\Sigma|^{-k^*}\big) + 3 |\Sigma|^{-k^*}\Big) + |\Sigma|^{- k^*} \\ &\le F_i + \big(\tilde{Q}_i^{(k^*)} - |\Sigma|^{- k^*}\big) - |\Sigma|^{- k^*} \\ &\le F_i + Q (y_i \mid x) - |\Sigma|^{- k^*}. \end{align}\] Here, the third inequality can be proved from Equation 5 as follows: \[\begin{align} \big(\tilde{Q}_i^{(k^*)} - |\Sigma|^{- k^*}\big) - |\Sigma|^{- k^*} &\ge |\Sigma|^{- (k^*-3)} - 3 |\Sigma|^{-k^*} \\ &\ge 8 |\Sigma|^{-k^*} - 3 |\Sigma|^{-k^*} \\ &= 5 |\Sigma|^{-k^*}. \end{align}\] This proves the properties of \(\mathsf{SFE}_{\mathsf{Enc}}\).
Next, we construct \(\mathsf{SFE}_{\mathsf{Dec}}\) and prove that it has the desired properties. The idea is simply to recover the \(y_i\) corresponding to the index \(i\) such that \(c \in [F_i, F_{i+1})\), given the code \(c\). This operation should be carried out while taking approximation errors into account.
Computation algorithm for \(\mathsf{SFE}_{\mathsf{Dec}}\)
Input: \(\overline{\operatorname{\mathsf{Enc}}_{\mathcal{X}} (x)} \cdot \boldsymbol{q} \cdot \boldsymbol{c}\)
Step 1: Using prefix-freeness, separate the input into \(\overline{\operatorname{\mathsf{Enc}}_{\mathcal{X}} (x)} \in \overline{\operatorname{\mathsf{Enc}}_{\mathcal{X}} (\mathcal{X})}\), \(\boldsymbol{q} \in \mathsf{PFPrograms}_{V}\), and \(\boldsymbol{c} \in \Sigma^*\). If they cannot be separated correctly, enter an infinite loop intentionally.
Step 2: Initialize \(i=0\).
Step 3: By scanning \(\Sigma^*\) in lexicographic order, find the element \(\boldsymbol{y}_i\) that is the \(i\)-th element in lexicographic order among the elements of \(\operatorname{\mathsf{Enc}}_{\mathcal{Y}} (\mathcal{Y}) \subseteq \Sigma^*\).
Step 4: Using \(\boldsymbol{q}\), as in Step 4 of \(\mathsf{SFE}_{\mathsf{Enc}}\), iterate \(k = 0, 1, ...\) in ascending order, compute an approximation \(\tilde{Q}_i^{(k)}\) of \(Q (y_i \mid x)\) with accuracy \(\pm |\Sigma|^{-k}\), and find \(k^* = \min \Big\{ k \in \mathbb{N}\;\Big| \;\tilde{Q}_i^{(k)} \ge |\Sigma|^{-(k-3)} - |\Sigma|^{-k}\Big\}\).
Step 5: Using \(\boldsymbol{q}\), as in Step 5 of \(\mathsf{SFE}_{\mathsf{Enc}}\), compute an approximation \(\tilde{F}_i^{(k^*)}\) of \(F_{i} := \sum_{j=0}^{i - 1} Q (y_j \mid x)\) with accuracy \(\pm |\Sigma|^{-k^*}\).
Step 6: As in Step 6 of \(\mathsf{SFE}_{\mathsf{Enc}}\), let \(\boldsymbol{c}_i = \arg \min_{\boldsymbol{c}_{i} \in \Sigma^*} \Big\{c \;\Big| \;c = \sum_{\ell=1}^{k^*} c_{i, \ell} |\Sigma|^{-\ell}, \;c \ge \tilde{F}_i^{(k^*)} + 2 |\Sigma|^{-k^*}\Big\}\), and If \(\boldsymbol{c}_i = \boldsymbol{c}\) then go to Step 8.
Step 7: Set \(i \gets i+1\), and go to Step 3.
Step 8: Output \(\boldsymbol{y}_i\) then terminate.
It is clear from the construction that this is the inverse of \(\mathsf{SFE}_{\mathsf{Enc}}\). Furthermore, given \(\overline{\operatorname{\mathsf{Enc}}_{\mathcal{X}} (x)}\) and \(\boldsymbol{q}\), the condition for halting is \(\boldsymbol{c} \in \mathcal{C}_{x, \boldsymbol{q}}\), and \(\mathcal{C}_{x, \boldsymbol{q}}\) is prefix-free. Hence \(\operatorname{\mathsf{dom}}\mathsf{SFE}_{\mathsf{Dec}}\) is also prefix-free. This proves that \(\mathsf{SFE}_{\mathsf{Dec}}\) has all the desired properties. ◻
Remark 13. Although it is not relevant to the subsequent proof, if Step 5 and Step 6 in the computation algorithm for \(\mathsf{SFE}_{\mathsf{Dec}}\) are modified as follows, then at the cost of losing the prefix-freeness of the domain, one can use different elements of \(\mathsf{PFPrograms}_{V} \Big(Q(\bullet \mid x) \;\Big| \;x\Big)\) at the time of encoding and decoding. More specifically, for \(\boldsymbol{q}, \boldsymbol{q}' \in \mathsf{PFPrograms}_{V} \Big(Q(\bullet \mid x) \;\Big| \;x\Big)\), for every \(y \in \mathcal{Y}\) satisfying \(Q (y \mid x) > 0\), \(\mathsf{SFE}_{\mathsf{Dec}} \Big(\overline{\operatorname{\mathsf{Enc}}_{\mathcal{X}} (x)} \cdot \boldsymbol{q}' \cdot \boldsymbol{c}_{y \mid x, \boldsymbol{q}}\Big) \downarrow = \operatorname{\mathsf{Enc}}_{\mathcal{Y}} (y)\) holds.
Step 5: Using \(\boldsymbol{p}\), compute approximations \(\tilde{F}_i^{(k^*)}\) and \(\tilde{F}_{i+1}^{(k^*)}\) with accuracy \(\pm |\Sigma|^{-k^*}\) of \(F_{i} := \sum_{j=0}^{i - 1} Q (y_j \mid x)\) and \(F_{i} := \sum_{j=0}^{i - 1} Q (y_j \mid x)\), respectively.
Step 6: If \(\sum_{\ell=1}^{k^*} c_{\ell} |\Sigma|^{-\ell} \in \Big[\tilde{F}_i^{(k^* + 1)} + |\Sigma|^{-(k^* + 1)}, \tilde{F}_{i+1}^{(k^* + 1)} - |\Sigma|^{-(k^* + 1)}\Big)\) then go to Step 8.
This decodes correctly because, by Equation 6 , \(c_i \in \Big[F_i + |\Sigma|^{-k^*}, F_{i+1} - |\Sigma|^{-k^*}\Big)\), and \(\Big[F_i + |\Sigma|^{-k^*}, F_{i+1} - |\Sigma|^{-k^*}\Big) \subseteq \Big[\tilde{F}_i^{(k^* + 1)} + |\Sigma|^{-(k^* + 1)}, \tilde{F}_{i+1}^{(k^* + 1)} - |\Sigma|^{-(k^* + 1)}\Big)\) holds. Therefore, Step 6 necessarily stops at the correct \(i\). Moreover, since \(\Big[\tilde{F}_i^{(k^* + 1)} + |\Sigma|^{-(k^* + 1)}, \tilde{F}_{i+1}^{(k^* + 1)} - |\Sigma|^{-(k^* + 1)}\Big) \subseteq [F_i, F_{i+1})\), the stopping conditions for different \(i\) are mutually disjoint, and the algorithm never stops at an incorrect \(i\).
Lemma 2 (Lower bound on log-likelihood by prefix-free complexity). Let the base of \(\log\) be \(|\Sigma|\). Let \(V\) be a prefix-free universal function. Let \(Q(\cdot\mid\cdot):\mathcal{X}\times\mathcal{Y}\xrightarrow{\mathsf{comp}}[0,1]\) be a constructively summable computable conditional probability mass function. Then there exists a constant \(c_{\mathsf{code}}\) such that, for all \(Q\), all \(x\in\mathcal{X}\), and all \(y\in\mathcal{Y}\), \[\label{eqn:MainPrefix} -\log_{|\Sigma|} Q(y\mid x)+K_V(Q(\cdot\mid x)\mid x)+c_{\mathsf{code}}\ge K_V(y\mid x)\tag{7}\] holds. Here, \(c_{\mathsf{code}}\) arises from the additive constant for simulating the fixed Shannon–Fano–Elias decoder by \(V\), and from the fixed additional length of the code construction, and does not depend on \(Q,x,y\). When \(Q(y\mid x)=0\), the left-hand side is interpreted as \(+\infty\). Consequently, for every probability distribution \(P\in\mathcal{P}(\mathcal{X}\times\mathcal{Y})\), \[\label{eqn:MainPrefixE} \operatorname{\mathbb{E}}_{X,Y\sim P}[-\log Q(Y\mid X)] + \operatorname{\mathbb{E}}_{X,Y\sim P}K_V(Q(\cdot\mid X)\mid X)+c_{\mathsf{code}} \ge \operatorname{\mathbb{E}}_{X,Y\sim P}K_V(Y\mid X)\tag{8}\] holds as an inequality of extended real numbers.
Proof. If \(Q(y\mid x)=0\), then the left-hand side is \(+\infty\), and the claim is trivial. In what follows, assume \(Q(y\mid x)>0\). What must be done is to find \(\boldsymbol{p} \in \Sigma^*\) and \(c\) such that \(\boldsymbol{p}_{y \mid x}\) satisfies \(V \Big(\overline{\operatorname{\mathsf{Enc}}_{\mathcal{X}} (x)} \cdot\boldsymbol{p}_{y \mid x} \Big) \downarrow = \operatorname{\mathsf{Enc}}_{\mathcal{Y}} (y)\) and \(|\boldsymbol{p}_{y \mid x}| \le - \log Q(y \mid x) + K_V (Q (\cdot \mid \cdot) \mid x) + c\).
Lemma 1 asserts that there is a function \(\mathsf{SFE}_ \mathsf{Dec}\), which is a prefix-free conditional computable function, with the following property:
Therefore, by the universality of \(V\), there exists a string \(\boldsymbol{p}_{\mathsf{SFE}, \mathsf{Dec}} \in \Sigma^*\) satisfying the following:
Now take \(\boldsymbol{q}\) to be some \(\boldsymbol{q}^* \in \arg \min \mathsf{PFPrograms}_{V} \Big(Q (\bullet \mid x) \;\Big| \;x \Big)\). By the definition of \(K_V\), \(|\boldsymbol{q}^*| = K_V \Big(Q(\bullet \mid x) \;\Big| \;x \Big)\). Again, for every \(x \in \mathcal{X}\) and \(y \in \mathcal{Y}\), \(V \Big(\overline{\operatorname{\mathsf{Enc}}_\mathcal{X} (x)} \cdot \boldsymbol{p}_{\mathsf{SFE}, \mathsf{Dec}} \cdot \boldsymbol{q}^* \cdot \boldsymbol{c}_{y \mid x, \boldsymbol{q}^*} \Big) \downarrow = \operatorname{\mathsf{Enc}}_{\mathcal{Y}} (y)\). In other words, by defining \(\boldsymbol{p}_{y \mid x} := \boldsymbol{p}_{\mathsf{SFE}, \mathsf{Dec}} \cdot \boldsymbol{q}^* \cdot \boldsymbol{c}_{y \mid x, \boldsymbol{q}^*}\), we can output \(y\) in the form \(V \Big(\overline{\operatorname{\mathsf{Enc}}_\mathcal{X} (x)} \cdot \boldsymbol{p}_{y \mid x} \Big) \downarrow = \operatorname{\mathsf{Enc}}_{\mathcal{Y}} (y)\). Therefore, we obtain \[\begin{align} K_V (y \mid x) &\le \big|\boldsymbol{p}_{\mathsf{SFE}, \mathsf{Dec}} \cdot \boldsymbol{q}^{*} \cdot \boldsymbol{c}_{y \mid x, \boldsymbol{q}^{*}} \big| \\ &\le |\boldsymbol{p}_{\mathsf{SFE}, \mathsf{Dec}}| + K_V \Big(Q(\cdot \mid x) \;\Big| \;x \Big) - \log_{|\Sigma|} Q(y \mid x) + 4. \end{align}\] This proves Equation 7 by setting \(c_{\mathsf{code}} = |\boldsymbol{p}_{\mathsf{SFE}, \mathsf{Dec}}| + 4\), as it does not depend on \(Q, x, y\).
The expectation version, Equation 8 , follows by integrating Equation 7 with respect to \(P\). It also holds as an inequality of extended real numbers when the expectation contains \(+\infty\). ◻
Lemma 3 (Lemma for constructing a program for a function from a completely faithful explanation). Let \(\Lambda\) be a finite character set, and fix an injective prefix-free encoding function for single characters \(\operatorname{\mathsf{Enc}}^{\mathsf{PF}}_\Lambda:\Lambda \twoheadrightarrow \Sigma^*\). Assume that the image \(\operatorname{\mathsf{Enc}}^{\mathsf{PF}}_\Lambda (\Lambda)\) is prefix-free and computable, or decidable. Put \[L_\Lambda:=\max \Big\{|\operatorname{\mathsf{Enc}}^{\mathsf{PF}}_\Lambda(a)| \;\Big| \;a\in\Lambda \Big\}.\] For a string \(\boldsymbol{e}=e_0\cdots e_{r-1}\in\Lambda^*\), define \[\operatorname{\mathsf{Enc}}_{\Lambda^*}(\boldsymbol{e}):=\operatorname{\mathsf{Enc}}^{\mathsf{PF}}_\Lambda(e_0) \cdot \operatorname{\mathsf{Enc}}^{\mathsf{PF}}_\Lambda(e_1) \cdot \cdots \cdot \operatorname{\mathsf{Enc}}^{\mathsf{PF}}_\Lambda(e_{r-1}).\] Note that this is not prefix-free as an encoding function for variable-length \(\Lambda^*\). Then \[|\operatorname{\mathsf{Enc}}_{\Lambda^*}(\boldsymbol{e})|\le L_\Lambda|\boldsymbol{e}|.\]
Moreover, assume that \(U\) is a universal conditional function and that an interpretation function \(\operatorname{\mathsf{Interpret}}\) is fixed. Then there exists a constant \(c_{\operatorname{\mathsf{Interpret}}}\) such that, for any \(\boldsymbol{e}_x\in\Lambda^*\) that is a completely faithful explanation of \(Q (\bullet \mid x):\mathcal{Y}\xrightarrow{\mathsf{comp}}[0,1]\), the following holds: \[C_U (Q(\cdot\mid x)\mid x) \le L_\Lambda|\boldsymbol{e}_x| + c_{\operatorname{\mathsf{Interpret}}}.\]
Proof. The first inequality follows immediately from the fact that \(\operatorname{\mathsf{Enc}}_\Lambda(\boldsymbol{e})\) is the concatenation of the encodings of each character, and that the code length per character is at most \(L_\Lambda\). We prove the final claim. By the computability of \(\operatorname{\mathsf{Interpret}}\), \(\operatorname{\mathsf{Interpret}}' (y, k, x, \boldsymbol{e}) = \operatorname{\mathsf{Interpret}}(\boldsymbol{e}, k, y)\) is also computable. There exists a partial computable function \(\tilde{\operatorname{\mathsf{Interpret}}}': \subseteq \Sigma^* \xrightarrow{\mathsf{comp}}\Sigma^*\) such that \(\tilde{\operatorname{\mathsf{Interpret}}}' \Big(\overline{\operatorname{\mathsf{Enc}}_{\mathcal{Y}} (y)} \cdot \overline{\operatorname{\mathsf{Enc}}_{\mathcal{\mathbb{N}}} (k)} \cdot \overline{\operatorname{\mathsf{Enc}}_{\mathcal{X}} (x)} \cdot \operatorname{\mathsf{Enc}}_{\Lambda^*} (\boldsymbol{e}_{x}) \Big) \approx_k Q(y \mid x)\).
By the universality of \(U\), there exists \(\boldsymbol{p}_{\tilde{\operatorname{\mathsf{Interpret}}}'} \in \Sigma^*\) such that \[\begin{align} & U \Big(\overline{\operatorname{\mathsf{Enc}}_{\mathcal{Y}} (y)} \cdot \overline{\operatorname{\mathsf{Enc}}_{\mathcal{\mathbb{N}}} (k)} \cdot \overline{\operatorname{\mathsf{Enc}}_{\mathcal{X}} (x)} \cdot \boldsymbol{p}_{\tilde{\operatorname{\mathsf{Interpret}}}'} \cdot \operatorname{\mathsf{Enc}}_{\Lambda^*} (\boldsymbol{e}_{x}) \Big) \\ & = \tilde{\operatorname{\mathsf{Interpret}}}' \Big(\overline{\operatorname{\mathsf{Enc}}_{\mathcal{Y}} (y)} \cdot \overline{\operatorname{\mathsf{Enc}}_{\mathcal{\mathbb{N}}} (k)} \cdot \overline{\operatorname{\mathsf{Enc}}_{\mathcal{X}} (x)} \cdot \operatorname{\mathsf{Enc}}_{\Lambda^*} (\boldsymbol{e}_{x}) \Big) \approx_k Q(y \mid x) \end{align}\] holds. Therefore, by the definition of the plain Kolmogorov complexity of real-valued functions, \[C_U \Big(Q(\bullet | x) \;\Big| \;x \Big) \le \Big|\boldsymbol{p}_{\tilde{\operatorname{\mathsf{Interpret}}}'} \cdot \operatorname{\mathsf{Enc}}_{\Lambda^*} (\boldsymbol{e}_{x})\Big| = |\boldsymbol{p}_{\operatorname{\mathsf{Interpret}}}| + \Big|\operatorname{\mathsf{Enc}}_{\Lambda^*} (\boldsymbol{e}_{x})\Big| \le |\boldsymbol{p}_{\tilde{\operatorname{\mathsf{Interpret}}}'}| + L_{\Lambda} |\boldsymbol{e}_{x}|.\] Since \(\boldsymbol{p}_{\tilde{\operatorname{\mathsf{Interpret}}}'}\) does not depend on \(Q\), \(x\), or \(\boldsymbol{e}_x\), the proof is complete by taking \(c_{\operatorname{\mathsf{Interpret}}} = |\boldsymbol{p}_{\tilde{\operatorname{\mathsf{Interpret}}}'}|\). ◻
Proof of Theorem 1. We prove (i). Combining the facts proved so far gives \[\begin{align} C_U(y\mid x) &\le K_V(y\mid x)+c_{U,V}\\ &\le -\log Q_A(y\mid x)+K_V(Q_A(\cdot\mid x)\mid x)-c_{\mathsf{code}}+c_{U,V}\\ &\le -\log Q_A(y\mid x) + C_U (Q_A(\cdot\mid x)\mid x) + 2 \log_{|\Sigma|} \Big(C_U \big(Q_A(\cdot\mid x)\;\big| \;x\big) + 1 \Big) \\ & \quad + c_{V, U} + c_{\mathsf{code}}+c_{U,V}\\ &\le -\log Q_A(y\mid x) + L_\Lambda|\boldsymbol{e}_x| + c_{\operatorname{\mathsf{Interpret}}} + 2\log(L_\Lambda|\boldsymbol{e}_x|+1 + c_{\operatorname{\mathsf{Interpret}}})\\ & \quad + c_{V, U} + c_{\mathsf{code}}+c_{U,V} \\ &\le -\log Q_A(y\mid x) + L_\Lambda|\boldsymbol{e}_x| + 2\log(L_\Lambda|\boldsymbol{e}_x|+1 + c_{\operatorname{\mathsf{Interpret}}})\\ & \quad + 3 c_{\operatorname{\mathsf{Interpret}}} + 2 \log_{|\Sigma|} (c_{\operatorname{\mathsf{Interpret}}} + 1) + c_{V, U} +c_{\mathsf{code}}+c_{U,V}. \end{align}\] Here, the first inequality uses 1 , the second uses Lemma 2, the third uses 2 , and the fourth uses Lemma 3. The last inequality applies the inequality \(\log_{b} (a + 1 + c) < \log_{b} (a + 1 + c + 1) \le \log_b (a + 1) + \log_b (c+1) + (c+1)\), which holds for arbitrary \(a \ge 0, b \ge 2, c \ge 0\), with \(a = L_\Lambda |\boldsymbol{e}_x|\), \(b = |\Sigma|\), and \(c = c_{\operatorname{\mathsf{Interpret}}}\). Therefore, \[-\log Q_A(y\mid x) + L_\Lambda|\boldsymbol{e}_x| + 2\left\lceil\log(L_\Lambda|\boldsymbol{e}_x|+1)\right\rceil \ge C_U(y\mid x)+c\] holds, where \[c:= - 3 c_{\operatorname{\mathsf{Interpret}}} - 2 \log_{|\Sigma|} (c_{\operatorname{\mathsf{Interpret}}} + 1) - c_{V, U} - c_{\mathsf{code}} - c_{U,V}.\] This constant depends only on the fixed self-delimiting encoding, the fixed interpretation function, the fixed Shannon–Fano–Elias decoder, and the simulation constants between \(U\) and \(V\), and does not depend on \(A,x,y,P\).
(ii) follows by integrating the pointwise inequality in (i) with respect to \(P\). It also holds as an inequality of extended real numbers when the expectation contains \(+\infty\). ◻
Remark 14 (On lower bounds for conditional Kolmogorov complexity). In Lemma 2, under appropriate assumptions such as the computability of the distribution \(P\), there is a classical lower bound for \(\mathbb{E}_{X,Y\sim P}K_V(Y\mid X)\): \[\mathbb{E}_{X,Y\sim P}K_V(Y\mid X)\ge H_{P}(Y\mid X)-O(1).\] However, if one simply replaces \(\mathbb{E}_{X,Y\sim P}K_V(Y\mid X)\) in the inequality of Lemma 2 by \(H_P(Y\mid X)\), the inequality becomes \[\mathbb{E}_{X,Y\sim P}|\boldsymbol{e}_X| + \mathbb{E}_{X,Y\sim P} [-\log Q(Y \mid X)] \ge H_P(Y \mid X) + c.\] Gibbs’ inequality by itself gives \[\mathbb{E}_{X,Y\sim P}[-\log Q(Y\mid X)]\ge H_P(Y\mid X),\] so the above inequality gives no implication about the explanation length \(\mathbb{E}_{X,Y\sim P}|\boldsymbol{e}_X|\).
The above remark suggests that the significance of Lemma 2 lies in using the expectation of the algorithmic complexity of individual outputs rather than entropy. The following example shows that the gap between them can be arbitrarily large.
Proposition 7 (Example in which the lower bound given by the Quadrilemma is larger than the entropy lower bound). For every \(n\in\mathbb{N}\), there exists a probability distribution \(P\) such that \[\operatorname{\mathbb{E}}_{X,Y\sim P}K_V(Y\mid X)\ge H_P(Y\mid X)+n\] holds.
Proof. Consider the set of all sufficiently long strings. There are \(|\Sigma|^m\) strings over \(\Sigma\) of length \(m\), while the number of strings satisfying \(K_V(y)<N\) is at most \[\sum_{r=0}^{N-1}|\Sigma|^r=\frac{|\Sigma|^N-1}{|\Sigma|-1}.\] If \(m\) is chosen sufficiently large, then there exists a string of length \(m\) satisfying \(K_V(y_0)\ge N\). The value of \(N\) will be chosen later.
Define \(P\) as the point-mass distribution \[P(X=(),Y=y_0)=1.\] Then \(Y\) is deterministic given \(X\), and therefore \[H_P(Y\mid X)=0.\] On the other hand, \[\operatorname{\mathbb{E}}_{X,Y\sim P}K_V(Y\mid X)=K_V(y_0\mid ()).\] The difference caused by conditioning on the empty string is only a fixed constant. That is, there exists a constant \(c_0\) such that \[K_V(y_0\mid ())\ge K_V(y_0)-c_0\] holds. Taking \(N:=n+c_0\) and choosing \(y_0\) satisfying \(K_V(y_0)\ge N\), we obtain \[\operatorname{\mathbb{E}}_{X,Y\sim P}K_V(Y\mid X)\ge n=H_P(Y\mid X)+n.\] ◻
In this section, we show the most naive lower bound on the expected conditional perplexity obtained from Kolmogorov complexity, and explain that this method cannot show a clear dependence between the length of an explanation of stochastic input-output AI and conditional perplexity.
The Kolmogorov complexity of an object represents the length of the shortest string that is transformed into that object by computation. Therefore, it can be seen relatively easily from the definition that a stochastic input-output AI that can be described by a string shorter than the Kolmogorov complexity of the true input-output distribution cannot achieve the true distribution, and hence cannot achieve the minimum value of conditional perplexity. To state this precisely in the general case requires detailed definitions, but when the support of the true distribution on the input space is the entire input space, the following concretely holds.
Proposition 8 (Impossibility of minimizing conditional perplexity based on the Kolmogorov complexity of the true input-output distribution). Let the input space be \(\mathcal{X}\) and the output space be \(\mathcal{Y}\). Let \(\pi\in\mathcal{P}(\mathcal{X})\) be the true probability distribution on the input space, and assume \(\operatorname{supp}\pi=\mathcal{X}\). There exists a constant \(c_{\operatorname{\mathsf{Interpret}}} \in \mathbb{N}\) depending only on the universal conditional function \(U\) and the interpretation function such that the following holds. Let \[P(\cdot\mid\cdot), Q(\cdot\mid\cdot):\mathcal{X}\times\mathcal{Y}\xrightarrow{\mathsf{comp}}[0,1]\] be computable conditional probability mass functions. Assume that \(\boldsymbol{e}\in\Lambda^*\) is a completely faithful explanation of \(Q\) and that \[L_\Lambda|\boldsymbol{e}| < C_U(P) - c_{\operatorname{\mathsf{Interpret}}}\] holds. Then \(Q\) cannot minimize the expected logarithmic conditional perplexity. More specifically, \[\operatorname{\mathbb{E}}_{X\sim\pi,\;Y\sim P(\cdot\mid X)}[-\log Q(Y\mid X)] > \min_{P'(\cdot\mid\cdot)\in\mathcal{P}(\mathcal{Y}\mid\mathcal{X})} \operatorname{\mathbb{E}}_{X\sim\pi,\;Y\sim P(\cdot\mid X)}[-\log P'(Y\mid X)]\] holds.
Proof. First, we show from the assumption that \(Q\ne P\). If \(Q=P\), then \(\boldsymbol{e}\) is also a completely faithful explanation of \(P\). There exists a partial computable function \(\tilde{\operatorname{\mathsf{Interpret}}}: \subseteq \Sigma^* \xrightarrow{\mathsf{comp}}\Sigma^*\) such that \(\tilde{\operatorname{\mathsf{Interpret}}} \Big(\overline{\operatorname{\mathsf{Enc}}_{\mathcal{X}} (x)} \cdot \overline{\operatorname{\mathsf{Enc}}_{\mathcal{Y}} (y)} \cdot \overline{\operatorname{\mathsf{Enc}}_{\mathcal{\mathbb{N}}} (k)} \cdot \operatorname{\mathsf{Enc}}_{\Lambda^*} (\boldsymbol{e}) \Big) \approx_k P(y \mid x)\).
By the universality of \(U\), there exists \(\boldsymbol{p}_{\tilde{\operatorname{\mathsf{Interpret}}}} \in \Sigma^*\) such that \[\begin{align} & U \Big(\overline{\operatorname{\mathsf{Enc}}_{\mathcal{X}} (x)} \cdot \overline{\operatorname{\mathsf{Enc}}_{\mathcal{Y}} (y)} \cdot \overline{\operatorname{\mathsf{Enc}}_{\mathcal{\mathbb{N}}} (k)} \cdot \boldsymbol{p}_{\tilde{\operatorname{\mathsf{Interpret}}}} \cdot \operatorname{\mathsf{Enc}}_{\Lambda^*} (\boldsymbol{e}) \Big) \\ & = \tilde{\operatorname{\mathsf{Interpret}}} \Big(\overline{\operatorname{\mathsf{Enc}}_{\mathcal{X}} (x)} \cdot \overline{\operatorname{\mathsf{Enc}}_{\mathcal{Y}} (y)} \cdot \overline{\operatorname{\mathsf{Enc}}_{\mathcal{\mathbb{N}}} (k)} \cdot \operatorname{\mathsf{Enc}}_{\Lambda^*} (\boldsymbol{e}) \Big) \approx_k P(y \mid x) \end{align}\] holds. Therefore, by the definition of the plain Kolmogorov complexity of real-valued functions, \[C_U (P) \le \Big|\boldsymbol{p}_{\tilde{\operatorname{\mathsf{Interpret}}}} \cdot \operatorname{\mathsf{Enc}}_{\Lambda^*} (\boldsymbol{e})\Big| = |\boldsymbol{p}_{\tilde{\operatorname{\mathsf{Interpret}}}}| + \Big|\operatorname{\mathsf{Enc}}_{\Lambda^*} (\boldsymbol{e})\Big| \le |\boldsymbol{p}_{\tilde{\operatorname{\mathsf{Interpret}}}}| + L_{\Lambda} |\boldsymbol{e}|.\] Taking \(c_{\operatorname{\mathsf{Interpret}}} = |\boldsymbol{p}_{\tilde{\operatorname{\mathsf{Interpret}}}}|\), \(c_{\operatorname{\mathsf{Interpret}}}\) does not depend on \(P,Q\), or \(\boldsymbol{e}\), and this contradicts the assumption \(L_\Lambda |\boldsymbol{e}| < C_U (P) - c_{\operatorname{\mathsf{Interpret}}}\). Therefore, in this case, \(Q \ne P\).
Next, we discuss minimization of the expected log loss. For any conditional probability mass function \(P'\), \[\begin{align} &\operatorname{\mathbb{E}}_{X\sim\pi,\;Y\sim P(\cdot\mid X)}[-\log P'(Y\mid X)]\\ &= H_P(Y\mid X) + \operatorname{\mathbb{E}}_{X\sim\pi} D_{\mathrm{KL}}\big(P(\cdot\mid X)\,\|\,P'(\cdot\mid X)\big). \end{align}\] Here, the base of the logarithm is \(|\Sigma|\). By Gibbs’ inequality, the KL divergence is nonnegative, and equality holds if and only if \[P'(\cdot\mid X)=P(\cdot\mid X)\] holds \(\pi\)-almost surely. Since \(\operatorname{supp}\pi=\mathcal{X}\), this is equivalent to \(P'(\cdot\mid x)=P(\cdot\mid x)\) for every \(x\in\mathcal{X}\).
Since \(Q\ne P\), there exists \(x\) satisfying \(Q(\cdot\mid x)\ne P(\cdot\mid x)\). Because \(\pi(x)>0\), \[\operatorname{\mathbb{E}}_{X\sim\pi} D_{\mathrm{KL}}\big(P(\cdot\mid X)\,\|\,Q(\cdot\mid X)\big) > 0\] holds. If there exists \(y\) satisfying \(P(y\mid x)>0\) and \(Q(y\mid x)=0\), then the left-hand side is \(+\infty\), and is again positive. Therefore, \[\operatorname{\mathbb{E}}_{X\sim\pi,\;Y\sim P(\cdot\mid X)}[-\log Q(Y\mid X)] > H_P(Y\mid X)\] holds. On the other hand, by taking \(P'=P\), the expected log loss becomes \(H_P(Y\mid X)\). Hence, \(Q\) cannot minimize conditional perplexity. ◻
The above proposition means that, if one wants to minimize conditional perplexity exactly, there is a lower bound on the length of a complete and faithful explanation determined by the plain Kolmogorov complexity \(C_U(P)\) of the true probability distribution \(P\). However, the above proposition says nothing about cases in which conditional perplexity is not exactly minimal. In fact, there are examples in which \(L_{\Lambda}|\boldsymbol{e}|\) is much shorter than \(C_U(P)\), and nevertheless the optimization gap in expected logarithmic perplexity \[\operatorname{\mathbb{E}}_{X \sim \pi,\,Y|X \sim P}[-\log Q(Y\mid X)] - \min_{Q^* \in \mathcal{P} (\mathcal{Y}\mid\mathcal{X})}\operatorname{\mathbb{E}}_{X \sim \pi,\,Y|X \sim P} \big[-\log Q^* (Y\mid X) \big]\] is extremely small. More specifically, the following proposition holds.
Proposition 9 (Failure of the naive lower bound based on \(C_U(P)\)). Let the input space, or source set, \(\mathcal{X}\) and the output space, or target set, \(\mathcal{Y}\) both be countably infinite sets.
For every \(n\in\mathbb{N}\) and every \(\epsilon\in\mathbb{R}_{>0}\), there exist a probability distribution \(\pi\in\mathcal{P}(\mathcal{X})\) whose support is all of \(\mathcal{X}\), two computable conditional probability mass functions \[P(\cdot\mid\cdot), Q(\cdot\mid\cdot):\mathcal{X}\times\mathcal{Y}\xrightarrow{\mathsf{comp}}[0,1],\] and a string \(\boldsymbol{e} \in \Lambda^*\) that is a completely faithful explanation of \(Q\) such that the following two conditions hold simultaneously:
\(\operatorname{\mathbb{E}}_{X \sim \pi,\,Y|X \sim P}[-\log Q(Y\mid X)] - \min_{Q^* \in \mathcal{P} (\mathcal{Y}\mid\mathcal{X})}\operatorname{\mathbb{E}}_{X \sim \pi,\,Y|X \sim P} \big[-\log Q^* (Y\mid X) \big] < \epsilon\).
\(|\boldsymbol{e}| < C_U (P)-n\).
Proof. First, we confirm that the optimization gap in expected logarithmic perplexity is given by the Kullback–Leibler divergence. More specifically, for any conditional probability mass function \(P'(\cdot\mid\cdot)\), the following decomposition holds: \[\label{eqn:PerplexityHKL} \begin{align} &\operatorname{\mathbb{E}}_{X\sim\pi,\,Y\sim P(\cdot\mid X)} [-\log Q(Y\mid X)] \\ &\qquad = H(Y \mid X) + \operatorname{\mathbb{E}}_{X\sim\pi} D_{\mathrm{KL}}\big(P(\bullet \mid X) \;\big\|\;Q (\bullet \mid X)\big). \end{align}\tag{9}\] Here, \(H (Y \mid X) := \operatorname{\mathbb{E}}_{X\sim\pi,\,Y\sim P(\cdot\mid X)} [-\log P (Y\mid X)]\) is the conditional entropy of \(X\) and \(Y\) with \(X\sim\pi,\,Y\sim P(\cdot\mid X)\), and \(D_{\mathrm{KL}}\) is the Kullback–Leibler divergence function. By Gibbs’ inequality, the second term in Equation 9 is nonnegative, and the condition \(Q (\bullet \mid x) = P (\bullet \mid x)\) for all \(x \in \mathcal{X}\) is a necessary and sufficient condition for the second term to attain its minimum value zero. Therefore, the optimization gap in expected logarithmic perplexity is represented as follows: \[\begin{align} &\operatorname{\mathbb{E}}_{X \sim \pi,\,Y|X \sim P}[-\log Q(Y\mid X)] - \min_{Q^* \in \mathcal{P} (\mathcal{Y}\mid\mathcal{X})}\operatorname{\mathbb{E}}_{X \sim \pi,\,Y|X \sim P} \big[-\log Q^* (Y\mid X) \big] \\ &= \operatorname{\mathbb{E}}_{X\sim\pi} D_{\mathrm{KL}}\big(P (\bullet \mid X) \;\big\|\;Q (\bullet \mid X)\big). \end{align}\] Thus, the conditions to be satisfied are
\(\operatorname{\mathbb{E}}_{X\sim\pi} D_{\mathrm{KL}}\big(P (\bullet \mid X) \;\big\|\;Q (\bullet \mid X)\big) < \epsilon\).
\(|\boldsymbol{e}| < C_U (P)-n\).
In what follows, we construct a concrete example satisfying the above two conditions. As a full-support probability distribution \(\pi\) on the input space, fix \(\pi (x) = \frac{1}{(i(x)+1)(i(x)+2)}\); in fact, the concrete values of \(\pi\) are irrelevant to the subsequent argument. Here, \(i: \mathcal{X} \to \mathbb{N}\) is the lexicographic index of the code of each element of \(\mathcal{X}\) under \(\operatorname{\mathsf{Enc}}_{\mathcal{X}}\). Also fix a computable full-support probability distribution on \(\mathcal{Y}\) by \(q(y) := \frac{1}{(j(y)+1)(j(y)+2)}\), and set \(Q (y \mid x) = q(y)\). Here, \(j: \mathcal{Y} \to \mathbb{N}\) is the lexicographic index of the code of each element of \(\mathcal{Y}\) under \(\operatorname{\mathsf{Enc}}_{\mathcal{Y}}\).
The idea of the proof is as follows. As the true conditional probability mass function \(P (\cdot \mid \cdot)\), consider one whose probability mass differs slightly from \(q\) on two distinct elements \(\eta, \eta' \in \mathcal{Y}\) having large Kolmogorov complexity. More specifically, define it as follows. Let \(P (y \mid x) = p (y)\), where \[p (y) = \begin{cases} q (y) & \;\text{if y \ne \eta, y \ne \eta',} \\ q (y) + \delta & \;\text{if y = \eta,} \\ q (y) - \delta & \;\text{if y = \eta',} \\ \end{cases}\] where \(\eta, \eta' \in \mathcal{Y}\) and \(\delta \in \big(0, q(\eta')\big)\) will be chosen appropriately later. Since \(P\) and \(Q (\cdot \mid \cdot)\) differ only slightly as probability distributions, the optimization gap of \(Q\) is small. However, by detecting the difference between \(Q\) and \(P\), one can describe \(\eta, \eta' \in \mathcal{Y}\), and hence it follows that the Kolmogorov complexity of \(P\) is large. In fact, by choosing \(\eta, \eta'\) appropriately, it follows that the Kolmogorov complexity of \(P\) can be made arbitrarily large.
We now define \(\eta, \eta', \delta\) concretely. First, in order to quantify the relation between \(C_U (P)\) and \(\eta\), consider the following algorithm \(\mathsf{FindDiff}\), which outputs \(\boldsymbol{\eta} = \operatorname{\mathsf{Enc}}_{\mathcal{Y}} (\eta)\) using \(\boldsymbol{p} \in \mathsf{Program}_{U} (P)\).
Input: \(\boldsymbol{p} \in \mathsf{Program}_{U} (P)\).
Step 1: Initialize \(j \gets 0\). Choose an arbitrary \(x_0 \in \mathcal{X}\), and let \(\boldsymbol{x}_0 := \operatorname{\mathsf{Enc}}_{\mathcal{X}} (x_0)\).
Step 2: Find \(\boldsymbol{y}_j\), the \(j\)-th element in the lexicographic ordering of the code set \(\operatorname{\mathsf{Enc}}_{\mathcal{Y}} (\mathcal{Y})\). Define \(y_j \in \mathcal{Y}\) as the element satisfying \(\operatorname{\mathsf{Enc}}_{\mathcal{Y}} (y_j) = \boldsymbol{y}_j\).
Step 3: Using \(\boldsymbol{p}\), \(\boldsymbol{x}_0\), and \(\boldsymbol{y}_j\), compute an approximation \(\tilde{p}_j\) of \(P (y_j \mid x_0)\) with accuracy \(\pm \frac{\delta}{2}\).
Step 4: Compute \(q_j = Q (y_j \mid x_0) = \frac{1}{(j+1)(j+2)}\). Note that the right-hand side is a rational number, so its exact value can be computed.
Step 5: If \(\tilde{p}_j > q_j\), go to Step 7.
Step 6: Set \(j \gets j + 1\), and go to Step 2.
Step 7: Output \(\boldsymbol{\eta} = \boldsymbol{y}_j\) then terminate.
By the universality of \(U\), there exists a string \(\boldsymbol{p}_\mathsf{FindDiff} \in \Sigma^*\) such that \(\boldsymbol{\eta} = U (\overline{\boldsymbol{p}_\mathsf{FindDiff}} \cdot \boldsymbol{p})\). This gives \(C_U (\eta) \le |\boldsymbol{p}_\mathsf{FindDiff}| + |\boldsymbol{p}|\). Applying this to \(\boldsymbol{p}^* \in \mathsf{Program}_U (P)\) satisfying \(|\boldsymbol{p}^*| = C_U (P)\), we obtain \(C_U (\eta) \le |\boldsymbol{p}_\mathsf{FindDiff}| + C_U (P)\). That is, \[\label{eqn:CPEval} C_U (P) \ge C_U (\eta) - |\boldsymbol{p}_\mathsf{FindDiff}|.\tag{10}\]
On the other hand, evaluating the relation between the optimization gap in expected perplexity and \(\delta, \eta, \eta'\) gives the following: \[\label{eqn:KLEval} \begin{align} & \operatorname{\mathbb{E}}_{X\sim\pi} D_{\mathrm{KL}}\big(P (\bullet \mid X) \;\big\|\;Q (\bullet \mid X)\big) \\ & \le \operatorname{\mathbb{E}}_{X\sim\pi} D_{\mathrm{KL}} (p \;\big\|\;q) \\ & = D_{\mathrm{KL}} (p \;\big\|\;q) \\ & = (q(\eta) + \delta) \log_{|\Sigma|} \frac{q(\eta) + \delta}{q(\eta)} + (q(\eta') - \delta) \log_{|\Sigma|} \frac{q(\eta') - \delta}{q(\eta')} \\ & \le \frac{1}{\ln |\Sigma|} \cdot \Bigg[(q(\eta) + \delta) \bigg(\frac{q(\eta) + \delta}{q(\eta)} - 1\bigg) + (q(\eta') - \delta) \bigg( \frac{q(\eta') - \delta}{q(\eta')} - 1\bigg) \Bigg] \\ & = \frac{\delta^2}{\ln |\Sigma|} \left( \frac{1}{q (\eta)} + \frac{1}{q (\eta')}) \right). \end{align}\tag{11}\] In the second inequality above, we used \(\log_{|\Sigma|} (t) = \frac{\ln t}{\ln |\Sigma|} \le \frac{t - 1}{\ln |\Sigma|}\).
It remains only to define \(\eta\), \(\eta'\), and \(\delta\) appropriately. First, choose \(\eta\) so that \(C_U (\eta) > |\boldsymbol{p}_\mathsf{FindDiff}| + |\boldsymbol{e}| + n\). Such an \(\eta\) necessarily exists. Indeed, the number of \(y \in \mathcal{Y}\) satisfying \(C_U (y) \le |\boldsymbol{p}_\mathsf{FindDiff}| + |\boldsymbol{e}| + n\) is at most \(\sum_{\ell=0}^{|\boldsymbol{p}_\mathsf{FindDiff}| + |\boldsymbol{e}| + n} |\Sigma|^\ell\), and is in particular finite, whereas \(\mathcal{Y}\) is countably infinite. When \(\eta\) is chosen as above, Equation 11 implies that \(C_U (P) > |\boldsymbol{e}| + n\) regardless of the concrete choice of \(\eta'\) or \(\delta \in (0, q(\eta'))\). Also let \(\eta' = y_0\), where \(y_0\) is the element of \(\mathcal{Y}\) satisfying \(j(y_0) = 0\). As \(\delta > 0\), choose a rational number satisfying \(\delta < \min \Big\{\sqrt{\frac{q (\eta) q (\eta')}{q (\eta) + q (\eta')} \ln |\Sigma| \cdot \epsilon}, q (\eta') \Big\}\). The \(P\) defined by the above choices is a full-support conditional probability mass function, and Equation 11 gives \(\operatorname{\mathbb{E}}_{X\sim\pi} D_{\mathrm{KL}}\big(P (\bullet \mid X) \;\big\|\;Q (\bullet \mid X)\big) < \epsilon\). This completes the proof. ◻
For the above reason, an analysis using the Kolmogorov complexity \(C_U(P)\) of the true probability mass function cannot provide conditions on the explanation length of a stochastic input-output AI whose conditional perplexity is not minimal but is extremely close to minimal.