Elamur Research

Chat Detection in an Intelligent Assistant: Combining Task-oriented and Non-task-oriented Spoken Dialogue Systems

Paper · 2017 · Satoshi Akasaki and Nobuhiro Kaji

Summary

A voice assistant needs to decide what kind of response a person expects before it can choose how to respond. A question about the assistant’s feelings calls for conversation. A question about the weather calls for information. Both arrive as ordinary spoken language, and a remark about being hungry could plausibly lead in either direction. Akasaki and Kaji call this decision chat detection. They study it as a text classification problem in which the input is the text produced by speech recognition and the output is a choice between chat and non-chat. In a hybrid dialogue system, that choice can help determine whether a conversational component should handle the utterance.

The authors build a benchmark from 15, 160 distinct Japanese utterances recorded in the logs of Yahoo! Voice Assist. They sample across frequency groups so that the benchmark includes uncommon wording as well as familiar requests and greetings. Crowd workers label each utterance, and the majority vote supplies the reference answer. The resulting dataset contains 4, 833 chat utterances and 10, 327 non-chat utterances. An examination of the chat examples finds personal disclosures, questions addressed to the assistant, invitations, and insults. The variety matters because a detector trained on recognizable formulas for small talk still has to handle comments on subjects the designers could scarcely enumerate in advance.

The paper compares a support vector machine, which learns from features such as short character and word sequences, with a convolutional neural network, which learns to recognize useful local patterns in the text. Both can draw on word embeddings learned from the assistant logs. The authors then add evidence from outside the assistant. They estimate how closely an utterance resembles tweets that received replies and how closely it resembles web search queries. A separate feature records whether the utterance occurs in the search log. The detector learns how to combine those signals with the wording of labeled examples from the assistant.

The strongest support vector machine reaches 92.15 overall accuracy and 87.53 F1 for chat in cross-validation. The corresponding system with word embeddings and without the external features reaches 86.21 chat F1. The external features also improve the network with pretrained embeddings. The clearest errors occur where people disagree about the label. The best detector reaches 98.33 accuracy on utterances with unanimous votes and 66.67 on utterances with the narrowest majority. The results show that unlabeled text from other settings can help with the routing decision and that some of its hardest cases arise when the words leave the speaker’s purpose open.

Deep dive: Chat Detection in an Intelligent Assistant: Combining Task-oriented and Non-task-oriented Spoken Dialogue Systems

Akasaki and Kaji test how a voice assistant can tell small talk from requests, using labeled Japanese utterances, tweets, and web searches. · about 35 minutes to read

The problem and its context

The decision a hybrid assistant has to make

The paper begins with a difference in what people expect from spoken interfaces. A system built around tasks can offer a useful service by finding information or operating a device. A chatbot can offer a worthwhile exchange even when the user has no separate task in mind. The difference is easy to see when a person plainly asks for an alarm or invites the assistant to talk. A hybrid assistant supports both uses through the same interface. Each new utterance presents a small decision about which capability the person is trying to use.

For an assistant that can perform several tasks, there are often several decisions to make. A request may need to be sent to the component responsible for the weather, web search, or device settings. Once it reaches a component, the system may need further details before it can do anything. An alarm request, for instance, needs a time. Chat detection addresses the question of whether the utterance belongs with the conversational component at all. The study evaluates that choice on its own. Its negative category covers a range of possible next actions, all of which count as non-chat for this experiment.

The distinction depends on the purpose of an utterance as well as its grammatical form. Someone can ask the assistant a question about itself or ask for the name of a tall building. Both look like questions, yet the first may start a social exchange and the second seeks a fact. A command can have either function too. Changing the screen brightness is a device operation. Asking the assistant to cheer someone up is also phrased as a request, but it belongs to the conversational side of the benchmark. Useful cues may therefore be more specific than whether there is a question, a command, or a complete sentence.

The hard cases also make clear why a literal inventory of the services the assistant supports would be incomplete as a description of the problem. A person can express discomfort or mention a personal circumstance without specifying what they expect the assistant to do. The same statement could be an opening for an exchange, an indirect request for information, or a contribution whose purpose becomes apparent only after another turn. The paper turns this broader problem into one that can be measured by asking annotators for a binary judgment on each utterance. That produces a usable target for classification while leaving the underlying ambiguity visible in the votes.

How earlier dialogue research divided the work

The authors describe task-oriented dialogue and open-ended conversation as traditions with different starting assumptions. When researchers build a service for a specific task, they can generally presume that people speak to it to get that task done. When they build a system for open-ended conversation, they can generally presume that an incoming utterance deserves a conversational reply. Those assumptions make good sense for the systems they describe. The need for a separate detector becomes apparent when both kinds of behavior are available through a single assistant.

Earlier proposals had already considered ways to put the capabilities together. In one approach discussed by the paper, a conversational system could serve as a fallback for a task system. A fallback is a way to keep the exchange going when the main route cannot produce an adequate response. It leaves a practical question about how to recognize the circumstances in which it should be used. The fallback study cited by the authors explored the arrangement and left automatic switching unspecified. A separate line of work used an example-based dialogue manager to combine the capabilities. The authors saw that arrangement as a less flexible place to insert a separately trained classifier.

