Designing and building computational models that generate meaningful dialogue for human-interaction, in an interesting and engaging manner, is a challenging open problem. As personal digital assistants increase in popularity, proper conversational capabilities may allow them to provide creative, playful, and helpful interactions. Conversational agents can be effective for health-care (Bickmore & Giorgino, 2006), by supporting cognitive-behavioral therapy for treating depression (Fitzpatrick et al., 2017), helping patients with chronic pain (Miner et al., 2017), and supporting reminiscence (Nikitina et al., 2018). These applications require systems capable of understanding and collaboration.
What makes some dialogues more interesting than others? Interesting collaborative dialogue constructs knowledge iteratively (Swain, 2000) and depends on each speaker bringing information to the conversation (Sawyer, 2003). Interestingness is also subjective and difficult to directly optimize via numerical methods (Li et al., 2016; Venkatesh et al., 2018).
Rule-based conversational models have existed for over 50 years (Weizenbaum, 1966). These methods are limited by hand-tuning and engineering to predict and handle possible inputs. Generative language models maximize the likelihood of an utterance (e.g. a sentence or sequence of words) (Graves, 2013). These models can predict the likelihood of an utterance by considering the sentences as a sequences of words, sub-word units, characters, and/or tokens (Sennrich et al., 2015). This objective can result in generated sentences which are grammatically correct, and bear a semantic relationship to the context surrounding it, but lack global consistency (Liu et al., 2018).
Our work generates interesting dialogue by using a narrative arc to incrementally construct shared knowledge. A narrative arc defines evolving qualities of emotion, tension, or topic over a story (Bizzocchi, 2007). We draw inspiration from improvised theater, where actors collaborate in real time to develop narrative based on thematic constraints (Johnstone, 1979). Improvised theater is a unique storytelling medium which relies on collaborative dialogue in which each utterance must carry significant information (Swain, 2000). We appeal to the two golden rules of improvised dialogue: 1) accept (i.e. be consistent with the dialogue thus far and 2) reveal (i.e. progress the dialogue with new information) (Sawyer, 2003; Johnstone, 1979).
In this work, we propose a new method to modulate a conversation model, which accepts input utterances by generating consistent and revealing
responses. Our approach combines a conversational model with a topic classifier, oruniverse model. We borrow the term universe from improvised theater where it is used to describe the world-as-we-know-it (Johnstone, 1979; McLeod, 2000; Raby, 2010). The universe encompasses associations surrounding the dramatic world, and is motivated by the possible world semantics theory (Kripke, 1963).
We identify two modes of operation for our shaping method: revealing and concealing. Revealing dialogue adds additional information about the current universe. Generating utterances which progress a scene with new information is the primary goal of our approach. Concealing dialogue avoids exposing new information about the universe.
The universe model characterizes the information revealed by each utterance in a sequence. We refer to this information profile across utterances as the narrative arc. By tuning the revealingness we can selectively choose utterances to shape the narrative arc to produce more interesting and engaging dialogue. We argue that a balance between revealing and concealing is required for interesting and engaging collaborative dialogue (Swain, 2000). Both over-specification and ambiguity are undesirable (Sawyer, 2003; Johnstone, 1979). We hypothesize that there is an ideal region of information revelation which our method can expose in existing text-based narratives such as movie scripts.
2 Shaping the Narrative Arc
In this section, we present a mechanism for shaping the narrative arc inspired by combining methods exploring entropy in textual documents (Shannon, 1951) with the Simple Shapes of Stories described by Vonnegut.111From K. Vonnegut lecture: goo.gl/JuEDVR We describe concepts of conversation and universe models. Then, we show how these combine to describe a narrative arc. Finally, we show how the narrative arc can be used to generate interesting dialogue.
2.1 The Conversation Model
A conversation model accepts an input utterance and generates one, or several, output utterance(s). The conversation model maintains local coherence by conditioning output generation on the input. We write to denote the set of possible utterances (i.e. sequences of words); in this work, is a collection of English sentences. A sequence of successive utterances is a dialogue, denoted
. A conversation model yields a probabilityof an utterance given a dialogue .
We focus on dialogue generation using three retrieval-based conversation models. The first two models are based on the OpenSubtitles dataset (Lison et al., 2018). Pre-processing details are included in the supplementary material. When queried with an input line , a model returns candidate responses:
Baseline Random model: sample lines from .
Books: Similar to the DNN model, responds with semantically-related nearest neighbor lines from literature, filtered for offensive content.222books.google.com/talktobooks
2.2 The Universe Model
The universe model measures how each successive utterance of a dialogue influences the probability distribution over universes. For a given utterance, the universe model calculates a probability distribution over universes. For a sequence of utterances, we use recursive universe belief propagation (Sec.2.3) to update the posterior over the course of a dialogue. Revealing dialogue would concentrate probability mass on a single universe, and concealing dialogue would distribute probability mass uniformly across a set of universes. The shape of this sequence of posteriors is the narrative arc (Sec. 2.4). We investigated reveal/conceal dynamics using three different universe models based on probabilistic topic classifiers.
: Using the newsgroup classification dataset, we filter out stop-words, created frequency vectors, and use the TF-IDF (term frequency / inverse document frequency)(Salton & Buckley, 1988) word weighting scheme to account for word importance in the corpus. We train a naïve Bayes classifier on 5 aggregate topic universes (Computers, Recreation, Religion, Science, and Talk) (Joachims, 1996).
Movies: Naïve Bayes classifier, trained similar to Newsgroups, using a collected dataset of film synopses and one of 10 corresponding genres (Drama, Comedy, Horror, Action, Crime, Romantic Comedy, Romance, Thriller, Film Adaptation and Silent Film) from Wikipedia data (Hoang, 2018).
DeepMoji: Deep neural network that takes input text and outputs a distribution over a set of 8 aggregated emoji universes: (Sad, Mad, Meh, Nervous, Glad, Music, Love, and Miscellaneous) (Felbo et al., 2017). The authors’ pretrained model was used.333github.com/bfelbo/DeepMoji
2.3 Recursive Universe Belief Propagation
We desire a means by which we can update the universe belief incrementally as evidence is accumulated with each successive utterance in a dialogue. We begin by defining the notion of a universe model as a means of modelling the dynamics of information revelation. Consider a finite set of universes, . The role of a universe model is to assess the compatibility of an utterance with a given discrete universe, . Given such a model, we develop a method to update the agent’s posterior universe distribution over a sequence of utterances. For each universe , the universe model assigns a likelihood to an utterance , conditioned on a dialogue .
The universe model iteratively updates a posterior belief over universes, in a similar spirit to prediction with expert forecasters (Cesa-Bianchi & Lugosi, 2006)
. The probability of a given universe depends on iteratively combining evidence in support of that universe. We define the the posterior probability over universesgiven a sequence of utterances as:
is the prior probability,is the likelihood of utterance conditioned on the past dialogue and universe, and is the likelihood of utterance under the conversation model.
be an initially uniform distribution over universes, or the universe model’s prior. We can marginalize out the universe if the evidence is consistent over all hypotheses. To illustrate the relationship between utterance likelihood and universe, we can explicitly write the marginal likelihood as:
Thus, the posterior is updated recursively as:
In practice, it may be convenient to use the output of a probabilistic classifier in lieu of a likelihood function conditioned on past utterances and universe
. Universe classifiers can be trained separately from language models, and provide a complementary signal if model input distributions overlap. This assumption is justified when both models work with similar training corpus vocabularies. We view the probability distribution over universes output by the universe model as derived from a joint distribution, of the universe , and utterance . With as the prior distribution over universes, the conditional probability is:
We can substitute for in Eq. 2.3 by assuming conditional independence (i.e., ), uniform prior distribution (i.e., ) and constant marginal probability (i.e., ). These assumptions are justified when the probabilistic topic classifier is a naïve Bayes classifier (Bishop, 2006) with uniform prior. Thus, the substitution follows the following steps:
|[ uniform prior]|
|[ const. marginal]|
Eq. 2.3 thus becomes:
2.4 The Narrative Arc
As defined in Eq. 2.3, the posterior is a function of the dialogue . We define the narrative arc as the sequence of universe distributions iteratively calculated for the dialogue. The arc depicts the evolution of a belief over a set of universes. The narrative arc function maps , where is a probability simplex over . We discuss three properties of the narrative arc of the synthetic dialogue shown in Fig. 1:
1. Utterances affect the arc in varying degrees. “My favorite scientist and academic is Albert Einstein” is similarly likely under Science and Talk, and less likely under the Recreation universe (bottom green line). Different utterances should have different effects on .
2. A concentrating posterior signals a revealing dialogue. A dialogue which emphasizes scientific content, for example, should see . Conversely, we would expect a concealing dialogue to spread the posterior across multiple universes.
3. A universe model is a perspective on dialogue. Different universe models can expose different aspects of the same dialogue. Replacing the Newsgroups universe model by a Movies universe model suggests the dialogue is from a Drama and/or Comedy universe. This dialogue would be considered revealing under both universe models.
In this section, the universe model was applied to a fixed dialogue , but the model also provides a criterion for favoring utterances when generating dialogue.
2.5 Generating Dialogue with the Narrative Arc
The entropy of the posterior is given by:
Then, the entropy change due to a new utterance, , given the past dialogue, , is defined as:
The term measures how much a given utterance changes the entropy of the posterior, given the previous utterances . A positive value of is a reduction in entropy (i.e. revealing). Conversely, a negative value of is an increase in entropy (i.e. concealing). We define the score of an utterance , with respect to a dialogue, , as:
The exponential function is a convenient way to ensure strict positivity and preserve the ordering of scored candidates. We use our entropy-based score function to modulate the sampling of a base conversation model, , toward , which depends on the change in entropy due to the new utterance.
If , and candidates are sampled according to . If , is modulated by the score . Modulation mode depends on the value of :
(reveal): modulate towards revealing the universe. The probability of utterances likely under the universe with highest probability are increased.
(conceal): modulate towards concealing the universe. The probability of utterances likely under multiple unlikely universes is increased. Utterances not supporting the likely universe are made more likely.
We use these two modulations for filtering samples from our base conversation model. We filter via one of two methods for sampling from an unnormalized distribution: greedy sampling and rejection sampling. Greedy sampling scores a set of samples from the conversation model and selects the candidate with the maximum score. Scoring a large set of candidates can be time intensive. Rejection sampling (Alg. 1) can sample from the desired unknown modulated distribution online (Murphy, 2012). Additional details on rejection sampling are included in the supplementary material. As the entropy function is bounded, the utterance score is bounded. In practice, we set a max score and weigh all utterance scores above the threshold equally. Both filtering methods have benefits. Rejection sampling provides a smoother distribution and does not require scoring a large set of candidates. Greedy sampling is less sensitive to the range of from different utterances.
3.1 Narrative Arc of Existing Dialogues
In Fig. 2, we visualize the narrative arc underlying the first 20 lines of Shakespeare’s Romeo and Juliet using three universe models: 1) Newsgroups, 2) Movies, and 3) DeepMoji.
Fig. 2 illustrates the entropy-reducing nature of good dialogue by showing us the underlying, evolving, narrative arc. Under the Newsgroups universe model, the dialogue evolves toward a talk-centric universe. Under the Movies model, the same dialogue balances between comedy and drama before shifting towards drama. Finally, using the DeepMoji universe model, a developing ambiguity between DeepMoji universes Sadness and Love is uncovered. This supports the hypothesis that existing dialogues exhibit underlying narrative arcs conditioned on universe models. Additional samples exposing narrative arc dynamics are presented in the supplementary material.
3.2 Shaping the Narrative Arc
In this section, we demonstrate that our method is able to modulate conversation models toward generation of revealing or concealing dialogues. Linguistic quality and semantic consistency of utterances are determined by the language underlying the conversation model. Here, we emphasize evaluation of narrative arc shaping.
We use the DNN conversation model to test how preferential selection, induced by our score function, can modulate information introduced into the conversation. In Fig. 3 we present characteristic narrative arcs and dialogues using concealing (top), neutral (middle), and revealing (bottom) modes. Each generation was primed with the first two lines from Romeo and Juliet (shown in bold in Fig. 3).
A significant difference is exposed between concealing (top) which tends toward a high entropy, uniform universe distribution, and revealing (bottom) where drama tends toward . Drama remains the most likely universe (and visible on all plots) as it was supported by the first two lines and subsequent utterances did not significantly shift the distribution. Fig. 3 also shows the dialogue generated by the model. Concealing utterances do not add information to the dialogue, revealing utterances incorporate new information over the course of the dialogue.
We next evaluate our method’s ability to generate concealing/revealing dialogue by measuring the entropy under both an objective universe (i.e. the universe model used for scoring in generation) and a test universe not used for scoring. We use the Newsgroups universe model for objective scoring and the Movies model for testing. A random conversation model is used to generate response candidates.
We generate 20 conversations following a process similar to Algorithm 1 but using greedy sampling. Each conversation starts with a random dialogue starter line to encourage diversity and then 19 lines are sampled from the conversation model using the narrative arc function. This approximates the length of a medium-duration improvised conversation (Sawyer, 2003).
Results are presented in Fig. 4. There is a significant difference between the entropy under the objective and testing universes, but each model exhibits similar dynamics over the dialogues. We conclude that concealing dialogue can conceal under multiple universes, and revealing dialogue can reveal information under multiple universe models.
The revealing/concealing dynamics of each utterance may be related to measurable lexicographical qualities such as words per sentence (WPS). We analyzed the language used in lines from each model and found a significant difference () between utterances selected by the revealing model ( WPS) and utterances selected by the concealing model ( WPS).
3.3 Predicting the Next Best Line
We next test the system’s ability to add information to improve performance on a prediction task. Given a sequence of gold-standard conversational utterances and a list of next utterance candidates (i.e. the ground truth and distractors), can the universe model be used to improve accuracy of predicting the ground truth?
Evaluation compares top- accuracy and mean reciprocal rank (MRR) over samples in a held out test set. Accuracy measures the likelihood that the system scores the ground truth within the top- candidates against the distractors. MRR compares average ground truth ranking across conditions. A text2text Transformer language model was trained on the OpenSubtitles dataset (Lison et al., 2018) to predict an output line given a set of input lines (Vaswani et al., 2017). Additional details are in the supplementary material.
The trained Transformer model was used to assign a perplexity score for output line candidates given an input context line. For each unique subtitle file in the validation and test sets, the concatenation of the first lines serve as input context and line is the ground truth output to be predicted. Negative candidates are randomly selected from lines in the respective corresponding data segment (i.e. validation or test sets), thus may not be from the same source file as the input context lines.
The perplexity under the trained conversation model serves as the unmodulated probability (Eq. 3) of selection in the prediction task. The input sequence is then passed, line-by-line, through a Newsgroups universe model and a score is assigned to each candidate relative to the change in entropy of the evolving posterior. The value is modulated over evenly spaced values between . The accuracy of predicting the ground truth in the top- candidates and the MRR of the ground truth are computed.
The results on the validation set are shown in Fig. 5. By selecting the correct value, the likelihood of correctly selecting utterances revealing an incremental amount of information increases significantly. Note the shape of the curve as changes. As hypothesized, there exists a region, between and where the ‘right’ amount of universe information is revealed. This region corresponds to the notion that each line of dialogue will reveal some, but not too much, information about the universe. As continues to increase, the accuracy decreases below the neutral baseline. The top- accuracy of prediction increases when the universe model boosts the probabilities of appropriately revealing dialogue. The validation set is used to set the optimal , which is then used to score samples in the test set and results are presented in Table 1. Two additional models are included for comparison. T2T@1 uses preceding the ground truth as context. Unigram assigns a perplexity to output candidates by building a unigram language model using the input lines as a corpus. A smoothing factor of is used for out-of-vocabulary words. Additionally, a random conversation baseline model is included. For each model tested, information from the universe model significantly improves the predictive accuracy on this task.
for a Students’ t-test comparing MRR to the Neutral model.
3.4 Interactive Collaborative Dialogue
Finally, as a practical implementation case-study, we tested how this system performs in collaborative dialogue through interaction with humans. Four expert improvisational theatre performers engaged with the system in text-based conversations. Each conversation consisted of utterance-response pairs for a total of ten utterances (i.e. an average length of a short-duration improvised scene (Sawyer, 2003)). Subjects are native English speakers with 5+ years professional performance experience and are familiar with shared narrative development and collaborative dialogue. Each interacted with revealing, concealing, and neutral models in a randomized order unknown to the them. Transcripts of actor-system dialogues and qualitative feedback are included in supplementary material.
As described in Sec. 2.1, this experiment used the Books conversation model and the DeepMoji universe model. Following the interactions, each performer was asked the following question: “please rank the conversations from 1 (most engaging) to (least engaging)”. Engagingness was defined to align with the notions of reaveling and concealing in this work. An agent is engaging for shared scene development if it brings just enough information to add specificity and reduce ambiguity but not limit the conversation.
Three of the four performers ranked the revealing model, , as the most engaging. Those three performers ranked as being less engaging due to being “too random”. All subjects ranked as being least engaging and not bringing enough information to the scene. These results support the hypothesis that can effectively modulate the engagingness of collaborative dialogue in human-machine interaction.
4 Related Work
Collaborative dialogue between humans and machines has been proposed as a grand challenge in artificial intelligence(Mathewson & Mirowski, 2017b; Martin et al., 2016; Brown, 2008)
. Previous methods have used hard coded rules, decision trees, and event representations to generate novel narrative chains(Martin et al., 2017). We used an deep neural network-based generative language model enhanced with universe model information in the context of improvised theatre (Mathewson & Mirowski, 2017a).
While neural response generation systems provide a trainable end-to-end system for language generation, these methods are prone to providing generic, unspecific responses (Li et al., 2015). Recent advances have improved generated responses by optimizing sentence encoding and decoding jointly, post-generation candidate re-scoring (Bordes et al., 2016; Vinyals & Le, 2015; Sordoni et al., 2015)2016), hierarchical models for distilling extended context (Serban et al., 2016), and auxiliary training objectives, such as maximizing mutual information (Li et al., 2015), and personality specificity and consistency (Li et al., 2016; Zhang et al., 2018). In future work, universe models and conversational models could be trained jointly.
Our work is related to the controlled generation of text using disentangled latent representations (Hu et al., 2017; Zhou et al., 2017; Asghar et al., 2018). Previous work has used a topic-transition generative adversarial network to enforce smoothness of transition of subsequent utterances (Liang et al., 2017). These methods use neural encoder-decoders and generate responses given an input sequence and a desired target class for the response.
Other, recent work has aimed to improve candidates returned by retrieval-based conversation models (Weston et al., 2018). These methods utilize a conversation model to find similar prototypes using embedding distances and refine prototypes with a sequence-to-sequence model (Guu et al., 2017). We do not refine candidates from the conversation model, rather we sample and select using a scoring function defined by the revealing and concealing parameter.
Similar to universe models, topic models or lexical fields have been shown capable of tracking general subjects of a text (Blei et al., 2003; Geeraerts, 2010). Dynamic topic models characterize the evolution of topics over a set of documents over time (Blei & Lafferty, 2006). Our work differs in that we generate dialogue using the evolving probabilistic belief during a single conversation, as opposed to tracking topical shifts over longer timescales. Using a probabilistic classifier for narrative tracking has been explored previously (Mohammad, 2011; Reagan et al., 2016). These works used sentiment classifiers to track emotion and plots arcs through narratives. We extend these works by using probabilistic universe models collaborative dialogue generation.
5 Discussion and Conclusion
While innovations have improved the linguistic quality, semantic alignment, and consistency of utterances generated by neural models, generated conversations still lack interestingness and engagingness. Our work generates engaging dialogue by shaping the underlying narrative arc as opposed to improving the training of generative language models. The methods presented are agnostic to both the universe and the conversational model used. Using rules from improvised theatre, we quantitatively define the evolution of interesting and engaging dialogue.
In this work we focus on genre, emoji, and topic-based universe models. Other universe models to be explored involve causality of events, directions of relationships, or audience reaction prediction (Riedl & Young, 2006; Knight et al., 2011; Trabasso & Sperry, 1985; Cook, 1928; Eger et al., 2015). While this work explores the interaction between a base conversation model and a universe model, this method could be compatible with image or video generation.
The main contribution of this work is the computational formalization of the narrative arc, an information-theoretic framework for collaborative dialogue interaction. The framework fills a gap in previous research by connecting the utterance-level improvements of language models with the conversation-level improvements of universe tracking. This is done by sampling candidates from a conversational model using a universe model and the narrative arc. We illustrate narrative arcs underlying popular dialogues and show how universe models can be combined with conversation models to generate interesting dialogue. We present empirical results showing how the narrative arc can improve accuracy on a next line prediction task. Finally, we present an expert user-study to validate our model.
- Asghar et al. (2018) Asghar, N., Poupart, P., Hoey, J., Jiang, X., and Mou, L. Affective neural response generation. In Eur. Conference on Information Retrieval, pp. 154–166. Springer, 2018.
- Bickmore & Giorgino (2006) Bickmore, T. and Giorgino, T. Health dialog systems for patients and consumers. J. Biomedical Informatics, 39(5):556 – 571, 2006. ISSN 1532-0464. Dialog Systems for Health Communications.
- Bishop (2006) Bishop, C. M. Pattern Recognition and Machine Learning. Springer, New York, 2006.
- Bizzocchi (2007) Bizzocchi, J. Games and narrative: An analytical framework. Loading-The Journal of the Canadian Games Studies Association, 1(1):5–10, 2007.
- Blei & Lafferty (2006) Blei, D. M. and Lafferty, J. D. Dynamic topic models. In Proc. of the 23rd Intl. Conf. on Machine learning, pp. 113–120. ACM, 2006.
- Blei et al. (2003) Blei, D. M., Ng, A. Y., and Jordan, M. I. Latent dirichlet allocation. J. of Machine Learning Research, 3(Jan):993–1022, 2003.
- Bordes et al. (2016) Bordes, A., Boureau, Y.-L., and Weston, J. Learning end-to-end goal-oriented dialog. arXiv preprint arXiv:1605.07683, 2016.
- Brown (2008) Brown, K. The auslander test: or,‘of bots and humans’. Intl. J. Performance Arts and Digital Media, 4(2-3):181–188, 2008.
- Cer et al. (2018) Cer, D., Yang, Y., Kong, S.-y., Hua, N., Limtiaco, N., John, R. S., Constant, N., Guajardo-Cespedes, M., Yuan, S., Tar, C., et al. Universal sentence encoder. arXiv preprint arXiv:1803.11175, 2018.
- Cesa-Bianchi & Lugosi (2006) Cesa-Bianchi, N. and Lugosi, G. Prediction, Learning, and Games. Cambridge University Press, New York, NY, USA, 2006.
- Cook (1928) Cook, W. W. Plotto: a new method of plot suggestion for writers of creative fiction. Ellis., 1928.
- Eger et al. (2015) Eger, M., Potts, C. M., Barot, C., and Young, R. M. Plotter: operationalizing the master book of all plots. Proceedings of the Intelligent Narrative Technologies and Social Believability in Games, pp. 30–33, 2015.
- Felbo et al. (2017) Felbo, B., Mislove, A., Søgaard, A., Rahwan, I., and Lehmann, S. Using millions of emoji occurrences to learn any-domain representations for detecting sentiment, emotion and sarcasm. ArXiv e-prints, August 2017.
- Fitzpatrick et al. (2017) Fitzpatrick, K. K., Darcy, A., and Vierhile, M. Delivering cognitive behavior therapy to young adults with symptoms of depression and anxiety using a fully automated conversational agent (woebot): A randomized controlled trial. JMIR Ment Health, 4(2):e19, Jun 2017.
- Geeraerts (2010) Geeraerts, D. Theories of lexical semantics. Oxford University Press, 2010.
- Graves (2013) Graves, A. Generating sequences with recurrent neural networks. arXiv preprint arXiv:1308.0850, 2013.
- Guu et al. (2017) Guu, K., Hashimoto, T. B., Oren, Y., and Liang, P. Generating sentences by editing prototypes. arXiv preprint arXiv:1709.08878, 2017.
- Hoang (2018) Hoang, Q. Predicting movie genres based on plot summaries. arXiv preprint arXiv:1801.04813, 2018.
- Hu et al. (2017) Hu, Z., Yang, Z., Liang, X., Salakhutdinov, R., and Xing, E. P. Toward controlled generation of text. In Intl. Conf. on Machine Learning, pp. 1587–1596, 2017.
- Joachims (1996) Joachims, T. A probabilistic analysis of the rocchio algorithm with tfidf for text categorization. Technical report, CMU, 1996.
- Johnstone (1979) Johnstone, K. Impro: Improvisation and the Theatre. Faber and Faber Ltd., 1979.
- Knight et al. (2011) Knight, H., Satkin, S., Ramakrishna, V., and Divvala, S. A savvy robot standup comic: Online learning through audience tracking. In Workshop paper (TEI’10), 2011.
- Kripke (1963) Kripke, S. A. Semantical analysis of modal logic i normal modal propositional calculi. Mathematical Logic Quarterly, 9(5-6):67–96, 1963.
- Li et al. (2015) Li, J., Galley, M., Brockett, C., Gao, J., and Dolan, B. A diversity-promoting objective function for neural conversation models. CoRR, abs/1510.03055, 2015.
- Li et al. (2016) Li, J., Galley, M., Brockett, C., Spithourakis, G. P., Gao, J., and Dolan, B. A persona-based neural conversation model. arXiv preprint arXiv:1603.06155, 2016.
- Li et al. (2016) Li, J., Monroe, W., Ritter, A., Galley, M., Gao, J., and Jurafsky, D. Deep Reinforcement Learning for Dialogue Generation. ArXiv e-prints, June 2016.
- Liang et al. (2017) Liang, X., Hu, Z., Zhang, H., Gan, C., and Xing, E. P. Recurrent topic-transition gan for visual paragraph generation. CoRR, abs/1703.07022, 2, 2017.
- Lison et al. (2018) Lison, P., Tiedemann, J., and Kouylekov, M. Opensubtitles 2018: Statistical rescoring of sentence alignments in large, noisy parallel corpora. In Proc. 11e LREC 2018, Miyazaki, Japan., 2018.
- Liu et al. (2018) Liu, P. J., Saleh, M., Pot, E., Goodrich, B., Sepassi, R., Kaiser, L., and Shazeer, N. Generating wikipedia by summarizing long sequences. arXiv preprint arXiv:1801.10198, 2018.
- Martin et al. (2016) Martin, L. J., Harrison, B., and Riedl, M. O. Improvisational computational storytelling in open worlds. In Intl. Conf. on Interactive Digital Storytelling, pp. 73–84. Springer, 2016.
- Martin et al. (2017) Martin, L. J., Ammanabrolu, P., Wang, X., Singh, S., Harrison, B., Dhuliawala, M., Tambwekar, P., Mehta, A. A., Arora, R., Dass, N., Purdy, C., and Riedl, M. O. Improvisational storytelling agents. In Proc. of the Machine Learning for Creativity and Design Workshop at NIPS 2017, 2017.
- Mathewson & Mirowski (2017a) Mathewson, K. W. and Mirowski, P. Improvised theatre alongside artificial intelligences. In AAAI AIIDE, 2017a.
- Mathewson & Mirowski (2017b) Mathewson, K. W. and Mirowski, P. Improvised comedy as a turing test. In Proc. of the Machine Learning for Creativity and Design Workshop at NIPS 2017, 2017b.
- McLeod (2000) McLeod, C. The use of Keith Johnstone’s concepts of Circles of Expectation and Vogler’s generic story structure as directorial aids in comedy theatre. PhD thesis, University of Cape Town, 2000.
- Miner et al. (2017) Miner, A., Milstein, A., and Hancock, J. Talking to machines about personal mental health problems. JAMA, 318(13):1217–1218, 2017.
- Mohammad (2011) Mohammad, S. From once upon a time to happily ever after: Tracking emotions in novels and fairy tales. In Proc. of the 5th ACL-HLT Workshop on Language Technology for Cultural Heritage, Social Sciences, and Humanities, pp. 105–114. ACL, 2011.
- Murphy (2012) Murphy, K. P. Machine Learning: A Probabilistic Perspective. The MIT Press, 2012.
- Nikitina et al. (2018) Nikitina, S., Callaioli, S., and Baez, M. Smart conversational agents for reminiscence. arXiv preprint arXiv:1804.06550, 2018.
- Raby (2010) Raby, G. Improvisation and devising: The circle of expectation, the invisible hand, and rsvp. Canadian Theatre Review, 143(1):94–97, 2010.
Reagan et al. (2016)
Reagan, A. J., Mitchell, L., Kiley, D., Danforth, C. M., and Dodds, P. S.
The emotional arcs of stories are dominated by six basic shapes.
EPJ Data Science, 5(1):31, 2016.
Riedl & Young (2006)
Riedl, M. O. and Young, R. M.
From linear story generation to branching story graphs.IEEE Computer Graphics and Applications, 26(3):23–31, 2006.
- Salton & Buckley (1988) Salton, G. and Buckley, C. Term-weighting approaches in automatic text retrieval. Information processing & management, 24(5):513–523, 1988.
- Sawyer (2003) Sawyer, R. K. Improvised dialogues: Emergence and creativity in conversation. Greenwood Publishing Group, 2003.
- Sennrich et al. (2015) Sennrich, R., Haddow, B., and Birch, A. Neural machine translation of rare words with subword units. arXiv preprint arXiv:1508.07909, 2015.
- Serban et al. (2016) Serban, I. V., Sordoni, A., Bengio, Y., Courville, A., and Pineau, J. Building end-to-end dialogue systems using generative hierarchical neural network models. In Proc. AAAI, AAAI’16, pp. 3776–3783. AAAI Press, 2016.
- Shannon (1951) Shannon, C. E. Prediction and entropy of printed english. Bell Labs Tech. J., 30(1):50–64, 1951.
- Sordoni et al. (2015) Sordoni, A., Galley, M., Auli, M., Brockett, C., Ji, Y., Mitchell, M., Nie, J.-Y., Gao, J., and Dolan, B. A neural network approach to context-sensitive generation of conversational responses. arXiv preprint arXiv:1506.06714, 2015.
- Swain (2000) Swain, M. The output hypothesis and beyond: Mediating acquisition through collaborative dialogue. Sociocultural Theory and Second Language Learning, 97:114, 2000.
- Trabasso & Sperry (1985) Trabasso, T. and Sperry, L. L. Causal relatedness and importance of story events. Journal of Memory and language, 24(5):595, 1985.
- Vaswani et al. (2017) Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., and Polosukhin, I. Attention is all you need. CoRR, abs/1706.03762, 2017.
- Venkatesh et al. (2018) Venkatesh, A., Khatri, C., Ram, A., Guo, F., Gabriel, R., Nagar, A., Prasad, R., Cheng, M., Hedayatnia, B., Metallinou, A., Goel, R., Yang, S., and Raju, A. On evaluating and comparing conversational agents. arXiv preprint arXiv:1801.03625, 2018.
- Vinyals & Le (2015) Vinyals, O. and Le, Q. A neural conversational model. arXiv preprint arXiv:1506.05869, 2015.
- Weizenbaum (1966) Weizenbaum, J. Eliza: a computer program for the study of natural language communication between man and machine. Comm. of the ACM, 9(1):36–45, 1966.
- Weston et al. (2018) Weston, J., Dinan, E., and Miller, A. H. Retrieve and refine: Improved sequence generation models for dialogue. arXiv preprint arXiv:1808.04776, 2018.
- Zhang et al. (2018) Zhang, S., Dinan, E., Urbanek, J., Szlam, A., Kiela, D., and Weston, J. Personalizing dialogue agents: I have a dog, do you have pets too? CoRR, abs/1801.07243, 2018.
- Zhou et al. (2017) Zhou, H., Huang, M., Zhang, T., Zhu, X., and Liu, B. Emotional chatting machine: emotional conversation generation with internal and external memory. arXiv preprint arXiv:1704.01074, 2017.
6 Supplementary Material
Appendix A Data Processing Details
OpenSubtitles were used as conversation model data.444http://opus.nlpl.eu/OpenSubtitles.php. The dataset was preprocessed by removing duplicate movie subtitle files, lines under 10 characters and duplicate lines, resulting in 68,719,885 unique lines. The text2text Transformer model from Google’s open source implementation was used for training.555https://github.com/tensorflow/tensor2tensor OpenSubtitles were used as training data.666http://opus.nlpl.eu/OpenSubtitles.php As several files in the dataset cover the same uniquely identified movie or television show duplicates were removed by keeping only the subtitle file with the most lines for each unique ID. The dataset was split into into training IDs, validation IDs, and testing IDs. The data was prepared for training by removing empty lines, duplicate lines, and substituting non-Unicode characters. A vocabulary was built using the training set. After cleaning, subtitle files with less than lines were excluded. Training data was formatted into input/response pairs. The training data was split into training examples and
evaluation examples. Validation and testing subtitle sets were held out to measure task accuracy on unseen data. The hyperparameters of the Transformer model were set as follows: hidden size of, filter size of , batch size of , heads, and a dropout factor of was used for regularization. The model was trained for steps, to convergence, with final negative log-perplexity of on evaluation set.
Appendix B Rejection Sampling
Rejection sampling is a means of online sampling that allows for sampling from an unknown distribution. Suppose we are given an unnormalized distribution over which we can query (i.e. ) but not necessarily integrate over. Let be a proper distribution over such that is dominated by , :
The Rejection sampling algorithm to obtain a sample from an unnormalized distribution using samples from a proper distribution proceeds as follows:
Sample and sample ,
If , accept as a sample drawn from , otherwise reject the sample and go to 1.
This algorithm will take an average of iterations to obtain a sample. Let be the random element returned by this procedure.
Rejection sampling samples with probability
Write for the sequence of sampled symbols, and write to denote the event that the symbol is accepted (at which point we stop the process). Then
Now, this process is memoryless (in a sense we should make a little more formal) and
Since , the geometric sum converges and
which is the conditional probability of given . Now
where we used (4) to guarantee that . But then
We conclude that
as desired. ∎
Appendix C Additional Narrative Arcs Underlying Existing Dialogues
We present an additional set of narrative arcs underlying 20-utterance scenes in Figure 2 and discussed in Section 3.1. In the paper body we report results on the Romeo and Juliet scene.
“Argument Clinic” Monty Python’s Flying Circus, Episode 29 (1972). First 20 lines.
“Blade Runner” Hampton Fancher and David People. Adapted from a novel Philip K. Dick (1982). Last 20 lines of director’s cut movie script.
“The Great Dictator” Charlie Chaplin. Los Angeles, CA: United Artists (1940). First 20 lines of Charlie Chaplin’s speech.
“Dead Parrot Sketch” Monty Python’s Flying Circus, Episode 8 (1969). First 20 lines.
“Romeo and Juliet” William Shakespeare. Vol. 1. JB Lippincott, (1871). Act 1, Scene 1, first 20 lines.
Appendix D Expert Improvisor Conversation Transcripts
d.1 Subject1, Mode: Conceal
HumanGood morning dad, is breakfast ready? SystemBreakfast is ready. HumanGreat! What are we having? SystemWe are having Lamb Chops and peas for dinner. HumanYummmm. But what are we having for breakfast? Systemsome breakfast. HumanOk, thanks dad. I have a big ball game later, I would love if you and mom came to watch. SystemLikewise, Dad will fire up the chainsaw and be ready to cut through the big limbs at the joints as you work. HumanSo I guess you’re not coming to the game. You work too much to be good father. SystemI’m doing the best I can as a father, and I hope that’s good enough. HumanIt’s not. I’m moving out unless you change. SystemIf you will leave me to it, I will pack up my things and move out as quickly as I can so as not to inconvenience you.
d.2 Subject1, Mode: Neutral
HumanRosanne, thanks for meeting me under the oak tree SystemKeryn would also like to thank her cousins, Dana, Jason, Staci, and Ryan, and her aunt Marge Naegele for continually supporting her decisions even when they thought she was crazy. HumanIt means the world that you all came to meet here today as we prepare for another one of my crazy ideas SystemWe shall all be here at four o’clock. HumanWho else is coming? SystemA lot of people are coming. HumanHow many? SystemHow many and where? HumanWe need at least 200 here at the oak tree SystemGonna need at least three or four hundred. HumanYou’re right. How fast can they get here? Systemhowever fast they are travelling. HumanWell I can’t argue there. Prepare the tamborines. We all need tamborines for my crazy idea. SystemBut we’re depositing the money—you’ll need a chequebook.
d.3 Subject1, Mode: Reveal
HumanWelcome to tim hortons, what can I get you? SystemI’ll give you doughnuts and coffee with milk. HumanGreat work Jason, you’re doing great on your first day on the job SystemFirst day Welcome the employee! HumanThat’s right Jason. You’re very welcome here. If you do a good job, you’ll be a manager in no time. SystemBeing responsible and knowledgeable is possible in a participative environment if the manager is a member of the overall team. HumanWow. Jason you continue to surprise me. Where did you learn that? System“The next time I go up I’ll get the information for you,” Jason told him. HumanJason? Are you ok? SystemJASON: I’m glad you’re feeling better. HumanYou’re starting to scare me SystemAnd I frighten you.
d.4 Subject2, Mode: Conceal
HumanStacey! How are you? I’m excited that we’re getting our nails done for Sams wedding tomorrow! SystemI have to tell you I’m so excited for you! HumanThank you! Maid of Honour is a real honour! Did you remember to get them a gift? SystemI am so, so glad you’re my maid of honor. HumanAnd? SystemAbout what? HumanDid you remember to get your parents a gift? They are hosting your wedding after all. SystemOtherwise, plan to give them their gifts at the rehearsal dinner. HumanOh that’s a good idea! Hopefully they won’t need it earlier. SystemThey also need it in time so they can get it in the fridge to chill.
d.5 Subject2, Mode: Neutral
HumanGood Morning! I was wondering if you had any butcher knives for sale? SystemI had an extra one, roast carving size, sent me by the then president of Macy’s last summer, but when Mr. Case sent me two of his sets I gave this odd knife to my part-time cook. HumanWow! May I see it? I’m getting a… gift… for my boyfriend. SystemI sent it to you because you are now a man and it’s time for you to look at the future and fulfill the promise I gave to you in the desert—that I’d see you married.” HumanWhy would I want to make you happy? We haven’t spoken in years! SystemBecause I saw how kind your heart was? HumanI have missed you. I don’t know if I have what it takes. Am I ready to commit? Am I ready to take care of someone other than myself? SystemI am ready, willing, and worthy to speak with you right here and right now. HumanWill you teach me the butcher ways. So that I may follow in your steps? SystemI do it the easy way: I ask the butcher to score it; his knives are better than mine, for a start.
d.6 Subject2, Mode: Reveal
HumanCrikey Mate! Did you put the shrimp on the barby yet? SystemWe started the shrimp over a hot fire, then finished them over low heat to allow them to cook through gently. HumanWell that sounds delicious! We need to impress the Boss tonight! Did Karen make her cheese dip too? I can’t get enough of that! SystemShe makes some and we sit at the table again. HumanSounds great Greg! Listen, I really appreciate you hosting this party, and I hope you’re not too upset that I got the promotion over you. System(11) If Greg came to the party, all hell would break loose. HumanYeah I can’t stand that guy. Why have two Gregs in the office! You are all we need, am I right? SystemHe’s replacing Laura as our new office (assistant). HumanSounds like a plan. Well thanks again. Maybe next month you’ll get the promotion! SystemAnd you may depend on me to know my place if you get promoted.
d.7 Subject3, Mode: Conceal
HumanPhew! Good run today Meredith. SystemMeredith felt guilty even thinking it, but yesterday had been a good day. HumanYesterday was such a good day that Meredith never wanted it to end. SystemNow she really needed Meredith to go away. HumanShe needed to go somewhere new, somewhere for a fresh start. “I’m moving to Brazil!” She shouted. SystemAva made a lastminute decision to return to America by way of Spain, fitting in another visit to Madrid, taking a few days to see some of her new friends and acquaintances in that city of which she had grown so fond. HumanSee Ava and Meredith had always wanted to travel together, and this could be there last chance, before they were married and settled down. SystemDuring the summer of 1957, when Lorenzo Jr. was fourteen and Rani Meredith was nine, the family embarked on a rare train trip to visit relatives in Atlantic City, Philadelphia, New York, and New Bedford, Massachusetts. HumanThat was the last time the two friends had been close, so a trip was long overdue. SystemThe trip to Dinard was ‘a good opportunity for ending the fatal friendship that had sprung up between us, and ending it without bitterness’.
d.8 Subject3, Mode: Neutral
HumanTell me where the gold is! You can’t lie anymore. SystemGold was found in the bed of the Pactolus. HumanAh so you admit it. You stole from King Pactolus. SystemI didn’t admit it but I didn’t deny it. HumanIs there a difference? Once a thief, always a thief. SystemThe same is a thief and a robber.—The former of these words means the petty thief who commits the smaller or unobserved robbery. HumanBut your robbery was observed. You decided to steal from a royal. Something that will cost you dearly. SystemYet I desired to commit robbery, and did it. HumanSo you are a free man. And you shall die a free man. SystemYou are already free! the
d.9 Subject3, Mode: Reveal
HumanOh no! Mom is gonna be home soon! SystemAnd now you can’t come home. HumanPlease, just let me inside! It’s getting colder out here! SystemWe’ll go inside now. HumanOkay thank you! jeez, you’re a crazy older brother. SystemSometimes being a brother can mean you get mixed up in a bit of all of this. HumanYeah totally. At least we can be ready for bed now before mom gets back. SystemDo remember mother’s coming in the middle of the day, and she’s much more likely to be early than late. HumanExactly! That’s why I’m worried, let’s hurry! SystemHurry up then!
d.10 Subject4, Mode: Conceal
HumanMaster, I did not mean to disturb you but your estranged brother has unfortunately passed away. SystemYou did not mean any harm, and I owe you no grudge. HumanThank you, Master. I have brought you your three favourite things to cheer you up on this sad occasion: chocolate, red wine and a copy of this month’s Teen Vogue. SystemI am so very glad, as I do not know how I could have endured the thought of you & Edward enjoying Oxford life & myself cut off from it all for another year. HumanWithout you, Master, I don’t believe I could enjoy anything in this world. You have done so much for Edward and I; we can’t thank you enough. Because of this, we will forever be in your debt. SystemI thank you for accepting it; and I believe that I may safely promise that you will find the contents of the smaller packet of great importance and advantage to yourself and those dear to you. HumanI will open this small gift from you in front of you so that you may see my reaction. Good Master! This necklace is beautiful. Are you sure you wish to give this gift to me on the day of your brother’s passing? I am but a lowly servant. SystemThank you, Lord, that You can use our marriage to call out our unique gifts and abilities. HumanThe Good Lord has graced us with his blessing on this day. And you have blessed Edward and I will your compassion and grace. Before I depart, is there anything else you require, Master? SystemThou thought’st to help me, and such thanks I give As one near death to those that wish him live.
d.11 Subject4, Mode: Neutral
HumanListen here, Karen- y’all don’t come into my bar and tell me what the heck to put on my menu. ya hear? SystemI’m not thrilled about our menu, but I don’t want to hurt Thom’s feelings. HumanThom is supposed to be a professional. A pro-fess-ion-al. He has to take that dang feedback and take it with a smile on his face. Just like you do about the decor. SystemA long day of sessions produced little that Thom was happy with; his dissatisfaction can clearly be seen in the studio sequence that appeared in Meeting People Is Easy, as he complains to Nigel Godrich that they’ve been working for ages and still only two instruments—bass and one guitar—sound passable. HumanThom’s bar was designed to feature bands from across the nation, but working with Nigel made it difficult to play in a band and run a bar. SystemThe amount of travel created logistical problems, as the distance between venues had not been considered when scheduling each performance. HumanBands were consistently arriving late to perform or leaving their sets early. And to top it all off, the food catered to the bands from the bar left something to be desired. SystemA step up, the Kaiserkellar had a dance floor, a better PA, and another band on the bill to take some of the weight; although, because they had to start earlier and finish later, they ended up playing for six hours most nights. HumanAnd six hours was much too long for such an amateur band and tempers were runnning high. Nigel, Thom and Karen just couldn’t seem to get along. SystemIndeed, they continued to work astonishingly hard as a live band - but now on a truly international scale.
d.12 Subject4, Mode: Reveal
HumanDanielle, Kyle asked me to the prom but I can’t afford a dress. SystemIf you dress her in her new “Prom Pinks” outfit, satin splendor with matching coat, gold belt, clutch, and hair bow included, so long as you don’t lift her dress, right?—who’s to know. HumanYou’re absolutely right! We can borrow from my sister’s closet and no one will know it’s hers unless they see her name tag under the dress. SystemAnd when she finds it, she’ll hide the stuff even better. HumanWe need to be sneaky about it. We could use a bed sheet and hang it on the hangers and she’ll never know. Let’s do it! You grab the bedsheets and I’ll grab the dress. SystemThe pinch of the question is—why, after having provided the substitute dress, does she hide the smeared night-gown, instead of destroying it? HumanShe’s embarassed! Kyle asked me to the prom instead of her after their date went horribly wrong. She dropped ketchup all over herself. SystemShe thought that maybe she should just cancel the date and forget about the Junior Prom altogether. HumanShe should have but she didn’t. Plus, Kyle is the Captain of the Chess club. He’s the smartest guy around- I couldn’t say no. Was I wrong to do that? SystemKyle would have lost out on the opportunity to get to know someone who could be a mentor or valuable resource.
Appendix E Expert Improvisor Qualitative Assessment
Qualitative assessment as shared in free form discussion with expert improvisors during and following the experimental conversations. Words in [brackets] were implied in the conversation. When comments made were directly addressing a model’s alpha setting, that models alpha parameter is included in (bold).
e.1 Subject/Model Specific Comments/Assessment
(Subject1, Mode: Reveal): The system brought context to the scene.
(Subject1, Mode: Neutral): The system was comically literal.
(Subject1, Mode: Conceal): This setting was reactive though felt flip-floppy.
(Subject2, Mode: Reveal): It is making more sense this time, seems to make more sense deeper in conversation when it has more context.
(Subject2, Mode: Conceal): The system is making assumptions and while there is a chance for conflict it prefers to answer questions vaguely than admit guilt.
(Subject3, Mode: Neutral): This is a cool conversation, like it wanted to guide the conversation.
(Subject4, Mode: Reveal)): I am most impressed when it makes big choices that feel ‘right’.
(Subject4, Mode: Reveal): The system is good at picking a specific thing and running with it.
(Subject4, Mode: Neutral): felt like I was improvising with an improvisor who had their own ideas and doesn’t want to accomodate or listen.
(Subject4, Mode: Conceal): I loved the attention to detail.
e.2 General Interaction Comments/Assessment
When I gave things that were specific, it would give me specifics back. It gives you as much as you put in. It is as though you are improvising with yourself.
Sometimes there is too much information in the longer offers.
It responds and makes offers but they seldom have ‘conflict’, interesting but not ‘heightening’.
It is very comfortable narrating.
It doesn’t have memory, so it feels like I am following the scene.
It has adopted my style of speaking, and my linguistic choices.
It seems to enjoy providing names and backstory.
It doesn’t know the details I am not providing, it doesn’t know the details I am implying.
The offers that the system gives can further the scene.
It felt workshoppy, like a good improv tool to practice improv for new improvisors.
Sometimes it becomes a narrator, these moments are less fun for me as an improvisor.
I don’t know if the system knows how long I want the scene to be.
Speed helps in the system because then you are not judging it.
The system is not distracted by cheap laughs and references, it stays focused on the topic, it makes you do good improvisation.