Abstract
Plan recognition (PR)—the task of inferring an agent's goals from a sequence of observed actions—shares deep structural similarities with natural language parsing. This paper proposes that the formalisms developed for "mildly context-sensitive grammars" (MCSGs) in linguistics can address long-standing efficiency and expressivity issues in PR. By mapping Hierarchical Task Networks (HTNs) to these advanced grammars, researchers can handle complex, non-linear plans with polynomial-time complexity.
Introduction
For decades, the fields of Natural Language Processing (NLP) and Plan Recognition (PR) have operated in silos. While NLP researchers have spent years refining grammars to handle the complexities of human speech, PR researchers have often struggled with "plan libraries" that are either too simple (context-free) or computationally explosive (NP-hard).
A significant challenge in PR is efficiently handling "crossing dependencies"—situations where multiple goals are interleaved or where actions for one part of a plan are mixed with actions for another. Current PR approaches often resort to brute-force search or complex probabilistic models that do not scale well. This paper aims to bridge this gap by showing that the structural problems in planning are isomorphic to the structural problems in linguistics.
Mapping Plans to Grammars
The core of this theoretical synthesis is the mapping of Hierarchical Task Networks (HTNs) to formal grammars. In this framework, a plan library is viewed as a grammar where the "language" consists of sequences of actions rather than words.
- Operators to Terminals: Individual actions (operators) are mapped to terminal symbols.
- Methods to Production Rules: High-level tasks (methods) are represented as non-terminal production rules.
While Context-Free Grammars (CFGs) can represent simple, totally ordered plans, they fail to handle partial ordering or interleaved tasks without an exponential explosion in the size of the grammar. The authors demonstrate that the structural mapping between HTN components (name, task, sub-tasks, constraints) and CFG components (N, Σ, P, S) is formally sound but limited in practice.
The Challenge of Crossing Dependencies
Real-world plans are rarely linear. Causal links—where one action provides the preconditions for another—often create "crossing" structures. For example, in a bank robbery scenario, the agent might need to open a bag and put on a mask before entering the bank, but the sequence of these actions can interleave with other necessary steps like picking up a weapon.
These crossing dependencies are structurally identical to syntactic dependencies found in languages like Dutch. Just as CFGs fail to parse these linguistic structures efficiently, they fail to handle non-linear plans without significant overhead. The authors argue that PR requires at least the power of Linear Index Grammars (LIGs) to be truly useful for real-world, non-linear plans.
Mildly Context-Sensitive Grammars (MCSGs)
To solve this, the authors propose using Mildly Context-Sensitive Grammars (MCSGs), such as Combinatory Categorial Grammars (CCG) or Tree Adjunction Grammars (TAG). These grammars sit in the "sweet spot" of the Chomsky hierarchy: they are more expressive than CFGs but remain polynomially parsable (efficient to compute).
By adopting MCSGs, PR systems can maintain computational efficiency (avoiding NP-hardness) while gaining the expressivity needed for real-time applications, such as assistive robotics or complex activity monitoring. This shift allows PR to handle interleaved goals and partial ordering without the "unacceptable increase in the size of the grammar" that plagues CFG-based approaches.
Conclusion and Future Work
This work establishes a formal isomorphism between HTN components and grammar components, proving that the structural problems in planning are isomorphic to those in linguistics. While the authors prove that MCSGs are necessary to handle crossing dependencies, they acknowledge it is still an open question whether they are sufficient for all possible plan structures.
Future research should focus on empirical validation by implementing a PR system using a CCG or TAG parser and testing its performance against traditional PR algorithms. Additionally, while the structure of NLP and PR can be unified, the probability models used to rank different explanations might still need to remain distinct, integrating corpus-based statistics with Markov models of world dynamics.
Summary updated