The paper also describes integration frameworks that take a chat detector as one of their available parts. Their problem is how to coordinate the parts of a multi-domain assistant once those parts exist. Akasaki and Kaji work at a different level of detail. By giving utterances explicit labels and comparing classifiers against them, they investigate how to build a component whose output such a framework could use. This distinction defines the scope of the experiment. A detector can succeed at predicting the label even when the full assistant still needs a policy for what to do with the prediction.

Within task-oriented research, intent determination and domain determination are the closest comparisons. The paper uses intent determination for the relatively specific information a person wants within a service, such as a kind of information available in an airline travel system. Domain determination selects the relevant service in an assistant that handles several domains. These decisions can occur in sequence. A system may select a domain and then identify the more specific intention within it. That way of structuring the decision helps explain why chat detection could formally be treated as a special case of domain selection.

The authors still give the chat category separate attention because it covers conversation across an open range of topics. A weather domain can be characterized by the information and operations its service is equipped to handle. A conversational route receives turns about the user, turns about the assistant, social formulas, and miscellaneous remarks. The procedure after routing can also differ. Task-oriented systems can select an action and fill its slots, the fields needed to specify it. An open-ended response generator of the kind the authors discuss can instead take the utterance as its input for generating or retrieving a reply. One example in their discussion is the encoder-to-decoder approach of Sequence to Sequence Learning with Neural Networks.

The authors also distinguish their aim from earlier studies of intelligent assistants as products people use. That research had considered whether people were satisfied with a response, whether they would keep using an assistant, and how game-like activities might affect their interaction. Some papers used assistant utterances to study selection among task domains. These are questions about the same general setting, but they lead to different evidence. A study of satisfaction, for instance, tries to infer a reaction to the experience. The detector in this paper tries to infer from an incoming utterance what kind of response the person may be seeking.

How conversational data fits into the question

Work on open-ended conversation had moved from handcrafted rules towards methods that learned from examples. The paper points to a system that adapted phrase-based machine translation to produce replies and to subsequent work that used a neural sequence-to-sequence approach. The relevant precedent is the use of conversational exchanges as data. If a collection contains a post and its reply, it can supply examples of how a response follows an utterance. Such training makes sense when conversational intent is already assumed. The paper discusses these precedents through Data-Driven Response Generation in Social Media and A Neural Conversational Model.

Another use of tweets was to discover recurring dialogue acts without labeling every example. A dialogue act characterizes the role a contribution plays in a conversation, such as greeting, thanking, or offering information. Finding these roles from conversational data asks what people do within an exchange. The authors draw on the existence of that research while making a different use of tweets. They ask whether text from that setting can help distinguish conversation from other uses of a voice assistant. The earlier work they cite includes Unsupervised Modeling of Twitter Conversations.

This choice connects the research problem to a practical constraint on data collection. People readily produce examples of common assistant requests, but open conversation offers many ways to say something that has the same broad purpose. More labeled examples can help, yet each annotation requires someone to interpret an utterance. Tweets and search queries already exist in abundance. Their source offers a clue about how they were used, even though it supplies no definitive chat label for an assistant utterance. The paper’s design is to learn from that clue and let the labeled assistant data determine how much weight it deserves.

The method, step by step

Building a benchmark from recognized speech

The input is the text that Yahoo! Voice Assist obtained through automatic speech recognition. A benchmark example is thus a recognized utterance as it appeared in the assistant’s log. This detail puts the experiment at the interface between recognition and dialogue handling. The text may be exactly what a user intended to say, or it may reflect what the recognizer heard. The detector is trained to make its decision on the representation available at that point in the pipeline.

The assistant logs cover January through August 2016. The authors wanted the benchmark to represent different kinds of phrasing, including utterances that appeared too rarely to dominate a sample of ordinary traffic. They divided the distinct utterances into groups of high, middle, and low frequency, then sampled equal numbers from those groups. An utterance’s frequency determined the group it could be drawn from. Each selected string appears as a distinct benchmark example. During collection, the authors manually excluded utterances that included a person’s full name or a detailed address.

This sampling design changes what the dataset is most useful for. Often repeated expressions are valuable because they capture real uses that a working assistant should handle. Rare expressions are valuable because they expose forms of chat and request that otherwise might receive little attention. The resulting set deliberately represents both. The frequency thresholds themselves are confidential, so the categories convey how the sampling was organized while leaving the underlying traffic counts unspecified.

The next step was linguistic annotation. Crowd workers applied the label CHAT when they judged that the user wanted a conversational exchange. They applied NONCHAT when the utterance appeared to request information or ask for an operation on the device. Information seeking and device control therefore shared a label even though they would require very different responses in a complete assistant. The distinction between those two kinds of non-chat remains useful when reading the examples. Both illustrate the sorts of requests the detector must keep on the task side of the routing decision.

Each utterance went to seven workers. Its reference label came from the majority, and the authors kept track of how many workers supported that label. A narrow majority and a unanimous majority produce the same kind of categorical target for training. They remain distinguishable in the analysis because the vote count records how readily people agreed. This allows the paper to compare prediction on the clearest items with prediction on those whose labels were more contested.

The authors separately examined the utterances already labeled CHAT and assigned dialogue acts by hand. This part of corpus construction serves a descriptive purpose. It shows what kinds of conversational behavior are hidden inside the broad positive class. Greetings, questions, personal disclosures, and other acts all feed into the same binary label. The detector itself is trained to predict that label. A description of how someone is chatting might later help a system choose a response after routing, which is the subject of a separate proposal in the paper.

