🎉 75% of content is free forever — Unlock Premium from $10/mo →
CW
NEWSLIVESearch All Content
đŸ’ŧ Servicesâ„šī¸ Aboutâœ‰ī¸ ContactView Pricing Plansfrom $10

Rhetorical Structure Analysis: Discourse and Argumentation

Natural Language ProcessingRhetorical Structure Analysis: Discourse and ArgumentationđŸŸĸ Free Lesson

Rhetorical Structure Analysis: Discourse and Argumentation

Module: Natural Language Processing | Difficulty: Advanced

What You'll Learn

  • 1Explain RST nuclearity, satellites, and the 23-relation inventory
  • 2Compute the Catalan count of candidate trees and the 2n-1 cost of shift-reduce decoding
  • 3Implement a shift-reduce parser and a labeled-F1 scorer
  • 4Connect discourse parsing to argument mining and summarization

Rhetorical Structure Theory (Mann and Thompson, 1988) organizes a text as a rooted, mostly binary tree over elementary discourse units (EDUs), and discourse parsing recovers that tree from raw text. Structure matters because nucleus sentences carry the claim a summarizer must keep while satellites carry detail it can safely drop. This lesson builds the formalism, counts the search space exactly, and implements a transition-based parser.

Rhetorical Structure Theory

RST segments a text into EDUs, usually one clause, then recursively joins adjacent spans with named relations. Each relation marks a nucleus, the span whose meaning is central, and one or more satellites that support it. Most relations are binary and asymmetric, while Contrast, List, and Sequence are multinuclear. The RST Discourse Treebank (Carlson et al., 2001) applies the 23-relation inventory to 385 Wall Street Journal articles of about 21,500 EDUs.

RelationNuclearityTriggerExample
ElaborationNSdetail clauseThe board met Tuesday, chaired by Lee
AttributionNSsaid, claimedLee said the deal closed
CauseNSbecause, soSales fell, so costs were cut
ConditionNSif, unlessIf rates rise, bonds sell off
ContrastNNbut, howeverRevenue rose but margins fell
ListNNand, semicolonFirst hire, then train

Nuclearity is a deletion test

Delete the satellite and the text still stands; delete the nucleus and it collapses. That asymmetry cuts the decision space, because a parser chooses nucleus-left or nucleus-right only on top of the 23-way label choice.

Counting the Discourse Search Space

A document of EDUs admits full binary bracketings, because every internal node cuts the leaf sequence at exactly one point. The count grows exponentially, so no practical parser enumerates trees.

Transition-Based Discourse Parsing

Transition-based parsing replaces the cubic chart with a greedy decoder: a buffer holds the remaining EDUs, a stack holds partial constituents, and each step shifts one EDU or reduces the top two stack items. Reducing units to a single root takes exactly shifts and reduces.

Evaluation protocol

Parsers report span F1, nuclearity accuracy, relation F1 on gold spans, and end-to-end labeled F1 over triples. Representative RST-DTB values show that boundaries are nearly solved and relation labels are not.

Sub-taskMetricFeature-basedNeural with BERT
EDU segmentationF195.197.4
Span detectionF176.284.5
NuclearityAccuracy71.880.6
Relation classificationF162.472.3
Full labeled parseF157.571.9

From Discourse to Argumentation

Argumentation mining reuses the tree machinery with support and attack edges instead of rhetorical relations. Toulmin (1958) splits an argument into claim, data, warrant, and backing, and annotators label claim, premise, and the link between them. Review argument detection reaches 81.2 F1 while relation classification sits near 72 F1, the same boundary-driven gap as discourse parsing.

Worked Code

python
from dataclasses import dataclass
from typing import List, Optional, Tuple


@dataclass
class Node:
    text: str
    span: Tuple[int, int]
    relation: str = "Elementary"
    nuc: str = "leaf"
    left: Optional["Node"] = None
    right: Optional["Node"] = None

    @property
    def width(self) -> int:
        return self.span[1] - self.span[0] + 1


def affinity(a: Node, b: Node) -> float:
    # Proxy for a trained reduce classifier: lexical overlap plus span balance.
    ta, tb = set(a.text.lower().split()), set(b.text.lower().split())
    ov = len(ta & tb) / max(1, min(len(ta), len(tb)))
    bal = 1.0 - abs(a.width - b.width) / max(a.width, b.width)
    return 0.6 * ov + 0.4 * bal


def label(left: Node, right: Node) -> Tuple[str, str]:
    t = (left.text + " " + right.text).lower()
    if any(k in t for k in ("but", "however")):
        return "Contrast", "NN"
    if any(k in t for k in ("because", "since", "therefore")):
        return "Cause", "NS"
    return "Elaboration", "NS"


def shift_reduce(edus: List[str], threshold: float = 0.35):
    stack: List[Node] = []
    buf = [Node(e, (i, i)) for i, e in enumerate(edus)]
    actions: List[str] = []
    while buf or len(stack) > 1:
        if len(stack) < 2 or (buf and affinity(stack[-2], stack[-1]) < threshold):
            stack.append(buf.pop(0))
            actions.append("SHIFT")
        else:
            r, l = stack.pop(), stack.pop()
            rel, nuc = label(l, r)
            stack.append(Node(l.text + " " + r.text, (l.span[0], r.span[1]),
                              rel, nuc, left=l, right=r))
            actions.append("REDUCE-" + rel)
    return stack[0], actions


