Abstract
Llamipa (Llama Incremental Parser) introduces a novel approach to discourse parsing by fine-tuning Large Language Models (LLMs) to construct conversation structures incrementally. By treating existing discourse graphs as context, Llamipa effectively models complex, long-distance relationships in multiparty and situated dialogues. Experimental results demonstrate that Llamipa significantly outperforms previous encoder-only architectures, setting new state-of-the-art benchmarks on several key datasets.
1. Introduction
Discourse parsing is the task of identifying semantic relations between Elementary Discourse Units (EDUs)—the building blocks of conversation. Understanding whether a statement functions as an explanation, a correction, or an answer is critical for conversational AI. However, this task is complicated by structural complexity, where conversations form Directed Acyclic Graphs (DAGs) rather than simple trees, and a lack of explicit surface cues like "because" or "however."
2. Problem Statement
Previous state-of-the-art models, typically based on BERT-style encoders, often struggle with "long-distance" relations where the relevant context occurred many turns prior. These models frequently examine pairs of EDUs in isolation or within very narrow context windows, failing to capture the broader flow of multiparty or situated dialogue.
3. Methodology
Llamipa addresses these challenges by fine-tuning Llama 3 (8B) and Llama 2 (13B) using QLoRA. The core innovation is an incremental parsing strategy:
- Contextual Input: The model receives a sliding window of the 15 most recent discourse units alongside the discourse graph it has already constructed for those units.
- Joint Prediction: It simultaneously predicts both the "links" (attachment points) and the "relations" (semantic labels).
- Structural Reasoning: By including the existing discourse structure in the prompt, the model can use the logic of the preceding conversation to inform its next prediction.
4. Experimental Setup
The model was evaluated on three primary datasets annotated using Segmented Discourse Representation Theory (SDRT):
- MSDC (Minecraft Structured Dialogue Corpus): Situated, task-oriented dialogues involving both chat and non-linguistic actions.
- STAC: Multiparty chats from an online version of Settlers of Catan.
- Molweni: Ubuntu forum exchanges used for out-of-domain generalization testing.
5. Results and Discussion
Llamipa3 set a new state-of-the-art across all evaluated metrics. On the MSDC dataset, it achieved an F1 score of 0.88 for link prediction and 0.80 for joint link and relation prediction, a substantial improvement over the BERT-based baseline.
Ablation studies confirmed that the inclusion of the discourse graph in the prompt is vital. Performance on complex relations like Narration and Correction plummeted when the structure was removed, proving that the LLM is actively reasoning over the provided graph. Furthermore, Llamipa successfully internalizes recurring structural patterns, such as "correction triangles," to resolve difficult semantic links.
6. Conclusion and Future Work
Llamipa demonstrates the power of using generative LLMs for incremental discourse parsing. While the current model relies on gold segmentation (pre-split EDUs), future iterations will focus on integrating automatic segmenters and deploying these discourse-aware models into real-time conversational agents. Such integration is essential for robots and virtual assistants that must understand corrections and narrative flow to act effectively in dynamic environments.
Summary updated