proScript: Partially Ordered Scripts Generation via Pre-trained Language Models

Keisuke Sakaguchi, Chandra Bhagavatula, Ronan Le Bras, Niket Tandon, Peter Clark, Yejin Choi

Abstract

Scripts—standardized event sequences describing typical everyday activities—help understand narratives by providing expectations, resolving ambiguity, and filling in unstated information. However, they have proved hard to author or extract from text. We demonstrate that pre-trained neural language models (LMs) can be fine-tuned to generate high-quality scripts at varying levels of granularity for a wide range of everyday scenarios. We introduce proScript, a large (6.4k) crowdsourced dataset of partially ordered scripts. We define two tasks: edge prediction and script generation. Our experiments show that our models perform well (F1=75.7 in edge prediction), though a gap remains compared to human performance.

Introduction: Beyond Linear Sequences

In artificial intelligence, "scripts" represent the common-sense knowledge of how everyday activities unfold. For instance, "baking a cake" involves a series of steps like gathering ingredients, mixing them, and putting the batter in the oven. Traditionally, script research has focused on linear sequences. However, real-world tasks are often non-linear; some steps must happen in a specific order, while others can occur in parallel or in any order.

A partially ordered script for "bake a cake" represented as a Directed Acyclic Graph (DAG).

The proScript framework addresses this by formalizing scripts as Directed Acyclic Graphs (DAGs). This allows for "partial ordering," where the model understands that you can "turn on the oven" either before or after you "gather the ingredients," but you must do both before putting the batter in the oven.

The proScript Dataset

To facilitate this research, the authors created proScript, a crowdsourced dataset containing 6,414 scripts and over 311,000 event pairs. This dataset is significantly larger than previous efforts like DeScript (which had only 40 scripts).

Scenarios in proScript range from high-level tasks like "opening a small business" to fine-grained ones like "signing into an email account." A unique feature of proScript is the inclusion of temporal durations for events, providing a richer context for causal and temporal reasoning.

Methodology: Graphs as Language

The researchers treated script generation as a sequence-to-sequence problem. By using the DOT language—a standard plain-text format for describing graphs—they enabled large language models like T5-11B to output structured data.

Two primary tasks were evaluated:

  1. Edge Prediction: Given a scenario and a set of unordered events, the model predicts the temporal relationships (edges) between them.
  2. Script Generation: Given only a scenario name, the model generates both the individual steps (nodes) and their partial ordering (edges).

Key Results and Insights

The T5-11B model demonstrated a strong ability to learn graph syntax, with 99% of its outputs being syntactically valid. In the edge prediction task, it achieved an F1 score of 75.7, far surpassing random baselines but still trailing the human benchmark of 89.3.

A critical finding was that the complexity of the script's structure significantly impacts performance. As the "degree" of the DAG increases (meaning more complex branching and parallel steps), model performance drops.

Performance comparison (F1 score) between proScript models and humans across different graph degrees.

Interestingly, pre-training on linear procedures from WikiHow did not yield significant gains. This suggests that the challenge lies specifically in understanding the lack of order between independent steps, a nuance missing from strictly linear datasets.

Conclusion and Future Directions

While proScript models show impressive capabilities in generating procedural logic, they are not yet perfect. Roughly 15% of errors involve fundamental ordering mistakes (e.g., baking before mixing). Future work may involve integrating the temporal duration data to improve causal understanding or applying these models to complex narrative generation and robotic task planning. Together, the proScript dataset and models provide a robust foundation for future research into common-sense script knowledge.

Summary updated

BibTeX
@inproceedings{sakaguchi2021proscript,
  author = {Keisuke Sakaguchi and Chandra Bhagavatula and Ronan Le Bras and Niket Tandon and Peter Clark and Yejin Choi},
  title = {{proScript: Partially Ordered Scripts Generation via Pre-trained Language Models}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2021},
  doi = {10.18653/v1/2021.findings-emnlp.184},
}
Figure