Giving the detector evidence from the utterance itself

The authors develop two supervised classifiers. In supervised training, the examples come with answers that the classifier can use to learn which features predict each class. A support vector machine, or SVM, operates on a supplied representation of the utterance. A convolutional neural network, or CNN, learns part of that representation as it learns the labels. This comparison tests the external evidence with two ways of converting the original text into a classification decision.

For the SVM, the most direct features describe short pieces of the utterance. An n-gram is a run of adjacent units, with the unit chosen here as either a character or a word. The SVM uses sequences of lengths 1 and 2 at both levels. Individual units can pick out a recognizable word or written character. Pairs preserve some immediate ordering, such as a term repeatedly appearing next to a device-control expression. A classifier can learn weights for recurring patterns wherever they appear in the training examples.

Characters and words provide different views of the same text. A recurring character sequence can appear in utterances that contain different whole words. A recurring word pair can distinguish a brief phrase whose meaning depends on how its words are arranged. With Japanese input, the character representation is also available directly from the recognized string. The word representation adds evidence at a different scale. The paper’s final SVM combines both scales with a further description of the words’ distributional properties.

That description comes from word embeddings. An embedding assigns a word a vector of learned numerical values. The authors train a skip-gram system on the full set of assistant logs used in the study, using word2vec to create 300-dimensional embeddings. Skip-gram learns from the surroundings in which words occur. The resulting vectors can represent similarities in usage even when two words have different written forms. The technique is associated with Distributed Representations of Words and Phrases and their Compositionality.

To give the SVM a representation of an utterance as a whole, the authors average its word vectors. This adds 300 features to the SVM’s character and word n-grams. Averaging makes an utterance of variable length into a vector of fixed size. The same words would yield the same average in a different order. The neighboring-unit features still contribute the local ordering that their representation retains. This combination gives the classifier a way to use both recurring surface forms and relationships among the words learned from a larger body of assistant text.

The CNN begins with a sequence of word vectors. It looks at local neighborhoods through filters that slide along the input. A filter responds to a pattern in its window. The rectified linear unit, or ReLU, passes through positive responses and maps negative responses to zero. Max pooling retains the strongest response for a filter across the utterance. Together these operations give the network a compact record of patterns found somewhere in the text, even if utterances have different lengths. The authors use a single convolution stage with max pooling. Their account places it in the line of research represented by Effective Use of Word Order for Text Categorization with Convolutional Neural Networks.

A softmax layer turns the output of the CNN into scores for the possible classes that can be read as probabilities. The CNN can be trained with the embeddings initialized from word2vec, a setting the paper calls pretraining. Those embeddings are the same kind of information supplied to the SVM as an average, but they enter at a different stage. In the CNN, the sequence is still available when the filters examine the words. In the SVM, the average is already one of the fixed features presented to the classifier.

Learning from conversational posts and search queries

The authors use tweets and web search queries as examples of different ways people use written language. The tweets come from posts that received replies, a selection intended to favor conversational use. The queries record what people type when they are trying to find information. The paper trains a separate character language model on each collection. A language model assigns probabilities to sequences. Here it supplies a score for an assistant utterance by considering how probable each character is in light of the characters before it.

The procedure produces two values for every scored utterance. A sentence can be relatively familiar under the system trained on tweets and relatively unfamiliar under the one trained on search queries. A compact request can show the reverse pattern. An utterance can also sound plausible in both settings or unusual in both. Keeping both scores lets the chat detector learn from their values together with its own features. The source of the external text offers a useful tendency. The chat labels still come from people judging actual assistant utterances.

The paper represents the utterance as a sequence of characters.

u = (c₁, c₂, …, cₘ)

Here u is the utterance, c with a subscript denotes the character at that position, and m is the number of characters in the utterance. The subscripts from 1 through m identify positions in reading order, and the ellipsis represents the intervening characters.

The score for a source is the average of its log probabilities across the characters.

scoreᵣ(u) = (1/m) ∑ₜ₌₁ᵐ log pᵣ(cₜ | c₁, …, cₜ₋₁)

scoreᵣ(u) is the value assigned to utterance u by the language model trained on source r, where r is either tweet or query. The summation symbol ∑ adds the terms for character positions t from 1 through m, and 1/m divides their sum by the utterance length. pᵣ is the conditional probability under the language model for that source. The vertical bar means that the probability of the current character cₜ is conditioned on the preceding characters, from c₁ to cₜ₋₁. log takes the logarithm of that probability.

A character the language model expects contributes a higher log probability than a character it considers unlikely. Averaging these contributions gives the score an interpretation per character. Simply accumulating them would make the number of terms depend directly on how much text the user spoke. The averaging therefore makes the numbers more suitable as features across utterances of different lengths. It leaves room for length to matter in other ways, because the type and ordering of evidence available in short and long texts can differ.

The paper uses a gated recurrent unit, or GRU, for the character probabilities. A recurrent unit carries a hidden state through the input from one position to the next. The state is a vector the network learns to use as a record of earlier input. A gate consists of values that control how much of a signal passes through. In a GRU, gates govern the use of the previous state in constructing a candidate state and the balance between the previous and candidate states in the final update. The paper cites Learning Phrase Representations using RNN Encoder–Decoder for Statistical Machine Translation in describing this choice.

