The poem excerpted in the epigraph has often been called a ‘nonsense poem’. But it is not entirely so. While the content words (unemphasized: nouns, verbs, adjectives) are nonsense, the function words (emphasized: determiners, tense, auxiliaries, conjunctions, etc.) are not. The structure that they provide greatly aids our interpretation.
The distinction between these two types of expression occupies a central place in modern linguistics (Carnie Reference Carnie2006; Muysken Reference Muysken2008; Rizzi and Cinque Reference Rizzi and Cinque2016). Rightfully so: every natural language exhibits a distinction between content and function words. The former provide the content of sentences and fall into what are called ‘open classes’ (e.g., it is easy to introduce a new noun), while the latter provide the ‘grammatical glue’ of complex expressions and fall into ‘closed classes’ (e.g., it is difficult to introduce a new determiner).
Yet surprisingly little has been said about the emergence of this universal architectural feature of natural languages. Why have human languages evolved to exhibit this division of labor between content and function words? How could such a distinction have emerged in the first place?
This article takes preliminary steps toward answering these questions by showing how a communication system with such a distinction can emerge via a process of reinforcement learning. A crucial innovation consists in having the learning agents play a signaling game across variable contexts that contain multiple objects that possess multiple perceptually salient gradable properties. In the next section, I define a principle of nontrivial compositionality and argue that it is essential for the emergence of function words, while also diagnosing why existing approaches have failed to account for its emergence. After that, I introduce the new signaling game (sec. 2). Section 3 presents experimental results. I conclude with future directions in section 4.
1. Nontrivial Composition
In this section, I build on the foregoing remarks in order to argue for the following claim: for a communication system to have function words, there must exist nontrivial composition (in a sense to be made precise) of complex signals. I then analyze three case studies from the literature on the evolution of compositionality that exhibit only trivial composition. The reasons for this are then made mathematically precise: given the assumptions about optimal communication often made, the resulting systems must be trivially compositional.
The principle of compositionality says that the meaning of a complex expression is determined by the meanings of the parts and how they are put together (Frege Reference Frege1923; Janssen Reference Janssen, Benthem and Meulen1997; Pagin and Westerståhl Reference Pagin and Westerståhl2010a, Reference Pagin and Westerståhl2010b). Natural languages are compositional: whence the ability of competent speakers to produce and comprehend a potentially infinite set of novel expressions. A language can, however, be compositional without exhibiting the rich flexibility that human languages do. We will use the following definition:Footnote 1
1. A communication system is trivially compositional just in case complex expressions are always interpreted by intersection (generalized conjunction) of the meanings of the parts of the expression.
The force of this definition can be brought out by an example: Titi monkey calls (Cäsar et al. Reference Cäsar, Zuberbühler, Young and Byrne2013; Schlenker et al. Reference Schlenker, Chemla, Schel, Fuller, Gautier, Kuhn, Veselinović, Arnold, Cäsar, Keenan, Lemasson, Ouattara, Ryder and Zuberbühler2016a). In a series of predator-model experiments, it was found that raptors in the canopy elicit sequences of A calls, cats on the ground elicit sequences of B calls, cats in the canopy elicit one A followed by a sequence of Bs, and raptors on the ground elicit a sequence of As followed by a sequence of Bs. While the full details do not concern us,Footnote 2 Schlenker et al. (Reference Schlenker, Chemla, Schel, Fuller, Gautier, Kuhn, Veselinović, Arnold, Cäsar, Keenan, Lemasson, Ouattara, Ryder and Zuberbühler2016a) argue that the best analysis of this call system involves the following semantics, interacting with some plausible pragmatic principles:
2. Compositional semantics of Titi alarm calls: where t is a time,
a)
if and only if (iff) there is a noteworthy event at tb)
iff there is a serious nonground alert at tc)
iff
and
(where w is a call and S a sequence of calls).
The crucial feature of this semantics concerns the rule (2c) for interpreting complex expressions (sequences of calls). It says that a sequence of calls is interpreted by first evaluating the beginning of the sequence at time t, then evaluating the rest of the sequence at time
, and conjoining the results. This clause results in the following: each call in the sequence contributes to the meaning of the whole independently of the other calls, with the complete meaning resulting from conjunction. It thus constitutes a paradigm of the definition of trivial compositionality in 1.Footnote 3
In other words, nontrivial compositionality involves nonconjunctive modification of one linguistic item by another. Examples of such systems can also be found in communication systems much simpler than human language. In particular, Campbell’s monkeys have been argued to exhibit it (Ouattara, Lemasson, and Zuberbühler Reference Ouattara, Lemasson and Zuberbühler2009; Schlenker et al. Reference Schlenker, Chemla, Arnold, Lemasson, Ouattara, Keenan, Stephan, Ryder and Zuberbühler2014). They have two basic alarm calls: an eagle call hok and a general alert krak.Footnote 4 Moreover, both calls combine with what appears to be a suffix -oo, which has the effect of weakening the severity of the calls. Schlenker et al. (Reference Schlenker, Chemla, Schel, Fuller, Gautier, Kuhn, Veselinović, Arnold, Cäsar, Keenan, Lemasson, Ouattara, Ryder and Zuberbühler2016a) propose the following semantics:
3.
iff at t the sender is alert to a disturbance that licenses R but that is not strong among such disturbances.
This is nontrivial: -oo does not contribute independent meaning that is then conjoined with the contribution of hok or krak. Rather, it combines with one of the latter calls to modify the normal meaning of that call.
Here is the simple argument for the claim above that nontrivial composition is necessary for the existence of function words. Recall the characterization thereof as ‘grammatical glue’: such words do not contribute independent content to a sentence but structure that is provided by the content words. In a trivially compositional communication system, each expression contributes independent meaning to the complex expressions containing it. Therefore, none of the expressions therein are function words.
Note that the presence of nontrivial composition does not suffice for the presence of function words. To see this, consider subsective adjectives (Partee Reference Partee, Gleitman and Liberman1995). These are adjectives like ‘skillful’, which have the property that, for every noun, a ‘skillful N’ is an N but is not ‘skillful’ in any sense independent from the noun. For example:
4.
a) Jakub is a skillful rock climber.
b) Jakub is a cook.
c) Therefore, Jakub is a skillful cook.
The inference pattern in 4 is not valid: Jakub can be skillful at one thing but not at another. If ‘skillful’ contributed its meaning independently of the noun it combines with, the inference would be valid: Jakub would be a climber, a cook, and skillful; therefore, a skillful cook. But ‘skillful’ is still a content word. One could imagine a very simple language whose only complex expressions were of the form ‘Adj N’ but that had subsective adjectives. This language would be nontrivially compositional but would have no function words.
Now, I will present three case studies of prominent models purporting to explain aspects of the evolution of compositional communication. Each of them, however, will turn out to exhibit only trivial composition. After presenting the case studies, I identify common underlying assumptions and then prove a mathematical fact demonstrating that, under those assumptions, the resulting communication systems must be trivially compositional. In light of the foregoing discussion, none of these extant approaches can explain the emergence of the distinction between function and content words.
1.1. Three Études
Nowak and Krakauer (Reference Nowak and Krakauer1999) apply mathematical models of natural selection to the evolution of language, providing conditions under which a ‘grammatical’ language will evolve from a noncompositional one. In their model, states are object-action pairs loosely modeling events. They compare two types of languages: one in which each object-action pair has an independent label and another in which each object has a corresponding expression, each action has a corresponding expression, and the agents send the corresponding pair of expressions to communicate about an object-action pair. While the results they obtain are indeed interesting, it should be clear from this brief exposition that the type of language that they consider exhibits only trivial composition: each component of a complex expression contributes its bit of meaning (either an object or an action) independently of the other.
Barrett (Reference Barrett2007, Reference Barrett2009) studies a generalization of signaling games with multiple senders (Lewis Reference Lewis1969; Skyrms Reference Skyrms2010). In the simplest case, there are four states of nature and two senders, each of whom can send one of two signals to one receiver. The senders, but not the receiver, know which state obtains. Simulations show that a simple form of reinforcement learning leads these agents to a situation of perfect communication. Given the nature of the setup, the resulting systems look as follows. One sender partitions the four states into two sets of two, one for each signal. The other sender sends its two signals in an orthogonal partition (Lewis Reference Lewis1988). One can imagine the states as a 2 × 2 square, with one sender indicating the row and the other the column of the true state. While these agents have certainly learned to solve a nontrivial coordination problem, their communication system again exhibits only trivial composition, since the meaning of each sender’s signal is independent of the other’s and the receiver interprets the sequence by intersecting the two.
Finally, Mordatch and Abbeel (Reference Mordatch and Abbeel2018) study the emergence of communication in a multiagent setting where each agent has a private goal that it wants to achieve.Footnote 5 The agents—which are in this case recurrent neural networks—communicate about a world with various colored landmarks in it. Each agent additionally has a color and its own perspective from its position (i.e., no agents share a frame of reference). The goals consist of getting an agent to perform an action (going to or looking at) at one of the landmarks. With appropriate costs for maintaining large lexicons, the agents learn to send sequences of signals with separate signals for which agent, which action, and which landmark. These three types of signals have independent meanings, which are combined by conjunction.
1.2. A Limitative Result
There is in fact an underlying reason that these systems exhibit only trivial composition. Although the three cases just illustrated come from different theoretical frameworks, they all share the same following assumptions:
a1. Agents communicate about a fixed set of states. (Object/action pairs, separate points of a state space, and agent/landmark/action tuples, respectively.)
A2. Optimal communication consists in correctly identifying the true member of the state space.
A3. Messages are fixed-length sequences of signals from fixed sets.
Under these assumptions, optimal communication will be trivially compositional:
5. Let X and
be any sets, and f, g two functions of the following type:Define
. Then the following statement holds:Footnote 6 if
, then for all
.
Here, X represents the fixed set of states about which the agents communicate. Note that the structure of this set does not matter. The set of possible sequences of signals is ∏i Mi, with each Mi being the signals available to be sent in position i of a sequence. The sender function is f: a function from states to sequences of signals. This can capture a single sender or multiple acting either independently or in concert. The receiver function is g: it decodes the sequence of signals to one of the states X.Footnote 7 Because idX is the identity function on X, mapping each point to itself, that
means that optimal communication has been achieved, in the sense that the receiver always recovers the true state from X. Under that assumption, the result says that the receiver interprets a complex message (a sequence) by intersecting the independent meanings of each signal in the sequence (represented by
).
This result identifies three assumptions that cannot all be maintained if one wants to model the emergence of nontrivial composition, which I have just argued is a necessary step for explaining the emergence of function words. Not every approach makes all three of these assumptions. In particular, Steinert-Threlkeld (Reference Steinert-Threlkeld2014, Reference Steinert-Threlkeld2016a) as well as Barrett, Skyrms, and Cochran (Reference Barrett, Skyrms and Cochran2020) drop A3. In these models, not every message is a sequence of the same length. In the former, one sender can choose whether to prefix a set of signals with an additional signal. In the latter, two senders choose whether to send a signal, so messages can be of either length 1 or 2. In either case, the message space is a union, not a product (i.e., not of the form ∏iMi for any sets Mi), and so the limitative result does not apply.
In the remainder of the article, I develop a model that maintains A2 and A3 but drops the assumption (A1) of a fixed set of states that the agents communicate about. That is, the context in which the agents are communicating will vary. Against that backdrop, there will be a role for nontrivial composition to play.
2. A Signaling Game with Varying Contexts
I will introduce a type of signaling game (Lewis Reference Lewis1969; Skyrms Reference Skyrms2010)—called the Extremity Game—with a few helper definitions. Following the literature on gradable adjectives (Kennedy and McNally Reference Kennedy and McNally2005; Kennedy Reference Kennedy2007), I will assume that objects have some number of gradable properties, where each property has a corresponding scale. A scale in turn is a set of degrees, totally ordered with respect to a dimension. For example, the size of a circle corresponds to its radius, with degrees being positive real numbers (i.e.,
). For the degree of an object o on a scale s, I will write s(o). Given a set S of scales, I will define a context as follows.
6. A context c over scales S is a set of objects such that, for each
, there is a scale
such that either o has the least degree on s (
) or the highest degree on s (
).
In its general form, the game takes place between a sender and a receiver in the following way.
7. Extremity Game, in general:
a) Nature chooses a context c and a target object
.b) The sender sees c and o and sends a message m from some set of messages M.
c) The receiver sees c and m and chooses an object o′ from c.
d) The play is successful (and the two agents equally rewarded) iff
.
To fully specify a game, one must say what the messages M available are and how the agents make their choices. I specify the former now and the latter in the next section. The set of available messages will be inspired by the semantics for gradable adjectives. There, it is assumed that adjectives map objects (of type e) on to their degree on the corresponding scale (of type d). Morphemes like -est and least then map a contextually specified set of objects to those with the highest and lowest degrees, respectively.
8. Toy semantics for a gradable adjective and superlative morphemes.
a)

