The third multimodal challenge is Reasoning, which is defined as follows:
"Combining knowledge, usually through multiple inferential steps, exploiting multimodal alignment and the problem structure."
The reasoning challenge can be further broken down into 4 sub-challenges:
The first sub-challenge, Structure Modeling, sits on a spectrum from single-step reasoning to multi-step reasoning, which itself ranges from temporal structure, hierarchical structure, interactive structure and structure discovery.
Temporal Structure is discussed in Multimodal Transformer - Part 1 & Multimodal Transformer - Part 2 by exploring how multimodal Transformer process data containing temporal information.
Hierarchical Structures is discussed in Structured Representations & Reasoning, where 3 different types of structures are explored: graph structure, tree structure, and modular structure.
This post focuses on the interactive structure part for Structure Modeling.
The interactive structure is defined through an interactive environment where actions taken at previous time steps affect future states. This is precisely the formalism Reinforcement Learning was built for. The post gives a full tour of Reinforcement Learning fundamentals and methods, covering policy learning through value-based and policy-based methods, Bellman's principle of optimality, Tabular Q-learning, Deep Q-learning, Policy Gradients, the REINFORCE algorithm, and Actor-Critic algorithm, before returning to show some examples of how RL is applied in multimodal environments.

Reinforcement learning (RL) is the branch of machine learning where an agent interacts with an environment step by step. At every step of interaction, the agent observes the current state of the environment and then decides which action to take. The environment then changes in response to the action, and the agent receives a reward from the environment, a number that tells it how good or bad the action worked. The goal of the agent is to maximize its cumulative reward.
Formally, the process of an agent refining their decision-making strategy based on feedback from the environment can be modeled by a Markov Decision Process (MDP), defined by:
Two important quantities in RL are defined as follows:
The goal of an RL agent is to find the policy that maximizes the expected return.

Reinforcement learning differs from supervised learning along several dimensions.
RL problems involve sequential decision making, where decisions build on one another and their consequences might not appear until many steps later, whereas supervised learning problems are typically one-step, with a label attached to each individual input.
Besides, RL rewards are often sparse, and the environment is dynamic and may be unknown. In contrast, supervised learning provides every training example with explicit, immediate feedback, and the environment (data distribution) is typically assumed to be fixed during training.

One way to bridge the two paradigms is imitation learning. Instead of learning purely from rewards, the agent is given expert trajectories, such as recordings of a skilled human driver, and trained using supervised learning to predict the expert's action at each state.
This can work well when expert data is abundant, but it has a real limitation: distribution mismatch between training and testing. The states the agent visits at test time can drift away from the states it saw during training, and the agent has no way to recover once it wanders into a state the expert never demonstrated. In some settings, it may not even be safe or practical to collect expert trajectories in the first place.
The value of a state $s$ following a given policy $\pi$ ( i.e., $V_\pi(s)$) is the expectation of the
"action-value", $Q_\pi(s,a)$, weighted by how likely the policy $\pi$ is to take each action at the state $s$.
The optimal versions of these two functions, $V^*(s)$ and $Q^*(s,a)$, assume the best possible action is taken at every step, and the two are related to one another: The optimal "value" of a state, $V^*(s)$, equals the optimal "action-value" of the state, $Q^*(s,a)$, when first taking the best action $a$, before following the optimal policy.




