Basic syntax from speech: Spontaneous concatenation in unsupervised deep
  neural networks
Computational models of syntax are predominantly text-based. Here we propose
that the most basic syntactic operations can be modeled directly from raw
speech in a fully unsupervised way. We focus on one of the most ubiquitous and
elementary properties of syntax -- concatenation. We introduce spontaneous
concatenation: a phenomenon where convolutional neural networks (CNNs) trained
on acoustic recordings of individual words start generating outputs with two or
even three words concatenated without ever accessing data with multiple words
in the input. We replicate this finding in several independently trained models
with different hyperparameters and training data. Additionally, networks
trained on two words learn to embed words into novel unobserved word
combinations. To our knowledge, this is a previously unreported property of
CNNs trained in the ciwGAN/fiwGAN setting on raw speech and has implications
both for our understanding of how these architectures learn as well as for
modeling syntax and its evolution from raw acoustic inputs.
Gašper Beguš, Thomas Lu, Zili Wang
# Basic syntax from speech: Spontaneous concatenation in unsupervised deep neural networks

###### Abstract

Computational models of syntax are predominantly text-based. Here we propose that basic syntax can be modeled directly from raw speech in a fully unsupervised way. We focus on one of the most ubiquitous and basic properties of syntax--concatenation. We introduce _spontaneous concatenation_: a phenomenon where convolutional neural networks (CNNs) trained on acoustic recordings of individual words start generating outputs with two or even three words concatenated without ever accessing data with multiple words in the input. Additionally, networks trained on two words learn to embed words into novel unobserved word combinations. To our knowledge, this is a previously unreported property of CNNs trained on raw speech in the Generative Adversarial Network setting and has implications both for our understanding of how these architectures learn as well as for modeling syntax and its evolution from raw acoustic inputs.

## 1 Introduction

Concatenation (or compounding/conjoining elements) is one the most basic operations in human syntax. Many animal communication systems use simple symbols (call/sign\(\sim\)meaning pairs) that are not concatenated (termed "elementary signals" by Nowak and Komarova 2001). In human syntax, on the other hand, individual elements such as words can combine into "compound signals" (Nowak and Komarova, 2001) with compositional meaning. The evolution of concatenation (Progovac, 2015) as well as the existence of related operations that are presumably uniquely human and domain-specific (such as the proposed _Merge_; Chomsky 2014) have been the focus of debates in linguistics and cognitive science. Models of human syntax are predominantly text-based, but hearing human learners acquire syntax from acoustic inputs. Modeling syntax from raw speech also has engineering applications: speech processing increasingly by-passes text (Lakhotia et al., 2021). Understanding syntactic capabilities and limitations of spoken language models can inform architectural choices.

Here, we model how compound signals or concatenated words can arise spontaneously in deep neural networks trained on raw speech in a fully unsupervised manner. The sounds of human speech are a measurable, physical property, but they also encode abstract linguistic information such as syntactic, phonological, morphological, and semantic properties. For these reasons, we model basic syntactic dependencies from raw acoustic inputs with CNNs. We train CNN in the Generative Adversarial Network (GAN) setting. CNNs and GANs are uniquely appropriate for modeling linguistic dependencies from raw speech without supervision. These models have been demonstrated to learn disentangled near-categorical representations of linguistically meaningful units at the phonetic, phonological, morphological, and lexical semantic levels from raw acoustic inputs (Begus, 2020, 2021a, 2021b).

To test whether CNNs can spontaneously concatenate words, we conduct two sets of experiments. In the two _one-word_ experiments, we train the networks on single-word inputs. Because the networks are trained in the GAN setting, the Generator never accesses the training data directly, but generates innovative outputs. It has been shown that GANs innovate in highly interpretable ways that produce novel words or sound sequences (Begus, 2021a). Here we test whether innovations can produce spontaneously concatenated words. In the second experiment, we train the networks on one-word and two-word inputs (the _two-word_ experiment) and withhold a subset of two-word combinations. We then test whether words can be embedded into novel unobserved combinations in the output. Such a design also mimics one-word and two-word stages in language acquisition (Berk and Lillo-Martin, 2012).
Methods

