Introduction to Robot Learning · Lecture 24 of 25 · CMU 16-831

Foundation Models in Robotics

A robot told "I spilled my drink, can you help?" must somehow know a sponge is relevant. Where does that common sense come from? The web — borrowed through a foundation model to break robotics' data bottleneck.

Prerequisites: the data problem from Lecture 4 + a little Python. Knowing what an embedding is helps but isn't required.
10
Chapters
5
Simulations
3
Code Labs

Chapter 0: "I Spilled My Drink, Can You Help?"

A kitchen robot is standing by a counter. You say, offhand, "I spilled my drink, can you help?" Nowhere in that sentence is the word sponge. Nowhere does it say go to the counter, pick up the sponge, bring it to me. Yet any person hears that request and instantly knows what to do.

How? Because you have read, heard, and watched a lifetime of the world. You know spills involve liquid, liquid is cleaned with absorbent things, sponges are absorbent and live near sinks. That web of everyday knowledge — what the SayCan authors call semantic knowledge — is exactly what a robot trained only on its own joint angles does not have.

This is the bind that runs through all of 16-831. Back in Lecture 4 we met the data problem: a language model drinks from a firehose of trillions of web tokens, while every datum of robot experience must be acted out in real time, slowly and expensively. So robots are starved of exactly the broad knowledge that the web is drowning in.