The reset gate controls the contribution of the preceding state to the candidate.

rₜ = σ(W⁽ʳ⁾xₜ + U⁽ʳ⁾hₜ₋₁)

Here rₜ is the reset gate at character position t, xₜ is the embedding of the character at that position, and hₜ₋₁ is the preceding hidden state. W⁽ʳ⁾ and U⁽ʳ⁾ are learned weight matrices for the character input and the state input to the reset gate. Juxtaposition denotes matrix–vector multiplication, + adds the resulting vectors, and σ applies the sigmoid to their elements. This subscripted rₜ denotes a gate, while r in the score equation identifies a corpus.

The candidate hidden state uses the reset gate when drawing on the preceding state.

h̃ₜ = tanh(W⁽ʰ⁾xₜ + U⁽ʰ⁾(rₜ ⊙ hₜ₋₁))

h̃ₜ is the candidate state at position t. W⁽ʰ⁾ and U⁽ʰ⁾ are its learned weight matrices, and xₜ is the current character embedding. The operator ⊙ multiplies corresponding elements of the reset gate rₜ and the preceding state hₜ₋₁. U⁽ʰ⁾ acts on the gated state, + combines its transformed contribution with that of the character, and tanh applies the hyperbolic tangent to each element of the sum.

The update gate sets the balance between the old and candidate states. The paper displays its equation as follows.

zₜ = σ(W⁽ᶻ⁾zₜ + U⁽ᶻ⁾hₜ₋₁)

zₜ denotes the update gate, hₜ₋₁ is the previous hidden state, and W⁽ᶻ⁾ and U⁽ᶻ⁾ are the weight matrices assigned to this gate. Again, juxtaposition denotes multiplication, + adds the vectors, and σ is the sigmoid. As printed, the equation uses zₜ inside its own definition. The analogous input in the reset-gate equation and the paper’s definition of a current character embedding suggest that the first product is intended to act on xₜ. The displayed equation alone leaves that input ambiguous.

The last equation combines the candidate and the previous state.

hₜ = (1 − zₜ) ⊙ hₜ₋₁ + zₜ ⊙ h̃ₜ

hₜ is the updated hidden state at position t, hₜ₋₁ is the old state, h̃ₜ is the candidate, and zₜ is the update gate. 1 − zₜ subtracts each gate value from one. The ⊙ operations weight corresponding elements and the + sign adds the two weighted vectors. Where a gate value is larger, the candidate contributes more to the result. Where it is smaller, more of the previous state carries forward.

The character-scoring procedure uses a softmax prediction stage to obtain probabilities from the recurrent representation. In the scoring equation, the quantities being predicted are characters. This makes the external representation independent of the word-vector features used by the SVM and CNN. The paper reports that in preliminary comparisons the character-based language models performed consistently better than the word-based ones. The main experiments consequently use character scores.

The search corpus supplies a third feature through a separate operation. The authors check whether the entire utterance appears in the query log. This produces a binary value that records a match or its absence. The motivation comes from short non-chat inputs that name a place or a product. Such an input can function as an information request even without a verb that explicitly says to search. A search-log match provides evidence that the string occurs as a query. The score from the search language model can still supply evidence for a string the log has never recorded exactly.

Combining the inputs and training the classifiers

For the SVM, the two real-valued scores and the binary match indicator are appended to the existing features. For the CNN, those same values are joined to the representation produced by convolution and pooling just before the final softmax. The neural filters work on the word inputs. The final classification layer can give weight both to the patterns those filters detect and to the external values computed for the utterance as a whole.

How an assistant utterance becomes a chat prediction

The steps in order.

How an assistant utterance becomes a chat predictionStep 1: Take the utterance text from speech recognition1. Take the utterance text from speech recognitionStep 2: Represent its words and nearby text patterns2. Represent its words and nearby text patternsStep 3: Score its characters against tweets and queries3. Score its characters against tweets and queriesStep 4: Check for the utterance in the search log4. Check for the utterance in the search logStep 5: Combine the text and external features5. Combine the text and external featuresStep 6: Predict chat or non-chat with a supervised classifier6. Predict chat or non-chat with a supervised classifier

The resources used in training have different jobs. Crowd-labeled assistant utterances determine how the classifiers associate their inputs with CHAT and NONCHAT. The broader assistant log supplies the word embeddings. The tweets teach one language model which character sequences are likely in its source, and the web queries teach the other. The search log is also the lookup collection for the binary feature. External data thus changes the evidence available to the supervised decision while the labeled assistant examples define the decision itself.

The authors used the faster-rnn toolkit for the GRU training. The character embedding and hidden layer sizes were both 256. For the language-model softmax training they used noise contrastive estimation with 50 noise samples. This training procedure learns to distinguish observed data from sampled noise. They also report training maximum entropy 4-gram models to obtain a combined language model. The feature comparisons in the paper name the final score features Tweet GRU and Query GRU.