### The model

We train the ciwGAN and modified fiwGAN models [1]. ciwGAN/fiwGAN models are information-theoretic extensions of GANs (based on InfoGAN, WaveGAN and DCGAN; Chen et al.2016; Donahue et al.2019; Radford et al.2015) designed to learn from audio inputs.

The ciwGAN/fiwGAN architectures involve three networks (Figure 1): the Generator that takes latent codes \(c\) (either one-hot vectors or binary codes) and random latent space variable \(z\) (\(z\sim\mathcal{U}(-1,1)\)) and through six upconvolutional layers generates 2.048s audio (32,768 samples). The audio is then fed to the Discriminator, which evaluates realness of the output via the Wasserstein loss [1]. The unique aspect of the ciwGAN/fiwGAN architecture is a separate Q-network, which is trained to estimate the Generator's hidden code \(c\).

During training the Generator learns to generate data such that it increases the Discriminator's error rate and decreases the Q-network's error rate. In other words, the Generator needs to learn to encode unique information into its acoustic inputs, such that the Q-network is able to decode unique information from its generated sounds. The training between the Generator and the Q-network mimics the production-perception loop in speech communication: after the training, the Generator learns to generate individual words given a latent code \(c\) and the Q-network learns to classify unobserved words with the same corresponding codes [1]. Since learning is completely unsupervised, the Generator could in principle encode any information about speech into its latent space, but the requirement to be maximally informative causes it to encode linguistically meaningful properties (both lexical and sublexical information; 1). Such a setting not only replicates the production-perception loop, but is also one of the few architectures featuring traces of communicative intent (between the Generator and the Q-network). Unlike in generative models trained on next sequence prediction or data replication where no communicative intent exists, the training objective between the Generator and the Q-network is to increase mutual information between the latent space and the data such that the Q-network can retrieve the information (latent code) encoded into the speech signal by the Generator.

CiwGAN and fiwGAN have been shown to be highly innovative in linguistically interpretable ways. For example, the Generator produces new words or new sound sequences that it never accesses during training. Crucially, the Generator never directly accesses the data: it learns by generating data from noise such that the Discriminator fails to distinguish real and generated data. In this respect, it mimics learning by imitation in human language (rather than replication as is the case with variational autoencoders).

### Data

The training dataset consists of sliced lexical items from the TIMIT database of spoken English [1], such that each item is a single spoken word.

In the first, _one-second one-word_ experiment, we use 5 lexical items:, _oily, rag, suit, year_ and _water_. In this experiment based on a pre-trained model, the 5-layer Generator outputs only 1.024s of audio and data is never left-padded (only right padded) which controls for the effect of padding on concatenation. We replicate the results with another one-word experiment trained on _box, greasy, suit, under_, and _water_. Here, each item is randomly padded with silence to a length of 2s to produce 100 distinct data points for each class, for a total of 500 data points used in training (the _two-second one-word_ experiment).

In the third experiment (_two-second two-word_), we use 3 lexical items: _greasy, suit_, and _water_. 100 data points each 2s in length are generated in an analogous process to the first experiment, but for each combination of two items (i.e. _greasy, suit_, and _water_ alone, _greasy_ followed by _water_,

Figure 1: The architecture of ciwGAN used in the two-second one-word experiment.
_water_ followed by _greasy_, and so on). However, we withhold the combination _suit/greasy_, such that they do not appear together in the training set in any order, to produce a final training set of 700 data points.