The thesis of this lecture, in one sentence. Instead of trying to teach a robot common sense from scratch (impossible — the data isn't there), borrow it. Take a model already trained on internet-scale text and images — a foundation model — and connect its knowledge to the robot's sensors and skills. The web supplies the semantics; the robot supplies the hands and eyes.

But there's a catch, and it is the whole technical story of this lecture. A language model has never touched a sponge. It has never failed to pick one up because the gripper was at a bad angle. It lives entirely in token-space. So if you simply ask it "how do I clean a spill?", it might happily answer "use a vacuum cleaner" — reasonable in the abstract, useless if there is no vacuum in the room. The knowledge is there; the connection to this robot, in this scene, right now is missing. Supplying that connection is called grounding, and it is what every system in this lecture is really about.

The knowledge gap — what each brain knows

Type or pick a household request. The language model proposes sensible-sounding steps from web knowledge. The bare robot only knows its raw skills. Watch the mismatch — and why neither one alone solves the task.

Pick a request above.
Why this is the right place to start. Every method ahead — SayCan, CLIPort, RT-1, Code-as-Policies — is a different answer to the same question: how do we let a robot borrow the web's knowledge without that knowledge floating free of physical reality? Keep the spill in your head. By the end you'll see four different machines that can actually fetch the sponge.

A language model, asked to help clean a spill, suggests "use a vacuum cleaner" — but there is no vacuum in the room. What does this failure show?

Chapter 1: What Is a Foundation Model?

Before we wire one into a robot, let us pin down the term. The phrase comes from a 2021 Stanford report, and its definition is deliberately broad:

Foundation model (Bommasani et al., 2021). Any model trained on broad data — generally via self-supervision at scale — that can be adapted (for example, fine-tuned or prompted) to a wide range of downstream tasks.

Two halves matter. Broad data at scale: not a curated dataset for one job, but the whole web — text, images, code. Self-supervision: the label is built into the data itself, so no human has to annotate it. For a language model the task is "predict the next word"; the next word is the label, free, for every sentence ever written. That is how you reach trillions of training examples without an army of labelers.

The lecture splits the foundation models that matter for robotics into two families:

FamilyExamplesWhat it gives a robot
Large Language Models (LLMs)GPT, PaLM, PaLM-EReasoning, planning, common sense about tasks and procedures — "to clean a spill, find something absorbent."
Vision(-Language) Foundation ModelsCLIP, DINOv2, SAM, diffusion modelsRecognition and open-vocabulary understanding of scenes and objects — "that blob of pixels is a sponge."

CLIP deserves a special mention because it bridges both worlds, and we'll use it heavily in Chapter 4. CLIP was trained on hundreds of millions of (image, caption) pairs from the web to put an image and its matching text near each other in a shared embedding space. So you can hand CLIP the word "sponge" and an image, and it tells you how well they match — without ever having been trained on a labeled "sponge" dataset. That is the open-vocabulary superpower: it recognizes things nobody explicitly taught it, because the web already described them.

The connection to Lecture 4's four ingredients. Recall GPT's recipe: architecture, data, loss, optimization, generation. The one ingredient robots lack is the data firehose. A foundation model is, in effect, a frozen reservoir of that firehose — somebody already paid to absorb the web, and we get to reuse the result. That is the entire economic logic of this lecture: don't recollect the internet, rent it.

What "frozen" means — and why it matters

A theme you'll see in every system: the big pretrained model is usually frozen (its weights are not changed during robot training), while a small head — the part that actually talks to motors — is the only thing trained on the scarce robot data. Why? Because you have billions of web examples behind the frozen part and maybe a few hundred robot examples for the head. Train the whole thing on a few hundred examples and you'd wash away everything the web taught you. Freeze the knowledge; train only the connection. That single design rule explains most of the architectures ahead.

Why is CLIP described as "open-vocabulary"?

Chapter 2: Grounding — The Word the Whole Lecture Turns On

We keep saying it; now let's make it precise. Grounding means associating the output of a foundation model with the real robot and its environment. The model speaks in words and pixels; grounding ties those to things the robot can sense and do.

The lecture lists the flavors of grounding, because each system grounds a different way:

Misconception to kill now. "A language model is so smart, just let it drive the robot." No. An LLM cannot see and cannot act. It has never observed the consequence of any physical action. Left ungrounded it will confidently propose impossible steps. The intelligence is real; it is just disembodied. Grounding is the harness that turns disembodied knowledge into embodied behavior.

The cleanest grounding signal: an affordance

The single most important grounding tool in this lecture is the affordance: a number saying how possible is this action, right now, from this state? "Pick up the sponge" has high affordance when a sponge is within reach and low affordance when there's no sponge in sight.

Where does that number come from? Here is the beautiful trick the SayCan authors use. Train a skill with reinforcement learning where the reward is 1 if the skill succeeds and 0 if it fails. Then the skill's value function — the expected return from this state — is the probability the skill will succeed from here. A value function trained on success/fail reward is, literally, an affordance function. We met value functions in the RL lectures; here they get a second life as the robot's sense of "can I?"

Foundation model output
Words ("pick up the sponge") or image features — semantic, disembodied.
↓ grounding ties it to…
Robot reality
Affordance value, available skills, scene features, reward.
↻ only now can the robot act sensibly
SayCan turns a value function trained with success/fail reward into an "affordance." Why does that work?

Chapter 3: SayCan — Say × Can

Now we can build our first real system. SayCan's slogan is its whole idea: Do As I Can, Not As I Say. The language model says what is sensible; an affordance function says what is possible; you multiply them and pick the winner.

The data flow, concretely

The robot is given an instruction i ("I spilled my drink, help") and owns a fixed library of skills — in the paper, 551 of them across 7 families like pick, place, open drawer, go to. Each skill carries a short language label like "find a sponge" and a low-level policy that can execute it. For each candidate skill the robot computes two numbers:

The combined score is simply the product, and the robot picks the highest:

score(skill) = p(label | instruction) · p(success | state, label)
chosen skill = argmax over skills of [ Say · Can ]

The factorization is honest about why you multiply: the chosen skill makes progress only if it is both the right thing to try (Say) and likely to work from here (Can). A skill that fails the affordance contributes nothing. Execute the winning skill, then loop: re-score everything from the new state, pick the next step, until the LLM proposes "done."

What's frozen vs. trained. The LLM (PaLM-540B) is frozen — pure web knowledge, never touched by robot data. The affordance value functions and the low-level skill policies are trained on robot data (in simulation, then sim-to-real). SayCan is the harness that snaps the two together. Grounding via affordances nearly doubled task success over an ungrounded LLM baseline.

A number to make it concrete

Suppose the instruction is "I spilled my drink, help," the sponge is across the room, and we score two candidate skills. The LLM thinks both are roughly sensible first moves, so it gives find a sponge a Say of 0.40 and pick up the sponge a Say of 0.42 — almost a tie, and the language model slightly prefers the more direct-sounding one. Now multiply by the affordances. Find a sponge is feasible (just walk and look), affordance 0.95. Pick up the sponge is impossible from here, affordance 0.02.

find a sponge: 0.40 · 0.95 = 0.380
pick up the sponge: 0.42 · 0.02 = 0.008

The product is decisive where the language score alone was a coin flip. Find a sponge wins by roughly fifty to one, even though the LLM marginally preferred the other. That is the entire point of multiplying: the affordance vetoes the impossible, no matter how eloquent the language model is about it. Run the skill, walk over, and on the next loop the sponge's affordance has jumped — now pick up the sponge wins. The plan unfolds one grounded step at a time.

Why is this a loop and not a one-shot plan? Because the affordance is recomputed from the current state every step. If the robot bumps the sponge off the table mid-task, the next round's affordances reflect that new reality, and SayCan re-plans without anyone telling it to. It inherits the closed-loop spirit from Lecture 1: re-sense, re-decide, act, repeat.

Say × Can — watch the chosen step change with the scene

The Say bars are the LLM's language scores for the spill instruction (fixed by semantics). The Can bars are affordances — drag the slider to change the scene (is a sponge nearby?). The product is what SayCan picks. Watch how making the sponge unreachable kills a likely-but-infeasible step.

Sponge within reach? 0.10
Drag the slider.

With the sponge far away (slider low), "pick up the sponge" has high Say but near-zero Can, so SayCan instead picks "find a sponge" — the sensible first move. Walk over, the slider effectively rises, and on the next loop "pick up the sponge" wins. The plan emerges step by step from Say × Can, never from Say alone. Let's implement exactly that scoring step.

In SayCan, the LLM scores "pick up the sponge" highly, but its affordance is near zero because the sponge is far away. What does SayCan do?

Chapter 4: CLIPort — What Meets Where

SayCan decides which skill to run. But a skill like "pick up the sponge" still has to figure out exactly where to put the gripper, down to a centimeter. That is a different kind of grounding: language to spatial precision. CLIPort is the lecture's answer, and its design is a clean lesson in combining two foundation-model strengths.

The authors borrow the two-stream hypothesis from cognitive psychology: the brain has a "what" pathway (recognizing objects) and a "where" pathway (locating and acting on them). CLIPort builds both:

StreamBackboneJob
Semantic ("what")CLIP, frozenUnderstand the instruction and the scene's meaning — "which pixels are the blue block?" Open-vocabulary, from web pretraining.
Spatial ("where")Transporter, trainedReason about precise pick and place geometry — no object models, no pose estimation, just where to act.

How Transporter works — detect actions, not objects

The key Transporter idea is to predict affordance heatmaps over the image instead of estimating object poses. Concretely:

This action-centric view is wildly data-efficient: CLIPort learned 9 real-world tasks from just 179 image-action pairs. You never have to model "objectness"; you only have to learn where to act.

CLIPort's contribution is to inject CLIP's features into the Transporter streams, so the heatmaps become language-conditioned. "Pack the blue block" and "pack the red block" produce different heatmaps over the same image, because CLIP's semantic features steer where Transporter looks. The spatial network stays sharp; the semantic network makes it understand words.

Why the place step needs rotation, concretely

The pick step is the easy half: pick the pixel with the highest pick affordance and lower the gripper there. Placing is subtler, because orientation matters — a "put the rook one block forward" or "align the rope" task needs the object set down at the right angle, not just the right spot. Transporter handles this by taking the cropped patch from around the pick point and testing it at many rotations as it slides across the image. The place location and the place angle are read off together as the best-matching pose. So a single forward pass yields both where to set the object down and how to turn it — without ever estimating an object's pose explicitly.

And the data flow is satisfyingly uniform: the network's input is the RGB-D image plus the (CLIP-encoded) instruction; its output is two dense affordance maps, one for pick and one for place. No bounding boxes, no segmentation masks, no symbolic state. The whole tabletop manipulation problem is reframed as "which pixels, at which rotation, are good to act on?" That is what made it possible to learn ten simulated tasks — and one shared multi-task policy across all of them — from a tiny number of demonstrations.

The division of labor. CLIP brings the web's what (it has seen millions of captioned blocks, ropes, cloths) but is hopeless at centimeter-level where. Transporter brings razor-sharp where but starts as a blank slate with no semantics. Bolt them together and you get a language-conditioned manipulator that generalizes to unseen objects — CLIPort's experiments show the CLIP features help on both seen and unseen objects.

CLIPort pick heatmap — the same scene, two instructions

Three colored blocks on a table. Toggle the instruction: CLIP's semantics steer Transporter's pick heatmap to a different block, even though the pixels are identical. Brighter = higher pick affordance.

Pick an instruction above.

The semantic match is the engine here, so let's build it. CLIP scores how well an instruction's embedding matches each object's embedding — cosine similarity in the shared space — and the manipulator focuses on the winner.

CLIPort's two streams are CLIP (semantic) and Transporter (spatial). What does each contribute?

Chapter 5: RT-1 — Tokenize Everything

SayCan plans; CLIPort places. RT-1 (Robotics Transformer 1) takes the most direct route of all: train one big Transformer to map images + instruction directly to actions, end-to-end, the way GPT maps text to text. The bet is the Bitter Lesson made flesh — a high-capacity model fed enough diverse data will learn the patterns better than any hand-built pipeline.

The data flow, shapes and all

Inputs
A short history of camera images + a natural-language instruction ("pick apple from top drawer").
↓ FiLM-conditioned EfficientNet (ImageNet-pretrained)
Visual tokens
FiLM injects the language so the CNN extracts only task-relevant visual features.
↓ TokenLearner squeezes to a few tokens
Compact token set
~8 tokens per image instead of hundreds — the trick that lets it run in real time.
↓ Transformer
Action (11 numbers)
7 for the arm (x, y, z, roll, pitch, yaw, gripper), 3 for the base, 1 mode switch.
↻ execute at ~3 Hz, re-sense, repeat

The decisive design choice — and the one we'll implement — is how RT-1 represents that 11-number action. It does not regress continuous values. Instead it discretizes each action dimension into 256 bins and predicts a bin, exactly like predicting a word token. The control problem becomes a classification problem: "which of the 256 buckets does this joint command fall into?"

Why tokenize the action? Three reasons. (1) It reuses the Transformer machinery that already works for language — same architecture, same cross-entropy loss. (2) Classification handles multi-modal action distributions (two equally good grasps) better than a regression that would average them into a bad middle. (3) It makes the whole pipeline — image tokens, text tokens, action tokens — one uniform sequence problem. This is the seed of the VLA idea in Chapter 7: actions are just another language.

What's frozen vs. trained

The EfficientNet starts from ImageNet pretraining (a vision foundation model) and is then trained along with the rest. The whole RT-1 (a modest 35M parameters) is trained on a huge robot dataset: 130k demonstrations, 700+ tasks, collected with 13 robots over 17 months. Note the contrast with SayCan and CLIPort — RT-1 doesn't freeze a giant LLM; it pours scale into the robot data and the visual backbone. It hit 97% success on training tasks and generalized markedly better than baselines to new tasks, distractors, and backgrounds. It also plugs straight into SayCan as the low-level skill executor.

Two design pressures pull against each other here, and the architecture is the compromise. A Transformer is a high-capacity sponge — exactly what you want to absorb 700 tasks — but Transformers are slow, and a robot controller has to emit an action many times a second or the arm jerks. The TokenLearner is the resolution of that tension: instead of feeding the Transformer hundreds of image patches, it learns to keep only the ~8 tokens that matter for the current task, so each forward pass is cheap enough to hit 3 Hz. That is the same "borrow capacity, but make it run in real time" theme you'll see strain to breaking point with the 55-billion-parameter VLA in Chapter 7.

And notice what RT-1 is really doing about the data problem from Lecture 4. It does not escape it — somebody still acted out 130k demonstrations the slow, physical way. What it changes is the payoff for that data: a single high-capacity model trained on all of it together generalizes far better than 700 narrow models trained one task at a time. The connections between structurally similar tasks become training signal. This is the Bitter Lesson in robot form: pour diverse data into a general model and let it find the patterns.

Action tokenization — the round trip

A continuous gripper command (top axis) gets snapped to one of N discrete bins (the buckets). RT-1 predicts the bin, then the robot reads back the bin's center. Slide the bin count: more bins = finer control, smaller round-trip error. The true value and its recovered bin center are marked.

Bins N 8
True action 0.37
Slide the controls.

Notice the round-trip error never exceeds half a bin width — that's the resolution price of turning control into classification. With 256 bins (RT-1's choice) over a normalized range, that error is tiny. Let's prove that bound in code.

