A language model knows that a spill needs a sponge. It does not know that the sponge is 2 metres away. SayCan multiplies what is sensible by what is possible, and the robot cleans the spill in 4 steps.
Pick a brain, move the sponge and press Run. Count who cleans the spill. Then we build, piece by piece, grounding, SayCan, CLIPort, RT-1, Code as Policies and the vision-language-action models that came next.
You need what a probability is and a little Python. A value function (Lecture 7) helps. We build the rest from zero.
Lecture 24 of 25 in Introduction to Robot Learning, CMU 16-831 (Spring 2024): a guest lecture by Yafei Hu on 15 April 2024. Slides on the course lectures page. This is a snapshot of a fast field: claims are as of the lecture, and newer work is linked, not restated.
Illustrative toy. The Say scores, the affordances and the kitchen are made up. The rule, multiply Say by Can and run the winner, is SayCan's. A skill works here when its Can is at least 0.5.
Chapter 0
Ask a language model for a plan, then check each step against one real robot in one real room
You tell a kitchen robot, "I spilled my drink, can you help?" The word sponge is not in the sentence. A person still knows what to do: find something that soaks up liquid and bring it.
That everyday knowledge comes from a life of reading, talking and watching. A robot trained only on its own camera frames and joint angles does not have it. The web has plenty of it. A language model, a network trained to predict the next word of web text, soaks it up.
So ask a language model for a plan. Then check each step against this robot and this room.
Pink steps are what a language model might suggest. The right side checks each step: does the object exist here, and does the robot have the skill? Pick a request. Then add a vacuum to the room.
Illustrative. The plans are typical of what an ungrounded model writes, not output from a named model. The robot's skills are find, pick up, bring and put in.
The model knows that spills need something absorbent. It does not know what this room holds or what this robot can do. Tying a model's words to the robot's real skills and scene is called grounding. Every system in this lesson is a different way to ground.
The symptom is a plan that sounds right and cannot run. To measure it, count the plan steps that name a missing object or a missing skill. The fix is grounding: let only feasible steps through.
Chapter 1
Compare web data with robot data on one ruler, and see why the big model stays frozen
The term comes from a 2021 Stanford report by Bommasani and colleagues. A foundation model is any model trained on broad data, usually with self-supervision at scale, that can be adapted to many downstream tasks.
Self-supervision means the label is already in the data. For a language model the task is "predict the next word", and the next word is the label. No person annotates anything, so the data can grow to the size of the web.
| Family | Examples in the lecture | What it gives a robot |
|---|---|---|
| Language models | GPT, PaLM, PaLM-E | Plans and common sense: "to clean a spill, find something absorbent". |
| Vision and vision-language models | CLIP, DINOv2, SAM, diffusion models | Recognition of objects nobody labelled for the robot: "that blob is a sponge". |
Why borrow at all? Put the datasets on one ruler.
Each bar is one dataset on a log scale: every tick is 1,000 times the last. The yellow line marks RT-1's robot data. Pick a dataset to compare.
Counts from the papers: PaLM 780 billion training tokens; CLIP 400 million image-text pairs; RT-1 about 130,000 demonstrations; CLIPort 179 real image-action pairs. The units differ, so read the gap in counts, not an exact ratio of information.
Work the number. CLIP saw 400 million pairs. RT-1, one of the largest robot datasets of 2022, has about 130,000 demonstrations. 400,000,000 / 130,000 ≈ 3,100. Each robot demonstration costs a person and a robot real time. A foundation model is that web data, already absorbed.
Most systems here keep the big pretrained model frozen: its weights do not change during robot training. Only a small part that talks to the motors learns from the robot data. The reason is a count: billions of web examples sit behind the frozen part, and maybe a few hundred robot examples behind the new part.
The symptom: you fine-tune every weight on 200 robot demos, and the model stops recognising objects it knew. This is catastrophic forgetting. To measure it, test on unseen objects before and after. The fix is to freeze the backbone, or to keep web data in the fine-tuning mix, as RT-2 did (Chapter 7).
Chapter 2
Run a skill many times with a reward of 1 or 0, and watch the average become the chance of success
Grounding ties a foundation model's output to the real robot and its environment. The lecture lists four ways to do it.
An affordance is a number: how likely is this skill to succeed from the current state? "Pick up the sponge" has a high affordance when the sponge is in reach, and a low one when it is across the room.
Where does the number come from? Train the skill with reinforcement learning. Give a reward of 1 when the skill succeeds and 0 when it fails. Call the reward of one try R, and the chance of success from state s p. The skill's value function V is the expected reward from s.
V of s equals the expected value of R, which is one times p plus zero times one minus p, which is p.
A try is worth 1 with chance p and 0 otherwise. So the average reward V is the chance of success p. A value function trained on success or failure is an affordance.
With made-up numbers: the robot tries "pick up the sponge" 100 times from one spot and succeeds 62 times. V = 62 × 1 / 100 + 38 × 0 / 100 = 0.62. The affordance of that skill from that spot is 0.62.
Set how far the sponge is. Press Run to try the grasp 100 times. Each dot is one try. The average reward lands on the true chance of success.
Illustrative toy. The true chance is 0.9 within 0.3 m and falls off with distance. SayCan trained its value functions with reinforcement learning on this kind of 1-or-0 reward, with people judging success.
The symptom is a confident affordance that is wrong in a new kitchen. To measure it, compare predicted values with real success rates in that kitchen. The fix is more varied robot data for the value function, or a check that asks for help (Chapter 8).
Chapter 3
Score every skill twice, multiply, run the winner, and score again
SayCan (Ahn and colleagues, 2022) is named for its paper's title: Do As I Can, Not As I Say. The robot owns a library of skills. In the paper there are 551 skills in 7 families, such as pick, place and go to. Each skill has a short text label, such as "find a sponge", and a policy that runs it.
For each skill the robot computes two numbers. Call the instruction i, the skill's label ℓ, and the current state s.
L-star equals the argmax over L of p of L given i, times p of success given s and L.
For every skill L, multiply its Say score by its Can score. Run the skill with the largest product, L-star. Then score every skill again from the new state.
With made-up numbers: the sponge is 2 m away. "Find a sponge" has Say 0.40 and Can 0.95, so 0.40 × 0.95 = 0.380. "Pick up the sponge" has Say 0.42 and Can 0.02, so 0.42 × 0.02 = 0.0084. Find wins by about 45 to 1, though the language model slightly preferred pick.
Why multiply? A skill helps only if it is the right thing to try and it will work. A Can near 0 vetoes the step, no matter how good it sounds. Then the loop repeats: after the robot walks over, Can for "pick up the sponge" jumps, and pick wins.
Pink is Say, teal is Can, purple is the product. The outlined row wins. Press Run the winner and watch the scores change with the new state. Move the sponge to start over.
Illustrative toy, same kitchen as the hero. The Say table changes with the steps already done, as the language model reads the history in its prompt.
The robot fills in the scoring step in this lab.
The symptom is a robot that keeps picking a skill that fails. To measure it, log Say, Can and the outcome of each step. If a high Can keeps failing, the value function is wrong. If no skill in the library fits, SayCan cannot help: it only chooses, it never invents a skill.
Chapter 4
Let CLIP pick which object the words mean, and let Transporter pick the pixel to grasp
SayCan chooses "pick up the sponge". The gripper still needs a spot, to the centimetre. CLIPort (Shridhar and colleagues, 2021) grounds words to that spot with two streams.
| Stream | Backbone | Its job |
|---|---|---|
| Semantic: what | CLIP (ResNet-50), frozen | Which pixels match the words. Learned from web captions. |
| Spatial: where | Transporter, trained | Where to pick and place. No object poses, no masks. |
Transporter predicts a heatmap over the image: the value at each pixel is "how good is it to pick here?" The brightest pixel is the pick. To place, it crops a patch around the pick, turns it to 36 angles, and slides each copy over the image. The best match gives the place spot and angle together.
CLIP puts an image and a caption into one shared space of vectors, an embedding space, so that a matching pair points the same way. Call the instruction's vector q and an object's vector o. Their match is the cosine of the angle between them.
Sim of q and o equals q dot o, divided by the length of q times the length of o.
Take the dot product of q and o. Divide by both lengths. What is left measures direction only, so a long vector cannot win on size.
With made-up 3-number vectors: q = (0.2, 0.9, 0.3) for "pick up the sponge", sponge o = (0.1, 0.8, 0.2). q · o = 0.02 + 0.72 + 0.06 = 0.80. Lengths 0.970 and 0.831. sim = 0.80 / 0.806 = 0.99. A long apple vector (1.8, 0.8, 0.4) has the bigger dot product, 1.20, but its sim is only 0.62.
The pixels never change. Pick an instruction and the purple heat moves to the object it names. Switch CLIP off: Transporter alone finds every graspable thing and cannot choose.
Illustrative toy with made-up 3-number embeddings. Real CLIP vectors have hundreds of entries, and CLIPort fuses CLIP features into Transporter's layers. It does not multiply two maps.
Acting on pixels instead of object models makes CLIPort data-efficient. In the paper, one multi-task policy learned 10 simulated tasks, and the real robot learned 9 tasks from 179 image-action pairs.
The symptom is a grasp on the wrong object when two objects look alike. To measure it, log the similarity of the top two objects; a small gap means a guess. The fix is a more specific instruction, or asking which one (Chapter 8).
Chapter 5
Follow images and words into one Transformer, and snap each action number into one of 256 bins
RT-1, the Robotics Transformer (Brohan and colleagues, 2022), takes the direct route. One network maps camera images and an instruction straight to actions, the way GPT maps text to text.
The key choice: RT-1 does not output each action number directly. It splits each number's range into N equal bins, with N = 256, and predicts a bin, as a language model predicts a word. Call the action value a, its range lo to hi, and the bin width w = (hi − lo) / N.
k equals the floor of a minus lo, divided by w.
Measure how far a sits above lo. Count how many whole bins of width w fit in that distance. That count is the token k. The robot reads back the bin's centre, lo + (k + 0.5) × w.
With a made-up action a = 0.37 on −1 to 1. With N = 8, w = 0.25, k = ⌊1.37 / 0.25⌋ = 5, centre 0.375, error 0.005. With N = 256, w = 0.0078, k = 175, centre 0.3711, error 0.0011.
The error is never more than half a bin, w / 2. At N = 256 on −1 to 1 that is 0.0039 of the range. That is the price of turning control into classification.
Purple is the true action. Teal is the bin centre the robot executes. The zoom below shows the one bin it falls in. Change the bin count and the action.
Exact arithmetic, toy range. RT-1 uses 256 bins on each of its 11 action numbers.
RT-1 has about 35 million parameters. It trained on about 130,000 demonstrations of over 700 tasks, collected by 13 robots over 17 months. It succeeded on 97% of seen tasks and 76% of unseen ones; the best baseline reached 52% on unseen tasks.
The symptom is a jerky arm on fine tasks, such as threading a peg. To measure it, compare w / 2 with the task's tolerance. The fix is more bins, a narrower range per task, or a continuous action head.
Chapter 6
Give a code-writing model two small libraries, and watch its program move the blocks
SayCan chooses from a fixed menu. Some tasks need logic the menu lacks: loops, conditions, arithmetic. Code as Policies (Liang and colleagues, 2022) lets a language model trained on code write the robot's program directly.
The prompt holds a few example commands, each with its code, and two libraries of functions.
| Library | Example functions | Backed by |
|---|---|---|
| Perception | detect_objects("blocks"), get_obj_pos(name) | Open-vocabulary detectors |
| Control | pick_place(obj, target), move_to(pos) | The robot's motion primitives |
Give it a new command and it writes new Python that calls those functions. The language model never touches a motor. The code is the grounding.
Pick a command. The code appears line by line, then the gripper runs each pick_place call. Warm squares are blocks; the rings are bowls.
Illustrative. The code is in the style of the paper's examples, written for this toy. The table is 1 m wide.
Work the number for "line up the blocks". The program places block i at x = 0.2 + 0.3 × i metres. For i = 0, 1, 2 that is 0.2, 0.5 and 0.8 m: three evenly spaced spots. The model chose the spacing from the word "line" and the table size in its prompt.
is_empty, it writes that function too. The paper calls this hierarchical code generation.The symptom is code that runs and does the wrong thing, such as stacking on the full bowl. To measure it, run each program in simulation and check the final scene against the command. The fix is better examples in the prompt, or a human review of the code before the robot runs it.
Chapter 7
Write an action as 8 numbers of text, and see why every token must be right
SayCan wires a language model to separate skills. RT-1 trains one Transformer on action tokens. The endpoint is one model that reads images and words and writes actions: a vision-language-action model, or VLA.
RT-2 (Brohan and colleagues, 2023) is the lecture's VLA. It fine-tunes a web-trained vision-language model on robot data, with each action written as text. The mix keeps web tasks too, so the model does not forget them.
An RT-2 action is 8 numbers: terminate, 3 position changes, 3 rotation changes, and the gripper. Each number is one of 256 bins, written as a token. The model writes the 8 tokens one after another. Call the action string a, its j-th token a-j, the camera image I, and the instruction x.
P of a given I and x equals the product, over j from one to eight, of p of a-j given I, x and a-before-j.
The model writes token a-1, then a-2 given a-1, and so on to a-8. The confidence in the whole action p(a | I, x) is the product of the 8 token confidences.
With made-up numbers: each token is 0.9 sure. The whole action is 0.9 multiplied by itself 8 times, 0.43. One wrong token, such as the gripper, makes the whole action wrong.
Move the arm forward or back and open or close the gripper. The 8 tokens update. Lower the per-token confidence and watch the confidence in the whole action fall.
Illustrative. The 8-number layout and the 256 bins follow the RT-2 paper. The values and the shared confidence per token are toy choices.
Because the action shares a backbone with web knowledge, meaning carries into control. On the project page, RT-2 follows "pick up the extinct animal" and grasps the toy dinosaur, a concept absent from its robot data. On unseen objects, backgrounds and settings, RT-2 averaged 62% success against RT-1's 32%.
| Model | Size | Where it runs | Action rate |
|---|---|---|---|
| RT-1 | 35M | On the robot | 3 Hz |
| RT-2-PaLI-X 5B | 5B | Cloud TPUs, over the network | about 5 Hz |
| RT-2-PaLI-X 55B | 55B | Cloud TPUs, over the network | 1 to 3 Hz |
The field moved fast after April 2024. Octo (May 2024) trained an open policy on about 800,000 trajectories from the Open X-Embodiment dataset. OpenVLA (June 2024) released a 7B VLA that beat RT-2-X (55B) by 16.5 points across 29 tasks. Flow-based models such as π0 followed. For the current picture, read the VLA Gleam, RL for robot foundation models and VLA Architectures.
The symptom is an arm that lags a moving target. To measure it, log the time from image to action. The fix is a smaller model, or a fast low-level controller under the slow VLA.
Chapter 8
Match each robot-learning challenge with its foundation-model tool, and make the robot ask when it is unsure
The lecture ends where it began: do foundation models bring general-purpose robots closer? As of spring 2024, the answer is yes on four fronts and not yet on one.
| Challenge | How foundation models help |
|---|---|
| Generalization | Language models plan for new tasks (SayCan). VLAs act on new objects (RT-2: 62% against 32% on unseen tests). |
| Data scarcity | Zero-shot skill from web data; generated training images (ROSIE); pooled datasets (Open X-Embodiment: 22 robots, 21 institutions). |
| Goals hard to write down | Language as the goal; or a language model writes the reward (Language to Rewards, Eureka). |
| Unknown dynamics | Video models that predict the next frames from an action, such as UniSim. Early work. |
| Safety and uncertainty | Mostly missing. One example: KnowNo, a planner that asks for help when unsure. |
A confident wrong step is dangerous because it sounds reasonable. KnowNo (Ren and colleagues, 2023) gives the planner a rule for doubt. The model scores each option y for the next step; call that score p(y). Keep every option whose score passes a threshold τ.
C equals the set of options y such that p of y is at least tau.
Keep each option y whose score p(y) reaches tau. If C has one option, act. If C has more than one, ask a person which one.
With made-up numbers: "put the bowl in the microwave", with a plastic bowl at 0.46 and a metal bowl at 0.40, and tau = 0.25. Both pass, so C holds two options and the robot asks "which bowl?".
Bars are the planner's scores. Options above the yellow line stay in the set. One survivor: act. More: ask. Pick an instruction and drag the threshold.
Illustrative scores. KnowNo sets the threshold with conformal prediction; here you set it by hand.
Low tau: the robot asks often and is rarely wrong. High tau: it acts alone more and errs more. Calibration chooses the point on that trade.
The symptom is a robot that acts confidently on an ambiguous order. To measure it, run ambiguous instructions and count the times it acted without asking. The fix is a calibrated set, as above, plus a hard safety layer below the planner.
Chapter 9
Keep the systems, the terms and numbers, a checklist and the SayCan loop in code
Every system here borrows web knowledge and grounds it in a different way. The table is the lecture in five rows.
| System | Borrowed model | Outputs | How it grounds |
|---|---|---|---|
| SayCan | Language model, frozen | The next skill | Say × Can, with Can from value functions |
| CLIPort | CLIP, frozen | Pick and place spots | CLIP features steer Transporter's heatmaps |
| RT-1 | ImageNet CNN | 11 action numbers as tokens | Trained end to end on robot data |
| Code as Policies | Code language model, frozen | A Python program | Calls perception and control functions |
| RT-2 | Vision-language model, fine-tuned | 8 action tokens as text | One model from web knowledge to action |
| Term | One line | Number to remember |
|---|---|---|
| Foundation model | Broad data, self-supervised, adaptable to many tasks. | CLIP: 400M pairs; RT-1: 130k demos |
| Affordance | V(s) = E[R] = p with a 1-or-0 reward. | 62 of 100 tries: 0.62 |
| SayCan | Run argmax of Say × Can, then score again. | 0.380 against 0.0084 |
| Cosine match | sim = q · o / (‖q‖ ‖o‖). | Sponge 0.99, long apple 0.62 |
| Action token | k = floor((a − lo) / w); error at most w / 2. | 256 bins: 0.0039 of the range |
| VLA action | 8 tokens; confidence is their product. | 0.9 each: 0.43 |
| Ask for help | C = options with p(y) ≥ τ; ask if more than one. | 0.46 and 0.40 pass 0.25: ask |
pythondef saycan(instruction, skills, llm_score, value_fn, observe, max_steps=10): history = [] for _ in range(max_steps): s = observe() # current state (camera, pose) best = max(skills, key=lambda k: llm_score(instruction, history, k.label) # Say: p(label | instruction, history) * value_fn(s, k.label)) # Can: p(success | s, label) if best.label == "done": break best.run() # low-level policy, e.g. RT-1 history.append(best.label) # the next Say reads what was done return history
This lesson follows Lecture 24, "Foundation Models in Robotics", a guest lecture by Yafei Hu in CMU 16-831 Introduction to Robot Learning, Spring 2024, taught by Guanya Shi. The slides are on the lectures page. The readings: Hu and colleagues, Toward General-Purpose Robots via Foundation Models (survey); SayCan; CLIPort; RT-1; Code as Policies. Also cited: RT-2, KnowNo, Octo, OpenVLA.
Now press Present or Teach. Explain from memory what grounding is, why SayCan multiplies, and how RT-1 and RT-2 turn actions into tokens. Then go back to the kitchen, choose Language only, put the sponge far away, and say why it gets stuck.