Introduction
In natural human conversation, the functional meaning of an utterance is frequently contingent upon the preceding discourse. For computational systems, understanding spoken language extends beyond simple transcription; it requires identifying the "Dialogue Act" (DA)—the specific communicative role of a sentence. A significant challenge in DA recognition is ambiguity. For instance, the word "Yeah" can function as a Yes-Answer in response to a direct question, or as a Backchannel (indicating active listening) during a longer explanation. Traditional models often treat utterances in isolation, failing to capture these critical contextual nuances. Discourse-Wizard addresses this by employing Hierarchical Recurrent Neural Networks (HRNNs) to model the flow of conversation.
Methodology
The research evaluates two primary neural architectures designed for DA classification:
- No-context Model: This baseline utilizes a standard Long Short-Term Memory (LSTM) network. It processes an individual utterance as a sequence of word embeddings to output a DA label.
- Context-based Model (HRNN): This hierarchical approach utilizes the hidden state representations ("thought vectors") generated by the no-context model. It takes the representation of the current utterance along with $n$ preceding utterances and feeds them into a second-layer LSTM. This higher-level network tracks the sequential dependencies of the conversation to predict the current DA.
The system is implemented via a modular web architecture. A Model Server (Keras, TensorFlow, Flask) handles the neural computations, while a Web Interface (Django) provides a real-time platform for users to input and analyze dialogues.
Experimental Setup
The models were trained and evaluated on the Switchboard Dialogue Act (SwDA) corpus, a benchmark dataset consisting of 1,115 training and 19 testing conversations. Utterances are annotated using the DAMSL (Dialogue Act Markup in Several Layers) tag set, which encompasses 42 distinct dialogue act classes. The sequential nature of this corpus is vital for training the hierarchical model to recognize discourse patterns.
Results and Discussion
Quantitative analysis demonstrates that incorporating context significantly improves classification accuracy. The context-based model (with $n=2$) achieved an accuracy of 74.37%, compared to 71.76% for the no-context baseline. Both models substantially outperformed the most common class baseline of 31.50%.
Key findings from the experiments include:
- The "Context Jump": Including just one previous utterance ($n=1$) resulted in a 2% accuracy boost, confirming that immediate history is highly informative.
- Diminishing Returns: Performance peaked at $n=2$. Adding further context ($n=3$ or $n=4$) yielded negligible gains, suggesting that local discourse structure is the primary driver for DA recognition.
- Qualitative Disambiguation: The context-based model successfully resolves ambiguities that baffle isolated models. For example, it correctly identifies "Yeah" as a Yes-Answer when it follows a question, whereas the baseline model frequently defaults to Backchannel regardless of the preceding turn.
Conclusion
Discourse-Wizard demonstrates that a relatively simple hierarchical LSTM structure is highly effective for deep discourse analysis. By modeling the temporal dependencies between utterances, the system achieves performance competitive with state-of-the-art methods. Future work will explore attention mechanisms to better weight historical context and the integration of Automatic Speech Recognition (ASR) for live multimodal interaction.
Summary updated