Back to Foundation Models Index | Next: (y-02) Machine Learning Basics

Mental Model First

  • A foundation model is trained once on broad data and then reused as the basis for many downstream tasks (Bommasani et al., 2021). The idea underneath everything else in the course is reuse: learn a broadly useful representation or capability, then adapt it.
  • Pretraining gets its learning signal from structure already in the data: predict the next token, reconstruct a masked token or patch, or match paired examples (an image and its caption) against mismatched ones.
  • Adaptation either changes the model (fine-tuning, LoRA, instruction tuning, preference learning) or changes the context it sees at inference time (prompts, examples, retrieved documents).
  • LLM, VLM and VLA describe input and output interfaces: text in and text out, images plus language in and text or locations out, observations plus instructions in and robot actions out.
  • Every application needs evidence of a useful outcome (passing tests, experimental validation, learning without the assistant, safe task success), and deployment raises questions about errors, misuse, data rights, prompt injection, energy and access that capability alone does not answer.
  • Organization: lectures on Mondays, a new exercise sheet every week, and exam admission needs valid attempts on 8 of 11 sheets plus at least one successful presentation. The grade is 100% the final exam.

1. If AI Can Write Code, Why Study CS and AI?

Generated BFS code is only the start. You still have to understand the model, evaluate the result, improve the system and recognize its limits.

Ask a model to “generate Python code for breadth-first search” and you get a correct-looking BFS with a queue and a seen set. The lecture’s answer to why you still need to study the field is a list of things the generated code does not do for you:

  • Understand the model: how does it learn and generate answers?
  • Evaluate the result: is it correct, efficient, reliable?
  • Improve the system: better algorithms, models and training.
  • Recognize the limits: what can we guarantee, and at what cost?

2. Today’s Lecture

The first session has three parts: foundation models (pretraining, adaptation, and what LLM, VLM and VLA mean), capabilities and applications (recent systems, scientific opportunities and the limits of demonstrations), and course organization (what the course covers, the weekly exercises and exam eligibility).

3. What Is a Foundation Model?

A foundation model is trained on broad data and adapted to many downstream tasks (Bommasani et al., 2021). The central idea is reuse.

A foundation model is “a model trained on broad data that can serve as the basis for many downstream tasks” (Bommasani et al., 2021). Data of many kinds (text, images, speech, structured data, 3D signals) goes into training, and the resulting model is adapted to tasks such as question answering, sentiment analysis, information extraction, image captioning, object recognition and instruction following. The central idea is reuse: learn a broadly useful representation or capability once, then adapt it.

4. Pretraining: Learning from Available Structure

Three pretraining signals: next-token prediction, masked prediction and contrastive matching of paired examples.

Pretraining needs a learning signal that does not require human labels. The lecture shows three, each with a simple training example:

  • Next-token prediction: “The sky is” → predict “blue”. This learns patterns useful for language generation.
  • Masked prediction: “The [MASK] is blue” → reconstruct “sky”. The same idea works for hidden image patches and learns representations of context.
  • Contrastive learning: match an image with its caption (“dogs on grass”) and contrast it with other examples. This learns representations shared across modalities.

5. Adaptation after Pretraining

Adaptation either changes the model (fine-tuning, LoRA, instruction tuning, preference learning) or changes the context (prompts, examples, retrieved documents).

There are two ways to adapt a pretrained model:

  • Change the model: fine-tuning and LoRA adapt the parameters; instruction tuning and preference learning shape the responses.
  • Change the context: prompts, examples and retrieved documents supply task information at inference time, without touching the weights.

One pretrained model can support many systems with different data, tools and evaluation criteria.

6. LLMs, VLMs, and VLAs

LLM, VLM and VLA name different input and output interfaces, from text in and text out to observations in and robot actions out.

The three terms describe different input and output interfaces:

ModelInputOutput
LLM (large language model)Text or codeText, code, tool-call arguments
VLM (vision-language model)Images or video with languageText, embeddings, grounded locations
VLA (vision-language-action model)Visual observations, instruction, robot stateRobot actions or action sequences

7. A Snapshot of Current Systems

A snapshot of autumn 2026 systems. Context made of text and images goes into a foundation model that acts through tools.