For the one-word experiments, we use the ciwGAN model with one-hot encoding and five levels, such that each of the five unique words can be represented with a unique one-hot vector. In the two-word experiment, we use a modified fiwGAN (binary code). The binary code is limited to three bits, but each code can have up to two values of 1 (e.g. [1,0,0] and [1,1,0]). We also train an additional two-word two-second model with the same data but with 6-level one-hot \(c\) in the ciwGAN architecture.

## 3 Results

To test whether the models can spontaneously concatenate, we train the networks for 8,011 (pre-trained one-second one-word), 8,956 (two-second one-word), 9,166 (two-second two-word fiwGAN), and 18,247 steps (two-second two-word ciwGAN) and analyze generated data. We use the technique proposed in Begus (2020) to analyze the relationship between linguistically meaningful units and latent space. According to this technique, setting individual latent space variables to values outside of the training range reveals the underlying linguistic value of each variable.

### One-word model

In the one-second one-word model, the Generator learns to associate each unique one-hot code with a unique lexical item in a fully unsupervised and unlabeled manner. The Generator's input during training is a one-hot vector with values 0 or 1. For example, the network learns to represent _suit_ with \([1,0,0,0,0]\). To test this observation, we set the one-hot vector to values outside the training range (e.g. \([5,0,0,0,0]\)), which overrides lower-level interactions in the latent space. This causes the Generator to output _suit_ at near categorical levels (9 times out of 10), revealing the underlying value of the code. This further reveals that \([0,1,0,0,0]\) encodes _year_ (8 times out of 10) and \([0,0,1,0,0]\) encodes _water_ (10 times out of 10), since setting latent codes to values greater than 1 results in the model almost categorically outputting the associated word.

In addition to lexical learning, we observe a robust pattern: the networks trained on one-word inputs generate two-word outputs when the one-hot values are set to negative values outside of the training range. For example, when the latent code is set to \([0,-2,-2,-2,0]\), the Generator consistently outputs a two-word output _suit year_ (8 times out of 10). For \([-3,-2,-3,-2,2]\), the network consistently outputs _rag year_ (8 times out of 10; Figure 3). These concatenations occur despite the fact that the training data is always left-aligned, the Generator never accesses the data directly and the Discriminator only sees single words.

To show that this outcome is not an idiosyncratic property of one model and that it is indeed the negative values that encode concatenated outputs, we also analyze a separately trained two-second one-word model. The inputs to the Discriminator in this case are also single words only, but they are longer (2s) and randomly padded with silence on the left and right. While high positive values occasionally yield two-word outputs in this model, negative values are consistently associated with two-word outputs. For example, \([-50,-50,0,-50,0]\) (with extreme values) consistently encodes _box greasy_ (9 times out of 10), and \([-50,-50,-50,0,0]\) consistently encodes _greasy under_ (10 times out of 10). Positive values of the same codes produce completely unintelligible outputs (noise).

In addition to several two-word concatenated outputs, the network even occasionally generates a three-word concatenated output _box under water_ for the latent code \(c\) with all negative values \([-3,-1,-1,-1,-1]\) (2 times out of 10). Figure 2 illustrates the three-word sequence.

Figure 2: The three-word concatenated output _box under water_. Independently, the second word (_under_) is somewhat difficult to analyze, but given only five training words, it is clearly the closest output to _under_.
### Two-word model

In the two-word experiment, the models get one-word and two-word inputs (thus mimicking the two-word stage). The models are only trained on three words and their combinations, except for the _suit/greasy_ combination withheld.

In the ciwGAN two-word model, the Generator consistently outputs the unobserved _greasy suit_ for \([15,0,0,0,0,0]\) (17 times out of 20), which suggests the network learned this unobserved combination as one of the possible sequences and encoded it with a one-hot value. For the code \([-1,4,4]\) (modified fiwgan), the Generator occasionally outputs the three-word output _suit greasy water_ (1 time out of 20; Fig. 4), which contains the unseen _suit greasy_ pair. It appears that the negative values of the latent code \(c\) again encode unobserved novel combinations. We also observe repeated three-word outputs such as _water water suit_ as a consistent output of \([0,50,-50]\) (20 times out of 20).

