Manuscript Offprint
arXiv:2610.40934A Theoretical Framework for Understanding and Building "Any-task inference" Capable Foundation Models
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Matthew McDermott
Columbia University Department of Biomedical Informatics
Florent Pollet
Columbia University Department of Biomedical Informatics
Payal Chandak
Harvard Medical School
Gregory Kondas
Columbia University Department of Biomedical Informatics
Liat Friedman Antwarg
Harvard Medical School
Noa Dagan
Clalit Health Services and Ben Gurion University
Isaac Kohane
Harvard Medical School
Abstract
In this work, we provide a formal framework and mathematical definition for the subset of foundation models focused on enabling the property of “any-task inference” (ATI) (similar to zero-shot inference), rather than those designed for pre-training fine-tuning. To achieve this mathematical definition, we formalize the notion of a “space of tasks of interest,” which we include in the problem domain, then provide an interface-based formal definition for ATI foundation models as those that map samples of data and tasks to predictions over the space of labels directly. While simple, this definition allows us to show that all ATI foundation models can be decomposed through a “universal task reduction” lens into encoder, model, and decoder aspects. We can leverage this decomposition to also decompose foundation model error into terms corresponding to different aspects of this reduction, stratified into a collection of “design terms,” which are theoretical properties that can inform one of whether a particular proposed ATI foundation model can achieve optimality or not due to the structure of the proposed task reduction, and “realized model excess” terms which capture interactions between learned and programmatic components of foundation model systems. Lastly, we can use this perspective to offer two “prototypical” recipes for realizing ATI foundation models in diverse domains, which we term generative and discriminative variants of ATI foundation models. This exercise is grounded throughout by 5 real-world examples of foundation models in different settings, varying greatly in how these capabilities are realized, showing the applicability of this definition to real-world settings.
1 Introduction
This work aims to provide a formal definition of the subset of “foundation models” that are designed to enable the practical property typically called “zero-shot inference,” which we recognize more directly as the ability to use the foundation model to perform inference for any arbitrary task in a given domain, on any input sample, with no additional training required. A formal definition for this class of foundation models will reduce ambiguity when this term is used in research, allow for more comprehensive theoretical understanding of these foundation models, and help us see how we can build them in diverse domains.
In this work, we will focus our analyses specifically on foundation models that are capable of ATI, which we will call ATI foundation models, rather than other kinds of foundation models. In so doing, we are explicitly not studying other notions of what may make something a “foundation model” that are commonly used today. In particular, in this work we will take the following positions:
-
We will assume that foundation models need not be generative models. Instead, the focus on downstream task utility is paramount, not their ability to estimate the likelihood of or generate samples from the data domain.
-
We will assume that foundation models need not be trained with any particular style of self-supervision or neural network architecture. What makes foundation models unique is how they can be used at inference time, not how they were trained.
-
We will focus our analyses on ATI foundation models, rather than foundation models that require fine-tuning and do not permit ATI.
-
We will assume that foundation models need not solve problems of distribution shift over their domains, provided they still show any-task adaptability to diverse downstream tasks in the domain of interest. Critically, as we will formalize later in the work, any-task adaptability itself need not require distribution shift, so this is not in conflict.
Note that we do not argue that these topics are not interesting, useful, and important in their own right – just that we can separate them from the concept of an “ATI foundation model,” (and arguably from the term “foundation model” more generally) and reserve this new term to refer more specifically to these any-task capable models. The established terms for each of these capabilities (e.g., generative modeling, self-supervised modeling, transfer learning, and distribution shift) can instead be used to refer to those specific areas individually. Note that we may at times just use the term “foundation model” in the text, but we will near universally use this to mean an ATI foundation model unless otherwise specified.
1.2 This Definition Permits Meaningful Theoretical Contributions
With this narrowed focus, we can provide a formal mathematical definition of ATI foundation models that permits us to make several theoretical advances. Concretely, to summarize the contributions of this work:
- We re-introduce the notion of a “distribution of tasks” over a space that is jointly distributed with one’s data over and labels over .² We further introduce the notion of stochastic representations
¹We use this term rather than the term “zero-shot inference” because our primary interest is not in how a model was trained (i.e., what particular style of learning objective was used) but rather in what you can do with it at inference time (i.e., make predictions for arbitrary tasks of interest), though in many cases these two capabilities will intersect.
²To the best of our knowledge, this concept was first introduced in Baxter (2000).
of tasks that map from the (potentially intractable and unobserved) space to a usable space for modeling.
-
Given this joint domain, we define any-task inference capable foundation models as procedures that operate jointly over pairs of data samples and tasks to predict the target label: .
-
We show that any foundation model under this definition can be decomposed into “encoder”, “model”, and “decoder” stages, which formalize the view that foundation models enable any-task inference by performing an algorithmic reduction in the space of tasks to some “universal task.”
-
We further show that this decomposition gives rise to a clear decomposition of the sources of error any foundation model has, across terms dependent on each of these components, including the following error terms:
-
Irreducible additional uncertainty due to low fidelity representations of the input task.
-
Limitations in how effectively the universal task can approximate the true task.
-
Error in how effectively the model component actually models the universal task.
-
Error arising from the choice of labeling function used to translate universal-task outputs into downstream labels.
-
Error arising from imperfect approximation of the target decoding distribution by the realized decoder.
-
We give two practical recipes for how to build foundation models in diverse domains.
-
We show that foundation model evaluation is mathematically analogous to evaluation in the context of algorithmic fairness, yielding identical impossibility criteria.
1.3 Running examples
We will use several running examples of ATI foundation models in the literature today throughout this work, including the following:
Large language models We will consider large language models (LLMs) as ATI foundation models in the sense that, through prompting and/or specific decoding strategies, diverse (and arguably all) tasks in natural language processing (NLP) can be reframed as next-token prediction problems, and thus a well trained LLM arguably should be useful for solving arbitrary examples of such tasks in NLP. Examples include Radford et al. (2019); Brown et al. (2020); Achiam et al. (2023). We separate these any-task capable examples from PT/FT LLMs such as BERT (Devlin et al., 2019), which we will not consider here (though we note that masked language models can in theory be used for any-task inference as well, though this is less well explored in practice).
Autoregressive Foundation Models for Electronic Health Record Data An emerging area of foundation models today concerns autoregressive (AR) sequence models applied over longitudinal electronic health record (EHR) datasets (typically expressed in event-stream format, e.g., in the MEDS standard (McDermott et al., 2026) which is then tokenized into some categorical sequence (Guo et al., 2026; Lee et al., 2026; Attrach et al., 2026)). These models appear superficially similar to LLMs, but perform any-task inference in a distinct pathway. Whereas LLMs use prompting to modify the “input” for an any-task problem in some controlled fashion, EHR AR FMs do not modify the input (a stream of patient level data) at all (and are generally not capable of prompting). Instead, they simply forecast possible “simulated futures” of the patient data, then infer the task label via some statistical form (e.g., Monte Carlo sampling) over those simulated futures directly. Examples include Renc et al. (2024); Waxler et al. (2025).
Prior Fitted Networks Another emerging area of foundation models concerns prior fitted networks (Müller et al., 2022), which frame foundation models as a Bayesian inference problem to learn arbitrary posteriors given samples of that posterior learned through a dataset derived from a prior over distributions. Recent works such as TabPFN (Hollmann et al., 2025) have realized that these models can be used as powerful foundation models over, e.g., tabular data, though further recent work has also applied this method to other data modalities, such as imaging data (Woerner et al., 2026). Unlike other foundation model variants, the input for a PFN looks quite different from a traditional model that maps to . In particular, PFNs explicitly take as input a sequence of sampled pairs that represent the task of interest at inference time, followed by a final, unpaired sample for which the target label should be inferred. During pre-training, these sampled sequences are generated from a defined “prior” over possible tasks, enabling many diverse relationships between and to be learned. This makes PFNs extremely flexible, but also imposes computational resource limitations on when they can be used given a sequence of many pairs must fit on the GPU for a single sample. While one may argue that this sequence of pairs used as input to the model violates the “any-task” contract of interest here, we will permit this, and justify it more formally later in the work.
Task-conditioned or Multi-task Foundation Models over an Explicit Task Space Classically, multi-task learning (McDermott et al., 2021) or even single-task (but typically multi-class) supervised pre-training have been widely used in representation learning settings (Deng et al., 2009). More recently, many variants of multi-task pre-training algorithms have been presented as “foundation models”, in particular in health domains (Steinberg et al., 2024; Jing et al., 2026). A superficially related approach, in which task-conditioned labels are produced, rather than producing labels for multiple tasks simultaneously, has also recently been proposed as an alternative to AR foundation models in the health domain (Chandak et al., 2026).
In multi-task models, a model outputs a separate prediction for a finite set of tasks simultaneously. In task-conditioned models, the model takes as input a sample but also some “representation of the task of interest” in some structured form, then outputs a prediction solely for that task and input. In this way, it takes many inference steps for a task-conditioned model to produce the same output as a multi-task model, but the task-conditioned model can model a much larger (potentially infinite) set of tasks simultaneously, in contrast to the finite set of tasks expressible by a multi-task model. These models realize “any-task” capabilities over the structured space of tasks over which labels are produced. If either this space is sufficiently broad or a procedure on how to adapt other tasks into this structured space of tasks is provided, it is reasonable to consider these models as “foundation models” in our more restricted sense (though we note that often these models are presented in a manner requiring PT/FT or transfer learning).
A summary of the key characteristics of these examples is provided in Section 5.3 and Table 3.
1.4 Outline of the Rest of the Work
Our notation uses precise conventions for typeface and notational elements in several places: for example, we write random variables in sans-serif typeface and distinguish them from their values, write Markov kernels as , and use push-forward distributions . These conventions, together with the standing assumptions we rely on, are collected in Appendix A. We strongly recommend that readers review Appendix A before proceeding to the rest of the work, as the formal development begins there and uses this notation without further introduction.
In the rest of this work, we will first formalize the notion of the “distribution of tasks” and of “task representations” in Section 2. Then, in Section 3, we will formally define ATI foundation models and demonstrate that this definition universally permits a decomposition through a “universal task reduction” lens. Building on this definition, in Section 4, we will decompose the error of any given foundation model into meaningful terms dictated by the universal task decomposition. In Section 5, we will further show that we can define two concrete recipes to build foundation models, building on the same basic assumptions and describe how they translate error across these different error sources. Finally, in Section 6, we will discuss evaluating foundation models, and show that it is mathematically equivalent to evaluation of supervised models under fairness constraints.
2 Formalizing Tasks in Our Notation and Problem Formulation
A key ingredient of our eventual ATI foundation model definition will be the elevation of a “task” to a part of the input to the procedure, and thus to the probabilistic formulation of the problem. In this section, we provide the necessary mathematical and notational set-up to do this formally.
2.1 The Extended Task-Data Domain
Let be some data domain. Let be a label domain, such as for binary classification, though need not be discrete. Typically, in machine learning, we assume that we have random variables over that define our space of interest. In this work, we argue this view is insufficient. As was first introduced (to the best of our knowledge) by Baxter, we argue that we should also include a notion of a standard Borel space of “tasks” requiring us to predict from . This notion requires us to similarly extend our (joint) distribution to over data inputs , labels and the task to which that label corresponds . We will explicitly assume that this joint random variable is well defined for any valid domain, and further that the random variable always has full support over .
To make our notion of a task clear, we will identify a task with its associated posterior distribution of labels given data by assuming that there exists a jointly measurable kernel , such that . We will further assume that the mapping is injective – i.e., each task defines a unique posterior distribution of . Note that while, mathematically, we assert that exists, we are not claiming that it is ever known – indeed, if were known, we would not need to do any learning as it defines the true posterior distributions.
Distribution Shift in the Task Space Note that formalizing this space of tasks and distribution over tasks implies we may observe distribution shift over tasks between training and evaluation. This is an important area of study, but not, we argue, essential to “any-task inference” capabilities or to “foundation models,” and we leave it as an area of future work.
Existence of Trivial Task Distributions Note that we are not claiming that there is only “one” true task space or task distribution . Instead, just as we have many data domains or data distributions, we can have many task domains or distributions, and define new ones to suit certain applications or contexts. This does mean that we can define some “trivial” task spaces – e.g., a single element task distribution . This is valid in much the same way that it is valid to define my data domain as a single point . It is technically true, but neither interesting nor useful. Given this flexibility, specifying is therefore an important part of specifying the domain of interest for any claims made about associated foundation models.
Single-task Models in this Extended Domain Note that this formulation does not preclude us from studying single-task models for a given task . In this setting, we are interested solely in modeling (in either a generative or discriminative setting). In such a setting, we can safely discard entirely, define our “effective” variables to be given by , and model as normal without issue.
Any-task Inference Capabilities in this Extended Domain If we are not interested in a single-task model, however, and instead interested in models that display “any-task inference capabilities,” then this extended domain is precisely the machinery we need to formalize this capability. In particular, for a model to support any-task inference over it is clear that this model must permit, through some procedural form, one to map any pair to some prediction distribution over – e.g., the model must be usable through a procedure that lives in .
Critically, note here that we are not asserting anything about the model’s actual performance. It may, for example, yield terrible performance over every task , or be constant in its predictions across all , and that need not violate its ability to perform “any-task inference.” Instead, the claim we make here is operational – if someone describes their model as being able to make inference over any task within this
³Note this relies on assuming that all tasks share the same label space – we will revisit this later but it is a more comfortable assumption than it seems at first glance.
extended domain, then there must be a mechanism by which you can perform inference for any task , which we can formalize in this functional form.
Note that we are also not requiring that be directly observable for a model to support any-task inference – instead, the only requirement is that if you have access to a task or some representation of such a task, you must somehow be able to use the model to make inference for that task . Note that this definition shares many similarities with the informal definition of “zero-shot” learning; for more commentary on why we use “any-task inference” vs “zero-shot learning” here, see Appendix B.
2.2 Task Representations
In general, will be an unobserved, latent space which is not represented in a tractable format. This will make it challenging to operationalize how we will realize these “procedures” defined on referenced above. Instead, in practice, where “tasks” are used today in an operational manner, we instead must “represent” a task in some more tractable manner. We formalize this through the notion of a Markov Kernel (i.e., a stochastic function) from into a space via . As this kernel defines a probability distribution for each , we can introduce the notion of a random variable , jointly distributed with such that the conditional random variable is given precisely by the action of on . If we wish for to be given by a deterministic function , we can represent that with a point mass distribution, such that . In this case, we may (at a slight abuse in notation) use as well when this distinction is clear from context. Note that even in the case that is deterministic, may still be stochastic given the stochasticity of . Below, we list some general properties and/or definitional requirements of task representations (all of which are assumed to be held in the context of a joint domain over ).
Given a representation , we can also define several induced kernels that will help with further results. In particular, Definition 2.1 defines to be the posterior kernel of tasks given representations and Definition 2.2 defines the kernel to be the distribution of labels conditioned on a data sample and a represented task (much as is the kernel for true tasks).
Definition 2.1. Given extended domain a representation of , and associated joint random variables , we can define the induced kernel to be the posterior distribution of .
Definition 2.2. Given extended domain a representation of , and associated joint random variables , we can define the induced kernel to be the induced distribution of .
To maximize the utility of these task representations, there are some basic properties, assumptions, and definitions we will introduce. Concretely, we take as a definitional assumption that . Similarly, if we have two distinct representations and , then we will likewise assume that . Given two such representations, we may also define a composite representation such that yields a random variable taking values such that each component of is independent of one another and defined by and respectively. Additionally, some representations may be “degenerate” in the sense that they may offer no information about the task in question, such that . For example ( maps all tasks to a point-mass at 0) is degenerate.
Conversely, a representation will be called “complete” if it contains all the information about the task. Concretely, is complete if almost everywhere. For example, is complete.
A graphical model of the relationship between data, tasks, labels, and representations can be shown in Figure 1.
Examples While it may seem counterintuitive at first, all task spaces permit tractable representations through a variety of means. Concretely, as we will explore in more depth below, each of our running examples leverages distinct tractable representations of tasks to achieve their foundation model behaviors. In particular, LLMs represent tasks via free-text prompts and natural language questions. AR foundation models for EHR data represent tasks in the form of structured programs they use to extract labels from generated trajectories during inference. PFNs represent a task stochastically via samples (assumed to be iid) drawn from the distribution of , which are directly passed to models as a sequence of pairs. Task-conditioned,