Why does RT-1 discretize each action dimension into bins and predict a bin, rather than regressing a continuous number?

Chapter 6: Code as Policies — Let the LLM Program the Robot

SayCan let the LLM pick from a fixed menu of skills. But what if the task needs logic the menu doesn't cover — loops, conditionals, arithmetic, "stack the blocks on the empty bowl"? The Code-as-Policies insight is delightful: code-writing LLMs (trained on billions of lines of GitHub) can write the robot's control program directly.

The loop, concretely

You give the LLM a few example commands paired with their policy code (few-shot prompting), plus the signatures of two API libraries:

Then you hand it a new command, and it writes fresh Python that calls those APIs to accomplish it. For "stack the blocks on the empty bowl" it might generate:

block_names = detect_objects("blocks")
bowl_names = detect_objects("bowls")
for bowl_name in bowl_names:
    if is_empty(bowl_name):
        empty_bowl = bowl_name
        break
objs_to_stack = [empty_bowl] + block_names
stack_objects(objs_to_stack)

Two things to notice. First, the LLM never touched a motor — it grounds language by writing calls to APIs that do the sensing and acting. The code is the grounding. Second, it can recursively define functions it used but weren't given (is_empty, stack_objects), writing helper code on demand — "hierarchical code-gen."

What this buys you over SayCan. A program can express things a fixed skill menu cannot: feedback loops ("move right until you see the apple"), conditionals ("if you see an orange, back up"), arithmetic ("move a bit to the left"), and commonsense values ("faster" → a specific velocity, because the LLM learned what "faster" usually means from code+comments). The LLM directly shapes the perception-action loop instead of just choosing the next skill.

