After studying this material, students should be able to:
Multimodal agents are AI systems that can process multiple types of input simultaneously:
Text + Images + Video + Audio
โ
AI Agent
โ
Takes Actions
Real-world example: An agent searching the web that must read text AND interpret screenshots to find an answer.
Traditional agents follow this pattern at every single action step:
Context Input
โ
Generate Reasoning (freeform text)
โ
Generate Action
โ
Execute Action
โ
Repeat...
For small models (2Bโ4B parameters), this creates two critical issues:
| Problem | Explanation |
|---|---|
| Quality Problem | Limited model capacity โ reasoning becomes lengthy but unhelpful |
| Cost Problem | Generating long reasoning text token-by-token is computationally expensive |
Analogy: Imagine asking a junior employee to write a detailed memo before every small decision. The memos become long, unfocused, AND slow everything down.
SSR fundamentally changes the question the model must answer:
โ OLD: "What reasoning should I generate?" (open-ended)
โ
NEW: "Which pre-written reasoning fits best?" (selection)
SSR maintains a library of reusable reasoning templates:
Reasoning Candidate Library:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Candidate A: "The search results show โ
โ relevant information, I should click..." โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Candidate B: "The current page doesn't โ
โ contain the answer, I need to search..." โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Candidate C: "I found the target โ
โ information and should extract..." โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
At each turn, the model scores each candidate given the current context and selects the best fit.
Analogy: Instead of writing a custom email from scratch, you select from pre-approved email templates. Faster, consistent, and still contextually appropriate.
Traditional generation is sequential:
Token 1 โ Token 2 โ Token 3 โ ... โ Token N
(each token depends on the previous one)
TIME: O(N) sequential steps
SSR scoring is parallel:
Context (shared)
โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโ
โ Candidate A โ Candidate B โ Candidate C โ
โ score all โ score all โ score all โ
โ tokens at โ tokens at โ tokens at โ
โ once โ once โ once โ
โโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโ
TIME: Much faster!
1. Teacher-Forced Prefilling
2. Shared Context KV Cache
Context โ KV Cache (computed ONCE)
โ
โโโโโโโโโโโดโโโโโโโโโโ
โ โ
Candidate A Candidate B
(reuses cache) (reuses cache)
KV Cache explained: Think of it as the model's "working memory" of the context. Instead of re-reading the entire context for each candidate, it's computed once and shared โ like photocopying a reference document instead of re-reading the original each time.
3. Likelihood-Based Selection
Score(Candidate) = P(candidate tokens | context)
Select = argmax[Score(A), Score(B), Score(C)...]
The candidate with the highest probability given the context wins.
SSR is compatible with two training approaches:
Expert demonstrations
โ
Match actions to best-fitting candidates
โ
Train model to select correct candidates
Model selects candidates โ Takes actions
โ
Environment provides reward signal
โ
Model learns which candidate selections
lead to successful task completion
Key advantage: SSR works across multiple RL objectives โ it's not tied to one specific training method.
Models tested: 2B parameters, 4B parameters
Benchmarks: 7 multimodal search tasks
Comparison: SSR vs. standard freeform reasoning agents
| Metric | Result |
|---|---|
| Task Success Rate | Competitive with leading same-scale agents |
| Per-turn reasoning latency | โ 90%+ reduction |
| Total per-question inference latency | โ 28โ54% reduction |
Standard Agent (per turn):
[Context Processing][Generate reasoning...............][Action]
โโโโ slow, sequential โโโโโ
SSR Agent (per turn):
[Context Processing][Select reasoning][Action]
โโ fast, parallel โโ
PROBLEM: Small models โ bad freeform reasoning + high latency
โ
SOLUTION: SSR Framework
โ
โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโ
โ โ โ
Pre-specified Parallel Scoring Shared KV Cache
Candidates (teacher forcing) (compute once,
(reusable library) reuse often)
โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโ
โ
OUTCOME: Same accuracy
+ 90% less reasoning latency
+ 28-54% less total latency