Figure 1: A graphical model of data samples x, tasks t, labels y, and representations of tasks induced by , r.
direct prediction foundation models like EveryQuery (Chandak et al., 2026) directly represent tasks via structured programs (much like AR EHR FMs use), and, finally, multi-task foundation models consider only a discrete space of tasks and represent them via categorical indices.
2.3 Irreducible Error due to Task Representation Ambiguity
It is important to note that will often produce “lossy” representations of tasks. In particular, it is clear by the data processing inequality and the fact that is a Markov chain, then . In other words, a representation of a task has less mutual information with the joint distribution of than does the true task.
We can generalize this notion slightly to apply to arbitrary generalized entropies and divergences by introducing the strictly proper scoring loss over and the associated generalized entropies introduced in Appendix A, through Definition 2.3.
Definition 2.3. Given , as defined above, let (implicitly dependent on , which we will assume is specified in context) to be the increase in the generalized -entropy of when conditioning on rather than t:
Definition 2.3 shows that is precisely (1) the amount of information that remains between y and t when conditioning on r and x, and (2) the increase in Bayes-optimal error were we forced to predict y from x and r alone vs. if we could use the true t directly.
Note that we can see that if is complete, then , so . Conversely, if is degenerate, then and is maximized. Additionally, suppose that . Then, by independence of and and the construction of the composite representation , we have that and .
Example Consider two tasks: predicting whether a patient will be readmitted within 7 days or within 30 days. If both are represented simply as “predict readmission,” the time horizon is lost. A readmission on day 20 would have different labels under the two tasks. Thus, even a Bayes-optimal predictor cannot fully resolve this ambiguity, resulting in irreducible representation error .
3 Defining Foundation Models
With this machinery in place, we can now define an ATI foundation model formally. In fact, in this work, we will make the property of “any-task inference capable” identical with being a “foundation model,” as this aligns precisely with the desiderata introduced in the Introduction and the spirit of maximally data-efficient adaptability introduced by Bommasani et al. We will first introduce a direct definition based on any-task inference capability in Subsection 3.1, then further show that we can equivalently define foundation models as reductions to a universal task and establish some basic properties of this definition in Subsection 3.2.
3.1 Formal Definition of an ATI Foundation Model
We first define ATI foundation models formally in Definition 3.1.
Definition 3.1 (Foundation Model). Let be an extended data, task, label domain of interest, satisfying the normal, previously mentioned assumptions. We will define an “ATI foundation model” over this domain to be a procedure . Implicitly, if one is interested in an ATI foundation model over this domain, but is only permitted to access tasks through a single-draw of a representation , then we should understand this as a procedure over instead of to reflect this single-draw requirement.
Much as we said for “any-task inference capability,” Definition 3.1 does not assert a specific performance guarantee, nor does it require generalization outside of the specified domain . It does, however, assert that there must be an operational manner by which one can map an input and a given task to a predicted distribution over . Note that we also do not assert that the foundation model will be able to access the raw task – instead, as we will introduce later, we will assume there is a specific representation of the task that the foundation model can leverage, which will factor into eventual error decompositions.
While Definition 3.1 may seem weak, we will see in this section that it permits meaningful theoretical and practical results. Concretely, in what remains of this section we will first remark that this definition trivially demonstrates what the “Bayes-optimal” foundation model is over this domain, and the implications of this, then we will show that all foundation models under this definition can be decomposed into terms under a “universal-task reduction” lens.
Bayes-optimal Foundation Models It is clear from Definition 3.1 that over a given domain with joint random variables , the Bayes-optimal foundation model under any strictly proper scoring loss is given by the true posterior of given :
We can also use this to see, near trivially, that the best possible foundation model cannot outperform the best possible single-task model for a task , both in general and when under matched model-permissibility constraints, thereby formally clarifying that foundation model improvements over supervised models must come from other mechanisms (Appendix C).
Foundation Models over Represented Task Spaces Definition 3.1 defines a foundation model over an extended domain and over the space where is the representation space of some representation in the case that the user is only allowed to access a single-draw of for any task . Note that even in this single-draw case, we still consider the foundation model to be “over the domain” not for the purposes of its definition/API, but instead for the purposes of optimality, as were the user to use a different representation for the root space of , they might be able to obtain a “better” model than is obtainable under in a manner that is lost if we consider optimality to be in the space. We will show later that the cost of a given choice in this single-draw case is precisely the irreducible representation error as defined in Definition 2.3.
Example A multi-task model predicting a fixed set of clinical outcomes satisfies Definition 3.1 when is restricted to those outcomes: given a task index, the corresponding prediction can be returned without retraining. However, this guarantees no inference capability beyond the specified task space, emphasizing that the expressiveness of is central to interpreting foundation model claims.
3.2 Foundation Models as Universal Task Reductions
Building on only Definition 3.1, we can decompose any foundation model into a procedure that leverages a form of reduction in the space of tasks to achieve any-task inference capabilities. Concretely, we will break a
Note that we use the term “procedure” rather than “function” or “model” here simply to reflect that this may, operationally, involve classical, algorithmic and modeled components, not to differentiate this mathematically from any other ordinary function.
foundation model P down into an “encoder”, a “universal task” and associated predictive “model”, and a “decoder”, such that the encoder, limited by an encoder-specific task representation, converts inputs to P into universal task model inputs, the predictive model attempts to solve the universal task over the modified inputs, and the decoder (similarly limited by a decoder-specific task representation) converts predictions for the universal task into predictions over the true labels .
To define this decomposition formally, we introduce the following variables, introduced in Notation 1.
Notation 1. Let be the normal extended domain, with the normal jointly distributed random variables. Then, define the following terminology and notational elements:
Encoder and Decoder Task Representations Let and be encoder and decoder specific task representation spaces, with and defining encoder and decoder representations, and and the induced encoder/decoder representation random variables, respectively.
Global Representation Define , with the induced random variable.
Universal-task Domain Let be alternative, standard-Borel spaces. Intuitively, and define the input and output spaces of the universal prediction problem to which the original task is reduced: the encoder maps the original input and task representation into , and predictions in can subsequently be transformed by the decoder into predictions over the original label space .
Encoder Let . In the context of a known encoder , we can introduce a random variable defined as , jointly distributed with all others.
Universal Task Let define a probability distribution for a “universal task” predicting elements from given inputs from , such that . In the context of a defined task and encoder , we will let the random variable denote the random variable induced from , jointly distributed and independent of all others given .
Labeler Define a per-task deterministic labeler , a measurable function that maps a universal-task output to a downstream label for any represented task . We write .
Model Let . In the context of a known we can define a random variable induced by as sampled via , jointly distributed and independent with all others given .
Decoder Let be the realized decoder. It is intended to approximate the target decoder induced by the labeler,
i.e., the distribution of for .
Unlike the model and decoder , which can be compared respectively to the target universal task and the stochastic labeling operation induced by , we do not posit a target encoder. Rather, the choice of encoder is part of the specification of the universal-task reduction itself and therefore jointly determines, together with , the universal prediction problem.
With these introduced, we can formally state and prove Theorem 3.2, which informally states that all foundation models permit a reduction through this universal task lens.
Theorem 3.2 (All Foundation Models are Universal Task Reductions). Let P be a foundation model over an extended domain . Then there exists a representation, encoder, model, and decoder (in the sense of the previously introduced terminology), such that almost surely
Proof. We can realize this trivially by construction. For , let the encoder representation be complete, let , , be the identity, directly, and let return the first argument only. Then this equality holds almost surely.
Note that Theorem 3.2 does not suggest that all foundation models uniquely decompose among these components – merely that there exists a decomposition of this form. Additionally, note that Theorem 3.2 leverages a consistent, deterministic representation , and thus does not permit us to say that we can decompose a generic foundation model over in a manner leveraging an inconsistent or stochastic representation. However, in such settings, if we assume the user is only permitted a single draw from the given representation (which we generally will), then we really are operating over the induced domain of (rather than ) with a consistent, deterministic representation without loss of generality. Finally, and most critically, note that the construction used in Theorem 3.2 is trivial, and does not assign any special properties to any components in a particular sense. However, it does show that we can, without loss of generality almost surely, use this decomposed view of a foundation model as a general definition. In particular, we can use Definition 3.3 instead of Definition 3.1 as our working definition of ATI foundation models, and conclude by Theorem 3.2 that this is almost surely without loss of generality.
Definition 3.3 (Foundation Models as Reductions). Define , , , in the prior terminology block. Then a foundation model can be defined as the tuple , realizing the function
Example A nontrivial instance of Theorem 3.2 and Definition 3.3 is given by autoregressive foundation models for longitudinal EHR data (Renc et al., 2024). Here, the model need not receive the downstream task as input. Instead, we may take to be degenerate and let , while choosing the universal task to be prediction of a future patient trajectory given the observed history . The learned model approximates this trajectory distribution. A downstream task , such as predicting whether a particular clinical event occurs within a specified time horizon, is represented on the decoder side through , and maps the predicted trajectory distribution to a distribution over the corresponding task label. Thus, many distinct task-specific predictions are obtained by reducing them to the same universal task of forecasting future patient trajectories.
Optimality Relative To a Target Universal Task And Labeler Note that thus far, we have not explicitly used the universal task or the labeler . To incorporate these into our definitions, we will define the notions of or -optimal foundation models in Definition 3.4. Informally, a foundation model is -optimal if perfectly reflects the distribution (e.g., ). It is -optimal if the realized decoder coincides with the target decoder, , i.e., .
Definition 3.4 (Foundation Model Optimality). Let define a foundation model , with and the induced target decoder as defined previously. Then is -optimal if (if perfectly models the universal task) and -optimal if for all (if exactly implements the labeler ).
In general, and -optimality are only meaningful for a pre-specified or ; e.g., the construction used in Theorem 3.2 actually establishes -optimality for being the kernel for and -optimality with (the identity, since ), thus showing that one can always choose a and to establish optimality. However, this will not imply that for any and , a given foundation model is optimal.
Notational Elements for the Decomposed Foundation Model In addition to the variables introduced in Notation 1, now that we have introduced u and d optimality, it makes sense to introduce explicit random variables for the various combinations of the components of P under Definition 3.3, as they will ultimately help us describe P in more precise ways. These elements are defined in Notation 2 and are represented as an augmented graphical model in Figure 2. Tables 1 and 2 summarize all the introduced objects and how they relate to each other.
Notation 2. Recall the notation introduced in Notation 1. We further introduce the following notational conventions: (1) The use of a will indicate a random variable that has been approximated via f rather than the true universal task u – this is consistent with already introduced in Notation 1. (2) The use of a will indicate a distribution being approximated through the action of the realized decoder D rather than the target decoder .
Consistent with these, we have:
| Space | Elements / random variable | Interpretation |
|---|---|---|
| Input space | Original data/input space. | |
| Task space | Space of downstream tasks of interest. | |
| Label space | Downstream label space. | |
| Encoder representation space | Space in which encoder-side representations of the task live. | |
| Decoder representation space | Space in which decoder-side representations of the task live. | |
| Global representation space | Joint task-representation space combining the information used by the encoder and decoder. | |
| Universal-task input space | Input space of the universal task. | |
| Universal-task output space | Output space of the universal task. |
Table 1: Spaces used in the universal-task reduction and their associated realizations and random variables.
Input Variables x, t, y, r_E, r_D as defined in Notation 1.
Encoder Action Let v = E(x, r_E) be the random variable induced by E.
Universal Task Outputs Let z be the true universal task label drawn from u(v), and be the approximated universal task label drawn from f(v). A u-optimal model has z|v and |v identically distributed.
Decoded Outputs We will let the “w” character represent the valued random variable obtained by applying the target decoder or the realized decoder D to a distribution over . Concretely,
- Let w represent the random variable obtained by applying the target decoder to the true universal-task distribution:
- Let represent the random variable obtained by applying the realized decoder to the true universal-task distribution:
- Let represent the random variable obtained by applying the target decoder to the model-approximated universal-task distribution:
- Instead of using the awkward notation for our final term, we use to represent the true output of P, obtained by applying the realized decoder to the realized model output:
Note that a d-optimal model has w|x, r and identically distributed, and likewise and . If f is u-optimal and D is d-optimal, then
The conditional independence relationships between these random variables, and their generating kernels/relationships, are shown via the augmented graphical model in Figure 2.
4 Decomposing Foundation Model Error
In this section, we will use Definition 3.3 to decompose foundation model errors into terms corresponding to different aspects of this decomposition. There are many such decompositions possible, and as we will define them here, many are near-trivial in complexity, as we will define individual error terms such that by