Code-as-Policies — instruction to generated program to robot

Pick an instruction. Watch the LLM emit policy code that calls perception + control APIs, then watch a tiny tabletop "robot" execute those calls and rearrange the blocks. The code is the bridge from words to motion.

Pick an instruction above.
How does Code-as-Policies "ground" an LLM's knowledge in the physical robot?

Chapter 7: Toward VLAs — Actions as Another Language

Step back and look at the trend across the four systems. SayCan keeps the LLM and the robot as separate boxes wired together. CLIPort fuses two pretrained streams. RT-1 trains one Transformer that tokenizes actions. The natural endpoint: one model that ingests vision and language and emits actions — a Vision-Language-Action (VLA) model. This is the bridge to Lecture 6's discussion of diffusion policies and modern generalist robots.

RT-2 is the lecture's flagship VLA. Its move is audacious and simple: take a giant vision-language model already trained on the web (one that answers questions about images), and fine-tune it on robot data with actions written as text tokens. An action like "move arm to (x, y, z), rotate, close gripper" becomes a little sentence of numbers. Control is now literally a vision-question-answering problem where the "answer" is an action string.

Why this is powerful. Because the action head shares the backbone with web knowledge, semantic generalization transfers to control. RT-2 can act on objects and concepts it never saw in robot demonstrations — pick "the extinct animal" toy — because the vision-language model already knows what a dinosaur is from the web. The web's knowledge leaks all the way down into the motor commands. That is the dream of this whole lecture realized in one model.

