Joining the Conversation: Towards Language Acquisition for Ad Hoc Team Play
Abstract
In this paper, we propose and consider the problem of cooperative language acquisition as a particular form of the ad hoc team play problem.
We then present a probabilistic model for inferring a speaker’s intentions and a listener’s semantics from observing communications between a team of language-users.
This model builds on the assumptions that speakers are engaged in positive signalling and listeners are exhibiting positive listening , which is to say the messages convey hidden information from the listener, that then causes them to change their behaviour.
Further, it accounts for potential sub-optimality in the speaker’s ability to convey the right information (according to the given task).
Finally, we discuss further work for testing and developing this framework.
Introduction
Typically, in the field of emergent communication a group of agents learn to interact with one another through communication channels in order to facilitate coordination in a shared environment, i.e. a Dec-POMDP (Oliehoek & Amato, 2016).
The agents learn highly effective communication strategies, but they tend to be brittle in the sense that they are unable to coordinate with agents that they have not encountered before.
This construction does not naturally lend itself to systems that require a machine to communicate with a human, or enter within a community of humans using language to coordinate.
In this paper, we frame this as a problem of cooperative language acquisition , where the goal is to adopt the language of a community of agents so as to coordinate with them.
More precisely, we place the problem in the context of ad hoc team play (Stone et al., 2010).
In ad hoc team play, we are given a set of competent 1 agents and a domain of coordination tasks, and the problem is to design new agents that are capable of achieving success when playing with randomly sampled teammates.
In our problem, we assume that there exists a community of language-users that define the pool of players who, by means of their shared language, are all successful ad hoc team players.
Therefore, the cooperative language acquisition problem is defined as the case of designing a new agent to join this pool of players by observing a sample of interactions from the community.
Background
A decentralised partially-observable Markov decision process (Dec-POMDP) is described by a 7-tuple ( S , {A i } , T, R, { Ω i } , O, γ ), where S is a set of states, {A i } is a set of action sets,
T is a transition function, R is a reward function, { Ω i } is a set of observation sets, O is an observation function, and γ is a discount factor.
We will talk of trajectories for a given agent i , which are sequences of state-action-reward tuples τ ∈ T i =
( S × A i × R ) ∗ .
Each agent i follows a policy π i that maps an observation sequence to a distribution over actions.
We denote the distribution over future trajectories that a policy induces as π ( τ | . ).
The return of a trajectory is computed as the discounted sum of rewards: V ( τ ) =
P | τ | k =
γ k r k
Following Lowe et al.
(2019), we suppose that each agent’s action sets can be expressed as
A i =
A ci ∪ A ei , where A ci is a set of communicative actions and A ei is a set of environment actions .
Communicative actions are sent to a target agent by a dedicated cheap-talk channel (there is no cost to communication), meaning they appear in the receiver’s observation at the next time step.
We also use Lowe et al.’s
(2019) definitions of positive listening and positive signalling :
Definition 1 (Positive Listening) .
An agent i with the policy π i exhibits positive listening if there exists a message generated by a signaller j , m ∈
A cj , such that d τ ( π i ( τ | z, 0 ) , π i ( τ | z, m )) > 0 where 0 is a zero vector, z is a variable that conditions the policy (e.g. observations and/or latent memory), and d τ is a distance metric over T i .
Definition 2 (Positive Signalling) .
Let m =
( m 0 , . . .
, m T ) be a sequence of messages sent by an agent over the course of a trajectory of length T , and similarly for observations
o =
( o 0 , . . .
, o T ) , and actions a = ( a 0 , . .
. , a T ) .
An agent exhibits positive signalling if m is statistically dependent on either a or o .
One-Way Communication Problem Formulation
We start to formulate the problem of cooperative language acquisition with the simplest case involving two agents: a speaker A and a listener B .
For a particular interaction i the speaker emits a message m i ∈
A cA ∗ that is received by the listener, and then the listener takes actions that lead it on a trajectory τ i ∈ T B in a Dec-POMDP sampled from a given domain.
We are only considering the case of one-way communication with this set-up, but we will discuss two-way communication, i.e. dialogues, in Section 6.
To make this more precise, we assume that A and B are agents sampled from a pool of players operating in an ad hoc team, where the domain D is a set of referential games , i.e. a class of Dec-POMDPs based on Lewis signalling games (Lewis, 1969; Lazaridou et al., 2017; Lee et al., 2018).
We will assume that the listener is exhibiting positive listening to the messages sent by the speaker, and the speaker is positive signalling an ‘intended’ target trajectory 2 , τ ⊙ i ∈ T B .
We can denote this by saying that the observer observes: m i ∼ π A ( m | τ ⊙ i ) and
τ i ∼ π B ( τ | m i ), where π A and π B denote the policies followed by each agent respectively.
Before moving on, let us define a running example game to illustrate the setting.
Suppose that the speaker has access to a shopping list and a map of the supermarket, and must write a note for the listener to observe, who then must retrieve the items as quickly as possible.
The cooperative language acquisition task is to construct an agent X , who we will call the observer , which is able to take on the roles of either the speaker or the listener and successfully communicate with others.
So, if X is taking on the role of the speaker, given some τ that they intend for B to follow, they should emit a message that maximises the probability that B does so.
If X is acting as the listener, and receives some m ∼ π A ( m | τ ⊙ )
they should estimate τ ⊙ and follow this trajectory.
With this, given a dataset of interactions between speakers and listeners, m i , τ i ∼ D AB , we can define the following sub-problems:
Problem 1 (The Forward Problem (Signalling)) .
Find a function β ( m | τ, θ β ) parameterised by θ β , which we call the Broca function, such that m maximises the probability that the listening agent B follows the trajectory τ upon receiving m , i.e.:
[Equation]
Problem 2 (The Backward Problem (Listening)) .
Find a function ν ( τ | m, θ ν ) parameterised by θ ν , which we call the Wernicke function.
Given the message m is from the speaking agent A and is intended to invoke the trajectory τ ⊙ , the function ν should maximise the probability of τ ⊙ .
[Equation]
Finding Broca and Wernicke
Firstly, we can directly model the forward problem with the data available.
We estimate the parameters θ β by mapping from observed trajectories to messages received by B :
[Equation]
where ˆ m i
= arg
[Equation]
β
[Equation]
m
[Equation]
Given a distance function d m over messages.
Put differently, we are aiming to find θ β such that the Broca function can produce the message that caused a given trajectory in the data.
To place this into our running example, we have data regarding the notes that were sent to the shopper ( m i ), and paths through the shop that the shopper took ( τ i ), and we are learning the relationship between notes and paths.
However, the backward problem is much trickier given that we are never able to directly observe the intended trajectory τ ⊙ i for the message m i sent by the speaker.
If we assume that the speaker is optimal, i.e. it always sends the perfect message to invoke the intended actions in B , then τ ⊙ i
= τ i and thus we can optimise the reverse mapping as in the forward problem (i.e. messages to trajectories).
But what can we do if we wish to relax this?
Instead of modelling the speaker as perfectly optimal, we can assume ‘soft-optimality’, otherwise known as Boltzmann-rationality 4 .
We will do this in two parts: first, we will assume that given the target trajectory τ ⊙ , the speaker is more likely to send messages that are ‘closer to optimal’, for which we need some notion of semantic distance between messages.
Secondly, we will assume that the speaker is more likely to pick target trajectories for the listener that yield a high return in the Dec-POMDP.
Put formally:
[Equation]
Where, V is the expected return of a given trajectory, m ∗ B ( τ ⊙ ) is the optimal message to send to B to maximise the chance that B takes the trajectory τ ⊙ , and S B is a measure of the semantic distance between two messages for B .
These latter two are defined as follows:
[Equation]
In other words, the semantic distance is a function of the difference in actions that B takes (characterised by the distance function over trajectories d τ ) as a result of different messages.
Thus, it is mathematically similar to Lowe et al.’s
(2019) definition of positive listening, and philosophically close to the various approaches to ‘meaning’ that couple information and action (Haig, 2017; Wittgenstein, 1953; Peirce, 1878).
Additionally, note that if we substitute these definitions into P ( m | τ ⊙ ):
[Equation]
Thus the expression involving the semantic distance captures the intuition that the more optimal messages are the ones that, in expectation, lead to trajectories that are closer to the target.
With our assumptions in place, we now insert this into the backward problem.
For a given interaction m i , τ i ∼ D AB we can express most probable target trajectory ˆ τ ⊙ i with the maximum a posteriori estimate:
[Equation]
Where α is a hyperparameter controlling our prior on the relative optimality of the speakers ability to effectively communicate versus pick the optimal trajectory (similar to Jeon et al.
Therefore, to estimate the parameters of the Wernicke function θ ν :
[Equation]
where ˆ τ
[Equation]
=
[Equation]
Again, let us contextualise this within the example of the shoppers.
If the speaker’s note contained roughly the right set of instructions, but is perhaps slightly confusing in a way that throws off the shopper (perhaps impossible directions), the Wernicke function will not emulate the shoppers confusion.
Instead, the estimate of the intended trajectory can take into account the ambiguity or inconsistency and try and figure out what would be a successful path through the supermarket.
Comparatively, when we assume optimality of the speaker, we are forced to conclude that the shoppers confusion was intended.
Related Work
A close area of related work is inverse reinforcement learning (Russell, 1998; Ng & Russell, 2000).
Namely, the modelling of the speaker is similar to IRL, where instead of there being a hidden reward function influencing the agents’ actions, there is a target trajectory for the listener.
Further, the Boltzmann-rational model used is very similar to approaches in IRL (Zietbart et al., 2008; Finn et al., 2016).
In the field of emergent communication, the works of Lee et al.
(2018) and Lazaridou et al.
(2017) both present frameworks for grounding learning agents in human natural language.
They do this by using text annotated images rather than data from direct human communication in a cooperative setting.
Finally, outside of AI, in the economics literature there has been work modelling how an uniformed listener may extract information from informed debaters (Glazer & Rubinstein, 2001).
But because of markedly different assumptions, it does not tackle the problem of the current paper.
Discussion and Conclusion
In this paper we have presented the first steps towards constructing an agent that, given data regarding the interactions of language-users, can find the meaning behind messages received, as well as optimally convey a recommended trajectory to a listener.
Yet, there are still several directions of further work to be explored.
Firstly, how do we extend the system to dialogues , i.e. two-way communication?
Potentially the system naturally captures dialogues as both agents can play the roles of speakers and listeners simultaneously (or interchangeably).
For instance, suppose that in the supermarket example the speaker and the shopper held a phone call, and the shopper asks a question for clarification on directions.
The shopper does not have an exact intended trajectory for the speaker’s response, because if they knew this they would not need to ask the question.
However, this does not necessarily pose a problem for the framework presented in this paper.
Although we have referred to the target trajectory as “intentional” it is not necessary for a speaker to know the full details of the trajectory.
This applies so long as they help the listener to find the closest trajectory that maximises reward, which they may do so by adding their own private information.
Secondly, but no less critically, is the problem of empirically testing this framework by constructing an agent.
There are several suitable test environments, for example, gridworld games that are similar to the supermarket example (Kajić et al., 2020; Leibo et al., 2017), or more communication focused problems such as the game of Taboo .
In this game, one person has to get another to say a hidden word, but they are forbidden from revealing certain pieces of helpful information 5 .
Finally, this work could be extended from the passive case of observing data, to a situation where the learner is engaged with the language-users, perhaps for example with an active learning approach (Settles, 2009). Acknowledgements
Work done by DC is thanks to the UKRI Centre for Doctoral Training in Safe and Trusted
AI (EPSRC Project EP/S023356/1).
We would like to thank Francis Rhys Ward, Nandi Schoots, Richard Willis, Mattia Villani and Charles Higgins for their help