Figure 2: An augmented schematic graphical representation of the random variables and distribution-level operations induced by different combinations of our foundation model components. Blue circular nodes correspond to random variables and orange nodes correspond to stochastic or deterministic kernels or procedures. Solid directed edges through kernels indicate sample-level generation. Dashed edges from universal-task output random variables to D* or D indicate dependence on the corresponding conditional distribution rather than pointwise application to the realized random variable. Each decoder (target D* or realized D) separately receives the decoder-side task representation . This figure should be interpreted as a probabilistic graphical representation rather than a causal DAG.
| Role | Object | Definition / type | Induced object(s) | Interpretation |
|---|---|---|---|---|
| Base problem and reduction | ||||
| Base | Task kernel | True task-specific conditional distribution of labels. | ||
| Reduction | Encoder task representation | Represents the task for the purpose of constructing the universal-task input. | ||
| Reduction | Decoder task representation | Represents the task for the purpose of interpreting universal-task outputs in the original label space. | ||
| Reduction | Global representation | Joint representation containing the encoder- and decoder-side task representations. | ||
| Reduction | Encoder E | Maps the original input and encoder-side task representation into the input space of the universal task. | ||
| Universal task | ||||
| Target | Universal task | Target conditional distribution defining the universal task. | ||
| Realized | Model | Realized predictive model intended to approximate the universal task . | ||
| Task-specific labeling and decoding | ||||
| Target | Labeler | Task-specific deterministic map from a universal-task outcome to a downstream label. | ||
| Target | Target decoder D* | Decoding operation implied by the target labeler. | ||
| Realized | Decoder D | Realized decoder intended to approximate the target decoder D*. | ||
| Complete foundation model | ||||
| Realized | Foundation model P | Complete any-task inference procedure obtained by composing the task representations, encoder, realized universal-task model, and decoder. | ||
Table 2: Components of the universal-task reduction. Reduction components specify how the original task and input are mapped into the universal-task domain. Target components, shown in blue, specify the intended universal task, labeler, and the target decoder they induce; realized components, shown in orange, denote their implemented counterparts.
construction they sum to the total foundation model error. Nevertheless, the decompositions we introduce will allow us to understand what parts of the error we can optimize and control under different algorithms. For example, suppose a foundation model is trained in a “typical” manner, where the developer’s intent is to train the model to approximate a pre-specified universal task and the decoder D to approximate the target decoder D*, while the other components of the process are held fixed. A typical training procedure in this setting would then optimize to better approximate and/or D to better approximate D*. By separating such error components out from other aspects of the error, we can identify what remaining components exist in the total error and when they can be bounded or identified to be zero.
To decompose error in this way, we will first formally define what we mean by “foundation model error” in Subsection 4.1, then introduce a large set of terms quantifying different aspects of the total error in Subsection 4.2, before finally formally introducing our error decompositions and arguing for their utility in Subsection 4.3.
4.1 Defining Error for a Single-Draw Model
We define the error of a foundation model under strictly proper scoring loss formally in Definition 4.1.
Definition 4.1 (Foundation Model -Error). Let be an extended domain, be a task representation, be the normal joint random variables, and let be a strictly proper scoring loss. Let be a single- -draw foundation model over this domain, defined therefore via Definition 3.1 as a procedure over . Let be a random variable induced by , which we can therefore understand to be jointly distributed with all other random variables. We define the foundation model 's error over as the normal regret divergence for between the predicted distribution given by and the true distribution given by in expectation over samples and tasks:
Definition 4.1 introduces the error of the procedure against the ideal model achievable over (to respect the single-draw constraint). To capture the impact the single-draw criteria has, Lemma 4.2 decomposes into a term describing the error in comparison to the achievable error of vs. the ideal predictor over (not ) and a term capturing remaining error due to task-representation error.
Lemma 4.2. Given Definition 4.1 and introduced in Definition 2.2, we can re-organize as defined in Definition 4.1 as follows:
Proof.
as desired.
4.2 Components of Foundation Model Error
To provide a useful decomposition of , in this section we will introduce a variety of terms of different types of error which we will eventually combine in Theorem 4.11.
These terms will be organized to quantify the errors of different components of P in various arrangements, motivated by the assumption that the developer is “intending” to approximate a pre-specified universal task u and target decoder . For example, under the assumption that a model builder may be training the model f to approximate a task u, it would be of interest to compute the error of f's approximation of u (to determine how well their training process worked) or how much error they would incur were they able to approximate u perfectly, then use the rest of their foundation model as specified (to evaluate the choice of universal task u).
We will introduce these terms in three sections. First, a section introducing “error” terms capturing unambiguous, strictly non-negative measures of error that would be obtained were elements of P isolated from the system and considered in a standalone manner. Second, a section introducing signed “excess” terms that capture how real-world interactions amongst these components in a full foundation model can either exacerbate or ameliorate total expected error. Finally, third, we will note that as is a strictly proper scoring loss, there are natural, information-geometric, signed Bregman interaction terms canonical via the Bregman three-point identity between some combinations of our terms. All of these sections will rely heavily on the notation introduced in Appendix A and the specific random variables introduced to correspond to foundation model components defined in Notation 1 and 2 and Figure 2. In addition, all of these terms will judge the foundation model (for now) against the achievable total error, and thus condition on the observed pair rather than the base pair, consistent with the single-draw criteria.
Error Terms In Definition 4.3, we introduce various direct error measurements corresponding to parts of P. While we will combine each of these terms later, informally, they are all directly useful quantities when designing or evaluating a concrete foundation model. Specifically:
-
A target universal task that has large deficiency is likely a poor target for foundation model development, as solving the task perfectly will still not enable production of a consistent, high-performance foundation model.
-
While often unmeasurable, the observed model deficiency directly captures how much error is inescapable with a fixed model , and will be useful in our decomposition later.
-
If the model error is large, then the model poorly approximates , limiting internal validity if the choice of universal task is important.
-
If labeler error w.r.t. either or is large, then the choice of labeler can be seen to be problematic at a design level.
-
Finally, if the observed decoder error w.r.t. either or is large, it means that the realized decoder D is unable to well approximate the target decoder , limiting internal validity if the choice of is important.
All terms will also be w.r.t. a strictly proper -scoring loss . In addition, we let denote a strictly proper scoring loss over the universal-task output space , which we use to measure discrepancies between the target universal task and the model .
Definition 4.3. Given the setup introduced previously, define the following error terms, which are all non-negative:
-deficiency The universal-task deficiency is the minimal possible error a -optimal foundation model P could ever achieve when its decoder is restricted to a labeling step:
-deficiency The model-deficiency is analogous to , but when we use the model rather than the target universal task :
Model Error The model-error captures how effectively models , in the typical way:
Meaning that P must be -optimal for some labeling kernel . We allow to be stochastic so that is the best error attainable from at all; the cost of restricting to a deterministic labeler is then part of .
Labeler Error The labeler-error w.r.t. computes how much excess error is induced through the use of a specific labeler over the minimal error possible to obtain when predicting from the true universal task :
Labeler Error Similarly, the labeler error w.r.t. computes the excess error due to when predicting from real model :
Decoder-labeler Error w.r.t The Decoder-error w.r.t. computes how well the realized decoder D approximates the target decoder D* on the outputs of the universal task :
Decoder-labeler Error w.r.t The Decoder-error w.r.t is analogous to but over the outputs of realized model rather than :
With these error terms, we can additionally introduce Definition 4.4, which states that a foundation model is well-founded w.r.t. either or if it has no universal-task deficiency or labeler error, respectively. Informally, this definition is advisable as if one can justify that a foundation model setup is well-founded, it indicates they have chosen a universal task and labeler that theoretically permit any-task inference at optimal achievable performance, in the event that one can learn a -optimal model and leverage a -optimal decoder D.
Definition 4.4. A foundation model P is well-founded w.r.t. if . It is well-founded w.r.t. if . It is simply well-founded if it is well-founded w.r.t. both and .
In addition, Lemma 4.5 relates - and -optimality to the corresponding error terms, showing that -optimality is characterized by zero model error, while -optimality guarantees zero decoder error.
Lemma 4.5. Recall Definitions 3.4 and 4.3. Two properties hold:
-
P is -optimal iff .
-
If P is -optimal, then .
Proof. The first property follows directly from the definition of -optimality meaning that and that is strictly proper. The second follows from the definition of -optimality meaning that , so and (resp. and ) have the same conditional distribution given .
Excess Terms All of the direct error terms in Definition 4.3 are non-negative, and in a strict sense only a subset of them will directly contribute to total foundation model error. This discrepancy is because these error terms measure direct comparisons on individual components of P, and when these components are combined, the result can have greater or lesser error than that introduced by the sum of its parts. To capture these additional interactions, Definition 4.6 defines these signed “excess terms” which compute what remains between the true foundation model error and the direct error terms defined in Definition 4.3.
Definition 4.6. Given the setup introduced previously and the terms in Definition 4.3, define the following “excess terms”, which compare the relative errors that one obtains in reality (via model ) vs. those they would expect during model design (via universal task ):
Excess model deficiency Even though is an imperfect approximator of , it may exacerbate or ameliorate the total possible error obtainable through a permissible foundation model in comparison to , and captures this tradeoff:
Recall that denotes the realized decoder applied to the realized model, i.e., the output of P.
Excess labeler error . Similarly, beyond the optimal possible discrepancy in error, may induce different observed error relative to the possible error in comparison to what would be expected at design time w.r.t. the universal task :
Excess Decoder-labeler error . Similarly, the realized decoder can exacerbate or ameliorate error in matching the target decoder differently under in comparison to what would be expected at design time w.r.t :
Building on these definitions, Lemma 4.7 remarks that all excess terms vanish under -optimality and vanishes under -optimality.
Lemma 4.7. If is -optimal, then . If is -optimal, then .
Proof. If is -optimal, then is precisely , so by construction these differences in response between and vanish. For point 2, Lemma 4.5 shows that under -optimality, both , which implies that , as desired.
Bregman Interaction Terms Lastly, in Definition 4.8 we introduce some notation for the remaining signed Bregman interaction terms inherent from Bregman's three-point identity and the fact that is a strictly proper scoring loss.
Definition 4.8. We will explicitly use to denote the specific Bregman interaction term capturing the difference in divergence between and vs. that captured consecutively between then then :
Building on this definition, Lemma 4.9 identifies that vanishes for -optimal models.
Lemma 4.9. If is -optimal, then .
Proof. This follows directly from -optimality implying that will be identically distributed to given , as .
4.3 General Decompositions of Foundation Model Error
In this section, we leverage the terms defined in Definitions 4.3, 4.6, and 4.8 to formally decompose foundation model error. We will express this decomposed error first via Lemma 4.10, which shows a clear, telescoping error decomposition among our model error terms and our Bregman interaction term. However, our more ultimately useful result will be Theorem 4.11, which will leverage the excess terms as well to divide the error between design-space quantities dependent on , , and – which can be analyzed even before a specific model is trained to motivate a foundation model design – and our signed Bregman and excess terms, which can adjust total error in either direction, but generally cannot be fully controlled, and can only be bounded or analyzed post training or in specific contexts.
Lemma 4.10. Given a single-draw foundation model using the notation/variable conventions introduced previously, then
Proof. Recall from Lemma 4.2 that , where . Further, by definition, . Therefore, , as desired.
Theorem 4.11 (Foundation Model Error Decomposition). Let P be a foundation model with the usual notation. Then,
Proof. This follows directly from Lemma 4.10 and the observation that the excess terms are precisely the difference between the model error terms used in Lemma 4.10 and the design-space error terms introduced here.
Note that Theorem 4.11 does not precisely tell us anything distinct from the generic expression of error. The terms used in its decomposition are constructed precisely to enable a decomposition of this form, and the model excess terms and the Bregman interaction terms are both signed, so it is not the case that we can even say that the design-space error terms lower bound total error in general (though by Lemma 4.2 we can say that does lower bound total error).
Nevertheless, when designing a foundation model algorithm, especially under current AI systems, we typically can only directly control the design error terms and cannot intentionally influence model excess or the Bregman interaction terms directly. E.g., if we design a foundation model with a fixed encoder E and decoder D and a target labeler d and universal task u in mind, then train a model f to approximate u, it is not the case that we will be able to directly or even indirectly dictate the sign or magnitude of the model excess or Bregman interaction terms at all – so identifying how they split from the design error terms, which we can control, allows us to meaningfully and transparently justify our design choices and their limitations. Beyond this benefit, in select settings we will be able to enforce more concrete bounds on some of these non-design terms, enabling us to bound or otherwise more richly understand the total error, which we will explore next.
Example The decomposition highlights distinct limitations across foundation model paradigms. An underspecified LLM prompt can induce representation error , while an autoregressive EHR model approximating task probabilities through finite Monte Carlo sampling may incur decoder error . In contrast, task-conditioned models such as EveryQuery use an identity decoder, eliminating this decoder approximation error. Thus, different architectures can concentrate error in fundamentally different components of the same decomposition.
Practical Settings in Which Model Excess and Bregman Interaction Terms can be Bounded. It is not practical to insist on u-optimality, as this cannot be reliably achieved in settings where f is learned (though we note trivially by Lemma 4.7 that this zeros all excess terms). However, it may be practical to insist upon a model being both well-founded and d-optimal – e.g., were you able to perfectly learn the universal task u, the total error would reduce to the irreducible representation error . Lemma 4.12 shows that in this setting, all error terms can be reduced solely to .
Lemma 4.12. Let P be a foundation model that is well-founded in the sense of Definition 4.4 and d-optimal in sense of Definition 3.4. Then
Proof. The first equality follows directly from Definition 4.4 of well-founded (which sets ), Lemma 4.7, which establishes that , Lemma 4.5, which establishes that , and Lemma 4.9, which establishes that , all given -optimality. The second two equalities simply expand the definitions of these excess terms and of .
However, in such a setting, we can do even better by re-introducing the model error . Recall from Definition 4.3 that may be measured via a different strictly proper scoring loss than , which can make it challenging to compare these two losses. To remedy this, Definition 4.13 first introduces the notion of a loss inflation term, that bounds how much a stochastic kernel can possibly inflate a loss in space to one in space .
Definition 4.13. Given (1) spaces and ; (2) strictly proper scoring losses and over these spaces, respectively; and (3) a stochastic kernel , define the divergence inflation coefficient as
with the convention .
Armed with Definition 4.13 and Lemma 4.12, Theorem 4.14 shows that in this well-founded, -optimal setting, we can leverage this to bound in terms of and directly.
Theorem 4.14. Let be a well-founded, -optimal foundation model, with a strictly proper scoring loss over in addition to the strictly proper scoring loss over . For , let , , be the kernel induced by the labeler, and let .
Assume that and .
Then,
Proof. Let and , both kernels . Then is the conditional kernel of and that of .
Note that by well-foundedness , has law , and by definition has law . Hence, by Definition 4.13,
Combining with Lemma 4.12 gives the result.
We can go one step farther than Theorem 4.14 in settings where is informally equivalent to and are -divergences. In that setting, Lemma 4.15 states that for all possible kernels.
Lemma 4.15. Suppose and induce the same normalized -divergence over their respective families. Then for every Markov kernel , .
Proof. This follows exactly from the well-established data-processing inequality, which states that the -divergence between two random variables must always be at least that formed through stochastic garbling of those random variables by the same kernel.
In settings where our strictly proper scoring losses can also satisfy this property, Lemma 4.15 would thus let us offer an even tighter, more natural bound. The log loss satisfies it, as its regret divergence is the KL divergence; moreover, on label spaces with at least three elements, the KL divergence is the only divergence that is both a Bregman divergence (and hence the regret of a strictly proper scoring loss) and an -divergence (Amari, 2009; Jiao et al., 2014), so the log loss is essentially the only case in which Lemma 4.15 applies. Theorem 4.16 uses this to state that if and are the ordinary log loss and is both well-founded and -optimal, then .
Theorem 4.16. Let P be a well-founded, d-optimal foundation model and let and both be the ordinary log-loss. Then
Proof. The regret divergence of the log loss is the KL divergence, an -divergence, so Lemma 4.15 gives for every , hence , and the result follows from Theorem 4.14.
4.4 Conclusion
In this Section, we have shown in Theorem 4.11 how to decompose single-draw foundation model error into the irreducible representation error; design-error terms corresponding to universal task , target labeler and realized decoder D; excess terms capturing how the approximate model interacts with the various system components to exacerbate or ameliorate design errors; and a Bregman interaction term dictated by the geometries induced by the strictly proper scoring loss and distributions in use. This decomposition permits intentional, justifiable design choices when constructing foundation models and explains what aspects of the system contribute to overall error.
We further showed in Theorem 4.14 that in the case of a well-founded, -optimal model, we can further bound the total error by the sum of the irreducible representation error and a scaled version of the normal model error capturing how well approximates , where the scaling factor is dictated by geometric properties of both the target labeler and the different losses between the model target space and the overall label space . Next, in Section 5, we will show how to use Definition 3.3 to realize practical recipes to build foundation models in the real world.
5 Recipes to Build Foundation Models
When considering building foundation models, an astute reader may observe that Definition 3.1 frames foundation models in a way that is identical to how one might frame a supervised-learning, single-task model to predict from the joint input domain . This analogy would suggest that to train a foundation model, we should simply sample triples from and train a model as we would normally, using all the advancements in ML/AI for supervised learning to power this endeavor. This is, of course, not possible in general because we rarely, if ever, have overt access to the ability to sample from (though in some strange setting where this were possible, this would be a viable strategy). In general, we will not even be able to sample from , which would also permit us to learn a (reduced) foundation model.
In this section, we instead ask, powered by Definitions 3.1 or 3.3, how we can practically construct a foundation model for a domain when may be latent and is unknown and cannot be sampled directly. To answer this question, we provide two recipes, that each build on the following assumptions.
Firstly, for the purposes of these recipes, we will assume that is complete (and in particular assume that is naturally expressed in a tractable form, such that we can reliably use as an input to functions, etc.). As was shown in Section 4, this is equivalent to simply acknowledging that there is irreducible error due to , then simply modeling over the space instead of and considering error in that lossy domain, so we can do this without loss of generality, and it will only serve to make algebra simpler.
In addition, we assume two properties:
-
There exists a valued random variable (jointly distributed with all others) such that is sampleable, such that are related via the Bayesian DAG shown in Figure 3.
-
There exists a known, computable labeling function such that almost surely. Note that by Figure 3, so recovers the true task kernel through .
If is stochastic, all results below carry over by appending an independent seed to .

