---
title: "Fine-Grained Sentence Functions for Short-Text Conversation"
description: "Fine-Grained Sentence Functions for Short-Text Conversation tests whether predicting how a reply should be phrased helps systems choose…"
canonical: "https://research.elamur.ai/free/en/papers/bi-2019-fine-grained-sentence-functions-short/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/bi-2019-fine-grained-sentence-functions-short/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2019](https://md.research.elamur.ai/free/en/papers/2019/) / Fine-Grained Sentence Functions for Short-Text Conversation

# Fine-Grained Sentence Functions for Short-Text Conversation

Paper · 2019 · Wei Bi, Jun Gao, Xiaojiang Liu et al.

**Authors:** [Wei Bi](https://md.research.elamur.ai/free/en/authors/wei-bi/), [Jun Gao](https://md.research.elamur.ai/free/en/authors/jun-gao/), [Xiaojiang Liu](https://md.research.elamur.ai/free/en/authors/xiaojiang-liu/) and [Shuming Shi](https://md.research.elamur.ai/free/en/authors/shuming-shi/) · **Year:** 2019 · **Venue:** Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/P19-1389/)
- [PDF](https://aclanthology.org/P19-1389.pdf)
- [DOI 10.18653/v1/p19-1389](https://doi.org/10.18653/v1/p19-1389)

## Summary

A reply can stay on topic and still make the wrong conversational move. A question that asks for an explanation invites a different kind of answer from one that asks for confirmation. A response that shares the speaker’s surprise may fit a personal story better than a follow-up question does. Wei Bi and colleagues study whether a system can improve its replies by choosing a sentence function, the purpose served by the form of an utterance. They distinguish broad functions such as asking a question or making a statement from finer distinctions such as an open request for information or a question expecting yes or no. Their experiments address brief exchanges in Chinese drawn from social media. The setting is short-text conversation within [dialogue systems](https://md.research.elamur.ai/free/en/topics/dialogue-systems/).

The authors build STC-SeFun by having annotators judge the function of each segment in a query and its reply while reading the pair together. The final collection contains 95,898 pairs. They use it for two different classification tasks. The first identifies the function of text that already exists. The second predicts a suitable function for a reply when only the query is available. The system chosen to label existing text achieves fine-grained accuracy of 87.6% on test query segments and 80.6% on test reply segments. The predictor used during conversation reaches 65.5% fine-grained accuracy on test queries when judged against the function of the recorded reply. This is a harder comparison to interpret because several kinds of reply may fit the same query.

The first classifier also supplies labels for STC-Auto-SeFun, a collection of over 700 million conversation pairs. At test time, the second classifier supplies a target for either a retrieval system that selects an existing reply or a generator that writes a new one. Retrieval uses the target to reorder candidates already selected for their query similarity. Generation can use it as a cue at each step of writing. Human judges assess the top replies to 200 test queries. In the fine-grained retrieval comparison, rescoring raises informativeness from 61.6 to 75.3 and relevance from 68.2 to 73.4 on the authors’ reported percentage scale. The strongest generator across the comparisons, C-Seq2seq, also improves on its unconditioned baseline for both measures at both label levels. Retrieval with reranking receives the highest overall scores in this evaluation.

The results support using reply function as an explicit cue alongside subject matter. They also show where that cue is least dependable. The classifiers do substantially better when frequent examples dominate the metric than when each label counts equally. The human evaluation shows gains for the tested systems and queries, while leaving open which other functions a person might have accepted for any given reply.

## Deep dive: Fine-Grained Sentence Functions for Short-Text Conversation

Fine-Grained Sentence Functions for Short-Text Conversation tests whether predicting how a reply should be phrased helps systems choose or write better replies. · about 32 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### What a reply is doing

A short message gives a conversation system several kinds of evidence at once. Its words indicate a subject, its phrasing can convey an attitude, and its form gives clues about what the speaker expects to happen next. The last of these is the focus of the paper. An utterance can ask, assert, direct, or express a reaction. Each broad category allows further distinctions that matter to the next turn. A question seeking the identity of someone or something calls for different content from a question that proposes a possibility for confirmation. The subject of the exchange can stay fixed while the expected reply changes.

The authors use *sentence function* for the purpose a speaker serves by uttering a sentence. Their account connects purpose to observable language. Word order and recurring combinations of words can give evidence about function. A distinction between two question types can therefore matter to a system trying to produce a reply, even if both questions share the same topic and much of their vocabulary. Conversely, a word typically associated with a question can appear inside a statement. The authors need a scheme that can represent these differences and a way to learn from sentences where the cues vary.

The input in the paper is a query in the conversational sense, the opening message of a query–response pair. The term covers a statement about a family quarrel as readily as a message asking for information. The second message is an actual reply from the source conversation. Restricting the task to a single exchange determines the available evidence. A reader can see how each message relates to the other, while the preceding turns, possible later reactions, and spoken delivery used in some other dialogue settings play no part in the annotation. The goal is an appropriate immediate response in a setting without a prescribed task.

Sentence function offers a possible way to reduce an ambiguity left by the query’s wording alone. Consider the difference between answering a message with another question and answering it with a personal reaction. Both can contain words relevant to the original subject. They can lead the exchange in different directions. A retrieval procedure that considers overlap with the query has no explicit representation of that difference. A generator trained to produce plausible continuations can learn associations between wording and reply form implicitly. The paper investigates making reply form a separate, observable choice that the system can use when it selects or constructs its answer.

#### Earlier ways of steering a conversation

As the authors describe the field, earlier work used several signals to guide replies. Research on emotion considered how a system could recognize a user’s emotional state and respond in a way that suits it. The paper also discusses topic-based methods motivated by the possibility that a reply about a related subject may keep the user engaged. Topic and emotion can influence the vocabulary a response uses. Sentence function can affect the organization of the entire utterance, including where words go and what patterns connect them. A given topic can be expressed as a statement, as a question, or as a direction.

Earlier work had also considered sentence function directly. Li and colleagues used questions and imperatives as ways to move a stalled conversation forward. Ke and colleagues treated sentence function as a controllable input to a generator and addressed the problem of satisfying that input while producing informative content. These studies helped establish the motivation for using function. Bi and colleagues identify a further requirement for testing it at a larger scale. A system needs examples on which to learn how the functions appear in practice, and it needs a way to label existing conversations beyond the subset that people can annotate by hand.

The authors also relate sentence function to dialogue acts, the categories used to describe communicative moves such as statements, questions, and acknowledgments. The two descriptions overlap in their concern with what an utterance does. Earlier studies used dialogue-act information to help select a response or to guide a generator. For the categories in their own annotation scheme, the authors draw on a tag set developed for the Switchboard telephone conversations. Those conversations could involve evidence from several turns, several participants, or speech signals. The short written exchange used by Bi and colleagues supports a different set of judgments. The relevant precedents include [Dialogue act modeling for automatic tagging and recognition of conversational speech](https://md.research.elamur.ai/free/en/papers/stolcke-2000-dialogue-act-modeling-automatic-tagging/) and [Learning Discourse-level Diversity for Neural Dialog Models using Conditional Variational Autoencoders](https://md.research.elamur.ai/free/en/papers/zhao-2017-learning-discourse-level-diversity-neural/).

The authors adapt the categories to the evidence available in written pairs. They remove categories that depend on information outside that setting and combine some of the remaining distinctions when the corresponding sentence patterns look similar. The resulting inventory serves a practical purpose. It needs to capture functions that annotators can recognize within a pair, describe distinctions likely to matter in replies, and give classifiers cues they can learn from text. Its finer categories are thus tied to the authors’ conversational setting as well as to the broad grammatical families from which they start.

#### Why the work covers retrieval and generation

The paper describes two broad approaches to producing conversational replies. In [information retrieval and search](https://md.research.elamur.ai/free/en/topics/information-retrieval/), the system looks for a previous query that resembles the incoming one and uses its associated reply. In [text generation](https://md.research.elamur.ai/free/en/topics/text-generation/), the system learns to produce a sequence of words given the query. Both approaches can use a target sentence function, but they act on it at different points. Retrieval can inspect finished candidates for evidence of their function. Generation can use the function while deciding what to write.

That distinction is central to the design of the study. The same linguistic cue can serve as a reason to prefer a candidate or as information available while composing one. Applying it in both settings lets the paper ask a wider question than whether one architecture benefits from an extra input. It asks whether explicit information about the kind of reply can improve the choice or composition of responses in two established ways of handling short-text conversation. Earlier neural work on the underlying response task includes the [Neural Responding Machine for Short-Text Conversation](https://md.research.elamur.ai/free/en/papers/shang-2015-neural-responding-machine-short-text/).

### The method, step by step

The pipeline starts with actual conversations. Human annotation supplies examples of what each segment is doing. A classifier then scales those annotations to a larger collection, and a separate predictor estimates what kind of reply fits a new query. The predicted function reaches the conversation system before its final reply is chosen. In retrieval it can change the ranking of possible replies. In generation it can change the word choices made during decoding, the process of turning a query representation into text.

From annotated exchanges to function-guided replies The steps in order.

#### Building the manually annotated collection

The authors collect raw query–response pairs from the Chinese social platforms Tieba, Zhidao, Douban, and Weibo. They filter pairs containing offensive language or other sensitive material and then have people screen for exchange quality. The screening focuses on how the reply works in context. A useful example should offer a response relevant to the opening message and have something informative or interesting to say. Four annotators take part in this stage. Each reply is assessed independently by two of them, and a pair advances when both consider it suitable. The outcome of the screening is 100k pairs available for function labeling.

In the function-labeling stage, punctuation determines where the messages are split. A segment is the unit assigned a label. This choice allows a reply that contains a statement and a question to be described in parts. Each annotator sees the query and reply together, so a segment can be interpreted in light of its role in the exchange. A label may therefore depend partly on a relationship between the two messages, even though the first classifier later has to infer that label from the segment itself. The judgments constitute [linguistic annotation](https://md.research.elamur.ai/free/en/concepts/annotation/).

There are four broad, level-1 families. A declarative makes a statement, an interrogative asks a question, an imperative directs someone towards or away from an action, and an exclamatory expresses a reaction or related function. The level-2 inventory has twenty categories. The broad label describes the family and the fine label describes a more specific form or use. The paper’s examples emphasize how distinctions within interrogatives correspond to patterns in the words. A Wh-style interrogative asks for missing information. A yes-no interrogative asks for confirmation or rejection. An A-not-A interrogative presents an affirmative and negative version of a possibility in its phrasing. These distinctions are available beneath the shared description of an utterance as a question.

The category names also show why simple punctuation rules would be insufficient. The declarative family includes statements containing interrogative words as well as positive, negative, and double-negative forms. The interrogative family includes rhetorical questions, which need to be understood in terms of their conversational purpose. In the imperative family, a request is distinguished from a command or prohibition. Among exclamatories, the inventory distinguishes replies using interjections and has a separate category for greetings. Punctuation thus establishes what gets inspected together, while the label captures the annotators’ reading of that piece of text.

Three annotators take part in this stage. For each segment, an annotator can select at most one broad label and two fine labels. Pairs with full agreement are retained without further review. The process discards a pair if the annotations share no labels or if a segment receives none. For disagreements with overlap, the annotator who differed sees the labeling decisions and the majority’s choice and reviews the case. The pair is retained if that annotator accepts the majority result. Otherwise it is dropped. The final dataset, STC-SeFun, contains 95,898 pairs, with 103,138 query segments and 117,714 reply segments. The authors report making their code and datasets available.

The distribution of labels reflects both the kinds of exchanges selected and the different roles of the opening message and reply. Positive declaratives account for 49,223 query segments (48%) and 67,540 reply segments (57%) in the dataset statistics. Wh-style interrogatives account for 23,385 query segments (23%) and 7,652 reply segments (7%). Some other classes occur far less often. The inventory records no query segments with the interrogative backchannel label and 345 reply segments with that label. These differences matter when designing the classifiers. A class common in opening messages can be less useful as a default for replies, and an aggregate metric can reflect the frequent categories more closely than the rare ones.

#### Recognizing the function of existing text

The first task is called Classification-for-Modeling in the paper. It asks the classifier to read an existing segment and label it. The segment can come from either side of the conversation. Training uses the human annotations as examples, and the authors compare training on query segments alone, reply segments alone, or both together. In the separate setting, the role used in training is also the one used in testing. In the joint setting, the classifier learns from both roles and is evaluated separately on each. This design checks whether a shared classifier can supply labels for both sides of the larger corpus.

The classification architecture follows the broad-to-fine organization of the labels. It first encodes the segment as a vector, a list of numbers that summarizes features of its text.

```
vₓ = Encoder(x)
```

Here `x` is the segment being classified, `Encoder` is the operation that turns the input sequence into a numerical representation, and `vₓ` is the resulting vector for `x`. The paper tries two encoders. A convolutional neural network, or CNN, can learn to recognize local patterns of words. A recurrent neural network, or RNN, uses a sequence of hidden states to represent the input. The recurrent implementation uses a bidirectional gated recurrent unit, or GRU, so that information from either direction can contribute to how the sequence is represented. The convolutional implementation follows an approach previously used in [Convolutional Neural Networks for Sentence Classification](https://md.research.elamur.ai/free/en/papers/kim-2014-convolutional-neural-networks-sentence-classification/).

The first classification stage scores the broad categories.

```
p(dₓˡ¹ | x) = Softmax(FC(vₓ))
```

Here `p` denotes a probability distribution, `dₓˡ¹` stands for the possible level-1 functions of `x`, and the vertical bar means the probabilities are conditional on the observed segment `x`. The fully connected layer `FC` maps `vₓ` into scores for the broad categories. `Softmax` converts those scores to probabilities across the categories. The broad prediction gives the next stage an initial indication of whether the segment is, for instance, an interrogative or a declarative.

The finer stage represents the broad label estimated by the trained first stage as an embedding, a learned vector associated with that label. It adds the embedding to the numerical representation of the text before scoring the finer categories.

```
p(dₓˡ² | x, dₓˡ¹) = Softmax(FC(vₓ + eₓˡ¹))
```

Here `dₓˡ²` stands for the possible level-2 functions of `x`. The vertical bar introduces the inputs to this prediction, the segment `x` and its estimated broad function `dₓˡ¹`. The vector `vₓ` describes the segment, and `eₓˡ¹` is the embedding of the estimated broad function. The plus sign denotes vector addition. `FC` maps the combined representation to fine-label scores and `Softmax` turns them into a distribution `p`. The equation specifies conditioning through the embedding. It does not specify a separate rule that takes fine labels outside the predicted family out of consideration.

This arrangement lets the fine classifier use detailed word patterns alongside a compressed judgment about the segment. It also makes the quality of the broad estimate relevant to the finer decision. If the broad prediction points toward the wrong family, the fine classifier receives that estimate along with the representation of the original text. The paper describes using the estimated level-1 function from a classifier that has already converged, so the broad input to the fine stage reflects a decision the system can make without a human label.

The implementation uses hidden vectors of dimension 1024. Parameter values start from a uniform distribution over [−0.1, 0.1]. The batch size is 128, and the Adam optimizer uses a learning rate of 0.0001. During optimization, gradient clipping at 5 limits the size of gradients used to train the network. The authors choose the recurrent encoder trained jointly on queries and replies to label the larger collection. That collection, STC-Auto-SeFun, contains over 700 million conversation pairs collected using a procedure the paper describes as similar to the earlier collection. It serves as the repository for retrieval and the training corpus for generation.

#### Predicting the kind of reply

The second task, Classification-for-Testing, starts from a query whose reply has yet to be produced. An existing reply supplies words in which the signs of a function might already be visible. A query supplies evidence about which functions could make sense next. A question may favor a statement that answers it. A personal anecdote can reasonably invite a reaction, a relevant anecdote in return, or a request for more information. The classifier learns from recorded replies, using their annotations as targets for a decision it must make from the query.

```
p(dᵧ | [x], [dₓ])
```

Here `p` is the conditional probability distribution over the candidate reply functions, represented by `dᵧ`. The expression `[x]` denotes the sequence of query segments, and `[dₓ]` denotes their sentence-function labels. The brackets group the segments or labels belonging to the query. The vertical bar separates the predicted reply function from the information available on the query side. Although a query can have several segments, the output of this task is a single target reply function.

A query encoder represents the text. An embedding layer represents its labels, which are then pooled in a bag-of-words representation that collects their information without relying on their order. The classifier adds this representation to the query’s text vector. A fully connected layer and softmax produce probabilities for the reply functions. The paper uses the same parameter settings as for segment classification and compares predictors that receive query labels with predictors that rely on the text. For its conversation experiments, it selects the recurrent predictor with query-function information.

The distinction between the two classification tasks becomes especially important when reading the retrieval procedure. The reply-function predictor proposes what kind of answer suits the current query. The segment classifier checks what an existing candidate actually does. These judgments can agree even when the candidate and query use quite different words. They can also disagree when the lexical match is strong. Keeping the judgments separate gives the reranker a way to use the confidence of the second judgment without treating a rejected candidate as unavailable.

#### Reranking retrieved replies

The retrieval baseline searches the corpus for queries similar to the current one and uses the reply paired with the highest-ranking match. Similarity is calculated using the Jaccard index on bags of words. In this use, the index measures shared words against the distinct words present across the two queries. It rewards overlap relative to the amount of vocabulary represented. A match at this stage is between the current query and an earlier query. The reply is passed forward because of its association with the earlier query.

```
f(x, R) → {s₁, s₂, …, sᵢ, …, s₍|R|₎}
```

Here `f` denotes the baseline retrieval scoring procedure, `x` is the current query, and `R` is the set of candidate replies. The arrow shows that the procedure produces the associated similarity scores. The braces collect those scores in their initial ranked order, `sᵢ` is the score associated with the reply at position `i`, `s₁` is the leading score, and `|R|` is the size of the candidate set. The ellipses stand for positions between the ones shown.

The reranker takes this candidate list and assigns a penalty to each reply whose classified function differs from the target predicted for the query. The penalty depends on how confidently the segment classifier assigns the alternative label. An uncertain disagreement therefore has a weaker effect than a confident one.

```
sᵢᵖᵉⁿᵃˡᵗʸ = { 0     if dᵣᵢ = dᵧ*; pᵣᵢ otherwise }
```

Here `sᵢᵖᵉⁿᵃˡᵗʸ` is the penalty weight for candidate reply `rᵢ` at position `i`. The label `dᵣᵢ` is the candidate’s predicted function, and `dᵧ*` is the target for the new reply, with the star marking the selected target label. A match gives a penalty weight of `0`. Otherwise, `pᵣᵢ` is the classifier’s probability for the label it assigned to `rᵢ`. The braces enclose the alternatives and the semicolon separates the matching case from the remaining case.

```
sᵢʳᵉʳᵃⁿᵏ = sᵢ − λ(s₁ − sₖ)sᵢᵖᵉⁿᵃˡᵗʸ
```

Here `sᵢʳᵉʳᵃⁿᵏ` is the revised score for the candidate initially at position `i`, and `sᵢ` is its original score. The term `s₁ − sₖ` is the gap between the original leading score and the original score at rank `k`. The parameter `λ` controls the scale of the penalty, and `sᵢᵖᵉⁿᵃˡᵗʸ` supplies the candidate-specific weight. The brackets group the score gap, and adjacent factors are multiplied. The revised ranking orders candidates by these adjusted scores.

The score gap sets the penalty relative to the spread of the original ranking. With `λ` set to 0, scoring is unchanged. In the example the paper gives, a leading candidate with a penalty weight of 1.0 and `λ` set to 1 has its score reduced to the original score at rank `k`. In the experiments, the authors rerank the top 20 candidates with `λ` set to 1 and `k` set to 20. A function match keeps the original similarity score. A conflicting reply remains eligible, so original similarity and classifier confidence can still influence which answer ends up at the top.

#### Giving a generator the target function

The sequence-to-sequence baseline, Seq2seq, encodes the query with a one-layer bidirectional GRU. A one-layer GRU decoder writes the reply. Soft attention allows the decoder to draw more heavily on different parts of the encoded query as it produces different words. At test time, beam search maintains several promising partial replies during decoding. The experiments use a beam size of 5. The vocabulary has 50,000 entries, combining Chinese words and characters, and the paper reports 99.98% coverage of the words in STC-Auto-SeFun. Words outside the vocabulary are represented by `<UNK>`. The attention mechanism follows [Neural Machine Translation by Jointly Learning to Align and Translate](https://md.research.elamur.ai/free/en/papers/bahdanau-2014-neural-machine-translation-jointly-learning/).

C-Seq2seq keeps the baseline’s general structure and passes an embedding of the response function to the decoder at each position. During training, a reply and its function accompany the query. During testing, the chosen function comes from the reply-function predictor. Making the same cue available throughout decoding allows it to affect both the opening of the reply and choices later in the sentence. A conditional input makes those changes possible while leaving the generator responsible for producing the words. The approach adapts [Controlling Linguistic Style Aspects in Neural Language Generation](https://md.research.elamur.ai/free/en/papers/ficler-2017-controlling-linguistic-style-aspects-neural/).

The other generation comparisons use conditional variational autoencoders, abbreviated CVAEs. Their starting point is that many replies can be valid for a query. A latent variable, a quantity learned through training without direct annotations for its values, provides a way to represent variation across those replies. The paper describes the basic training objective in terms of a variational lower bound on the conditional distribution involving the reply and the latent variable. A lower bound gives training a quantity to optimize in place of the underlying probability expression.

```
p(y, z | x)
```

Here `p` denotes the joint distribution of reply `y` and latent variable `z` conditional on the query `x`. The comma groups the two quantities whose distribution is considered, and the vertical bar places the query on the conditioning side. In this part of the method, `x` denotes the input query as a whole, and `y` is its reply.

KgCVAE extends the basic approach with an observed feature, `l`, that the authors supply using the response function. Its dependency structure gives the generation of `y` access to `x`, `z`, and `l`, while `l` itself depends on `x` and `z`. Training adapts the variational bound to account for that extra feature jointly with the other quantities. The idea is to guide the learned variation with a label whose meaning is known, while retaining a latent representation that can capture variation beyond the label.

SeFun-CVAE addresses the relationship between sentence function and informative content more directly. Its objective conditions on the response function in the distribution used for training.

```
p(y, z | x, dᵧ)
```

Here `p` is the conditional joint distribution of reply `y` and latent variable `z`. The query `x` and response-function label `dᵧ` are the known inputs to that distribution, shown after the vertical bar. Each comma groups quantities on the same side of the conditioning expression. The response function is thus present explicitly in the distribution whose variational lower bound the approach optimizes.

SeFun-CVAE also adds a discriminator, a component trained to recover the response function from information encoded in the latent variable. This gives the latent representation a reason to preserve features associated with that function. Its decoder further distinguishes function-related words, topic words, and ordinary words. The generative comparisons therefore expose several ways of using the same target label. In C-Seq2seq it is a repeated decoder input. In KgCVAE it is a feature tied to the learned latent representation and the output. In SeFun-CVAE it also has a dedicated recognition constraint and a role in how the decoder treats vocabulary.

### Experiments and results

#### Classifying the text of queries and replies

The first evaluation asks whether the system can reproduce the human labels on existing segments. The authors randomly select 10,000 query segments and 10,000 reply segments from STC-SeFun for testing. They compare the convolutional and recurrent encoders under separate training and under joint training. They report accuracy, the proportion of correct classifications, together with macro-F1 and micro-F1. F1 combines precision, the reliability of assignments to a class, with recall, the recovery of instances of that class. Macro-F1 gives the classes equal weight. Micro-F1 aggregates the underlying decisions so that common classes contribute more instances. Reporting both shows how performance depends on which parts of the dataset get the most weight.

At the broad level, the highest query-segment accuracy is 97.6%, shared by the separately and jointly trained recurrent encoders. The joint recurrent encoder records macro-F1 of 91.2 and micro-F1 of 97.5 on query segments. On test reply segments, it reaches accuracy of 95.8%, macro-F1 of 85.9, and micro-F1 of 95.8 for broad functions. The reply figures distinguish two effects. Assigning the broad family is typically successful, but some families still have weaker coverage than the aggregate accuracy suggests.

At the fine level, the joint recurrent encoder scores accuracy of 87.6% and micro-F1 of 87.6 on query segments. Its macro-F1 for the same task is 64.2. On reply segments it reaches 80.6% accuracy, 80.6 micro-F1, and 53.4 macro-F1. The fine categories are harder to recover, especially under a metric that gives them equal weight. The authors nevertheless regard the classifier as adequate for distinguishing the dominant functions and use it to label the large conversation collection. For fine-grained classification of replies, the accuracy comparison shows how closely the recurrent and convolutional configurations perform in aggregate, while the macro-F1 scores discussed below tell more about the choice of encoder.

Fine-grained classification accuracy on STC-SeFun test reply segments Joint training with the recurrent encoder gives the highest accuracy on reply segments.

**The numbers**

| System or setting | accuracy % |
| --- | --- |
| Convolutional encoder, separate training | 79.0 |
| Recurrent encoder, separate training | 80.0 |
| Convolutional encoder, joint training | 80.3 |
| Recurrent encoder, joint training (this paper) | 80.6 |

The paper places these results alongside earlier work by Ke and colleagues. That work reported 78% accuracy on a 4-class task evaluated on 250 sentences. The authors take their experiments as evidence that their classifier is usable for large-scale automatic annotation. The comparison gives context for that decision, while differences in test data, sample size, and label inventory make the paper’s own held-out evaluations the more direct evidence for its particular labeling setup.

#### Predicting a function before the reply exists

The second evaluation compares each prediction with the annotated function of the reply actually paired with the query. It uses 5,000 test queries. The authors compare the same encoder families with and without a representation of the query’s functions. The strongest broad accuracy reported for these queries is 81.3%, from the recurrent encoder with query functions. It also has broad micro-F1 of 81.5 and macro-F1 of 28.5. The recurrent encoder given the query text alone achieves 77.9% broad accuracy and 30.3 macro-F1. Which predictor looks stronger therefore depends on whether correct decisions across examples or coverage across classes receives more emphasis.

For fine-grained prediction, the selected recurrent encoder with query labels scores 65.5% accuracy, 25.7 macro-F1, and 65.7 micro-F1. The recurrent encoder without those labels records 65.6% accuracy, 25.8 macro-F1, and 65.5 micro-F1. The convolutional encoder with query labels ties the latter’s accuracy at 65.6%, with 21.1 macro-F1 and 65.6 micro-F1. There is a considerable gap between the example-weighted and class-weighted views of the task. The arrangement chosen for the conversation experiments combines the strongest reported broad accuracy and fine micro-F1, while other settings lead under some of the remaining measures.

The authors explain that reply-function prediction is more subjective than recognizing a function in existing text. Its test target describes one observed response, whereas the input query is compatible with other possible responses. An observed reply that asks for clarification is a valid example of how the exchange proceeded. It does not establish that a direct answer or an expression of surprise would have been unsuitable. The prediction scores thus measure agreement with recorded reply functions. The later evaluation of completed replies asks a different question about the usefulness of choosing a target in practice.

#### Human judgments of the replies

The conversation experiments use human judgments because overlap-based automatic evaluation can disagree with people’s assessments of open-domain replies. Three annotators evaluate the top reply for 200 sampled test queries on fluency, relevance, informativeness, and function accuracy. Fluency concerns grammatical quality. Relevance concerns whether the response addresses the query. Informativeness concerns meaningful, specific content related to the query. Function accuracy concerns compatibility with the predicted target. The paper gives 0 and 5 as the grading endpoints and normalizes the average scores to [0, 1], presenting the results as percentages. Its motivation for using people draws on [How NOT To Evaluate Your Dialogue System](https://md.research.elamur.ai/free/en/papers/liu-2016-how-not-evaluate-your-dialogue/).

The word *accuracy* has a different measurement target here from the one it has in the classification experiments. When evaluating a classifier, the authors compare a predicted label with an annotation. When evaluating a conversation system, people judge how well the finished reply fits the target the system was given. A reply can satisfy that target without being a satisfactory response to the query, which is why relevance and informativeness are rated separately. Conversely, a relevant response could use a different sentence function from the one requested.

#### Retrieval gains from reranking

At the broad level, retrieval without reranking receives 63.4 for fluency, 68.4 for relevance, and 61.5 for informativeness. With reranking, those scores are 69.6, 74.4, and 77.2, respectively. Its compatibility score for the broad target is 50.5 after reranking, compared with 34.3 for the baseline. Because reranking directly pressures candidates towards the predicted function, improved compatibility is the intended immediate effect. Gains on the other dimensions show that the selected replies were also judged more favorably as responses to the sampled queries.

At the fine level, the results follow the same pattern. The ranking based on lexical similarity alone receives 63.0 for fluency and 68.2 for relevance. The reranked replies receive 68.0 and 73.4 for the same measures. Their function-accuracy score is 38.6, compared with 25.0 for the baseline. Informativeness gives the comparison shown below. Each chart entry uses the human evaluation of the top replies on the same reported test setting.

Retrieval informativeness on the short-text conversation test queries Function-based reranking improves judged informativeness at both label levels.

**The numbers**

| System or setting | normalized informativeness % |
| --- | --- |
| Retrieval baseline, broad functions | 61.5 |
| Reranked retrieval, broad functions (this paper) | 77.2 |
| Retrieval baseline, fine functions | 61.6 |
| Reranked retrieval, fine functions | 75.3 |

Both versions of reranking improve each reported dimension over their respective baselines. The broad-target reranker produces higher scores than the fine-target reranker in this human evaluation. The earlier experiments also show that broad labels are easier to predict. The reply evaluation establishes how the complete configurations compare, while the broad–fine comparison changes both the specificity of the guidance and the reliability with which the system can estimate it.

#### Response generation with function guidance

Seq2seq is the unconditioned generation baseline. The three guided alternatives are C-Seq2seq, KgCVAE, and SeFun-CVAE. At the broad level, C-Seq2seq leads the generators in relevance at 65.0 and informativeness at 51.6. Its fluency score is 55.9, and its function-accuracy score is 33.0. SeFun-CVAE gives the strongest function-accuracy score, 34.5, while KgCVAE gives the strongest fluency score, 57.6. The baseline scores 61.5 for relevance, 49.3 for informativeness, 55.4 for fluency, and 32.0 for function accuracy. The best configuration depends on which aspect of the output matters most.

With fine-grained guidance, C-Seq2seq leads the generative comparison for all the reported measures. It scores 58.9 for fluency, 64.7 for relevance, 50.9 for informativeness, and 37.2 for function accuracy. The fine-level Seq2seq baseline receives 53.0, 62.3, 48.9, and 35.0, respectively. SeFun-CVAE also improves over the baseline across those dimensions. KgCVAE obtains 33.7 for function accuracy, below the 35.0 from the unconditioned baseline, even as it receives higher ratings than the baseline for fluency, relevance, and informativeness. Giving a generator the label and getting replies that people judge compatible with it are separate accomplishments.

Fine-grained generation relevance on the short-text conversation test queries Direct conditioning of the decoder receives the strongest relevance rating among the tested generators.

**The numbers**

| System or setting | normalized relevance % |
| --- | --- |
| Seq2seq | 62.3 |
| KgCVAE | 63.2 |
| SeFun-CVAE | 63.7 |
| C-Seq2seq (this paper) | 64.7 |

The retrieval systems receive stronger ratings than the generators for fluency, relevance, and informativeness in these comparisons. The best generator at each label level does exceed the corresponding plain retrieval baseline in function accuracy. At the broad level, SeFun-CVAE records 34.5 against 34.3 for the retrieval baseline. At the fine level, C-Seq2seq records 37.2 against 25.0. Both fall below the rerankers at the corresponding level, which score 50.5 and 38.6. In this experiment, choosing among existing replies using both query similarity and candidate function gives the strongest results across the human judgments.

### What the ablations show

#### Encoder choice and shared training

The encoder and training setups give the paper controlled comparisons on classification. Replacing the convolutional encoder with the recurrent one generally improves the results. The clearest separation appears when the fine-grained classes receive equal weight. On the fine-label query test, separated training gives macro-F1 of 52.0 with the CNN and 65.8 with the RNN. On the fine-label reply test, the corresponding results are 43.3 and 54.2. These comparisons favor the recurrent representation in this setup. They do not trace the improvement to any particular word pattern or group of labels, since the reported averages combine those effects.

The separate and joint settings give a different view of performance. Training the recurrent classifier on both roles gives the highest fine-level accuracy for each, with 87.6% on query segments and 80.6% on reply segments. Separate recurrent training reaches 87.2% and 80.0%, respectively. For fine-level macro-F1, separate training yields 65.8 on queries and 54.2 on replies, whereas the joint setting gives 64.2 and 53.4. Joint training supports one classifier for the whole corpus and performs well on the aggregate metrics the authors prioritize. Equal weighting across all classes gives some reason to prefer the role-specific classifiers under these test conditions.

#### What changes when the predictor sees query functions

With the query text held as an input, the authors test adding its function representation to the classifier that selects a reply function. The strongest improvement in fine-grained accuracy occurs for the convolutional predictor, which scores 55.7% without query labels and 65.6% with them. Fine macro-F1 moves from 23.5 to 21.1 in that same comparison. For the recurrent predictor, query labels help broad accuracy, which moves from 77.9% to 81.3%. At the fine level, accuracy moves from 65.6% to 65.5%, while micro-F1 moves from 65.5 to 65.7.

The pattern shows that an explicit account of the query’s function can contribute to reply prediction, with its value depending on the encoder and what the score rewards. The text itself contains clues about function, so two encoders can benefit differently from having a label supplied as an additional input. The experiments establish the observed interactions. They give no breakdown of which reply categories gained from which query categories, or whether the additional features help primarily where the textual cues are weak.

#### Adding function guidance to the response system

The plain and reranked retrieval configurations begin with the same approach to finding candidates. Reranking adds a function-dependent adjustment. The human judgments favor that change for matching the target, and they also favor the new choices on grammatical quality, relevance, and informative content. Those gains make sense as a consequence of choosing a different existing reply. A candidate can be an imperfect answer to the current message even if its associated query shares words with that message. When several candidates are plausible by similarity, the candidate’s function supplies another reason to favor one over the others.

The comparison between Seq2seq and C-Seq2seq isolates a relatively direct intervention in generation. The decoder gets a function embedding at each step. That version improves on the baseline for every reported measure at both label levels. The comparison between KgCVAE and SeFun-CVAE addresses a different question. SeFun-CVAE gets higher function-accuracy ratings at both levels, including 34.5 against 29.0 for broad labels and 36.7 against 33.7 for fine labels. The authors interpret this as evidence that explicitly training the latent representation to carry function information helps. The two designs also differ in how they condition generation and handle words in the decoder. Their comparison measures the designs together. An effect attributable solely to the discriminator would require a comparison that changes only that component.

#### How the choices look in individual exchanges

One example in the paper begins with a remark suggesting that people who often drift into thought have a private inner world. The retrieval baseline chooses a question asking why someone likes to daydream. That reply borrows the central vocabulary but changes the exchange into a request for an explanation. The reranker chooses a first-person statement about keeping a quiet world inside. The reply picks up the image and makes it personal. The target in the example is a negative declarative. The displayed reply illustrates how the new ranking can give a more coherent continuation even when the English rendering offers little obvious evidence of the specific negative target.

The other example starts with someone describing a quarrel and a fight with a brother. The predicted fine function is an exclamation with an interjection. The plain retrieval reply brings up the idea of fighting and making up. The reranked reply reacts with laughter and says the speaker wants to show it to a brother. Here both replies can be connected to the original subject, but they act differently on the conversation. The reranked choice is recognizably a reaction. The generators also illustrate a range of responses, from a broad expression of amusement or affection to a reaction that brings in a brother of the respondent’s own. The examples show how a system can change the kind of continuation it offers without following the query’s word overlap as closely.

These examples illustrate individual choices behind the aggregate ratings. In the daydreaming exchange, responding to the image can matter more than repeating the wording. In the quarrel exchange, an interjection and a personal connection make the reply more specific. Neither example identifies how often a particular mechanism explains the score gains. The experiment samples finished responses and evaluates the combined effects of the predictor, the candidate set or generator, and the way the system uses the predicted function.

### Limitations

#### Limits the authors identify

The authors call attention to the uneven distribution of sentence functions. Common labels dominate the dataset, and macro-F1 is considerably lower than micro-F1, especially for fine-grained classification. They justify using the automatic labels because the system is effective on the categories that dominate their conversations. That justification has a corresponding limit. The study gives much weaker assurance about the assignment of rare functions. In the human-labeled data, distinctions such as commands, prohibitions, and some interrogative subtypes occur only infrequently. A corpus can be very large after automatic labeling while still relying on limited evidence about those distinctions in its initial training annotations.

The authors also limit prediction to a single response function and leave prediction of multiple functions for future work. This matters because the annotation scheme permits the same reply to contain multiple segments and because several appropriate responses can take different forms. A classifier that picks a reasonable single target can help a system produce an appropriate reply. Its recorded accuracy measures agreement with the reference response, however, and cannot directly measure how often it chose one of several other acceptable targets. The paper recognizes the resulting subjectivity when explaining why this task is harder than labeling existing text.

The authors use human judgments because earlier work found limitations in automatic scoring for open-ended dialogue. That choice suits an evaluation concerned with whether a reply makes sense in relation to a query. The evaluation target is still the top response to a short input. It captures quality as judged at that moment. The single-round scope is reflected both in what annotators are asked to judge and in the categories the authors remove when adapting the dialogue-act inventory.

#### Limits visible in the setup

The data are drawn from selected Chinese social media conversations. Before function annotation, people choose pairs whose replies appear relevant and informative or interesting. Some further pairs are discarded during label reconciliation. This produces a cleaner source for learning, with the result that the labels and distributions describe exchanges that survived those decisions. The tests establish performance in that setting. Extending the same inventory or accuracy expectations to unfiltered posts, longer exchanges, other languages, or spoken interactions would require evidence from those settings. Functions that depend on intonation or events across several turns have deliberately been left outside the inventory.

The human annotations and automatic labels are also produced with different views of the text. People label a segment after seeing its side of the exchange and the other side together. The segment classifier is designed to assign the label from the segment. Sometimes the missing context may contain evidence that determines a human judgment. Other segments will reveal their function through conventional wording. The reported averages give the overall performance of this procedure. They do not reveal how much of the error comes from having less context than the annotator, which would require evaluating the same task with and without the paired message.

The scale of STC-Auto-SeFun describes how many pairs the system could annotate. The held-out test describes agreement with people on samples from STC-SeFun. These are distinct forms of evidence. The scale figure on its own cannot establish label quality across the automatic collection, including its rare categories. Errors can also matter at later stages. An incorrectly labeled training reply can weaken the association a generator learns between a function and its wording. In retrieval, a mismatched target or candidate label can lead to an otherwise useful response moving down the list. The response ratings show that the complete procedure helps on balance in the test, without measuring the contribution of each of these possible errors.

The generation results also test particular implementations. The direct conditioning approach performs well, and the more elaborate approaches produce a mixed pattern. Because the systems differ in several details, the comparison leaves open which differences in output come from the representation of sentence function and which come from the rest of the training and decoding design. The simpler baseline comparison provides a cleaner estimate of what happens when the decoder receives a label. It still operates with a specific corpus, a specific vocabulary, selected predictor outputs, and a fixed search procedure. Different configurations could change the tradeoff between following the intended function and writing informative text.

The human judgments on 200 sampled queries are evidence about the top outputs, but the results give aggregate ratings without intervals or a measure of agreement among raters. Some generation configurations have close scores, so their ordering conveys the observed comparison without establishing how stable it would be on another sample. The assessment also treats relevance, informative content, grammatical quality, and target compatibility as judgments on individual replies. It does not follow the conversation to learn whether the user responds, whether the exchange stays coherent later, or whether selecting the function changed the course of the conversation in a desirable way.

Fine granularity is central to the dataset, and the retrieval results show that function guidance works when the fine labels are used. The strongest broad results show that coarse guidance is also effective. A finer target can specify more about a reply, but it is harder to predict and leaves fewer candidates that match it. The paper compares the complete coarse and fine configurations. Their results leave open how either would perform if supplied with a human-selected target, several acceptable targets, or equally reliable automatic labels. Those conditions would help distinguish the value of specificity from the cost of estimating it.

### What came after

A later citing work from 2022 is *Recent advances in deep learning based dialogue systems: a systematic survey*. Its connection is through a survey of dialogue research. The citation establishes that Bi and colleagues’ study was among the work it cited. It leaves open whether the survey discussed the annotated collection, the function-prediction task, the response experiments, or some combination of them. The established link is to the survey literature rather than to an identified reuse or extension of STC-SeFun. [Recent advances in deep learning based dialogue systems: a systematic survey](https://md.research.elamur.ai/free/en/papers/ni-2022-recent-advances-deep-learning-based/)

## Cite

Cite as Wei Bi, Jun Gao, Xiaojiang Liu and Shuming Shi. 2019. Fine-Grained Sentence Functions for Short-Text Conversation. Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.18653/v1/p19-1389](https://doi.org/10.18653/v1/p19-1389)

```bibtex
@inproceedings{bi2019fine,
  title = {{Fine-Grained Sentence Functions for Short-Text Conversation}},
  author = {Wei Bi, Jun Gao, Xiaojiang Liu and Shuming Shi},
  booktitle = {Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics},
  year = {2019},
  doi = {10.18653/v1/p19-1389},
  url = {https://doi.org/10.18653/v1/p19-1389}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