Bellman's principle of optimality is a key idea in dynamic programming that breaks an optimization problem into a sequence of simpler subproblems that can be solved recursively. The Bellman optimality equation or Bellman Equation formalizes this principle and can be used to find not only the optimal total reward for any initial state, but also the associated optimal actions.
The principle states that if a path from an initial state $x_0$ to a terminal state $x_T$ is optimal, then any remaining portion of that path, starting from an intermediate state $x_{t′}$ (where
$0\leq t' \leq T$) and ending at $x_T$, must also be optimal. Therefore, the optimal path from any initial state $x_0$ can be found recursively by working backward from the terminal state $x_T$.
Source: Osękowski, A. (n.d.). Chapter 1: Dynamic Programming.
Given a system $S$ whose initial state is at $x_0$, the goal is to maximize total reward obtained by following a path composed of exactly $N$ steps, where $N$ is a fixed positive integer. Formally, Let $y_m$ represents the action chosen at $m$-th step. The state at each step is then given by: $$x_m = f_m(x_{m-1}, y_m)$$ where $f_m$ is the transition function associated with the $m$-th step.
In addition, the objective function can be formulated as $\sum_{m=1}^{N} g_m(x_{m-1}, y_m) $, and $g_m$ represents the reward obtained by taking action $y_m$ at the $m$-th step in state $x_{m-1}$ .
Now, for any state $x$, define $B_m(x)$ as the maximal total future reward after the system has taken $m$ actions/steps and landed at state $x$. That is, $$B_m(x) = \max_{y_{m+1}, \dots, y_N} \sum_{n=m+1}^{N} g_n (x_{n-1}, y_n)$$ Then, $B_N(x)=0$ because there are no more steps left to take and thus no future rewards remain. Bellman's principle of optimality leads to the following Bellman equation (Zoom in on the image for a clearer view.):
Both value functions, $Q(s,a)$ and $V(s)$, satisfy the recursive relationship defined by the Bellman Equation. Therefore, using the Bellman Equation can converge to the optimal values and policies when discount factor satisfies $\gamma < 1$. However, this approach has several limitations: the state and action spaces need to be small and discrete, and the transition function must be fully known. Such conditions rarely hold in real environments.

Since real environments rarely come with fully-known transition functions, two methods can be used: Tabular Q-learning & Deep Q-learning
Tabular Q-learning learns the action-value function $Q(s, a)$ directly from sampled interactions with the environment, without requiring the transition function to be known in advance. The inputs to the algorithm include the number of episodes $N\in\mathbb{N}_1$, a fixed positive integer specifying the number of training rounds, and $\alpha\in(0,1]$ representing the learning rate.
Before training begins, the action-value function $Q(s, a)$ is represented as a Q-table, where each cell stores the estimated action-value of a state-action pair $Q(s, a)$. The table is commonly initialized to $0$ for all cells.
During each episode, starting from an initial state $s$, the agent selects an action according to an $\epsilon$-greedy policy. With probability $\epsilon$, the agent randomly selects an action for exploration. With probability $1 - \epsilon$, it selects the action with the highest action-value, $a = \argmax_{a'} Q(s, a')$, in the current Q-table for exploitation.
After taking the action $a$, the agent receives a reward $r(s,a,s')$ and transitions to the next state $s'$, and then it updates the $Q(s,a)$ cell with learning rate $ \alpha$ as follows:
$$Q(s, a) \leftarrow Q(s, a) + \alpha[ r(s,a,s') + \gamma \max_{a'} Q(s', a') − Q(s, a)]$$ where $\gamma$ is the discount factor.
When the agent reaches a terminal state or takes the maximum allowed number of steps, the episode ends. The next episode then begins from another initial state.
At the beginning of training, the Q-table may all be initialized to $0$, meaning that the agent initially has little or no information about which actions are better. Therefore, a relatively high $\epsilon$ is often used to encourage exploration. As training progresses and the Q-table contains increasingly accurate estimates of action-values, $\epsilon$ is typically gradually reduced, allowing the agent to rely less on exploration and more on exploitation.

Tabular Q-learning maintains a table of size $\lvert S \rvert \times \lvert A \rvert$, where $\lvert S\rvert$ is the total number of states and $\lvert A\rvert$ is the total number of actions. Each entry in the table stores an estimate of
$Q^*(s,a)$ for a state-action pair. Therefore, Tabular Q-learning still requires the state and action spaces to be small and discrete.
Deep Q-learning replaces the table with a neural network parameterized by weights $w$ to approximate $Q^*(s,a)$. The network takes a state-action pair $(s,a)$ as input and outputs an estimated action value $Q(s,a;w)$.
It is trained by treating the Bellman target, $r(s,a,s') + \gamma \max_{a'} Q(s', a'; w)$ as a regression target and minimizing the mean-squared error between the network's prediction and this target via stochastic gradient descent:
$$\text{Loss} = \left(r(s,a,s') + \gamma \max_{a'} Q(s', a'; w) - Q(s, a; w)\right)^2$$
However, the neural network used in Deep Q-learning tends to diverge. Like Tabular Q-learning, Deep Q-learning learns by updating its estimates of $Q(s,a)$ using transitions collected through multiple series of interactions with the environment across different episodes. However, consecutive transitions collected along the same trajectory tend to be highly correlated. Another reason is that the training target keeps changing as the network's own weights are updated.
Two techniques address this instability:
Let's define a class of parameterized policies $\pi_\theta$ and an objective function $J(\theta)$, defined as the expected return under that policy $\pi_\theta$. The goal of Policy Gradient is to find the parameters $\theta$ that maximize $J(\theta)$ using gradient ascent.
A trajectory $\tau$ can be written as: $$\tau = (s_0, a_0, r_1, s_1, a_1, r_2, ...)$$.
The probability of a trajectory $\tau$ under policy $\pi_\theta$ can be written as:
$$\begin{align*}p(\tau; \theta) = \pi_\theta (a_0\mid s_0) p(s_1 \mid s_0, a_0) \times \pi_\theta (a_1 \mid s_1) p(s_2\mid s_1, a_1) \times \dots = \prod_{t\geq 0}\pi_\theta (a_t\mid s_t) p(s_{t+1} \mid s_t, a_t)\end{align*}$$
where $p(s'\mid s,a)$ is the transition function.
By defining $r(\tau)$ as the return of a trajectory $ \tau$ ,the objective can be written as:
$$J(\theta) = \mathbb{E}_{\tau \sim p(\tau; \theta)}[ r(\tau) ]$$
Therefore, differentiating $J(\theta)$ directly involves differentiating $p(\tau; \theta)$ :
$$\nabla_{\theta} J(\theta) = \nabla_\theta \mathbb{E}_{\tau\sim p(\tau; \theta)}[r(\tau)]$$
which requires knowledge of the environment's transition functions, which are generally unknown.
REINFORCE algorithm sidesteps this problem by employing the log-derivative trick to rewrite the policy gradient as an expectation. More specifically, it rewrites the gradient of an expectation as an expectation over trajectories, which enables sample-based approximation that can be done purely by sampling trajectories.
Intuitively, this is the REINFORCE trick: run an episode, and then observe the result. If the episode produces a desirable result, increase the probability of each action taken during that episode, pretending that those are the correct labels. Similarly, if the episode produces an undesirable result, decrease the probability of each action taken during that episode, pretending that those are the wrong labels.
In practice, each action $a_t$ is weighted by the return $G_t$ received from time step $t$ onwards.
Therefore, after running an episode with trajectory $$\tau = (s_0, a_0, r_1, ..., s_{T-1}, a_{T-1}, r_{T})$$the policy parameters $\theta$ are then updated as follows:
$$\theta \leftarrow \theta + \alpha \sum_{t=0}^{T-1} G_t \nabla_{\theta}\log\pi_{\theta}(a_t \mid s_t)$$
where $\alpha$ is the learning rate.
Source: Levine, S. (2026). Section 3: Policy Gradients and Actor-Critic. Deep Reinforcement Learning.


The return of a trajectory, $G_t$, isn't very informative on its own. For example, if a task provides only positive rewards, plain REINFORCE will increase the probability of every action ever taken. What matters is whether an action performed better or worse than expected.
To account for this, $G_t$ can be replaced with the advantage, defined as:
$$Q^{\pi_{\theta}}(s,a) - V^{π_{\theta}}(s)$$
where $$ V^{\pi_{\theta}}(s) = \mathbb{E}[G_t \mid S_t=s]$$ acts as a baseline representing the expected return from state $s$ while following policy $\pi_{\theta}$ and $$Q^{\pi_{\theta}}(s,a) = \mathbb{E}[G_t \mid S_t=s, A_t=a]$$is the expected return obtained by first taking action $a$ in state $s$ and then following policy $\pi_{\theta}$
The difference between them indicates how much better taking action $a$ in state $s$ is compared with selecting an action according to the current policy.The resulting policy gradient estimator for one sampled trajectory can then be written as:
$$\nabla_{\theta} J(\theta) \approx \sum_{t=0}^{T-1} \nabla_{\theta}\log {\pi}_{\theta} (a_t \mid s_t)(Q^{\pi_{\theta}}(s_t, a_t) - V^{\pi_{\theta}}(s_t))$$
However, $ Q^{\pi_{\theta}}(s,a)$ and $V^{\pi_{\theta}}(s)$ are generally unknown, Actor-Critic algorithms address this by training an actor to learn the policy ($\pi_\theta$) and a critic to approximate a value function ($V$ or $Q$).
Asynchronous Methods for Deep Reinforcement Learning introduces Asynchronous Advantage Actor-Critic (A3C), which maintains an actor network for learning the policy $\pi(a_t \mid s_t; \theta)$ and a critic network for approximating the state-value function $V(s_t; \theta_v)$. In practice, they use a shared convolutional neural network (CNN) as a base, with the actor and the critic network sharing all parameters up to the final output layer: One softmax output layer produces the policy $\pi(a_t \mid s_t; \theta)$, while one linear output layer estimates the state-value function $V(s_t; \theta_v)$.
The paper trains the actor-critic network across multiple threads. Each worker thread is given a different $\epsilon$-greedy exploration policy, interacts with its own copy of the environment, then computes and accumulates the gradients at each time step based on its own collected experience. After reaching either a terminal state or a predefined maximum number of steps, each worker thread uses its own accumulated gradients to asynchronously update the shared parameters $\theta$ and $\theta_v$. The whole training process is repeated until a predefined maximum number of global steps is reached.

Beyond reward signals alone, natural language offers a second source of information for steering an RL agent, and it can enter the picture in more than one place: it can be task-dependent, literally telling the agent what to do during this episode, or task-independent, supplying background knowledge about the environment that applies across many episodes.
An instruction such as "go to the green torch" specifies the task for the agent directly. Given the current scene of the environment, the agent has to fuse a visual representation of the scene with a representation of the natural-language instruction. For example, it can multiply an image feature map with an attention vector derived from the instruction to decide where to navigate. This kind of visual text grounding, correctly associating words like "blue" or "torch" with the right visual features, turns out to be essential for generalizing to objects that were never seen during training.
For Embodied Question Answering, the agent must explore an environment it hasn't already surveyed in order to answer a question such as "What color is the car?" It has to decide where to look before it can produce an answer, coupling perception, navigation, and language understanding within a single task.
In addition to specifying the task itself, language can also specify the rewards rather than actions, such as "build an L-like shape using red blocks only", and preferences, such as
"I prefer JetBlue, even if the ticket price is more expensive". These specifications can be incorporated directly into the reward the agent optimizes.
Language can also serve as task-independent domain knowledge, supplied to the agent through instruction manuals. For example, sentences from a game's user manual can be filtered down to those relevant to the task, with their words labeled as describing actions, states, or irrelevant background. This information provides the agent with structured hints about game mechanics, such as which types of terrain are suitable for founding a city, before it ever starts playing.
Structure Modeling involves defining or learning the relationships over which Reasoning occurs. Interactive Structure extends this challenge to interactive settings, where actions taken at previous time steps affect future states.
The nature of Interactive Structure is exactly what Reinforcement Learning was designed to formalize. Therefore, to address the challenges of interactive reasoning, multimodal reinforcement learning has emerged as a growing research field that combines reinforcement learning with multimodal representations of the environment.
Beyond reward alone, natural language gives a second way to communicate with an RL agent. For example, it can be used to specify the task itself or supply domain knowledge. Research has shown that language grounding can be essential for generalizing to situations that the agent has not encountered during training.