The slide lists four systems from autumn 2026: GPT-6.1 Sol (September 2026; reasoning, coding, computer use, tools), Claude Sonnet 5.5 (September 2026; image understanding and software work), Gemini 4 Argon (September 2026; multimodal reasoning and long tasks, restricted initial access) and Mistral Large 4 (October 2026; multimodal API preview, weights announced for a later release). The common pattern: context made of text and images goes into a foundation model, which acts through tools such as code execution or computer use.

8. Language Modeling

Language modeling: estimate P(next token | context), raise the probability of observed continuations in training, and generate one token at a time.

A simple objective supports many tasks. Given “The capital of France is …”, the model estimates P(next token | context).

  • During training, the parameters are adjusted to assign higher probability to the continuations that were actually observed.
  • During generation, the model selects a token, appends it to the context, and repeats.

9. Reasoning and Computation at Inference Time

Inference-time reasoning (DeepSeek-R1): train on verifiable outcomes and spend more computation on intermediate steps, search and checking.

DeepSeek-R1 is one influential research example. Two ideas drive it:

  • Training for verifiable outcomes: for some mathematics and coding tasks, known answers or tests provide a training signal.
  • Spending more computation: a system can generate intermediate steps, search for alternatives, or check candidate answers.

What should count as evidence of success? A correct final answer on held-out problems, and robustness to variations of the problem, within a stated time and compute budget.

10. Retrieval and Tool-Using Agents

A tool-using agent answers in four steps (retrieve, reason and act, check, respond), each with its own failure point.

Example task: “Does the experiment support the paper’s claim?” An agent answers in four steps, each with its own failure point:

StepWhat it doesFailure point
1. RetrieveFind relevant passagesMissing evidence
2. Reason and actRead, calculate, or run codeWrong tool call or calculation
3. CheckCompare the answer with the evidenceCitation does not support the claim
4. RespondAnswer with sourcesUncertainty lost in fluent wording

11. Vision-Language Models

VLM questions about one image: which objects, which penguin is closest, locate every penguin. Where could perception be confused with inference?

A VLM handles images and language in one task. For a photo of penguins you can ask which objects are present, which penguin is closest to the camera, or ask it to locate every visible penguin. The question to keep in mind is where the model could confuse perception (what is in the image) with inference (what it guesses from context).

12. CLIP: Connecting Images and Language

CLIP's contrastive image-text training enables zero-shot recognition: describe a category in language instead of training a new classifier.

CLIP (Radford et al., 2021) trains an image encoder and a text encoder contrastively, so that matching image-text pairs score high. The result is a reusable representation for retrieval and zero-shot recognition: a category can be described in language without training a new classifier for every task. It is a foundational idea behind later multimodal systems. How would you test this on a new domain? (The MPL course covers CLIP in detail in MPL L07: Multimodal Learning.)

13. Visual Foundation Models beyond Chat

Visual foundation models beyond chat: DINOv3 for self-supervised features and SAM 3 for prompt-driven detection, segmentation and tracking.

Visual foundation models are useful without any chat interface:

  • DINOv3 (2025) learns self-supervised visual features for downstream tasks.
  • SAM 3 (2025) offers prompt-driven detection, segmentation and tracking.

Feature representations and task interfaces serve different roles.

14. Generative Models

Generative models learn a distribution of outputs, which raises new evaluation questions: faithfulness, consistency and physical plausibility.

A generative model learns a distribution of possible outputs. In conditional generation, given a prompt or other context, it generates a plausible image, sound, video or other output. That creates a different evaluation problem: is the output faithful to the request, consistent across details, and does it respect physical constraints?

Image Generation from 2023 to 2026

DALL-E 3 (2023) on the prompt "a professor in front of a class at the University of Stuttgart teaching Foundation Models".

GPT-6.1 (2026) on the same prompt: a photorealistic lecture hall with the course title on the screen.

The lecture runs the same prompt, a professor in front of a class at the University of Stuttgart teaching “Foundation Models”, through DALL-E 3 (2023), Flux (2024), GPT 5 (2025) and GPT-6.1 (2026). Over the four years the results move from stylized, obviously synthetic scenes to photorealistic lecture halls with the course title on the screen.