Figure 3: An extended graphical model where labels y are generated from x through a random variable z.
5.1 (Recipe 1) "Generative" Foundation Models: Model z|x, and Decode Labels Explicitly
In Recipe 1, which we will call our "generative foundation model recipe,"⁸ we do the following:
-
Define the universal task to be predicting , with .
-
Let simply forward the first argument and discard the task.
-
Let be any model trained on samples of to approximate .
-
Let the decoder representation be complete, with the canonical choice , so that almost surely.
-
Let the labeler be the known labeling function, . The target decoder is then .
-
Let the decoder be any procedure to approximate (e.g., Monte Carlo: draw and output , up to some budget).
The autoregressive EHR foundation models discussed in Section 3.2 illustrate this construction, with future patient trajectories serving as the universal-task output.
Then, as is shown in Theorem 5.1, the resulting foundation model given by is well-founded in the sense of Definition 4.4, which means that the only remaining sources of error will be the excess terms, which capture error introduced by 's poor approximation of , the Decoder-labeler Error , capturing 's poor approximation of , and the Bregman interaction term.
Theorem 5.1. If a foundation model is built as in Recipe 1, then this model is well-founded.
Proof. By Assumption 2 and , with probability one under the joint law of ,
As almost surely, and are identically distributed, so . Since is feasible in the deficiency defining and deficiencies are non-negative, , and therefore , establishing well-foundedness.
Advantages to Recipe 1 This recipe has multiple advantages. Firstly, it is guaranteed to be well-founded, and thus if and , the resulting procedure achieves Bayes-optimal predictions under the stated assumptions. In addition, if are sampleable, this model requires no additional assumptions to learn. Further, note that this model is universal in the sense that any task with a label inferrable from can be inferred from this foundation model – not just those tasks in , which will differ from the capabilities of models in Recipe 2.
Because Recipe 1 models the full distribution of , it can also answer conditional queries without retraining, by rejection sampling at inference time. For instance, given tasks and labels ,
⁸Note that the model here is actually learning a discriminative model over in the classical sense, not a generative model, but we still call this recipe the “generative” recipe as this is the vehicle by which most “generative” foundation models today operate.
let . Drawing , discarding draws outside , and labeling the accepted draws with yields whenever , an approximation of the conditional label distribution of task given that tasks take labels . Recipe 2 offers no analogous mechanism unless such conditional tasks are included in during training. A formal treatment of conditional tasks, including how the acceptance probability affects the error bounds of Section 4, is left to future work.
Detriments to Recipe 1 There are also several key disadvantages to this recipe. In particular, while this property of universality is nice, it also may induce needless inefficiency. If the only tasks of interest are those in , then any additional learning effort spent on how to transform from to in a manner that does not benefit learning is wasted.
In addition, while well-foundedness is nice, it is a relatively weak property. Without -optimality, which these models may not have, we cannot even relate total error to underlying model error in a principled manner, meaning that there may be interactions that exacerbate or ameliorate error between and that we cannot predict in advance with this theory. More generally, the lack of -optimality and the requirement that be used at inference time to translate from to impose additional sources of error and computational costs to the user, which can be severe.
Non well-founded Generative Foundation Models Recipe 1 is constructed such that it is well-founded, by virtue of the assumed Bayesian DAG shown in Figure 3. We could, however, generalize our notion of this recipe to apply in settings even when there is an unobserved, “confounder” pathway to from independent of , thereby violating the assumption that . In such a setting, we could still build a model as in Recipe 1 – let , set to be our task of predicting , set , and use as our labeler, with approximating the induced target decoder. This model would still be a valid foundation model under Definition 3.1, but it would no longer be guaranteed to be well-founded, due precisely to the error induced by ignoring the pathway independent of . We will use the term “generative foundation models” in general to refer to any model that satisfies this form – in particular have , which permits an interpretation of the model in this way, and reserve well-founded generative foundation model towards one that satisfies Recipe 1 as described fully (and is therefore well-founded).
5.2 (Recipe 2) “Discriminative” Foundation Models — Sample over a proxy distribution , then learn for
In this recipe, which we will call the “task-conditioned” recipe, we assume that we also have access to a proxy distribution , from which we sample independently of . We assume that, with probability one over the input , the conditional distribution of given is absolutely continuous with respect to . In other words, for such inputs, any measurable set of tasks assigned zero probability by also has zero probability under the original conditional task distribution.
In this setting, we can sample from , then compute ; we write for the induced label random variable. To construct a foundation model, we then
-
Define the universal task to be predicting , with and .
-
Let the encoder representation be complete (and canonically ), and be the identity.
-
Let be any model trained on samples to approximate .
-
Let the decoder representation be degenerate, the labeler be the identity, , and let the realized decoder simply return the output of directly: .
Task-conditioned models such as EveryQuery illustrate this construction, using structured task queries to directly predict downstream labels, subject to the stated assumptions on the proxy task distribution.
Then, as we will show in Theorem 5.2, this construction yields a foundation model that is not only well-founded but also d-optimal, permitting us to reduce all error to model error through Theorem 4.14.
Theorem 5.2. If a foundation model is built as in Recipe 2, then this model will be both well-founded and d-optimal.
Proof. d-optimality is clear, as .
Since is independent of and , the definition of gives
with probability one when is sampled from the joint law of .
By the absolute continuity assumption, this equality also holds with probability one when is sampled from the original joint law of .
Since, by the labeling assumption, almost surely, and , the right-hand side equals under that same joint law. Thus, almost surely.
Since the task representation is complete and the encoder and labeler are identities, . As is feasible in the deficiency defining and deficiencies are non-negative, , and therefore , establishing well-foundedness.
Advantages of Recipe 2 Unlike Recipe 1, Recipe 2 is both well-founded and d-optimal, meaning we can bound total error solely via model error, via Theorem 4.14. This means that we can rely on the extensive theory and practice of ordinary machine learning to learn foundation models via this recipe without concern for unmeasurable interactions between different error terms. It also has the significant benefit that there is no additional computational burden on users at inference time beyond the model itself, as D is trivial. It also does not waste learning energy on parts of that do not matter for any task – though this efficiency gain may be counteracted by the distribution shift of discussed more below.
Disadvantages of Recipe 2 The main detriment to this recipe is that this induces a source of distribution shift between training and testing, in that . At optimality under the sampling distribution, the absolute continuity assumption transfers the almost-sure equality to the original joint law of , where almost surely by the proof of Theorem 5.2, but in a real-world setting, this means that we cannot actually measure in an unbiased manner without the ability to sample from directly, which we assume is impossible. As such, though we can bound total error in theory, in practice we may still be left with uncertainty around what the true inference time error will be in practice, though we may be able to rely on the existing literature around distribution shift and limited ability to sample from to ameliorate this in practice, which we leave as an area of future work. In addition, this recipe is only universal to – not to as Recipe 1 is.
Lastly, this recipe also has a source of learning inefficiency similar to Recipe 1 – but instead of learning parts of that do not matter for any tasks, Recipe 2 may introduce learning inefficiency by requiring the model to learn labels for proxy pairs that have very low probability under the original joint distribution of , since is sampled independently of .
General Task-conditioned foundation models. Much like how we generalize our notion of a generative model to include any model with an unused encoder representation, we can generalize our notion of a task-conditioned model to non-well-founded settings by calling any foundation model with an unused decoder representation a “task-conditioned” foundation model.
5.3 Examples
Table 3 illustrates how the universal-task reduction applies to several representative foundation-model designs introduced earlier. For each example, the table gives one natural decomposition into encoder-side task representation , encoder E, universal-task input space , predictive model , universal-task output space , decoder-side task representation , and decoder D. These decompositions are not unique: in particular, preprocessing steps such as serialization or tokenization, as well as architectural encoder or decoder components, may be absorbed into E or D depending on the level of abstraction chosen. The examples are therefore intended to illustrate how the framework can represent common foundation-model designs rather than to prescribe a unique decomposition for each architecture.
The designs in Table 3 are also not intended to exhaust the possible realizations of foundation models under our definition. Prompted language models provide one broad family of examples whenever natural-language task specifications support any-task inference over the domain of interest. At the other extreme, recent decision models such as JEV expose a more explicitly task-conditioned interface: a model is provided with an input state together with one or more structured, typed questions and returns probability distributions over their possible answers. JEV is additionally trained using reinforcement learning for calibrated decisions (RLCD), which explicitly optimizes the quality and calibration of these probabilistic decisions (Almeida, 2026). From the perspective of our framework, such systems are naturally interpreted as instances of, or closely related to, the task-conditioned construction of Recipe 2. These emerging designs further illustrate that foundation-model behavior need not be tied to autoregressive text generation, but can instead arise from models trained to directly answer a sufficiently expressive space of task specifications.
6 Foundation Model Evaluation is Mathematically Similar to Evaluation under Algorithmic Fairness
Given a foundation model P, we may also ask how we can evaluate P in a useful manner, given we care about all tasks in in accordance with t. In fact, this evaluation shows a striking mathematical similarity to evaluation of supervised learners in settings with constraints on algorithmic fairness (Theorem 6.1). The motivation for this theorem is, informally, that many fairness results can be seen as general statements about how a model behaves over a partitioned input domain, where the sensitive attribute defines the partition, and we can realize that in evaluation of foundation models, we likewise care about a partitioned domain, where tasks determine the partition.
Theorem 6.1. Let P be a foundation model over extended domain as defined throughout.
Additionally, suppose we have a distinct domain , such that a model is a model of some task on that domain, with induced score . In this domain, suppose A defines a set of “attributes,” such that for each sample , we can identify a dictating the value of the “attribute” for this sample , realized through the random variables .
Suppose one can make a logical statement or formal theoretical proof about properties of and its evaluation as dictated across the full partition of possible values , splitting the dataset into separate partitions, each defined by the observation of a given value for a. Then one can make an analogous statement about P over , such that the partitions are induced by instead of A, provided that any required assumptions for said logical statement also hold over the domain with standing in for A.
Proof. Such a statement is expressed entirely in terms of the joint distribution of the prediction, label, and partitioning variable. Replacing the attribute a by the task t, the label y' by y, and the score s' by the foundation-model score s preserves the form of all probabilities, conditional independences, and group-conditioned quantities, provided that any required assumptions for the theorem are likewise met over this space (as is an assumption in the theorem). Hence the same argument applies with tasks indexing the partitions instead of attributes.
While basic, the utility of Theorem 6.1 is that many results stemming from the literature on algorithmic fairness can now be seen to have an analogous result for general foundation models, over “subpopulations” defined by disparate tasks, rather than protected attributes. For example, Lemma 6.2 establishes an analog of the Impossibility Theorem in fairness for foundation models:
Lemma 6.2. Suppose for simplicity that . Then, let s be the random variable corresponding to the induced output of a foundation model (or when is complete), realized as a distribution-valued
| Clinical LLM | EHR AR | PFN | EQ | Multitask | |
|---|---|---|---|---|---|
| Encoder task repr. | Natural-language prompt / instruction | Context set | Structured program / query | Categorical task index | |
| EEncoder | Pair EHR input with prompt / instruction | Forward EHR input | Pair query with context set | Pair EHR input with structured query | Pair EHR input with task index |
| Universal-task input | |||||
| Training dataTypical pretraining data | Clinical text / EHR notes | Longitudinal structured EHR event sequences | Task episodes sampled from a prior: context set plus query | EHR examples paired with structured tasks and labels | EHR examples with labels for a fixed finite task set |
| Model | Autoregressive clinical language model | Autoregressive patient-trajectory model | PFN predictor | Task-conditioned EHR predictor | Shared multitask predictor |
| Universal-task output | Generated clinical text / answer sequence | Generated EHR trajectory | Prediction in | Prediction in | Prediction in |
| Decoder task repr. | , or output schema / format | Structured task program | |||
| DDecoder | Identity, or parse generated text into task output | Apply task program to generated trajectory distribution | Identity | Identity | Identity |
| Task space | Natural-language clinical tasks / instructions | EHR prediction / extraction tasks | Supervised prediction tasks / data-generating distributions | Structured EHR queries / programs | Finite discrete task set |
| Example papersRepresentative works | (Peng et al., 2023) | (Renc et al., 2024) | (Hollmann et al., 2025) | (Chandak et al., 2026) | (Steinberg et al., 2024) |
| RecipeClosest Sec. 5 construction | Hybrid: Recipe 2-like input, Recipe 1-like output | Recipe 1 (Generative) | Recipe 2-like | Recipe 2(Task-conditioned) | Recipe 2-like |
Table 3: Illustrative decompositions of several foundation-model paradigms under the universal-task reduction framework. Here, denotes the original input, the downstream label, and the encoder- and decoder-side task representations, the universal-task input, and the universal-task output. We use a minimal functional decomposition in which E only assembles the original input and encoder-side task representation, while D only performs the task-specific transformation needed to map universal-task predictions into the downstream label space. Preprocessing, tokenization, embeddings, and architectural encoder or decoder components are therefore absorbed into . The “Training data” and “Example papers” rows are included for comparison and are not themselves components of the formal reduction. These decompositions are not unique. The “Recipe” row indicates the closest structural correspondence to the constructions in Section 5 rather than an exact identification with a particular recipe. In particular, clinical LLMs are shown as hybrid constructions: task information enters on the encoder side through natural-language prompting, as in Recipe 2, while the model generates a general text output that may subsequently be mapped into the downstream label space, as in Recipe 1.
random variable jointly distributed with all other relevant variables, with being treated as analogous to a “score” of the output of . In analogy to algorithmic fairness, define sufficiency to mean that and separation to mean that .
Then, provided and is not a perfect predictor (), then cannot simultaneously satisfy sufficiency and separation.
Proof. This is a direct application of Theorem 6.1 to the well-established impossibility theorem in algorithmic fairness (Chouldechova, 2017).
Example Consider a multi-task EHR model predicting outcomes with different prevalences, such as mortality and hospital readmission. Treating task identity as the partitioning variable reveals that, under the conditions of Lemma 6.2, sufficiency and separation cannot generally hold simultaneously across tasks. Thus, tradeoffs familiar from algorithmic fairness arise naturally when evaluating foundation models across heterogeneous prediction tasks.
The novelty of this section is therefore not a new impossibility theorem in itself, but rather the observation that known fairness-style tradeoffs can be reinterpreted as limitations of cross-task evaluation, and hence apply not only to foundation models but to multi-task evaluation more broadly.
References
Josh Achiam, Steven Adler, Sandhini Agarwal, Lama Ahmad, Ilge Akkaya, Florencia Leoni Aleman, Diogo Almeida, Janko Altenschmidt, Sam Altman, Shyamal Anadkat, et al. Gpt-4 technical report. arXiv preprint arXiv:2303.08774, 2023.
Diogo Almeida. Introducing system one models & jev. TypeSafe AI Blog, September 2026. URL https://typesafe.ai/blog/introducing-system-one-models-and-jev. Published September 15, 2026.
Shun-ichi Amari. -divergence is unique, belonging to both -divergence and Bregman divergence classes. IEEE Transactions on Information Theory, 55(11):4925–4931, 2009.
Rafi Al Attrach, Rajna Fani, Yugang jia, David Restrepo, Leo Anthony Celi, and Peter Schueffler. Rethinking tokenization for clinical time series: When less is more. In Machine Learning for Health 2025, 2026. URL https://openreview.net/forum?id=kdzXH4yxKs.
Jonathan Baxter. A model of inductive bias learning. Journal of artificial intelligence research, 12:149–198, 2000.
Rishi Bommasani, Drew A. Hudson, Ehsan Adeli, Russ B. Altman, Simran Arora, Sydney von Arx, Michael S. Bernstein, Jeannette Bohg, Antoine Bosselut, Emma Brunskill, Erik Brynjolfsson, Shyamal Buch, Dallas Card, Rodrigo Castellon, Niladri S. Chatterji, Annie S. Chen, Kathleen Creel, Jared Quincy Davis, Dorottya Demszky, Chris Donahue, Moussa Doumbouya, Esin Durmus, Stefano Ermon, John Etchemendy, Kawin Ethayarajh, Li Fei-Fei, Chelsea Finn, Trevor Gale, Lauren E. Gillespie, Karan Goel, Noah D. Goodman, Shelby Grossman, Neel Guha, Tatsunori Hashimoto, Peter Henderson, John Hewitt, Daniel E. Ho, Jenny Hong, Kyle Hsu, Jing Huang, Thomas Icard, Saahil Jain, Dan Jurafsky, Pratyusha Kalluri, Siddharth Karamcheti, Geoff Keeling, Fereshte Khani, Omar Khattab, Pang Wei Koh, Mark S. Krass, Ranjay Krishna, Rohith Kuditipudi, and et al. On the opportunities and risks of foundation models. CoRR, abs/2108.07258, 2021. URL https://arxiv.org/abs/2108.07258.
Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. Advances in neural information processing systems, 33:1877–1901, 2020.
Payal Chandak, Gregory Kondas, Liat Antwarg Friedman, Isaac Kohane, and Matthew McDermott. Every-query: Zero-shot clinical prediction via task-conditioned pretraining over electronic health records, 2026. URL https://arxiv.org/abs/2603.07900.
Alexandra Chouldechova. Fair prediction with disparate impact: A study of bias in recidivism prediction instruments. Big data, 5(2):153–163, 2017.
Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pp. 248–255. Ieee, 2009.
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 conference of the North American chapter of the association for computational linguistics: human language technologies, volume 1 (long and short papers), pp. 4171–4186, 2019.
Lin Lawrence Guo, Santiago Eduardo Arciniegas, Joseph Jihyung Lee, Adam Paul Yan, George Tomlinson, Jason Fries, and Lillian Sung. Tokenization tradeoffs in structured ehr foundation models, 2026. URL https://arxiv.org/abs/2603.15644.
Noah Hollmann, Samuel Müller, Lennart Purucker, Arjun Krishnakumar, Max Körfer, Shi Bin Hoo, Robin Tibor Schirrmeister, and Frank Hutter. Accurate predictions on small data with a tabular foundation model. Nature, 637(8045):319–326, 2025.
Jiantao Jiao, Thomas A. Courtade, Albert No, Kartik Venkat, and Tsachy Weissman. Information measures: The curious case of the binary alphabet. IEEE Transactions on Information Theory, 60(12):7616–7626, 2014.
Zilin Jing, Vincent Jeanselme, Yuta Kobayashi, Simon A. Lee, Chao Pang, Aparajita Kashyap, Yanwei Li, Xinzhuo Jiang, and Shalmali Joshi. One loss to rule them all: Marked time-to-event for structured ehr foundation models, 2026. URL https://arxiv.org/abs/2602.00541.
Inhyeok Lee, Luke Solo, Michael C. Burkhart, Bashar Ramadan, Sahil Sethi, Sarah Jabbour, William F. Parker, and Brett K. Beaulieu-Jones. Representation before training: A practical benchmark for generative medical event model tokenization, 2026. URL https://arxiv.org/abs/2604.16775.
Friedrich Liese and Igor Vajda. On divergences and informations in statistics and information theory. IEEE Transactions on Information Theory, 52(10):4394–4412, 2006.
Matthew McDermott, Bret Nestor, Evan Kim, Wancong Zhang, Anna Goldenberg, Peter Szolovits, and Marzyeh Ghassemi. A comprehensive ehr timeseries pre-training benchmark. In Proceedings of the Conference on Health, Inference, and Learning, CHIL '21, pp. 257–278, New York, NY, USA, 2021. Association for Computing Machinery. ISBN 9781450383592. doi: 10.1145/3450439.3451877. URL https://doi.org/10.1145/3450439.3451877.
Matthew BA McDermott, Ethan Steinberg, Jason A Fries, Robin P van de Water, Chao Pang, Patrick Rockenschaub, Pawel Renc, Jungwoo Oh, Kamilé Stankevičiūtė, Justin Xu, et al. Meds—an emerging data standard and ecosystem for health ai research. NEJM AI, 3(6):A Ira2501253, 2026.
Samuel Müller, Noah Hollmann, Sebastian Pineda Arango, Josif Grabocka, and Frank Hutter. Transformers can do bayesian inference. In International Conference on Learning Representations, 2022. URL https://openreview.net/forum?id=KSugKcbNf9.
Cheng Peng, Xi Yang, Aokun Chen, Kaleb E. Smith, Nima PourNejatian, Anthony B. Costa, Cheryl Martin, Mona G. Flores, Ying Zhang, Tanja Magoc, et al. A study of generative large language model for medical research and healthcare. npj Digital Medicine, 6, 2023.
Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9, 2019.
Maxim Raginsky. Shannon meets blackwell and le cam: Channels, codes, and statistical experiments. In 2011 IEEE International Symposium on Information Theory Proceedings, pp. 1220–1224. IEEE, 2011.
Pawel Renc, Yugang Jia, Marcin K Grzeszczyk, Tomasz Pawlowski, Emily Alsentzer, Matthew BA McDermott, and Isaac S Kohane. Zero shot health trajectory prediction using transformer. npj Digital Medicine, 7:260, 2024.
Ethan Steinberg, Jason Alan Fries, Yizhe Xu, and Nigam Shah. MOTOR: A time-to-event foundation model for structured medical records. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=NialiwI2V6.
Shane Waxler, Paul Blazek, Davis White, Daniel Sneider, Kevin Chung, Mani Nagarathnam, Patrick Williams, Hank Voeller, Karen Wong, Matthew Swanhorst, Sheng Zhang, Naoto Usuyama, Cliff Wong, Tristan Naumann, Hoifung Poon, Andrew Loza, Daniella Meeker, Seth Hain, and Rahul Shah. Generative medical event models improve with scale, 2025. URL https://arxiv.org/abs/2508.12104.
Stefano Woerner, Seong Joon Oh, and Christian F. Baumgartner. Universal algorithm-implicit learning, 2026. URL https://arxiv.org/abs/2602.14761.
A Notation and Assumptions
Sets
- We will use the notation to refer to the real numbers, to refer to the strictly positive real numbers, and to refer to the extended reals including .
Typefaces / Styling
-
We will use a standard typeface () to denote ordinary variables or functions. These may be scalars or vectors or functions depending on context, as that distinction will be less essential for our purposes.
-
We will use a calligraphic font () to denote generic, measurable sets, which we will typically use as the domain over which we will construct random variables.
-
We will use a sans-serif typeface () to denote random variables. As a general rule, if we define multiple random variables, they should be understood to be jointly defined, even when that joint relationship has not yet been defined.
-
We will use the monospace typeface E to represent a “procedure”, which is, mathematically, simply a function like any other, but we will denote it differently to reflect functions that will often be realized through more traditional computational algorithms rather than models that we might train via ML/AI methods, which we will denote with the more traditional notation or .
Probability
-
Given a set or boolean relationship , we will use the notation to represent the ordinary probability that .
-
We will use the notation to denote the set of all probability density/measure functions over the set . Note that if we state that , that does not necessarily mean that we have easy ways to perform all operations over , such as sample or compute a conditional or expectation, but we will assume the ability to evaluate the probability law on given inputs.
-
We will use the notation to denote that the value is drawn from the random variable . At times, we may also use the notation for some to denote that is drawn from a random variable with probability density/mass function .
-
Unless otherwise specified, we will use to denote the probability mass or density function of a random variable.
-
We will write for the law (probability distribution) of a random variable , and or for its conditional law given an event of positive probability (and, possibly, another random variable ).
-
Given a function over the domain , we will use the notation or to denote the expectation of a function that maps samples of to a measurable output space over the random variable . In the case that the random variable or distribution does not clearly delineate the function's input variable, we can use the expanded notation to indicate how the input function is applied to samples drawn from the random variable.
-
Given a suitably nice function over a domain and an valued random variable , we will let denote the random variable given by applying the function to samples drawn from . Relatedly, if and is a probability distribution over , then we will use the pushforward notation to denote the distribution obtained were one to sample from then apply (equivalent to the distribution of if ).
-
We will use a vertical bar to indicate conditional relationships, applied both to random variables (e.g., indicates the conditional random variable of x given the random variable t takes value , defined over a joint distribution over ) or probability density functions (e.g., ).
-
Extending the conditional notation above to events, given and a measurable set with , we write for conditioned on , i.e., for any measurable .
-
When it is clear from letter identity, we may simplify our conditional notation through the use of a subscript - e.g., let . If we do this for multiple random variables over the same conditional, they should be understood to be considered jointly conditioned with respect to the given variable, not two independently conditioned random variables - e.g., if we discuss , this is equivalent to .
-
When used without a target of the conditional, e.g., , this should be understood to be a stochastic kernel from to the space of probability distributions over , such that on input , this evaluates to the typical .
-
Given an -valued random variable , we will let denote the essential supremum over , which we can recall is defined for any measurable function to be
Informally, this is the supremum over the values that f can take on x that will be observed with non-zero probability.
Information Theory
-
We will use the traditional notation to denote that defines a jointly measurable Markov kernel from to (i.e., a stochastic function), such that we could introduce a random variable for each drawn from . Given a random variable over , then we can further consider to induce a random variable (without a subscript) over such that the conditional distribution given is defined precisely by . In this case, we can see that is precisely as introduced previously. Similarly, in this context the use of is consistent with our simplified subscript form for conditionals discussed above. We will also use the notation to represent the set of all possible Markov kernels from to equipped with the measures induced by the given random variables. At times we may use the notation equivalently when the measures are clear in context.
-
We will use the variable to represent a strictly proper scoring loss for , such that . We permit scoring rules and generalized entropies to take extended-real values and assume all relevant expectations and differences are well defined and finite whenever invoked.
-
Given a proper scoring rule and a random variable over , we will let the generalized entropy (where the last equality is guaranteed as is proper). In the event that is the log loss, then this is the Shannon entropy, .
-
To produce a generalized notion of conditional entropy, we simply compute the entropy over the conditional random variable in expectation over all possible conditioned values: . Note that this conditional entropy is exactly the score assigned by for a Bayes optimal predictor when predicting from over the joint distribution of . Similarly, we define the conditional generalized -information as .
-
Similarly, we can define the associated regret divergence for over two probability distributions as by propriety. In the case of the log loss, this is the normal KL-divergence. At a slight risk of an abuse of notation, if and are two valued random variables, we can use the random variables rather than probability laws to reflect the expected quantity: .
-
We can take the typical convention of supporting divergences between conditional kernels as reflecting an expectation over the conditioning value in a context where all variables are jointly defined: . We will also take as the convention that , to simplify notation.
-
As these divergences are Bregman regrets, we can also recall the three-point rule, which relates the pairwise divergences between three random variables over the same space via a (signed) Bregman interaction term. Concretely, if , , and are all random variables over , all jointly distributed with over a potentially different space, then we can define the unconditioned and conditioned Bregman interaction terms via:
Note that in the differentiable case, these Bregman interaction terms correspond explicitly to geometric quantities that can be independently expressed, but this interpretation will not be essential for us here.
- We can further define the generalized mutual information for via:
which is the improvement in Bayes-optimal predictive loss under from using x to predict y vs. using y alone.
-
Given two kernels, and , we will use the term “stochastic push-forward” of through to refer to the composition such that . We extend this notation in two ways. First, we identify a distribution with the constant kernel from a one-point space, so that . Second, given a -valued random variable , we write for the -valued random variable obtained by drawing from , jointly distributed with all others and conditionally independent of them given ; its law is , and, by this conditional independence, for any other random variable . When is induced by a measurable function , i.e., , these reduce to , , and the random variable (with law ), respectively.
-
We can further define the notion of an -deficiency, in the sense of statistical deficiencies in stochastic channels, a la Liese & Vajda (2006); Raginsky (2011). Let be jointly defined random variables taking values in , respectively. Note that the typical conditional distributions and form kernels such that and maps .
We define the deficiency of relative to to be the minimum possible error that could be obtained were one to predict through the action of any stochastic kernel in :
Functions
- We will slightly modify the traditional notation to denote not the set of functions from to , but instead, in cases where and are measurable, which will nearly universally be true in this work, the set of measurable functions from to , . We will also use the notation as is typical to denote that (again assuming measurability where applicable).
Note that this notation is unambiguous as we cannot take the divergence between a distribution over alone and a conditional kernel in , which is what the interpretation of this expression as being a divergence between and would imply.
Assumptions In general, where applicable, we will assume that sets/spaces are not only measurable, but are standard Borel spaces, and assume that random variables / probability distributions defined in the context of a known joint can be used interchangeably (e.g., we can identify a random variable with its probability distribution), that conditionals are well defined, and that statements made will be assumed to hold only almost surely (a.s.) in the probabilistic sense unless otherwise specified.
B Any-task vs. Zero-shot
We mentioned in the Introduction that we use the term “any-task inference” rather than “zero-shot inference” to avoid confusion, but here we can actually say more formally that these two requirements are very similar, and arguably identical in all domains where t is a continuous random variable everywhere. Concretely, in such a case, if we satisfy the two restrictions given above (can support inference for any task, no fine-tuning), then every evaluation we perform will be on tasks t that were almost surely¹⁰ never seen during training (by continuity of t), implying that every task we assess will be assessed in a zero-shot manner. In a setting where t is not continuous (e.g., is finite), then this may not hold. However, in this setting, the notion of “true zero-shot capabilities” (without assuming some notion of distribution shift to a new space of task ) is somewhat strange, as the space of tasks is fixed and finite, so there is nothing preventing a model from literally memorizing every single task that could ever exist directly with no risk of generalization error. Regardless, we use the term “any-task inference” here to focus squarely on the evaluation side, rather than on the training side, and avoid any confusion on this point.
C Foundation Models vs. Supervised, Single-task Models
Definition 3.1 implies the trivial, known results that the best possible foundation model has the same Bayes-optimal solution as the best possible supervised, single-task model for a given task , and thus has the same optimal error/performance. This is an obvious result, but it is worth stating explicitly to dispel any confusion that foundation models are somehow better than supervised learning models at optimality. Instead, their advantage must come in efficiency, learnability, flexibility, or along some other axis in practice.
In fact, we can go one step further than this. Suppose we have also measurable, with defined such that , and as usual, yielding two possible domains, and with the usual associated random variables. Further, suppose be some function class of interest within the space of all foundation models for and be a function class of interest within the space of foundation models for . For example, suppose that these function classes are defined both by operational constraints (e.g., neural networks with no more than a certain number of parameters), but also by “admissibility” constraints based on performance (e.g., the resulting foundation model will only be used if it achieves a certain average performance across all tasks within the domain, and otherwise it would not be considered successful).
In this setting, if we were to consider a foundation model over to be “permitted” in general, it must be within . If we were to then evaluate this model over alone and determine if it is “permitted” for the restricted domain , we would make this conclusion based on whether or not it is also within . As such, we can say that a foundation model over then considered as a solution for would be allowed only if it lives within . This therefore trivially implies that were we to consider the set of all foundation models permitted under alone vs. those permitted under and , the best possible performance of a model over alone must be at least as good as that of one permitted under both and .
Concretely, as an example, this implies that if we train a single task model for a task under any acceptance criteria (e.g., it must obtain a certain performance and have a certain capacity limitation), and alternatively train a foundation model over , asserting that it must likewise satisfy the capacity limitation and attain a similar performance on , but also satisfy some more general constraints due to its “foundation model” nature, then it is theoretically clear that it is impossible for the optimal such foundation model to outperform the optimal such single-task model. Instead, any performance difference we hope to achieve
¹⁰Meaning that the statement holds with probability one.
between single-task and foundation models must be accompanied by differences in prescribed criteria, such as permitting the foundation model to leverage additional capacity.