The SVM was trained with liblinear using L2 regularization and L2 loss. The regularization penalizes large weights, while the loss penalizes violations of the desired classification margin. The authors varied the cost parameter over powers of 2 with exponents from −10 through 10. The CNN was implemented in Chainer. Its search over feature maps used 100 and 150 as candidates. The filter region configurations considered single widths of 2 or 3, paired widths of 1 and 2, 2 and 3, or 3 and 4, and grouped widths of 1, 2, and 3 or 2, 3, and 4. A filter width controls how many adjacent units the filter considers together.

Training for the CNN used mini-batches of 32 and a dropout rate of 0.5. Dropout temporarily suppresses some activations during training so that prediction depends less on any individual activation. The authors used Adam for stochastic optimization with a step-size parameter of 0.001, decay parameters of 0.9 and 0.999, and a numerical stability constant of 10⁻⁸. Those are the reported training settings for the network whose chat-detection results appear in the comparison. The optimization procedure is described in Adam: A Method for Stochastic Optimization.

Experiments and results

What the benchmark contains

After annotation, the benchmark has 4, 833 CHAT utterances and 10, 327 NONCHAT utterances. The imbalance matters when interpreting overall accuracy. A system can correctly label many items by always choosing the larger class and still fail to route a single chat to the conversational component. The benchmark also contains real variety within each label. The non-chat examples span information seeking and device operations, while the chat examples range from short social formulas to questions and personal observations.

The authors’ dialogue-act analysis gives a more concrete picture of the positive class. They counted 1551 questions and 1164 instances of self-disclosure among the CHAT utterances. The first group includes turns about the assistant’s feelings or attributes. The second includes turns about how the user is feeling or what is happening in their life. The 716 chat orders show that the imperative form extends well beyond device control. A request for a song or for encouragement can take the form of an instruction while functioning as part of a conversation.

The same analysis identifies 206 greetings and 130 invitations in the CHAT subset. Greetings can use familiar wording that recurs across many speakers. An invitation can refer to a particular activity the user suggests doing with the assistant. The authors also count 172 curses, which they interpret as possibly reflecting dissatisfaction with how the assistant had responded. The logs record the wording that users actually produced. The proposed explanation for why someone said it remains an interpretation.

Other chat utterances are hard to cover with a small inventory of phrases. The paper describes cases such as a user reproducing a line from a film or imitating a rooster. These examples each sound unusual in isolation. Their value in the analysis is to show how the miscellaneous category can contain utterances whose topics offer little basis for predicting them from familiar greetings or questions. A benchmark drawn from real logs exposes this variety alongside the routine traffic.

The external corpora are much larger than the annotated benchmark and have separate collection periods. The tweet source is described as 100 million posts collected from April through July 2016. The selection was restricted to tweets that had received replies. The search source comprises 100 million queries issued from March through June 2016. Those queries provide both training data for the search language model and the collection used to check exact occurrence. The authors describe sharing the benchmark and the derived feature values as a plan, with the raw external corpora difficult to release.

How the test was run

The authors evaluate the classifiers with 10-fold cross-validation on the chat benchmark. Each fold uses 80% of the data for training, 10% for development, and 10% for evaluation. In this design the training portion supplies the examples for fitting the classifier, the development portion supports choices such as threshold calibration, and the evaluation portion supplies the cases on which predictions are tested. Changing the held-out portion across folds gives the comparison a broader basis than a result from a single split.

The paper reports overall accuracy and three metrics for CHAT. Accuracy counts correct predictions across both labels. Precision asks how often a predicted chat is labeled chat by the workers. Recall asks how often a worker-labeled chat is found by the detector. F1 combines precision and recall into a measure that requires both to be reasonably strong. A reader interested in whether chat is successfully recognized needs those class-specific measures because accuracy also reflects performance on the larger NONCHAT class.

The reference systems help identify what different sources of performance mean. The majority baseline predicts NONCHAT for every utterance. Its 68.12 overall accuracy measures what the larger label alone can provide. The paper reports only accuracy for this baseline. Tweet GRU uses a single feature as the decision rule. It predicts chat when the tweet score exceeds a threshold chosen on the development data to maximize chat F1. The feature comes from the same tweet language model used in the more elaborate classifiers. This gives a direct comparison between using conversational resemblance on its own and using it alongside supervised evidence.

The third point of comparison is the authors’ in-house intelligent assistant, a hybrid of rules and examples. Its technical details are confidential. Its results give a reference from an existing system, while the more closely matched experimental configurations help identify the effects of the features. In particular, the comparison between otherwise corresponding SVM versions changes whether the external features are available. The in-house reference changes the whole approach.

Which systems performed best

The classifier based only on the tweet score achieves 72.07 overall accuracy and 62.94 chat F1. Its chat precision is 54.54 and its chat recall is 74.40. Many actual chats pass the threshold, but the comparatively low precision indicates that a considerable share of the utterances tagged as chat belong to the other class under the benchmark labels. The in-house assistant obtains 78.31 accuracy and 70.03 F1, with 62.57 precision and 79.51 recall for chat.

The supervised SVM based on character and word n-grams attains 90.51 accuracy and 84.91 chat F1. Its chat precision is 86.42 and its recall is 83.45. Adding embeddings raises its accuracy to 91.35, precision to 87.62, recall to 84.88, and F1 to 86.21. These figures show that much of the result is possible using information from the assistant’s own text. They also provide the comparison needed to evaluate the external features after the embeddings are already in place.