15. Video Generation and World Modeling

Video generation and world modeling (Veo 3.1). A convincing video does not establish a reliable simulator.

Veo 3.1 (2025) is a recent example.

  • Video generation: condition on text, images or existing footage and generate a sequence with audio.
  • World modeling: predict how a scene evolves, potentially conditioned on actions. Useful prediction requires temporal and causal consistency.

The slide’s caveat: a convincing video does not establish a reliable simulator.

16. Vision-Language-Action Models

RT-2 as the starting point for VLAs: camera images and an instruction go in, de-tokenized robot actions come out.

In a VLA the output controls a physical system. The inputs are camera observations, a language instruction and often the robot’s state. The outputs are movement commands or a sequence of actions that a controller executes. RT-2 (2023) is the historical starting point: a vision transformer and a large language model produce tokens that are de-tokenized into robot actions. Action errors have physical consequences.

17. Current Directions in Robot Foundation Models

Open questions in robot foundation models: whole-body action (Gemini Robotics 2), transfer to new homes (π0.5) and compact models (SmolVLA).

Three systems stand for three open questions:

  • Gemini Robotics 2 (2026): how can perception, planning and whole-body action work together?
  • π0.5 (2025): can a policy transfer to unfamiliar homes and objects?
  • SmolVLA (2025): how far can compact models and community robot data take us?

18. A Model Is Part of an Interactive System

"Put the red cup in the cupboard" needs perception and grounding, planning, feedback and control, and safety and oversight.

Take the instruction “Put the red cup in the cupboard”. The model is only one piece of what has to work:

  • Perception and grounding: which cup, which cupboard?
  • Planning and action: which steps and movements?
  • Feedback and control: did the grasp work, and what changed?
  • Safety and oversight: when should the robot stop or ask for help?

19. Applications of Foundation Models

Each application needs evidence of a useful outcome: passing tests, experimental validation, learning without assistance, safe task success.

Useful outputs need evidence of useful outcomes. For each domain the lecture pairs the output with the outcome that would count as evidence:

DomainOutputEvidence of a useful outcome
SoftwareEdit a repositoryPassing tests and robustness
Science / biomedicinePredict properties or propose candidatesExperiments and external validation
EducationExplain, give feedback, support practiceLearning and transfer without assistance
RoboticsFollow instructions as conditions changeSafe task success in unfamiliar settings

Biomedicine: AlphaGenome

AlphaGenome predicts regulatory effects of DNA variation. The Atlas holds precomputed predictions that still need biological validation.

AlphaGenome predicts regulatory effects, connecting DNA sequence to expression, accessibility, splicing and other signals. The AlphaGenome Atlas holds precomputed predictions for single-letter changes across the human genome. Predictions still require biological validation, so the question to ask is what experiment would test the proposed mechanism.

Education: Assistance and Learning

Tutoring example: why does attention divide by √dₖ? Assistance gives hints, but learning means deriving the argument yourself.

The lecture’s tutoring example is “Why does the attention mechanism divide by √dₖ?”. Useful assistance means asking for a hint, comparing an explanation with the equations, and testing it on a small example. Evidence of learning means deriving the argument yourself and explaining what changes when the assumptions change.

Science and Engineering: Aurora

Aurora: shared pretraining on heterogeneous geophysical data, adapted to weather, air quality, ocean waves and cyclone tracks.

Aurora (Nature, 2025) is a foundation model for the Earth system. It is pretrained on heterogeneous geophysical data and then adapted to specialized forecasting: weather, air quality, ocean waves and cyclone tracks. The open question is what changes under rare extreme events.

20. Research Opportunities

Understanding the foundations lets us improve the systems. The directions named in the lecture:

  • learn from less data or less computation,
  • transfer to new domains while measuring what fails,
  • combine learned models with scientific structure and constraints,
  • build evaluations that reveal failures hidden by average scores.

21. Societal Challenges

Societal challenges: reliability and inequity, misuse and deception, data rights, concentration and accountability.