### Repetition

In addition to two-word concatenation and embedding of words into novel combinations, we also observe outputs with repeated words in all our trained models. The training data never includes the same word repeated, yet the models frequently include repeated words. For example, the two-second one-word model consistently outputs _greasy greasy_ for \([0,0,-40,0,0]\) (7 times out of 10; Fig. 4). This is significant because repetition or reduplication is one of the most common processes in human language and language acquisition (Berent et al., 2016; Dolatian and Heinz, 2020). Additionally, full or total reduplication (where the entire word is repeated) is among the most computationally complex morphophonological processes (Dolatian and Heinz, 2020) because it represents unbound copying at the segmental level. It has been shown elsewhere that deep convolutional neural networks can learn partial reduplication (where only a part of the word is repeated) from raw speech and extend it to novel unobserved data (Begus, 2021). Our results suggest that total reduplication (or unbound copying; Dolatian and Heinz 2020) can arise spontaneously in these models.

### Why negative values?

The Generator makes use of the unutilized space in the latent code to encode unobserved but linguistically interpretable outputs. During training, the Generator is trained on only two values of the latent code: 0 and 1. In the one-second one-word model, individual codes represent unique individual words, which suggest lexical learning emerges in the positive values in these models. The network never accesses two-word inputs and it never gets negative values in the latent code \(c\) during the training. It appears that the network is biased to concatenate and that it uses the unobserved latent code space to encode unobserved concatenated outputs.

## 4 Conclusion

Our results suggest that the Generator network in the ciwGAN architecture not only learns to encode information that corresponds to lexical items in its audio outputs, but also spontaneoulsy concatenates those lexical items into novel unobserved two-word or three-word sequences.

The ability of unsupervised deep neural networks trained on raw speech to concatenate words into novel unobserved combinations has far-reaching consequences. It means that we can model basic syntactic properties directly from raw acoustic inputs of spoken language, which opens up potential to model several other syntactic properties directly from speech with deep convolutional neural networks as well as from other architectures.

From the perspective of evolution of syntax, the results suggest that a deep neural network architecture with no language-specific properties can spontaneously begin generating concatenated signals from simple signals. The step from one-word stage to two-word stage is necessary both in evolution of human language as well as during language acquisition. Our second experiment mimics the two-word stage. We argue that unsupervised deep learning models not only concatenate single words into multi-word outputs, but are also able to embed words into novel unobserved combinations once the model is trained on multiple-word inputs.

Further research into the relationship between basic syntactic properties that spontaneously emerge in these fully unsupervised models trained on raw speech and the structure of the latent space has the potential to yield insights for the study of syntactic theory, language acquisition, and language evolution. By evaluating these models on syntactic properties of spoken language, we should also get a better understanding of computational limits of unsupervised CNNs.
### Limitations

This paper models concatenation of acoustic lexical items. Syntax is substantially more complex than concatenation [1]. Exploration of other syntactic properties as well as of compositionality in these models is left for future work. We also train the network on a relatively small number of lexical items (5) and a small number of tokens (100). The small number of lexical items is representative of the earliest stages of language acquisition when the number of lexical items is highly limited [1].

## Ethics Statement

Two models are trained for the purpose of this paper, and one model is pretrained. The three models were trained for 16hrs on a single GPU (NVIDIA 1080ti). We use the TIMIT [1] database for training. The number of parameters is given in the Appendix A. We take the standard hyperparameters (from Donahue et al. 2019 and Begus 2021a). Because the outputs are salient and rarely ambiguous, all transcriptions are performed by the authors. Generated audio files and models' checkpoints are available at the anonymous link: [https://osf.io/przuq/?view_only=9d19a26f0bb84a3ea4db8e6844b37985](https://osf.io/przuq/?view_only=9d19a26f0bb84a3ea4db8e6844b37985).