edus = ["Revenue rose 12 percent", "because demand in Asia stayed strong",
        "but margins slipped", "as input costs climbed"]
root, acts = shift_reduce(edus)
print("actions:", acts)
print("count:", len(acts), "= 2n-1 =", 2 * len(edus) - 1)
python
def to_triples(node, out=None):
    """node = (start, end, nuc, relation, left_or_None, right_or_None)."""
    out = [] if out is None else out
    start, end, nuc, rel, left, right = node
    if left is not None:
        out.append((start, end, nuc, rel))
        to_triples(left, out)
        to_triples(right, out)
    return out


def prf(pred, gold):
    hit = len(pred & gold)
    p = hit / max(1, len(pred))
    r = hit / max(1, len(gold))
    return p, r, (0.0 if p + r == 0 else 2 * p * r / (p + r))


def micro_f1(runs, golds):
    P, R, F = [], [], []
    for pred, gold in zip(runs, golds):
        p, r, f1 = prf(set(pred), set(gold))
        P.append(p)
        R.append(r)
        F.append(f1)
    return (sum(P) / len(P), sum(R) / len(R), sum(F) / len(F))


doc1 = (0, 3, "NN", "Contrast",
        (0, 1, "NS", "Elementary", None, None),
        (1, 3, "NS", "Cause",
         (1, 2, "NS", "Elementary", None, None),
         (2, 3, "NS", "Elaboration", None, None)))
doc2 = (0, 2, "NS", "Elaboration",
        (0, 1, "NS", "Elementary", None, None),
        (1, 2, "NS", "Contrast", None, None))

gold1 = [(0, 3, "NN", "Contrast"), (1, 3, "NS", "Cause"),
         (2, 3, "NS", "Elaboration")]
gold2 = [(0, 2, "NS", "Elaboration"), (1, 2, "NS", "Contrast")]

print("doc1 triples:", to_triples(doc1))
p, r, f1 = micro_f1([to_triples(doc1), to_triples(doc2)], [gold1, gold2])
print(f"micro over 2 docs: P={p:.3f} R={r:.3f} F1={f1:.3f}")

Real-World Applications

  • The RST Discourse Treebank's 385 WSJ articles and 21,500 EDUs train every English parser quoted here; annotation agreement is about 76 F1.
  • Rhetorical-role sentence selection adds 1.5 to 3 ROUGE-L points on the 300,000 document-summary pairs of CNN/DailyMail.
  • Review argument detection at 81.2 F1 powers the "most helpful paragraph" panels that retailers extract from million-review corpora.

💡Span accuracy hides the real error

Labeled F1 on RST-DTB typically falls 12 to 15 points below span F1, so a parser that looks strong on boundaries is still losing most of its accuracy at the relation head.

Common Mistakes

Treating every relation as symmetric

Fix: Store nuclearity explicitly; Elaboration needs NS or SN while Contrast needs the multinuclear marker

Evaluating with unlabeled span F1 only

Fix: Report span F1, nuclearity accuracy, relation F1, and labeled F1 separately, since span F1 overstates quality by 12 points

Reducing with a stack of fewer than two nodes

Fix: Guard the reduce action with a stack-depth check, otherwise the decoder crashes or drops an EDU

Best Practices

  • Verify EDU segmentation F1 above 95 before training the parser on top of it
  • Use transition-based decoding beyond 200 EDUs, where 2n-1 beats cubic chart search
  • Publish the 76 F1 annotation ceiling next to your score to show the headroom

Key Takeaways

  • Candidate trees are counted by C(n-1), which is 4,862 at 10 EDUs
  • Shift-reduce needs exactly 2n-1 actions, so 1,000 EDUs cost 1,999 classifier calls
  • F1 = 2PR/(P+R): 80 percent precision with 64 percent recall gives 71.1 F1
  • Argument detection reaches 81.2 F1 while argument relation classification sits near 72 F1

Frequently Asked Questions

Why is a discourse tree binary when a List can have many members?

RST composes units two at a time, so EDUs give internal nodes and bracketings counted by . Longer lists become a chain of binary joins under the same multinuclear label.

How long does a long document take to parse?

Linear decoding means actions, so 1,000 EDUs cost about 1,999 model calls. A cubic chart over the same units touches about 10^9 span cells and takes minutes instead of seconds.

Does discourse structure improve summarization?

Yes: rhetorical-role features add 1.5 to 3 ROUGE-L points over position-only sentence selection on CNN/DailyMail, because nucleus sentences carry the claim and satellites carry detail.

Interview Questions

Q1: What separates a nucleus from a satellite?

The nucleus carries the central claim and survives deletion of the satellite; about 16 of the 23 RST-DTB relations are nucleus-satellite and the rest are multinuclear

Q2: Why do transition-based parsers beat chart parsers here?

They make 2n-1 decisions instead of enumerating C(n-1) trees, so 10 EDUs drop from 4,862 candidate trees to 19 actions

CW

ChatWhole Learn Editorial Team

Written by experienced data scientists, software engineers, and educators. All content is reviewed by industry professionals to ensure accuracy and relevance.

Last reviewed: 2026-10-07

—
☆☆☆☆☆
0 ratings

Rate & Feedback

Continue Learning

Suggested next tutorials based on this topic

Need Expert NLP Help?

Get personalized tutoring, project support, or professional consulting.

Advertisement