How Structured Choices Make Multimodal Agents Faster

Peter Bubenik ยท Apple ML ยท ยท Source
Image for Selection-Based Structured Reasoning: Toward Efficient Multimodal Search Agents

๐ŸŽฏ Learning Outcomes

After studying this material, students should be able to:

  1. Explain why freeform reasoning is inefficient for small multimodal models
  2. Describe how Selection-based Structured Reasoning (SSR) reformulates the reasoning process
  3. Understand the technical mechanisms that enable SSR's efficiency gains
  4. Evaluate SSR's performance tradeoffs compared to traditional approaches

๐Ÿ“š Step-by-Step Teaching Guide


STEP 1: Understanding the Problem Space

What are Multimodal Agents?

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.

The Standard Reasoning Pipeline

Traditional agents follow this pattern at every single action step:

Context Input
     โ†“
Generate Reasoning (freeform text)
     โ†“
Generate Action
     โ†“
Execute Action
     โ†“
Repeat...

โš ๏ธ The Core Problem

For small models (2Bโ€“4B parameters), this creates two critical issues:

ProblemExplanation
Quality ProblemLimited model capacity โ†’ reasoning becomes lengthy but unhelpful
Cost ProblemGenerating 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.


STEP 2: The SSR Solution โ€” Core Concept

The Key Insight: Generation โ†’ Selection

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)

How Pre-Specified Candidates Work

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.


STEP 3: The Technical Mechanism โ€” Parallel Scoring

Why Selection Can Be Faster Than Generation

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!

Key Technical Components

1. Teacher-Forced Prefilling

  • The model sees the complete candidate text at once
  • Computes likelihood scores for all tokens simultaneously
  • No need to generate token-by-token

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.


STEP 4: Training SSR Models

SSR is compatible with two training approaches:

Approach 1: Supervised Fine-Tuning (SFT)

Expert demonstrations
        โ†“
Match actions to best-fitting candidates
        โ†“
Train model to select correct candidates

Approach 2: Reinforcement Learning (RL)

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.


STEP 5: Results & Performance Analysis

Benchmark Setup

Models tested:  2B parameters, 4B parameters
Benchmarks:     7 multimodal search tasks
Comparison:     SSR vs. standard freeform reasoning agents

Performance Results

MetricResult
Task Success RateCompetitive with leading same-scale agents
Per-turn reasoning latencyโ†“ 90%+ reduction
Total per-question inference latencyโ†“ 28โ€“54% reduction

Visualizing the Efficiency Gain

Standard Agent (per turn):
[Context Processing][Generate reasoning...............][Action]
                     โ†โ€”โ€”โ€” slow, sequential โ€”โ€”โ€”โ€”โ†’

SSR Agent (per turn):
[Context Processing][Select reasoning][Action]
                     โ†โ€” fast, parallel โ€”โ†’

STEP 6: Synthesizing the Key Tradeoffs

When SSR Works Well โœ…

  • Tasks with recurring, predictable reasoning patterns
  • Deployment on resource-constrained small models
  • Applications where latency is critical
  • Scenarios where reasoning types can be enumerated in advance

Potential Limitations to Consider โš ๏ธ

  • Candidate library must cover the reasoning space adequately
  • Novel situations may not match any pre-specified candidate well
  • Requires upfront design effort to create good candidates

๐Ÿ”‘ Concept Summary Map

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

โœ… Self-Check Questions

  1. Why does freeform reasoning fail for small multimodal models?
  2. What is the fundamental difference between SSR and traditional reasoning?
  3. How does teacher-forced prefilling enable parallel scoring?
  4. Why does sharing a KV cache across candidates save computation?
  5. What are the two training paradigms compatible with SSR?
  6. What does "90% reduction in per-turn reasoning latency" mean practically?

More to study