Foundation models: one pretrained model adapted to many tasks
Foundation models are large AI models trained on vast, diverse data that can be adapted to many downstream tasks. They use transfer learning and self-supervised learning to generalize across domains. Adaptation methods include fine-tuning, prompting, and distillation, each with trade-offs in performance and resources.
What defines a foundation model
The term foundation model was introduced by researchers at Stanford University's Center for Research on Foundation Models to describe AI models trained on broad data at scale and adaptable to a wide range of downstream tasks. As the Stanford CRFM report explains, these models are central yet incomplete, serving as a common basis from which many task-specific models are built.
Foundation models differ from traditional machine learning models, which are trained on smaller datasets for specific tasks like object detection or trend forecasting. In contrast, foundation models are trained on massive, unlabeled datasets and can perform general tasks such as understanding language, generating text and images, and conversing naturally, as described in AWS's foundation models overview.
The Stanford CRFM center, an interdisciplinary initiative at the Stanford Institute for Human-Centered Artificial Intelligence, studies the technical foundations, beneficial applications, societal impact, and policy implications of these models. Their work spans data, systems, architectures, training, adaptation, and evaluation, as noted on the CRFM website.
How foundation models are built
Building a foundation model involves several steps: gathering a huge corpus of diverse data, choosing the modality (text, image, audio, or multimodal), defining the model architecture, training, and evaluation. Most foundation models use transformer architectures with encoders, self-attention, and decoders, or diffusion models for image generation, according to IBM's foundation models explainer.
Training typically uses self-supervised learning, where the model learns inherent correlations in unlabeled data without labeled examples. The model predicts the next item in a sequence, such as the next word in a sentence, using probability distribution techniques, as AWS's foundation models page describes.
The scale of these models leads to emergent capabilities not present in smaller models. However, their homogenization means that defects in the foundation model are inherited by all adapted models downstream, a risk highlighted in the Stanford CRFM report.
Adapting a foundation model to specific tasks
Fine-tuning is a common adaptation method where a pretrained foundation model is further trained on a smaller, task-specific labeled dataset using supervised learning. This updates the model's parameters to optimize performance on the target task, but it can be computationally expensive and may affect performance on other tasks, as IBM's foundation models explainer notes.
Prompting is another approach that does not change the model's parameters. Users provide task-related instructions or examples within the prompt, leveraging the model's in-context learning ability. One-shot prompting shows a single example to guide the model's output, as explained in Google's Machine Learning Crash Course on tuning.
Distillation creates a smaller, more efficient version of a fine-tuned model by training a student model on labeled data produced by a larger teacher model. The distilled model runs faster and uses fewer resources, though its predictions may be slightly less accurate, according to Google's Machine Learning Crash Course on tuning.
Risks and governance considerations
Foundation models present novel capabilities and risks that are poorly understood, yet they are being deployed at scale. The Stanford CRFM center emphasizes the need for interdisciplinary collaboration to address questions about how these models work, when they fail, and what they are capable of, as stated on the CRFM website.
The National Institute of Standards and Technology (NIST) has published a cross-sectoral profile for generative AI as a companion to the AI Risk Management Framework. This profile aims to improve organizations' ability to incorporate trustworthiness considerations into the design, development, use, and evaluation of AI products and services, as described in NIST's publication page.
Organizations adapting foundation models should consider the societal impacts, including inequity, misuse, economic and environmental effects, and legal and ethical considerations. The Stanford CRFM report provides a thorough account of these risks and opportunities across domains like law, healthcare, and education.
| Method | What changes | Data needed | Resource cost | Typical use |
|---|---|---|---|---|
| Fine-tuning | Model parameters | Task-specific labeled dataset | High (updates all parameters) | Classification, regression |
| Parameter-efficient tuning | Subset of parameters | Task-specific labeled dataset | Lower than full fine-tuning | When full fine-tuning is too costly |
| Prompting | No parameter change | Instructions or examples in prompt | Low | In-context learning, quick customization |
| Distillation | Creates a smaller model | Labels from a teacher model | Moderate | Reducing model size for deployment |
Frequently asked questions
What is a foundation model?
A foundation model is a large AI model trained on vast, diverse data that can be adapted to many downstream tasks. The term was coined by Stanford researchers to describe models like BERT, GPT-3, and DALL-E that serve as a common basis for task-specific models.
How is fine-tuning different from prompting?
Fine-tuning updates the model's parameters by training on task-specific labeled data, which can be computationally expensive. Prompting does not change parameters; it provides instructions or examples in the input to guide the model's output, leveraging in-context learning.
What is distillation in the context of foundation models?
Distillation creates a smaller version of a fine-tuned model by training a student model on labeled data produced by a larger teacher model. The distilled model runs faster and uses fewer resources, but may have slightly lower accuracy.
Why are foundation models considered risky?
Foundation models have emergent capabilities that are poorly understood, and their defects are inherited by all adapted models downstream. They also raise concerns about inequity, misuse, economic and environmental impact, and legal and ethical issues.
What does NIST's AI RMF profile for generative AI do?
NIST's AI Risk Management Framework: Generative AI Profile is a cross-sectoral resource that helps organizations incorporate trustworthiness considerations into the design, development, use, and evaluation of generative AI products and services.