With both the embeddings and the external features, the SVM reaches 92.15 accuracy, 88.61 chat precision, 86.50 chat recall, and 87.53 chat F1. Both class-specific components of F1 improve. That matters for interpreting the role of the additions. The result is consistent with the extra evidence helping the learned classifier recognize more true chats and make more reliable chat predictions at the reported operating point.

Chat F1 across systems on the Yahoo! Voice Assist benchmark

The SVM that combines local text features, embeddings, and external evidence leads the comparison.

Chat F1 across systems on the Yahoo! Voice Assist benchmarkTweet GRU threshold: 62.94Tweet GRU threshold62.94In-house intelligent assistant: 70.03In-house intelligent assistant70.03CNN: 74.41CNN74.41SVM: 84.91SVM84.91CNN with pretrained embeddings: 85.36CNN with pretrained embeddings85.36SVM with embeddings: 86.21SVM with embeddings86.21CNN with pretrained embeddings and external features: 86.56CNN with pretrained embeddings andexternal features86.56SVM with embeddings and external features (this paper): 87.53SVM with embeddings and externalfeatures (this paper)87.53
The numbers
System or settingChat F1
Tweet GRU threshold62.94
In-house intelligent assistant70.03
CNN74.41
SVM84.91
CNN with pretrained embeddings85.36
SVM with embeddings86.21
CNN with pretrained embeddings and external features86.56
SVM with embeddings and external features (this paper)87.53

The plain CNN begins at 85.16 accuracy and 74.41 chat F1. Its 83.40 chat precision comes with 68.12 chat recall. Initializing it with pretrained word embeddings raises the metrics to 90.84 accuracy, 87.03 chat precision, 83.80 chat recall, and 85.36 chat F1. In this architecture the move to pretrained embeddings is particularly evident in recall. The version with pretrained embeddings and the additional tweet and search features obtains 91.48 accuracy, 87.78 chat precision, 85.18 chat recall, and 86.56 chat F1.

The two classifier families therefore tell a similar story about external evidence, even though their baselines differ. Each benefits from the complete tweet and query feature set once word embeddings are available. The stronger classifier in the reported setup is the SVM, with or without the external features. The authors suggest that the CNN’s simple architecture and the SVM’s carefully chosen features may contribute to this ordering. The comparison concerns those implementations and their inputs. The experiment varies the input representations along with the type of classifier, so it gives no clean estimate of how an architecture change by itself would affect their ranking.

What the ablations show

How much each external feature adds

The most direct feature comparison starts with the SVM that already uses character n-grams, word n-grams, and the averaged word embeddings. The authors add the tweet language score, the search language score, and the exact search-log indicator one at a time. They also compare those settings with the version that receives all the external features together. This isolates the value of each feature as an addition to the same starting system and shows how the complete bundle compares with any single addition.

Chat F1 with external feature additions to the SVM on the Yahoo! Voice Assist benchmark

The complete external feature set scores higher than any individual addition.

Chat F1 with external feature additions to the SVM on the Yahoo! Voice Assist benchmarkSVM with embeddings: 86.21SVM with embeddings86.21Add tweet language score: 86.53Add tweet language score86.53Add search language score: 86.28Add search language score86.28Add exact search-log match: 86.36Add exact search-log match86.36Add all external features (this paper): 87.53Add all external features (this paper)87.53
The numbers
System or settingChat F1
SVM with embeddings86.21
Add tweet language score86.53
Add search language score86.28
Add exact search-log match86.36
Add all external features (this paper)87.53

Among the individual additions, the tweet score produces the highest chat F1. The exact search match comes next, followed by the search language score. The individual configurations reach 91.53, 91.42, and 91.38 accuracy, respectively. The full configuration has the strongest result. This supports using several kinds of evidence together. The comparisons leave the results for pairs of external features open. As a consequence, the experiment shows that the bundle outperforms each single addition, while the effect of removing a particular feature from that bundle remains unmeasured.

One way to understand this pattern is to consider what each feature can tell the classifier when the others are weak. An utterance can be conversational in style even if the wording is rare in a search log. A short entity name can occur in the query log even when an utterance contains too little material for a clear stylistic judgment. A novel query can resemble familiar search strings in its character sequence without reproducing something the log contains. These are plausible roles for the features given their definitions. The aggregate scores show the benefit of combining them, while the individual cases in the paper illustrate the kinds of patterns they can capture.

What the scores and weights reveal

The authors compare the tweet and search scores for individual utterances. A chat turn observing that Halloween was already over receives a tweet score of −0.964 and a query score of −1.427. An invitation to go to sleep receives −0.957 from the tweet system and −1.610 from the query system. In both examples the score under the conversational source is higher. A compact series of words about installing Pokémon Go has a tweet score of −1.233 and a query score of −0.562. The request for a week’s weather outlook receives −1.837 and −0.682, respectively. In those non-chat examples, the query score is higher.

The examples make it easier to see what the pair of scores contributes. A remark about Halloween can look like a plausible search topic when judged from its subject alone. The form of the full utterance resembles a comment to another person in the example. A request for a forecast contains familiar query phrasing and scores well under the query source. The score differences follow the benchmark labels in these cases. Their role in the paper is illustrative. The classifier results across the benchmark supply the evidence for how much the feature set helps overall.