The honest engineering cost

It is not free. RT-2's largest version uses a 55-billion-parameter backbone — far too big to run on the robot — so it lives in a cloud TPU service queried over the network, returning actions at only 1–3 Hz. A smaller 5B version reaches ~5 Hz. Compare that to RT-1's 3 Hz from 35M parameters: the bigger the borrowed brain, the slower (and more expensive) the loop. This is the perennial robotics tension — real-time control versus model capacity — and it is wide open.

SystemBorrowed foundation modelWhat it outputsHow it grounds
SayCanLLM (frozen)A skill to run nextAffordance value × language score
CLIPortCLIP (frozen)Pick/place posesCLIP features steer spatial heatmaps
RT-1ImageNet CNNTokenized 11-d actionEnd-to-end on robot data
Code-as-PoliciesCode LLM (frozen)A Python programCode calls perception+control APIs
RT-2 (VLA)Vision-Language Model (fine-tuned)Action as text tokensOne model, web knowledge → action
What is the core idea that makes RT-2 a "Vision-Language-Action" model?

Chapter 8: Does It Actually Help? — Mapping Tools to Challenges

The guest lecture ends by returning to its opening question: have foundation models made general-purpose robots closer? The honest answer is "on several fronts, yes — and on one, not yet." Recall the challenges from Lecture 4 and the lecture's own list; here is which tool attacks which.