Four questions affect the design and deployment of any system, and technical capability alone does not settle them:

  • Reliability and inequity: who bears the cost of errors?
  • Misuse and deception: which harmful activities get easier?
  • Data rights: how are consent, attribution and access handled?
  • Concentration and accountability: who controls the system, and who can challenge it?

Security When Models Use Tools

Prompt injection: text inside a document tries to redirect the assistant. Reading content must not give it authority over tools and private data.

Prompt injection changes the security problem. The user asks the assistant to “summarize this report”, but an attacker has inserted instructions into the report that try to redirect the assistant’s actions. Reading content must not give that content authority over tools and private data. Least privilege, controlled tool access, and confirmation before consequential actions are system-level controls.

Computation and Environmental Cost

IEA scenario for global data-center electricity use: 415 TWh in 2024 and a projected 945 TWh in 2030.

An IEA (2025) scenario estimates global data-center electricity use at 415 TWh in 2024 and 945 TWh in a 2030 base case. The 2030 value is a projection, not an observation, and it covers all data centers. Resource use is driven by training and inference volume, model and hardware efficiency, and the electricity mix and location. A smaller cost per task can coexist with greater total use.

Economy, Work, and Access

  • Which tasks become easier, and which responsibilities remain with people?
  • Who can afford to train, adapt, evaluate and run these models?
  • How much can we reproduce when weights, data or training details are unavailable?
  • How should productivity, quality and effects on workers be measured?

“Open weights” and “fully reproducible” describe different kinds of access.

22. Foundations This Course Assumes

The assumed foundations: linear algebra and calculus, probability and statistics, ML and optimization, and programming.

The course builds on mathematics and programming you already know, each tied to where it shows up later:

  • Linear algebra and calculus (, ): embeddings, attention matrices, gradients.
  • Probability and statistics (P(next token | context)): likelihood, generative models, uncertainty, evaluation.
  • Machine learning and optimization (): losses, generalization, train/validation/test splits, gradient descent.
  • AI and programming (loss.backward()): search, algorithms, Python, tensors, experiments.

The next lecture is a refresher on these concepts.

23. Learning Goals

After the course you should be able to:

  • explain how pretraining and adaptation produce reusable capabilities,
  • relate architectures and objectives to different data modalities,
  • evaluate systems with appropriate baselines, metrics and failure analysis,
  • reason about reliability, safety and the cost of using a model.

24. Tentative Lecture Plan

DateTopicLecturer
12 OctWhat are foundation models?Mathias
19 OctBasics in ML recapMathias
26 OctNo lecture
2 NovData, tokenization, n-grams, word2vecSteffen
9 NovTransformers and pretraining: BERT, GPTSteffen
16 NovBLEU, SFT, RLHF / InstructGPT, DPOSteffen
23 NovAdaptation: fine-tuning and LoRASteffen
30 NovBenchmarks and evaluationArvindh
7 DecReasoning: chain of thought, DeepSeek exampleSteffen
14 DecRetrieval-augmented generation and agentsSteffen
21 DecNo lecture
11 JanProbabilistic generative models I (VAE, GAN)Mathias
18 JanProbabilistic generative models II (Diffusion)Mathias
25 JanDiscrete diffusion modelsLoay
1 FebComputer Vision I (Vision Transformer, CLIP)Loay
8 FebComputer Vision II (DINO, SAM, applications)Loay

Titles and teaching assignments may change. C@mpus lists sessions on 26 October and 21 December, but the tentative plan says there is no lecture on those dates.

25. Lectures, Tutorials, and Course Information

Lectures are on Mondays, 11:30 to 13:00, in room V 38.01 (Universität 38); the first lecture was on 12 October 2026. Tutorial dates follow C@mpus for the exercise group you registered for. Individual exercise solutions are submitted on ILIAS, which also carries announcements, lecture videos and slides. Final exam details will be announced on ILIAS, and the grade is based 100% on the exam.

26. The Weekly Exercise Rhythm

Weekly rhythm: a new sheet on Monday, individual submission by Sunday 23:59, and presentations in the tutorial.

  • Monday, after the lecture: a new sheet is released.
  • Sunday, 23:59 of the same week: submit your own solution individually on ILIAS. Late submissions are not accepted.
  • Tutorial (dates per group in C@mpus): students present first, then tutors explain the previous sheet’s solutions and answer questions.