The SVM weights provide a different view. In the complete SVM, the tweet score has a weight of 1.128 and the query score has a weight of −0.771. For a fixed setting of the other features, a higher tweet score pushes the decision towards chat, while a higher query score pushes it away from chat. The examples of word weights point in related directions. The first-person word shown in the paper has a positive weight of 0.215. A feature associated with volume has a negative weight of −0.196, and a phrase associated with placing a call has a weight of −0.217.

Those signs agree with the purpose for which the authors introduced the features. They also make it possible to inspect the learned decision in terms of recognizable evidence. Weight magnitude and contribution to a particular prediction are different quantities. A feature’s contribution depends on its value for that utterance and on how the other features combine with it. The weights are therefore useful for explaining the direction of the classifier’s learned preferences. The feature-addition experiments are the more direct test of changes in predictive performance.

Where people agree and the detector succeeds

Of the annotated utterances, 5, 811 receive unanimous votes. The paper reports this as 38% of the benchmark. At least six workers agree on 10, 789 utterances, or 71%. The authors use that concentration of agreement as evidence that the annotation procedure supplies reliable labels for much of the dataset. The same counts also let them ask whether agreement among annotators tracks the ability of their best classifier to predict the majority label.

For the 1701 utterances whose winning label gets 4 votes, the complete SVM has 66.67 accuracy and 57.53 chat F1. On the 2670 utterances with 5 votes for the winning label, it reaches 87.72 accuracy and 81.72 chat F1. On the 4978 utterances with 6 votes, the same system has 96.02 accuracy and 93.30 chat F1. For the 5811 in the unanimous group, it records 98.33 accuracy and 97.20 chat F1. Precision and recall rise with the vote count as well.

This is a comparison across subsets of the data for the same classifier. It shows that the majority label is considerably easier to predict when the workers reach it together. The narrow-majority cases may include utterances with several reasonable readings, wording that offers unusually little evidence, and instances where some workers read the task differently. The paper’s example of a statement about hunger stands out because the uncertainty has an intuitive explanation. A user could be opening a conversation or prompting the assistant to help find somewhere to eat. The desired action depends on information that the sentence leaves implicit.

Vote agreement is useful here because it adds detail to a binary benchmark. If the only result were the overall average, it would be harder to see how well the detector does on clear cases and how often it disagrees with the reference when the workers themselves are divided. The grouped results locate the difficulty. An error on a unanimous utterance records disagreement with a strong human consensus. An error on a narrowly decided utterance records disagreement with a more fragile consensus. The benchmark counts both as errors, while the analysis shows their different evidential circumstances.

How the gains vary with data size and utterance length

The paper varies the amount of labeled training data given to the SVM and plots accuracy as a function of the fraction used in each training fold. Accuracy rises almost monotonically as more of the training portion is used. The curve still suggests benefits from more labels over the range studied. That is consistent with the authors’ motivation for sampling varied utterances. Supervised training can keep benefiting from new examples when the target includes a wide range of conversational forms.

The external features also change how quickly the system reaches a given level of accuracy on the plotted curve. The authors report that the augmented SVM, trained on about 25% of the training portion, achieves accuracy comparable to the embedding-equipped SVM trained on the entire portion. The comparison concerns labeled data in this cross-validation setup. The features already draw on large quantities of outside text. Read in that light, the curve shows how evidence acquired without annotating more assistant utterances can contribute to a goal that would otherwise require more labeled examples from the assistant.

The authors also compare the SVM with embeddings against the same system with the external features across utterance lengths. The difference is especially visible for texts of ≤ 5 characters. Patterns learned from external sources can provide evidence when the individual utterance contains very few character or word sequences. The authors note that Japanese writing can express a simple sentence within that short span. A length measured in characters can therefore mark a difficult group without implying that its members are all names or incomplete fragments.

A difference is also visible for utterances of 15 characters or more. The paper suggests that a longer utterance can include words that carry little information about whether the speaker wants to chat. The average embedding incorporates those words, and the n-gram representation still records them. The normalized language score can supply evidence about style across the sequence. This is the authors’ explanation for the pattern. The length comparison measures where the augmented classifier gains accuracy. It leaves open how much of the gain at each length is attributable to the query match, the tweet score, or the query score.

Together, the learning curve and the length analysis place the aggregate comparison in more specific conditions. The learning curve concerns the amount of supervised evidence the classifier receives. The length comparison concerns the evidence present in each utterance at evaluation. The agreement analysis adds a further condition, the strength of human consensus about the intended route. Each makes a different source of difficulty visible. Their results explain why a single overall score captures only part of the way the detector behaves.

Limitations

Limits the authors identify

The authors explicitly identify ambiguous utterances as a challenge for the binary framework. When a user’s words suggest several reasonable intentions, a more capable dialogue manager could ask a clarifying question. That would change the interaction by giving the user a chance to specify whether they want assistance or conversation. The reported system makes a categorical prediction from the observed text. The paper proposes clarification as future work, and its results measure agreement with the majority label on the original utterance.

The input to the detector is limited to text from the current utterance. The authors propose adding preceding turns, acoustic information, and information about the user. Each could resolve uncertainties that survive in a transcript. Earlier turns might reveal that a task is already underway. Speech could carry cues absent from the written result. A user profile might provide context for interpreting a terse statement. These possibilities identify relevant evidence that the paper’s actual comparison leaves outside the detector.