ChallengeHow foundation models help
Generalization across scenes/tasks/objectsOpen-set vision models + LLMs generalize plans (SayCan) and low-level actions (RT series) to things never seen in robot data.
The data bottleneck (Lecture 4)Three angles: zero-shot open-world ability sidesteps collection; generative models (diffusion, LLMs) synthesize training data (e.g. ROSIE augments images); and large shared datasets (Open X-Embodiment) pool everyone's data.
Hard-to-specify goalsLanguage is the interface; or the LLM writes the reward function (L2R, Eureka); or a vision model gives a zero-shot goal (ZeST).
Unknown dynamics modelsAction-conditioned video models (UniSim, Sora-like) learn to "imagine" the world — a learned simulator — though this is early.
Safety & uncertaintyLargely missing. Work like KnowNo aligns an LLM planner's uncertainty (ask for help when unsure), but this remains the open frontier — "waiting for Guanya to solve this one."
Two cautions the lecture stresses. First, the Bitter Lesson (Sutton): general methods that leverage computation and data win over hand-built structure in the long run — which is the whole reason to bet on big pretrained models. Second, despite the progress, safety and uncertainty modeling are largely absent from current foundation-model-based robots. A model that confidently writes wrong code or proposes an unsafe step is dangerous precisely because it sounds reasonable. Grounding solved "is it possible?"; it has not yet solved "is it safe, and do I even know that I don't know?"

A way to picture the payoff

The promise is a step-change in breadth. A classical or single-task learned robot is excellent on the narrow slice it was built for and useless outside it. A foundation-model robot trades a little peak performance on any one task for the ability to attempt a vast range of tasks zero-shot — because it borrowed the web's breadth. The frontier is closing that small peak-performance gap while keeping the breadth, and adding the safety layer that is still missing.

According to the lecture, which robotics challenge is least addressed by current foundation-model approaches?

Chapter 9: Connections & Cheat Sheet

You started with a spilled drink and a robot that didn't know what a sponge was for. You now know four distinct ways to lend it the web's common sense — and why each one needs grounding to keep that knowledge from floating free of reality.

Cheat sheet — the vocabulary you now own.
  • Foundation model = trained on broad web data via self-supervision; adaptable to many tasks (LLMs; vision models like CLIP). For robots it is a rented reservoir of the data firehose they lack.
  • Grounding = tying a model's words/pixels to what the robot can sense and do. An ungrounded LLM cannot see or act — it proposes impossible steps.
  • Affordance = a value function trained on success/fail reward; the probability an action succeeds from here = "can I?".
  • SayCan = pick argmax of [ p(label|instruction) · p(success|state,label) ] = Say × Can; sensible AND feasible.
  • CLIPort = two streams: CLIP "what" (semantic, frozen) + Transporter "where" (spatial pick/place heatmaps); CLIP features steer the heatmaps.
  • RT-1 = images + instruction → FiLM-EfficientNet → TokenLearner → Transformer → 11-d action discretized into 256 bins (control as classification).
  • Code-as-Policies = LLM writes Python calling perception (get_obj_pos) + control (move_to) APIs; the code is the grounding.
  • VLA (RT-2) = actions as text tokens; fine-tune a web vision-language model; web knowledge transfers into control.
  • Open frontier = safety and uncertainty are largely missing.

Where to go next on this site

This lesson is Lecture 24 of the CMU 16-831 series. Continue and go deeper:

The test of this lesson. Open the original Lecture 24 slides. You should be able to explain, from memory: what a foundation model is and why robots want one; what grounding means and the affordance trick; the Say×Can decomposition; CLIPort's two streams; RT-1's tokenized image+text→action pipeline; how Code-as-Policies has the LLM write control code; and why VLAs are the trend — plus the one challenge (safety/uncertainty) still unsolved. If you can, you're ready for the course summary.

"The robot can be the language model's hands and eyes, while the language model supplies the knowledge of the world."