Narrative Twins in Computational Linguistics
- Narrative twins are defined as pairs of texts with identical underlying plots yet distinct surface forms, enabling theory-driven experiments in narrative analysis.
- They serve as positive pairs in contrastive learning, using bi-directional Transformers and InfoNCE loss to enhance unsupervised narrative salience modeling.
- The concept extends to Byzantine Fault Tolerant systems, where twin nodes simulate divergent internal states to systematically uncover protocol bugs.
Narrative twins are formally defined as pairs of texts that encode the same underlying plot but differ at the surface realization—orthographically, lexically, or in minor detail. Let be the space of narrative texts and the space of plots, with a (latent) mapping assigning each text its plot. Two narratives are narrative twins if but in their textual form. This structural equivalence—identical event sequences realized through distinct wording—provides an explicit separation of narrative content and surface features, permitting theory-driven experiments in both consensus systems and computational story understanding.
1. Theoretical Motivation and Definition
Narrative twins arise from the premise that plot—the core causal skeleton of salient events—determines narrative meaning, while the specific choice of words and minor details (surface form) is incidental. In computational terms, narrative twins are sampled from a common plot under independent surface realizations. This framework makes narrative twins an ideal positive signal in contrastive learning: their embeddings should be forced together, capturing the invariant structure that defines a story’s essence despite variation in expression (Sterner et al., 12 Jan 2026).
In Byzantine Fault Tolerant (BFT) protocols, the “twins” mechanism is generalized to system testing: creating twin nodes with the same network credentials but divergent internal states or event schedules, thus systematically emulating Byzantine deviations without handcrafted malicious code (Bano et al., 2020).
2. Contrastive Learning with Narrative Twins
The principal application of narrative twins in natural language processing is as positive pairs for contrastive representation learning. Given an encoder (typically a bi-directional Transformer such as BERT), stories are embedded into fixed-length vectors via pooling over contextualized token embeddings. For each anchor story , its narrative twin serves as the unique positive, while hard negatives 0 (distractors) are selected for maximal plot dissimilarity yet superficial similarity. The InfoNCE loss employed is:
1
where 2, 3, and 4 are the embeddings for hard negatives. The temperature parameter 5 modulates sharpness. Minimization pulls anchors towards their twins, separating them from distractors and other batch examples (Sterner et al., 12 Jan 2026).
When explicit twins are unavailable, pseudo-twins are formed via random dropout on the same input, producing two embeddings treated as positives (“dropout twins”).
3. Construction of Narrative Twins and Distractors
Generating robust narrative twins and hard negatives is essential. In short-format ROCStories, twins are produced by prompting LLMs to expand and compress stories multiple times, yielding distinct surface variants with identical plots. For longer Wikipedia plot summaries, multilingual summary pairs (“Tell Me Again!” dataset) are aligned via dynamic time warping on sentence embeddings, segmenting stories for window-level comparison.
Distractors are generated through LLM rewriting (preserving low-level details while altering the climax) in short stories, or by treating non-overlapping windows within the same long narrative as negatives—exploiting stylistic and character overlap for high challenge (Sterner et al., 12 Jan 2026).
4. Narratological Operations for Salience Inference
After training, the narrative twin-augmented encoder allows unsupervised salience scoring of story events via four narratological perturbations:
- Deletion: Remove sentence 6 and compute 7
- Shifting: Move sentence 8 to position 9, average similarity drops, 0
- Disruption: Measure change in embedding across sentence boundary, 1
- Summarization: Compute similarity between each sentence and the full story, 2
Higher 3 values indicate greater salience.
5. Empirical Results in Narrative Salience Modeling
Experimental evaluation on ROCStories and Wikipedia plot summaries demonstrates that models trained with narrative twins (explicit or via dropout) outperform masked-language-model baselines for salience inference. Results are summarized as follows:
| Operation | Masked LM (AUC) | Dropout Twins (AUC) | Narrative Twins (AUC) |
|---|---|---|---|
| Deletion | 0.61 | 0.70 | 0.70 |
| Shifting | 0.59 | 0.63 | 0.66 |
| Disruption | 0.42 | 0.53 | 0.57 |
| Summarization | 0.62 | 0.70 | 0.76 |
Summarization consistently delivers the most reliable salience identification, in line with narratological theory regarding “cardinal functions.” Hard distractors further benefit performance over naïve in-batch negatives. Dropout twins approach the performance of explicit textual twins, reducing dependency on costly LLM generation (Sterner et al., 12 Jan 2026).
6. Systematic Testing of Byzantine Systems with Twins
In BFT systems, twins methodology is an automated unit-test generator that instantiates twin node processes sharing the same identity. By placing twins in different network partitions or driving divergent event schedules, practical Byzantine misbehavior—including leader equivocation, double voting, and lock amnesia—is simulated. Scenario generation covers all node partitions (enumerated by Stirling numbers), leader assignments, and round sequences, with billions of unique schedules executable in production environments—e.g., 44 million scenarios per day in DiemBFT.
Twins methodology has uncovered both subtle logical bugs deliberately injected and classical attacks (e.g., on Zyzzyva, FaB, HotStuff variants), and identified new flaws, such as a split-brain bug in Fast-HotStuff by exploiting non-consecutive view commits. Integration into DiemBFT is non-invasive, requiring minimal additional Rust code for twin spawning, round-indexed partitioning, leader oracle insertion, and commit log auditing (Bano et al., 2020).
7. Limitations and Outlook
Explicit narrative twins often require costly LLM prompting or external multilingual resources; dropout-based twins can mitigate this limitation at some loss of theoretical purity. Quality of hard negatives strongly impacts contrastive learning efficacy; naïve negatives are insufficient. In long narratives, windowing may compromise global coherence, with models currently tested only up to ≈34 sentences. The specialization to English and specific domains (commonsense stories, film plots) raises open questions about generalizability to other genres or languages.
In the BFT systems domain, completeness of attack coverage for “full disclosure” protocols and extension to timing-aware synchronous protocols is ongoing work. The twins testing approach is readily portable to other consensus systems given appropriate integration at the process/thread and network layer (Bano et al., 2020).
A plausible implication is that narrative twins constitute a general, theory-grounded framework for both robust testing in distributed systems and unsupervised evaluation of narrative structure in computational linguistics. Their systematic construction and deployment yield scalable solutions to otherwise intractable adversarial scenario enumeration and semantic similarity modeling.