Speech recognition introduces a related limit. A classifier can only interpret the string that reaches it, and a recognition error can alter the words on which both its own features and the external scores depend. The authors discuss incorporating existing approaches to dealing with recognition errors as future work. A separate proposal concerns automatically recognizing the dialogue acts of utterances that are routed to chat. The paper’s analysis of dialogue acts is manual, so it demonstrates the variety of conversational contributions and leaves automatic act prediction unevaluated.

The authors set a clear boundary around full-system integration. They study a classifier that could be used inside a hybrid dialogue manager. Their evaluation ends with the routing label. A real assistant must still decide how to respond, whether to ask a question, and what to do when a conversational answer is poor. The paper acknowledges the difficulty of fluent open-ended replies. A correctly routed chat is an opportunity for such a reply. The measured score describes how often the router agrees with the label, while choice of response and user satisfaction remain separate questions.

The authors also describe practical limits on transparency. They withhold the frequency thresholds used for sampling and the details of the in-house assistant. They describe the raw external data as difficult to release and plan to share the derived features alongside the labeled dataset. Values supplied that way would let researchers compare classifiers on the same external inputs. Re-creating those inputs from the original corpora would require access to the underlying collections and their training procedure.

Limits that follow from the experiment

The scope of the benchmark is one assistant’s Japanese speech recognition output. The comparison gives evidence for that source and the distribution created by the sampling procedure. Performance on other languages and assistants remains open. The length findings are especially tied to the representation because the authors measure characters and draw attention to the expressive capacity of short Japanese strings. The same numerical character thresholds could select a different mixture of utterance types in a different language.

Sampling equal numbers from frequency groups gives uncommon wording a deliberate place in the test. That makes the benchmark informative about the diversity of requests and chat. It also means that overall accuracy and class proportions describe the sampled distinct utterances. A live-traffic estimate would depend on how frequently each form occurs and how those frequencies relate to error rates. The benchmark retains a wide range of inputs, and the published comparison leaves that alternative weighting unmeasured.

The annotation target is an inference about the user’s intention. Crowd agreement measures how consistently people interpret the recognized text under the labeling scheme. It cannot determine which interpretation the original speaker actually had in mind. This distinction has practical consequences at the low-agreement end of the benchmark. The classifier may be penalized for choosing a defensible reading, just as a person voting with the minority might choose a defensible reading. Even unanimous decisions establish a common interpretation of the visible utterance. They do not directly measure what response the user would have preferred.

The use of cross-validation tests generalization to held-out items within the constructed benchmark. A test on utterances from a different time period, or on a separate assistant, would answer a different question about how well the learned cues transfer. The outside text and the target logs cover overlapping parts of 2016, which makes the cues relevant to the period studied. The results give no direct measure of how well those same features would handle subsequent changes in topics, search habits, or conversational wording.

The language scores fit the broader interpretation that tweets and queries differ in style, and the authors’ examples demonstrate how that can help. Each language model can also capture words and topics that recur in its own source. Selecting tweets that received replies favors some forms of interaction. Checking for an exact query match favors phrases present in a particular collection. The feature comparisons establish their value for prediction in this benchmark. They leave the contributions of style, subject matter, and corpus coverage intertwined.

The comparisons also leave some methodological questions open. The external feature additions are evaluated individually and together, with no reported comparison of all possible intermediate bundles. The precision and recall results characterize the reported decisions, while a deployed assistant may attach different costs to sending a request to chat and sending a chat to a task handler. The paper provides no measured costs for either mistake. Its outcome is a benchmark for identifying the intended route and for comparing evidence used by classifiers. How a dialogue manager should act on a doubtful prediction depends on goals and interaction costs beyond that outcome.

What came after

RPTCS: A Reinforced Persona-aware Topic-guiding Conversational System (2023) cites the chat-detection paper and focuses on how a conversational system guides topics while accounting for persona. That places its stated problem at a different point in an interaction. Akasaki and Kaji ask whether an incoming utterance should lead to a conversational response. RPTCS addresses properties of the conversation once it is under way. Topic guidance concerns where the exchange goes, and persona awareness concerns how the conversational system presents itself as it takes part.

The citation establishes a connection between these studies of conversational assistants. The later work’s stated scope leaves its specific use of the chat detector, benchmark, or external features unspecified. The documented relationship is that a study of persona-aware topic guidance cites earlier work on recognizing when the user wants conversation. The two problems meet at the routing decision. A system that can guide a conversation still needs a basis for treating an utterance as an invitation to converse when it shares an interface with search and device control.

Cite

Cite as Satoshi Akasaki and Nobuhiro Kaji. 2017. Chat Detection in an Intelligent Assistant: Combining Task-oriented and Non-task-oriented Spoken Dialogue Systems. Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers).

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/p17-1120

@inproceedings{akasaki2017chat,
  title = {{Chat Detection in an Intelligent Assistant: Combining Task-oriented and Non-task-oriented Spoken Dialogue Systems}},
  author = {Satoshi Akasaki and Nobuhiro Kaji},
  booktitle = {Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)},
  year = {2017},
  doi = {10.18653/v1/p17-1120},
  url = {https://doi.org/10.18653/v1/p17-1120}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/akasaki-2017-chat-detection-intelligent-assistant-combining/