You can work in groups but must turn in the sheets individually.

27. Exam Eligibility and Valid Submissions

Exam eligibility requires valid attempts on 8 of 11 sheets and at least one successful presentation.

Both requirements are mandatory:

  • 8 of 11 exercise sheets with valid attempts, and
  • at least 1 successful subtask presentation in your own tutorial group.

A valid attempt means a genuine attempt at at least two subtasks per sheet, with the attempted subtasks clearly labeled. Unlabeled, blank, copied or token submissions do not count, and the teaching team checks every submission.

Presentations: Preparation and Selection

Submitting a subtask means you are ready to present it. Tutors prioritize subtasks with submissions and select randomly within your group among the students who submitted that subtask on time and have not yet presented successfully. Submitting more exercises without having presented increases your chance of being picked. You can only be selected for subtasks you attempted, and a successful presentation removes you from the pool.

A presentation succeeds if you explain your approach and answer questions. The solution may be wrong, but it must be your own and you must understand it. If you cannot explain it, the presentation does not count; there is no strike, but you must present again, and the tutor may invalidate that submission. Aim to present by mid-semester, although there is no formal deadline.

Attendance, Strikes, and Excused Absences

  • One strike: if you are selected and are absent, refuse, or leave before presenting. The tutor then picks another student.
  • Two strikes: you become ineligible for the final exam.
  • Excused absences (documented medical reasons, family emergencies, official university commitments) give no strike. Notify the team beforehand if possible and provide proof within 7 days. You still need a successful presentation.

Make-up Presentations

The last two tutorials offer make-up slots for students who have not yet presented successfully, using a subtask from a previous submission. Slots are limited and first come, first served. Tutors assign remaining students a subtask they attempted (you cannot choose a tutor-assigned one), so every still-eligible student gets a chance. An unexcused absence from a make-up slot gives a strike.

28. Academic Integrity and AI Assistance

All submissions must be your own work; copying classmates’ or online solutions is a violation. AI assistance is permitted, but you must understand the solution and be able to explain your steps. Fully AI-generated work you cannot explain is a violation, and integrity violations may lead to exclusion from the final exam.

29. Preparing for the Course

A quick self-check (not an assessed requirement):

  • Can you follow matrix dimensions and apply the chain rule?
  • Can you explain likelihood, overfitting, and a held-out test set?
  • Can you implement and inspect a small learning experiment in Python?
  • Can you explain your own solution without an assistant?

Summary

  • A foundation model is trained on broad data and reused for many downstream tasks; reuse is the central idea.
  • Pretraining signals: next-token prediction, masked prediction, contrastive learning. Adaptation changes either the model (fine-tuning, LoRA, instruction tuning, preference learning) or the context (prompts, examples, retrieval).
  • LLMs, VLMs and VLAs differ in their input and output interfaces, ending in robot actions for VLAs.
  • Capabilities covered: language modeling, inference-time reasoning (DeepSeek-R1), retrieval and tool-using agents, VLMs, CLIP, DINOv3 and SAM 3, image and video generation, world models, robot foundation models.
  • Applications need evidence of useful outcomes (AlphaGenome, Aurora, tutoring), and deployment raises questions of reliability, misuse, data rights, accountability, prompt injection, energy use and access.
  • Exam admission: valid attempts on 8 of 11 sheets and one successful presentation; two strikes make you ineligible; the grade is 100% the exam.

Self-Check

  1. What is a foundation model, and what is the central idea behind it?
  1. Name the three pretraining signals from the lecture and what each one learns.
  1. What are the two ways to adapt a pretrained model?
  1. How do LLMs, VLMs and VLAs differ?
  1. What counts as evidence of success for inference-time reasoning systems like DeepSeek-R1?
  1. Where can a retrieval and tool-using agent fail when checking a paper’s claim?
  1. Why does “a convincing video does not establish a reliable simulator” matter for world models?
  1. What is prompt injection, and which controls address it?
  1. What do you need for exam eligibility in this course?
  1. Is AI assistance allowed on the exercises?

Back to Foundation Models Index | Next: (y-02) Machine Learning Basics