- Introduced by
- Sutton, R. S. & Barto, A. G. (RL foundations); multilingual extensions emerged from the NLP/RL community in the 2010s
- Year
- 2010s (applied to multilingual NLP settings)
- Type
- Reinforcement learning applied to multilingual environments
- Family
- Deep learning / NLP / CV
What does it do?
Multilingual Reinforcement Learning applies the reinforcement learning framework, in which an agent learns from interaction and reward, to environments that involve more than one language.
The agent may need to interpret multilingual observations, follow instructions given in different languages, or reuse a policy learned in one language in another. Typical settings include cross-lingual dialogue, text-based games and language-grounded sequential decision tasks.
The intuition behind the method
Standard RL optimises cumulative reward in an environment whose observations, instructions or feedback are in a single language or contain no language at all. Here the agent must also handle language that varies across its inputs. A shared multilingual encoder, such as mBERT, XLM-R or mT5, maps text from different languages into a common representation, so a policy built on that representation can be applied to inputs in another language. The RL loop of observing, acting, receiving reward and updating the policy is unchanged; what changes is the encoder that connects the languages. Whether a policy transfers depends on how well the encoder aligns the languages involved and on whether the reward means the same thing in each of them.
History
Sutton and Barto's 1998 textbook is the reference for the reinforcement learning framework on which this method builds. Multilingual applications combine that framework with pretrained multilingual encoders. No single originating work for this extension is established, so it is best understood as an applied extension of reinforcement learning rather than a documented single development.
When to use it
Choose multilingual RL when the task is sequential, so that actions affect later observations, a reward can be defined, and more than one language appears in the observations, instructions or feedback. Typical cases are multilingual dialogue agents rewarded for task completion, and text-based games with instructions in several languages. Do not use it when each input needs a single label or number; supervised multilingual fine-tuning is simpler and usually needs far less interaction data for that case. Also avoid it when no reward can be specified, because RL then has no training signal, and when the task involves only one language and a monolingual RL setup meets the need. The method assumes that the environment is Markov in the encoded state, that the reward has the same meaning in every language involved, and that the encoder is either fixed or updated as described in the policy-learning step.
Limitations and considerations
- It needs a reward signal that is well defined across languages; for open-ended language tasks this is often hard to specify, and their outputs are also hard to evaluate reliably.
- The sample inefficiency of RL becomes harder to manage when the policy must generalise across several languages at once.
- Transfer quality depends on the pretrained encoder, and languages that are poorly represented in it are expected to transfer worst.
- Training instability from deep RL carries over to this setting, and the added variability of multilingual inputs can make it worse.
- When natural-language feedback is converted into a scalar reward by an auxiliary model, that model may be less accurate for some languages, and its errors can bias the policy.
- The policy may learn to exploit weaknesses in the reward or in the reward model rather than the intended task (reward hacking), which is harder to detect when the task is judged across several languages.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- A policy learned in one language can be applied to others through a shared encoder, so reward data does not have to be collected separately for every language, provided the reward has the same meaning across them.
- It builds on pretrained multilingual encoders, such as mBERT, XLM-R or mT5, which are trained to share representations across several languages to a degree that varies by model, so cross-lingual representations do not have to be learned from scratch.
- It can extend to low-resource target languages where reward annotation is scarce, to the extent that the encoder represents those languages.
- It combines sequential decision-making with multilingual language input, a combination that supervised multilingual models do not address.
- It can use natural-language feedback as a reward source, which allows human feedback given in several languages to train the policy.
Applications
- Multilingual dialogue systems that respond in the user's language and are optimised with a task-level reward.
- Cross-lingual text-based games in which observations and instructions appear in several languages.
- Instruction-following agents that act on natural-language commands given in more than one language.
- Transfer of policies from high-resource to low-resource languages, to the extent the encoder covers the target language.
- Training from human feedback given in several languages, where the feedback is converted into a reward signal.
How it works
How it works
A sequential decision environment is defined in which observations, instructions or feedback appear in one or more languages. Typical examples include a dialogue system, a multilingual text-based game, a cross-lingual instruction-following task, and a setting in which natural-language feedback must be interpreted as a reward.
Observations and language inputs are passed through a shared multilingual encoder, typically a pretrained model such as mBERT, XLM-R or mT5. The encoder places text from different languages in a common embedding space, so the policy network does not need a separate encoder for each language.
The policy is optimised with a standard deep RL algorithm, for example PPO, A3C or DQN, so as to increase the expected cumulative discounted reward, where the discount factor γ weights rewards received later in time. The expectation is taken over trajectories generated by the policy and the environment. The discounted sum is finite for bounded rewards when 0 ≤ γ < 1, or in episodic tasks that terminate. The policy maps encoded states to actions. Updates may change only the policy head, or may also change the encoder weights if the encoder is allowed to adapt.
Formula
\pi^*(a|s) = \arg\max_{\pi} \mathbb{E}\left[\sum_{t=0}^{\infty} \gamma^t r_t\right]A policy trained on a source language, or a set of source languages, is then evaluated or fine-tuned on target languages. If the encoder aligns the representations well, the policy can sometimes act in a target language it was never trained on (zero-shot transfer); otherwise some target-language experience may be needed. Performance should be measured separately for each language rather than assumed.
Rewards may be scalar task signals, multilingual signals, or natural-language feedback. When feedback is in natural language, an auxiliary model must convert it into a scalar reward. If the meaning of the reward differs across languages, learning can become unstable, so the reward definition should be checked in each language.
Common pitfalls
- Assuming zero-shot transfer will work without checking that the target language is represented in the pretrained encoder.
- Defining the reward only in the source language and assuming it carries over unchanged to target languages.
- Ignoring language imbalance in training data, which can lead the policy to fit high-resource languages better than others.
- Treating multilingual RL as multilingual supervised learning. RL needs exploration and a reward signal; supervised methods do not.
- Freezing the encoder during RL fine-tuning when the domain vocabulary differs from the encoder's pretraining data, which prevents the representation from adapting.
Frequently asked questions
What is the difference between multilingual RL and standard RL?
Standard RL usually operates in a fixed environment that is monolingual or contains no language. Multilingual RL adds the requirement that observations, instructions or rewards involve multiple languages, and it uses a shared multilingual encoder so that a policy can generalise across them.
Which RL algorithms are used in multilingual settings?
PPO, A3C and DQN are common choices in this setting. PPO and A3C are policy-gradient methods that can be placed on top of a neural encoder, while DQN is a value-based method usually applied to discrete action sets, such as those in many text-based games.
Do I need separate reward labels for each language?
Not necessarily. If the reward is a language-independent scalar, such as task completion, it does not need per-language labels. If the reward is natural-language feedback, annotations in at least some target languages may be needed, although transfer from source-language annotations may also be possible, depending on the encoder and the task.
How much data is needed?
RL generally needs far more environment interactions than supervised learning on comparable inputs. A strong pretrained encoder reduces the learning burden, but the amount required depends on the task, the reward and the algorithm, and should be determined empirically.
Can this approach work for low-resource languages?
Transfer to low-resource languages is one motivation for this approach, but success depends on how well the pretrained encoder covers the target language. Performance should be tested for each target language before the approach is relied on.
Related methods
Sources
Sutton, R. S., & Barto, A. G. (1998). Reinforcement Learning: An Introduction. MIT Press.
ISBN: 978-0262193986Reinforcement learning. Wikipedia.
Open publication reference