b)
and

c)
and
.
In contexts as defined in 6, having one expression for each scale and the morphemes -est and least will suffice to uniquely pick out each object in the context. I will assume, then, that the set of messages
, where MS is a set of size |S| (i.e., there are as many messages in MS as there are gradable properties for each object) and MP is a set of size two (P for ‘polarity’).
3. Experiment
A trial of our experiment will consist of some number of iterations of playing an Extremity Game as in 7. The sender and receiver are each neural networks, schematically depicted in figure 1. They are trained using the REINFORCE algorithm (Williams Reference Williams1992; Sutton and Barto Reference Sutton and Barto2018). This algorithm applies standard reinforcement learning logic—successful choices become more likely and unsuccessful ones less likely—to neural networks.
Schematic depictions of network architectures: a, basic sender; b, attentional receiver.

There are two types of receiver: basic and attentional. The basic one is a multilayer perceptron, taking the context and the signals, outputting a distribution over target objects, from which a sample is taken to determine the reward.
The attentional receiver uses an attention mechanism (Mnih et al. Reference Mnih, Heess, Graves and Kavukcuoglu2014; Xu et al. Reference Xu, Ba, Kiros, Cho, Courville, Salakhutdinov, Zemel, Bengio, Bach and Blei2015) to focus on a perceptually salient dimension. They implement hard attention in the following sense. First, they receive as input the context c and the message msi from MS chosen by the sender. On this basis, the receiver chooses a dimension to attend to: the input is filtered so that the agent only sees the objects according to one dimension (e.g., size or lightness). Then, the agent uses this attended-to dimension and the message from MP chosen by the sender to choose a target object. This attention mechanism reflects the perceptual salience of the gradable properties of the objects: it is very natural, for instance, in the contexts depicted in figure 1, to attend only to the size or the shade of the circles. Visual attention in humans exhibits a similar sensitivity to saliency along perceptual dimensions like color and shade (Theeuwes Reference Theeuwes1992; Nothdurft Reference Nothdurft1993, Reference Nothdurft2000).
I varied the number of dimensions (i.e., gradable properties) between one and three and ran 10 trials for each (for 5,000, 20,000, and 50,000 minibatches respectively, where each minibatch was 64 iterations). I recorded the rolling accuracy over 10 training steps, as well as the accuracy and detailed properties about contexts and signals used on 5,000 new games at the end of training. (The code and data can be found at https://github.com/shanest/function-words-context.)
3.1. Results: Basic Receiver
Mean communicative success per number of dimensions on 5,000 novel games is provided in table 1. In one and two dimensions, the agents reliably learned to communicate effectively. In three dimensions, they usually get stuck in suboptimal protocols.
Success on Test, Basic Receiver

| Dimensions | Mean | SD |
|---|---|---|
| 1 | .975 | .006 |
| 2 | .985 | .003 |
| 3 | .731 | .062 |
Inspection of the learned communication protocols also shows that they do not learn to treat either of the signals as a function word. The learned systems are always ‘maximally’ separating in the following sense: for any two contexts c, c′ and targets o, o′, if
and
for the same dimension d, then the sender’s message for o in c differs from its message for o′ in c′ in both syntactic positions. This holds true for both the two- and three-dimensional cases. In such a system, the agents are not grouping context/target pairs according to the dimension along which the target can be singled out as maximal or minimal.
This could be for roughly the following reason: in expectation, target objects that differ only in whether they are the minimum/maximum in context on the same dimension will actually be farther from each other in Euclidean space than from other objects. So the sender could be using maximally different signals for the two types of target objects to help the receiver distinguish them.
3.2. Results: Attentional Receiver
Mean communicative success per number of dimensions on 5,000 novel games is provided in table 2. In one and two dimensions, the agents reliably learned to communicate effectively. In three dimensions, we find a lower mean and higher variance. Visual inspection shows that many trials wind up near 88% communicative success, while others get stuck in very suboptimal communication protocols.
Success on Test, Attentional Receiver

| Dimensions | Mean | SD |
|---|---|---|
| 1 | .959 | .005 |
| 2 | .964 | .005 |
| 3 | .697 | .144 |
Analyzing the resulting communication protocols yields promising results. Figure 2 shows an example learned communication system for a three-dimensional trial. These are bar plots, showing the frequency with which the sender made various choices on the test games. The left column corresponds to MS, and the right to MP. The top row corresponds to the true dimension of the target object in context, and the bottom row to the true polarity of the target object. The top-left corner in each case shows that the different signals in MS are being used to reliably communicate the dimension. The bottom-right corner in each case shows that the signals in MP are reliably being used to communicate the polarity of the object.
Example communication system with three dimensions, attentional receiver.

When the agents are communicating in this way, the signals that communicate direction can be interpreted as function words. The signals in MS reliably communicate a bit of ‘content’: a dimension. The signals in MP reliably signal whether the target has the greatest/lowest degree along that dimension of all the objects in the context. This is nontrivial modification of one linguistic item by another. The resulting communication protocols behave exactly like the toy semantics in 8.
4. Conclusion
Every natural language divides the lexicon into content and function words. The latter provide the ‘grammatical glue’ that enables robust forms of compositional communication to arise. Most existing approaches to the evolution of compositionality do not explain the emergence of function words. In this article, I provided a diagnosis for this situation and introduced a signaling game with variable contexts consisting of multiple objects with multiple gradable properties. Simple reinforcement learning by neural networks—in particular with the ability to pay attention to certain perceptually salient aspects of the input—in this game can generate expressions that are appropriately characterized as function and as content words.
Because this was a preliminary study, much work remains to be done. In particular, the model presented here builds in many assumptions that could possibly be relaxed in the end. For example, the syntactic role of the two signals—that those from MP can see and act on those from MS—has been built in. In a more general model, the specialization of signals into these syntactic roles could emerge. More generally, one would like communication systems like those exhibited here to emerge in the very general setting of communicating by a sequence of symbols, with costs for things like vocabulary size and length of messages. While attention to salient dimensions sufficed in the present case, exactly which costs and biases must be added to generate nontrivial composition in a general setting—and whether a unified explanation of all forms of nontrivial composition can be given—remains for future work.

