N EURO -S YMBOLIC P ROCEDURAL P LANNING WITH C OMMONSENSE P ROMPTING
Anonymous authors
Paper under double-blind review
A BSTRACT
Procedural planning aims to implement complex high-level goals by decomposition into sequential simpler low-level steps.
Although procedural planning is a basic skill set for humans in daily life, it remains a challenge for large language models (LLMs) that lack a deep understanding of the cause-effect relations in procedures.
Previous methods require manual exemplars to acquire procedural planning knowledge from LLMs in the zero-shot setting.
However, such elicited pre-trained knowledge in LLMs induces spurious correlations between goals and steps, which impair the model generalization to unseen tasks. In contrast, this paper proposes a neuro-symbolic procedural PLAN ner ( PLAN ) that elicits procedural planning knowledge from the LLMs with commonsense-infused prompting.
To mitigate spurious goal-step correlations, we use symbolic program executors on the latent procedural representations to formalize prompts from commonsense knowledge bases as a causal intervention toward the Structural Causal Model.
Both automatic and human evaluations on WikiHow and RobotHow show the superiority of PLAN on procedural planning without further training or manual exemplars.
I NTRODUCTION
How to make a cup of coffee?
As humans, we can easily identify the procedure with the commonsense reasoning ability we acquire.
However, can we endow machines with the same ability to sketch out a sequential plan list?
Procedural planning (Pearson, 1996; Huang et al.
; Lyu et al., 2021; Wu et al., 2022; Zhang et al., 2020a;b) is a task that aims to decompose a specific task into a sequence of temporally extended steps (Figure 1).
Such ability is a necessity for a wide range of downstream applications, such as household robots (Ahn et al., 2022; Blukis et al., 2021;
Min et al., 2022;
Padmakumar et al., 2022; Shridhar et al., 2020) and conversational assistants (Budzianowski et al., 2018; Ding et al., 2022; Eric et al., 2017; Ilievski et al., 2018; Yang et al., 2022).
Existing formalization of the procedural planning task can mainly be categorized as 1) sequential choice making (Lyu et al., 2021; Wu et al., 2022; Zhang et al., 2020a;b), which reasons about the next step from the options given, the task, and previous steps; 2) conditioned generation (Huang et al. Ahn et al., 2022), which generates the plans composing of temporal-extended steps to implement the task.
We study the procedural planning task as the conditioned generation problem since it do not require a skillfully annotated dataset and is close to real-world scenarios.
Previous approaches require manual exemplars (Wei et al., 2022; Huang et al.) to acquire such procedural knowledge in the zero-shot setting.
However, it is impossible to cover the ever-changing task setups and the flexible dependency relations between internal steps.
In fact, the biased data may cause the model to learn spurious correlations and hinder the model from generalizing to counterfactual tasks.
Thus we take a step back and rethink how humans conduct procedural planning.
Studies in cognitive science state that humans rely on past experience (Duncker & Lees, 1945; Knoblich et al., 1999; Smith, 1995; Zhang et al., 2019) and chunking mechanisms (Gobet et al., 2001; Miller, 1956) to solve novel and complex problems.
Such generalizable planning ability in complex tasks, if not using exemplars, can be achieved by learning the causal-effect relations among the goals and steps in the procedure.
Thus we first devise a Structural Causal Model (SCM) (Peters et al., 2017) (Figure 2) for procedural planning and show that pre-trained knowledge (D) in LLMs confounds language models to make biased decisions toward an unreasonable action.
Since the confounder is unobservable, intervention techniques such as backdoor [Figure] adjustment (Hu & Li, 2021; Weber et al., 2020; Yue et al., 2020) are not applicable in our SCM.
Instead, we build a mediator and implement it as a commonsense-infused prompt.
Through the mediator, we can identify causal effects among goals and steps by investigating the indirect effect from the goals, which is essentially the frontdoor adjustment in causality (Pearl, 2009).
In addition, reasoning the logical order of the plan is a critical ability in procedural planning.
For example, switching on TV happens before sitting on the sofa and watching TV, but switching on TV is interchangeable with grabbing the remote control.
However, directly incorporating the graph structure external commonsense knowledge into language models cannot maximally elicit commonsense reasoning ability for order.
Thus we apply a symbolic program (Mao et al., 2019;
Yi et al., 2018) to construct such commonsense-infused prompt from external resource that attends to the high-level goals and maintains the procedural structure.
More specifically, we parse the goal into an entity to retrieve the subgraph that represents the common knowledge related to the entity, including the prerequisite event, subsequent event, location, usage, etc.
Finally, we semantically translate the knowledge to the admissible knowledge and aggregate with the task as commonsense-infused prompts to elicit procedural planning ability from LLMs.
We conduct experiments on two datasets that involve completing daily household goals,
RobotHow (Puig et al., 2018) and WikiHow (Koupaee & Wang, 2018).
Furthermore, we devisefamilies of automatic intervention methods to construct a counterfactual dataset based on the original dataset.
PLAN surpasses powerful baselines (Chain of Thoughts (Wei et al., 2022) and Zero-shot
Planner (Huang et al.)) by large margins on both the original and the counterfactual samples.
Our major contributions in this work can be summarized as:
• We propose a neuro-symbolic model using commonsense-infused prompting to tackle the procedural planning task without annotated exemplars or further training.
• We develop the first causal framework for procedural planning by 1) defining a temporally extended Structural Causal Model and 2) resolving spurious correlation between high-level goals and low-level steps via frontdoor adjustment with a prompt-based mediator.
• Extensive evaluation results show the superiority of PLAN in reasoning the cause-effect relations among goals and steps and achieving promising procedural planning ability.
E XTERNAL K NOWLEDGE M ATTERS IN P ROCEDURAL P LANNING
As depicted in Figure 1, the procedural planning requires generating the Plan (e.g., Step 1: Walk to the living room.)
conditioned on the Task (e.g., Watch TV).
We describe the problem definition below and then show why external knowledge matters in procedural planning through the lens of causality and how we elicit procedural ability from the Large Language Models (LLMs).
2. P ROBLEM D EFINITION
Given the high-level task T (e.g. watch television in the living room) sampled from a task domain D T (e.g. RobotHow), a procedural planner aims to decompose it into lower-level time-extended
[Figure] steps S = { s 1 , ..., s t | s ∈ ¯ S } .
Depending on the task domain D T , the and the environment have certain action set A and the object set O respectively. Each step s in ¯ S is constrained as the admissible composition of a ∈ A and o ∈ O .
The procedural plan S is generated as P ( S t | T, S 0: t − 1 ) .
We seek to empower the LLMs with the ability to reason cause-effect relations in procedural planning. Thus, we devise a causal framework by first defining a Structural Causal Model (SCM) of procedural planning in Figure 2. The SCM describes the temporal dynamics and procedural cause-effect relationship.
Our causal assumption in SCM indicates that there is a backdoor path from task to step, which must be blocked with frontdoor adjustment. Therefore, we model the input prompt as a mediator which is created from external knowledge.
More specifically, we define our Full Temporal Causal Graph as in Figure 2a, which is an unrolled Structural Causal Model (SCM) for sequential decision making.
Our goal is to identify the causal effect between attended task T and plan procedures
S = { S 1 , S 2 , . . . } from LLMs.
Initially, there are direct paths T → S i and S k
→ S i , k < i because S i relies on the LLM attended task entities and previous accomplished steps.
D is an unobserved confounder from learned knowledge during pre-training.
D builds a backdoor path between T and S i and misguides the LLM to attend on false entities to generate the next step (see Fig. 2b).
Note that D is unobservable as we directly adopt the LLM without knowing the pre-training data.
To mitigate the spurious correlation, we then introduce a mediator P i for each S i as shown in Figure 2a to achieve our frontdoor adjustment by injecting external knowledge into LLMs in a neuro-symbolic approach. We describe the implementation of such frontdoor adjustment in Section 3.1.  O UR A PPROACH
Though LLMs have strong general language intelligence, they still perform poorly in reasoning the cause-effect relations in procedural plans due to a lack of daily life experience.
We propose to elicit the unbiased procedural planning knowledge from the LLMs using the created commonsense-infused
Prompt P as P ( S t | T, S 0: t − 1 , P ) . Figure 3 and Algorithm 1 depict how PLAN tackles the procedural planning in a five-stage manner. We illustrate the commonsense-infused prompt construction (the first three stages) in Section 3.1 and planning with LLMs (the last stage) in Section 3.2. 3. C OMMONSENSE - INFUSED P ROMPT C ONSTRUCTION
Inspired by the above causal analysis, we propose to construct commonsense-infused Prompt P that reveals the cause-effect relations among the goals and steps during procedural planning.
[Figure]
Stage1:
Task-Relevant Knowledge Subgraph Sampling
First, we investigate the causal effect T → P i and S i − 1 → P i (Figure 2).
Note that in the path T → D → S i ← P i , S i is a collider that blocks the association between D and P i .
Since there is no backdoor path for T → P i and similarly for S i − 1 → P i , we simply have the conditional probability after applying do -operators:
[Equation]
We achieve the do -operation in a prompting way by modifying the input so that the model can attend on the correct entities.
We extract the entities from the task name, and retrieve a three-hop graph from an external knowledge base.
The graph can be verbalized and applied as a prompt so that the LLM attends on the correct entities to plan S 1 .
As for the implementation, the high-level task name T is Semantically Parsed into the Entity Set T E with the named entity information to extract the representative nodes from the graph.
We use NLTK to tokenize and pos tag the task text.
Then we use the noun (e.g. television), noun phrases (e.g. remote control), and verb phrases (e.g. watch television) as the entity node.
Each entity e ∈ T E is used as a query for sampling the local subgraph G e ⊆ N e ×
R s × N e from the external knowledge base G ⊆
N × R × N (e.g., ConceptNet (Speer et al., 2017)), where N and R represent the number of concept nodes and commonsense relations respectively.
When extracting the Task-relevant Subgraph G s from the External Knowledge Base G , we keep the triplets with relation type in household domain (e.g., AtLocation , UsedFor ) and filter out ones in the linguistic domain (e.g., DistinctFrom , DerivedFrom ) for the procedural planning task.
N e is maintained in a set of top- k task-relevant nodes using the weight of each R e , which is adapted using the edge-wise invariance module illustrated in the next paragraph.
G s is a composite of the { G e , e ∈ E } , representing the task-relevant external knowledge.
Stage2: Edge-Wise Adaption and Symbolic Structuring Second, we need to find the causal effect for P i
→ S i .
Since the path P i ← T ← D → S i contains a backdoor from P i to S i , we cannot rely on the conditional probability.
Instead, we add intervention on P i by applying the do -operator to cut off D → T :
[Equation]
The retrieved entity-centered graph has multiple edges representing various relationships with other actions/entities.
Therefore, the summation over intervened T can be achieved by incorporating these edges into the prompt.
For instance, “living room” can be “walked to” and “used for reading” while “book” can locate in “living room” and “bedroom”.
Similarly, we extrapolate over the edges for i − 1 hops to aggregate the intervened S i , i.e. P ( S i − 1 = s | T = t ) .
Directly ranking the retrieved nodes N e with the pre-computed weight in the external knowledge base will result in spurious correlation.
Such retrieved local subgraphs tend to capture the task-invariant concept nodes as the causal factors.
To mitigate this, we propose to adapt the weight of each triplet ( Edge-wise Adaption ).
The adaptive weight is the addition of the original edge weight and the cosine similarity between the tail node embedding n tail and the task embedding v task .
The embeddings are projected from the node text and task name using the sentence-transformer (Reimers & Gurevych, 2019).
To better track the utilized external knowledge during inference, we construct the task-dependent commonsense prompt with a symbolic program executor ( Symbolic Structuring ) guided by the relation type of each triplet in G s with the adapted edge weight beyond threshold θ e .
Specifically, the executor acquires the neural information of each natural language node and executes the sequential mapping program by sampling the operation Op from the Symbolic Rule Set R according to the edge relation type.
For instance, the AtLocation edge samples the operation
Op AtLocation from R , which takes the commonsense relation of the triplet from G s as the parameters to query the procedural concept output given the natural language meaning of the linked nodes (e.g., go to the location of Start Node Of ( r e ) in this case).
Similarly, Op UsedFor may refer to ”go to find End Node Of ( r e ) and use it for Start Node Of ( r e )”.
And operators Op HasSubevent and
Op HasPrerequisite will recursively navigate the subgraph G e .
After navigating the subgraph, we linearize the transformed triplets as the Procedural Prompt P G , which is then translated to
Admissible Knowledge Prompt ˆ P G by the Translation Language Model LM T .
Stage3: Temporally-Extended Aggregation To acquire temporal order in procedure , we obtain the Prompt P at timestep t with the aggregation of task T , history steps S 0: t − 1 and current external knowledge ˆ P G .
The underlying causal mechanism is a combination of Eq.
1 and Eq. 2:
[Equation]
The adjustment and marginalization in Eq.
3 is achieved in the input space by forming the Procedural Prompt P G that allows the LLM to attend on the causal entities instead of the highly correlated ones for the next step generation.
The LLM can reason over the most relevant edges to link the concepts with the task entities as a context.
The prompts from knowledge bases are independent of the pre-training data distribution so that P i is independent of D and satisfies the frontdoor criterion.
Please refer to Appendix A for more details on the simplification of our causal temporal graph.
3. P ROCEDURAL P LANNING WITH LLM S
Stage4: Semantic Generation
The external knowledge is further concatenated with the high-level goal (task name) as the initial prompt.
The initial prompt contains limited semantics and executability, but still contains external knowledge and structure that help leverage the reasoning ability of the large language models.
Given the prompt, the language model Generation LM G ∈ { P AR , P AE } (e.g., GPT3, BART) generates the next sentence, and the most confident prediction is then appended to previous prompts.
The Termination Condition is either reaching the max step t or the matching score is below threshold θ .
The joint probabilities of auto-regressive ( P AR ) and auto-encoder ( P AE ) model is factorized as:
[Equation]
where ˆ P G represent the commonsense knowledge and T represent the task name.
Stage5: Admissible Step Translation To ensure that the generated procedural plans could ground to the specific task domain (e.g. RobotHow, WikiHow), we should avoid producing the steps that are inadmissible (e.g. Toast the table). In other words, the generated steps should be fully constrained to the admissible composite of action and object in a certain task domain. Thus previous works ( (Huang et al.;
Ahn et al., 2022)) have explored using the model (which is LM T in our case) to score a step selected from a fixed set of available options, instead of directly sampling from the output distributions of the language model (which is LM G in our case).
Specifically, we match the generated step by LM G to the most similar admissible step in the embedding space encoded by the Translation
Language Model LM T . Following (Huang et al.), we utilize a Sentence-Transformer (Reimers & Gurevych, 2019) to calculate the cosine similarity:
[Equation]
where s i = { k | k ∈ [ a, o ] , a
[Equation]
A, o ∈ O } (5) which translates LM G ( x ) into the admissible step s i ∈ S that is the closest in the embedding space measured by the cosine similarity.
A and O represent the action set and object set respectively.
3. C OUNTERFACTUAL P ROCEDURAL D ATA C ONSTRUCTION
To investigate the counterfactual reasoning ability of the procedural planning models, we design three families of intervention methods: 1) Initial Configuration : intervene in the initial configuration, such as the location for implementing the task.
2) Intermediate Step , randomly selecting the step from the program as an additional constraint the task name for implementing the task.
3) Final Goal , intervene the task goal as the composite of another randomly sampled task.
Table 6 in Appendix summarizes the category, description.
The counterfactual dataset construction details and post-intervention examples are provided in Appendix B.2.
E XPERIMENTS 4. P ROCEDURAL P LANNING S ETUP
Datasets We conduct zero-shot experiments on two datasets with procedural information, WikiHow(collected following (Koupaee & Wang, 2018)) and RobotHow (Puig et al., 2018) without training.
WikiHow is a large-scale text summarization dataset that is constructed from a human-written knowledge base, involving procedural tasks that spans various topics.
We utilize “how to” title as the task names and the summarized headlines as the steps.
RobotHow is a large knowledge base of common household tasks collected in the VirtualHome (Puig et al., 2018) simulator.
The dataset contains the programs with high-level task names and low-level steps.
D T is composed of 292 and 2000 distinct tasks from RobotHow and WikiHow respectively.
In RobotHow, A is of size 42 and O is of size 195 .
In WikiHow, A is of size 1161 and O is of size 13873 .
Human evaluations use randomly sampled 50 task examples for each dataset.
Automatic evaluations use 150 and 1000 task examples randomly sampled from RobotHow and WikiHow respectively.
Please refer to Appendix B.1 and
Appendix B.2 for dataset details.
Baselines We compare our approach with three vanilla generative pre-trained language models (BART, GPT2, and GPT3) and two powerful generation baselines (Zero-shot Planner (Huang et al.) noted as “LLMaP” and Chain of Thought (Wei et al., 2022) noted as “Chain”).
More method and configuration details of the models can be found in Appendix B.3 and Appendix B.4.
Metrics We ask human annotators on the Amazon Mechanical Turk platform to rate model performance on two aspects: 1) Coverage : depicts which set of steps can better complete the target task
[Table] [Table]
(captures semantic completeness). 2) Order : depicts which sequence covers more steps that are necessary to complete the target task (captures sequential order correctness).
In addition, we use Sentence-BLEU (S-BLEU)
(Papineni et al., 2002), BERTScore (Zhang* et al., 2020), [-ROUGE- 
-]ROUGE1 (Lin, 2004) and Word Mover’s Distance (WMD) (Kusner et al., 2015) as automatic evaluation metrics.
These metrics are used to compute the semantic scores between the annotated programs and the predictions.
Details of the crowdsourcing human evaluation can be found in Appendix C.1.
4. H UMAN E VALUATION R ESULTS WITH C OVERAGE AND O RDER M ETRIC
Each example is rated by 3 crowdsourcing annotators.
For the Win-Lose Comparison , we ask the human rater to choose between ours and the baseline LLMaP (Huang et al.).
Averaged results reported in Table 1 show that our PLAN is more frequently rated as better for both coverage and order metrics, outperforming baselines over the winning ratio by 21% in coverage and 26% in order, across two datasets.
We report the average results of Human Ratings with 5 -point Likert scale in Table 2.
The consistent performance boost of PLAN indicates the superiority of injecting external commonsense knowledge into the procedural planning task.
The performance drop of LLMaP and Chain in the counterfactual setting indicates the vulnerability of fixed holdout knowledge and the pre-defined manual exemplars in causal procedural planning.
Please refer to Appendix C.1 for the crowdsourcing human evaluation interface details.
Table 5 shows two examples for Qualitative Comparison .
More examples can be found in Appendix D.
4. A UTOMATICALLY M EASURING THE P ROCEDURAL P LANNING
Main Results Table 3 summarizes The automatic evaluation results.
PLAN achieves the best results regardless of the architecture of the language model architecture, either autoregressive or autoencoder based.
The performance gain of “LLMaP” over “Chain” may probably be due to direct exposure to the holdout task from the dataset.
While the “Chain” baseline still outperforms the vanilla baseline that only takes the high-level task name as the prompt.
Note that the annotated program is not the only solution, thus these automatic metrics provide limited absolute performance information.
Details for the correlation between automatic metrics and human evaluation can be found in Section 4.5.
Effects of Edge-wise Adaption and Symbolic Program Execution We build the variant “ w/o
Adaption”, which maintains the top- k task-specific nodes ranked by the original weight in the external knowledge graph G without adaption.
And we build a variant “ w/o Symbolic” that directly takes the extracted concept nodes from external knowledge base as prompt.
As shown in Table 3, these two variants experience consistent performance drop, demonstrating the importance of adaption and [Table] [Table] symbolic components.
We conduct the paired-t test (p¡ 0 . 05 )
statistics results over the variant “ w/o
Symbolic” and “ w/o Adaption”.
Compared with the full model PLAN , the variants have experienced a statistically significant performance drop.
Especially on BERTScore-f1, the p-value is 8 .
884 e −and 1 .
4 e − 8 respectively.
This further confirms the importance of the modules.
Effects of the Large Language Model Architecture To investigate the effects of the pre-trained language model architecture, we use GPT2 and GPT3 as our autoregressive architecture and BART (Lewis et al., 2020) as our autoencoder architecture.
The autoregressive architecture achieves better results than the autoencoder one.
Since the pre-training objective of autoregressive-based GPT is to predict the next token given the previous input tokens.
We assume the performance gain of GPT is due to a smaller gap between the objective of their pre-training and the procedural planning task.
Level of Complexity We show report results that use the test set which is separated into several buckets according to the number of steps in the procedural planning task.
The step number reflects the difficulty of the task.
In Table 8 and Table 9 in Appendix C.2, we show that the averaged performance gain of PLAN over the baselines are consistent or more significant in more complicated procedural planning settings.
This indicates the superiority of PLAN in solving long-horizon tasks.
4. R ESULTS ON C OUNTERFACTUAL T ASK S AMPLES
We apply Initial Configuration , Intermediate Step , Final Goal intervention methods on RobotHow and
Intermediate Step on WikiHow.
Counterfactual setting results for human evaluation are summarized in Table 1 and Table 2.
PLAN consistently outperforms baselines by a large margin and experiences a much smaller performance drop compared with the powerful baselines when switching to the counterfactual setting.
We assume it’s due to the biased knowledge of the holdout examples and manual exemplars utilized in the baselines, which are vulnerable to counterfactual samples.
Automatic evaluation results on counterfactual RobotHow are summarized in Table 4.
Aligned with human evaluations, PLAN achieves the best performance.
The overall poor performance in the Final Goal category indicates the challenge for long-horizon and composite procedural planning tasks.
While the overall better performance in the Intermediate Step category benefits from the intermediate guidance.
[Table]
4. C ORRELATION BETWEEN A UTOMATIC AND H UMAN E VALUATION
We evaluate segment-level Pearson Correlation between human and automatic metrics.
We observe that BERTScore has a moderate correlation to the human coverage score and WMD has a moderate correlation to the human order score, with 23 .
3% and 32 .
3% respectively.
Similar to the prior findings (Xu et al., 2021), n-gram-based metrics (Sentence-BLEU and ROUGE) have a relatively weaker correlation to the human coverage score, with a Pearson correlation of 16 .
4% and 21 .
Overall, our automatic and human evaluation scores are consistent with the main claim of this paper.
However, human evaluation is still irreplaceable for procedural planning at the current stage.
R ELATED W ORK
Procedural Planning Learning to generate procedural plan (Zhang et al., 2020b; Chang et al., 2020; Huang et al.) is important for embodied agentTellex et al.
; Jansen (2020);
Ahn et al. and conversational assistants (Ilievski et al., 2018; Yang et al., 2022).
Previous work views procedural script learning as a structured form of commonsense knowledge Gupta et al.
; Regneri et al.
; Wanzare et al. (2016), while more recent work strengthens its association with the changing environments for executable action planning Puig et al.
; Shridhar et al.
Our method tackles the problem by utilizing commonsense-infused prompts via a neuro-symbolic approach (Mao et al., 2019; Nye et al., 2021;
Yi et al., 2018) for zero-shot procedural planning.
Causality for Language Generation
The integration of causality and machine learning has been an intriguing topic for many problems Pearl (2009);
Sch ¨ olkopf (2022).
Previous studies focusing on causal inference for natural language understanding Chen et al.
; Keith et al.
; WoodDoughty et al.
and generating counterfactual text representations Feder et al.
Weber et al.
(2020) proposes an intervention method for script learning.
However, their method cannot be directly applied to procedural generation.
The generated plan in our case has a formal structure and our method is based on mediation analysis VanderWeele (2015) and causal intervention Pearl (2009); Peters et al.
Prompt for Large Language Model There is an emerging interest in using prompts to extract knowledge from large language models Chen et al.
; Le Scao & Rush (2021); Su et al.
Ye et al.
; Zhou et al.
Cao et al.
(2022) treats the prompt as a cause of the task-specific predictor and investigates biases in prompt-based probing evaluations.
Chain of thought Wei et al.
(2022) discovers that LLM can perform better on reasoning tasks when the prompt is designed as a series of short sentences that mimic the reasoning process of humans.
C ONCLUSION AND F UTURE W ORK
Procedural planning is a newly emerged research area of great importance to various applications, such as household robots and virtual assistants.
We propose a neuro-symbolic procedural PLAN ner ( PLAN ) with commonsense-infused prompts elicited from the external knowledge base to solve the procedural planning problem in a zero-shot manner.
Experiments show the effectiveness of our proposed PLAN on both automatic and human evaluation results.
Extending neuro-symbolic procedural planning to handle the long-horizon composite tasks and provide effective automatic evaluation metrics are important directions for future work.
E THICAL S TATEMENT
Given the limited diversified cultural background of the dataset we are using from RobotHow and
WikiHow we assume our results may be biased toward a single cultural background.
For instance, given the task ”make breakfeast”, it should take multi-culture into consideration to generate the procedural plans.
R EPRODUCIBILITY S TATEMENT
We provide more data samples and qualitative samples in supplemental materials. In addition, we provide our code implementation at https://anonymous.4open.science/r/PLANNER-7B24 to reproduce our experiments. The Preprocess folder provides the utils to construct the data.
The
Evaluation folder provides the code for automatic and human evaluation tools.
The Planning folder contains the main code for our approach and reproduced planners for procedural planning.
The
Visualization folder provides the code we use to visualize in the environment
A SCM T HEORETICAL D ETAILS A. C AUSAL P RELIMINARIES
The Structural Causal Model (SCM) is a directed acyclic graph (DAG) to describe the causal relationships within a system Pearl (2009).
In this paper, we refer to the unrolled SCM along the time dimension as the full temporal causal graph, while the rolled-up version is also called the causal summary graph Peters et al.
In an SCM, if the variable D is a cause of both T and S i , then it is called a confounder .
A confounder opens up a backdoor path and causes a spurious correlation between T and S i .
The backdoor path is defined as the remaining path between T and S i when all the arrows pointing out of T are removed.
Therefore, T ← D → S i is a backdoor path.
For our SCM with mediator P i shown in Figure 4c (same as Figure 2b) from the main paper, there is no backdoor path between T and { P i , S i − 1 } because only D → T is left after removing outgoing arrows of T .
On the other hand, there is a backdoor path between P i and S i , i.e. P i ← T ← D
→ S i so that P i indirectly affect the observation of S i through { T, S i − 1 } and D .
To identify the true causal effect between X and Y , we aim to estimate the conditional P ( Y | do ( X )) after intervention with the do -operator.
The do -operator is to break the backdoor path by setting X to a fixed value independent of Z .
Then the path Z → X can be removed to eliminate the backdoor paths.
In practice, the backdoor adjustment and frontdoor adjustment are two fundamental methods to implement interventions and obtain the conditional P ( Y | do ( X )) .
Clarity of the Definition As a language prompt, P i inherit the content from P i − 1 and thus can be detached from steps before S i − 1 for simplicity.
Causal Intervention There are two types of operation to control the confounding bias: the backdoor adjustment and the frontdoor adjustment (Pearl, 2009).
The backdoor adjustment is intractable in our case because it requires the prior distribution of the confounding variables.
On the other hand, we can construct an input prompt as a mediator P i for T → S i and S i − 1 → S i .
Then the frontdoor adjustment applies a two-step do -operation to mitigate bias by investigating P → S i (Pearl, 2009).
Specifically, we construct the prompt mediator P i using techniques illustrated in Section 2.2.
A. T HE B ACKDOOR A DJUSTMENT
The backdoor adjustment is one way to realize the intervention do ( T = t ) by considering the conditional probability over the existing data distribution with observed confounder D .
It calculates the average causal effects by considering all stratums of the dataset:
[Equation]
However, for LLMs, the pretraining data is usually unobservable and has been transformed as knowledge incorporated into the hidden space.
Therefore, we are not able to directly apply the backdoor adjustment.
A. T HE F RONTDOOR A DJUSTMENT
The frontdoor adjustment is another technique to apply intervention by introducing a mediator P i when the confounder is unobservable.
As is explained in Section 2.2 from the main paper, the frontdoor adjustment is equivalent to two consecutive do -operation on task T and prompt P i .
We first investigate the generation of S 1 and then expand it to S t .
Timestep i =
As is shown in Figure 4a, since there is no preceding steps, the first step generation involves D , T and P 1 only.
Similar to the proof in Section 2.2 from the main paper, we have:
[Equation]
By adding intervention to T , we make the value of do ( T = t ) independent of the confounder D at the beginning.
The backdoor path through D → T is eliminated as a result.
[Figure]
Timestep i > 1 As is shown in Figure 2a from the main paper, we model the mediator P 1 as an effect of three variables, T , P i − 1 and S
i − 1 .
The first step of our frontdoor adjustment is to apply the do -operator on the three variables and observe the change in P i as explained in Section 2.2 from the main paper.
Since there are no backdoor paths between P i and these variables, we have the probability after intervention equal to the conditional probability without intervention:
[Equation] [Equation]
The second step is to apply do -operator on P i and then identify the causal effect as:
[Equation]
Combining Equation8-10 and Equation 11, we have the frontdoor adjustment.
Note that there are three backdoor paths from each of the variables T , P i − 1 , and S
i − 1 , as is shown in Figure 4b (drawn in blue, red and purple).
More importantly, the one through T , i.e. P i ← T ← D → S i (the blue path in Figure 4b) and the one through P i − 1 , i.e. P i ← P i − 1 ← T ← D
→ S i (the red path in
Figure 4b) shares the same subpath.
The intervention on the task T breaks the backdoor paths for both T and P i − 1 .
Therefore, we have our frontdoor adjustment as
[Equation] [Equation]
[Equation] [Equation] [Equation]
[Equation]
We have Equation 14 because of the intervention on T and Rule 2 (Pearl, 1995), Equation 15 because of Rule 1 (Pearl, 1995).
We end up with Equation 15-17 which is shown as Equation 3 in Section 2.
from the main paper.
B I MPLEMENTATION D ETAILS B. O RIGINAL D ATASET D ETAILS
RobotHow This dataset is Attribution-NonCommercial-ShareAlike 4.0 International Creative Commons License.
We evaluate the inference of 150 tasks by random selection from the dataset.
Each program contains the task name, task description and steps.
We use the task name and sequence of steps as our input and output references.
Each step is a composition of [Action] , [Object] and [Number] .
For example, the sequence of steps of the task ”Watch TV” are: 1.
[Walk] ¡TELEVISION¿ (1) 2.
[SwitchOn] ¡TELEVISION¿ (1) 3.
[Walk] ¡SOFA¿ (1) 4.
[Sit] ¡SOFA¿ (1) 5.
[Watch] ¡TELEVISION¿ (1).
WikiHow This dataset is under an Attribution-Noncommercial-Share Alike 3.0 Creative Commons
License.
And the text content is free to modify, republish and share.
We evaluate the inference of 1000 tasks by random selection from the dataset.
The admissible action space and interaction object space are more complex than the programs in RobotHow.
And there is no fixed ”
[Action] ¡Object¿ (Number)” form of each step.
For each article, it contains the title, the bold headlines and text.
We utilize the title and headlines as our task name and steps respectively.
External Knowledge Base For the external knowledge base, we utilize ConceptNet to leverage commonsense reasoning ability to help ground language generation in goal-guided procedural text generation.
ConceptNet (Speer et al., 2017) captures commonsense knowledge explicitly with triplets of ( head node , relation , end node ).
It contains 799 , 273 nodes and 2 , 487 , 810 edges that represent both symmetric and asymmetric relations.
Specifically, the core relations we utilized are Synonym , AtLocation , CapableOf , Causes , CausesDesire , HasPrerequisite , HasSubevent , and UsedFor . Since we are looking at the commonsense knowledge in house-holding tasks, so we filter out the relations (/r/DistinctFrom, /r/DerivedFrom, /r/SymbolOf, /r/EtymologicallyRelatedTo, /r/EtymologicallyDerivedFrom) that are related to the linguistic. B. C OUNTERFACTUAL D ATASET AND E XPERIMENT D ETAILS
[Table]
Table 7 show the examples that compare the original program and the counterfactual program of each intervention method are also provided.
Specifically, for Initial Configuration , we randomly append the location to a given task name to constrain the location of completing the task.
The steps are prepended with the initial step ”walk to ¡Location¿”.
For Intermediate Step , we randomly sampled a step from the task-specific program and append it to the task name to constrain the way to implement a given task.
For Final Goal , we randomly combine two tasks by combining both the task names and the programs to construct a set of long-horizon composite tasks.
We conduct counterfactual experiments by applying randomly selected intervention methods over
RobotHow.
And we only apply the Intermediate Step intervention method over WikiHow due to the loose configuration requirement and the long text of the WikiHow contents.
Note that the performance gain of PLAN under the counterfactual setting mainly comes from the additional guidance of the task introduced from the Intermediate Step intervention method.
However, the baselines mostly experience performance drops due to the limited annotated exemplars.
PLAN consistently outperforms baselines by a large margin, indicating its superiority under the counterfactual setting. [Table]
B. M ETHOD D ETAILS
Baselines LLMaP propose a procedure to extract temporally extended plans from large pre-trained language models. Chain explores manually creating exemplars that mimic the reasoning process and uses them to prompt large language models for reasoning tasks.
To compare with Chain on the procedural planning task, we manually generate exemplars that contain the chain of thought for 1% of the inference task programs. Note that for the BART language model, we use BART-large version.
And we use the 1 . 5 billion parameter GPT-2 (aka gpt2-xl).
For the translation model LM T , we use sentence-transformers (RoBERTa-large). All these models are released by HuggingFace. In addition, our experiments with GPT3 (davinci) use OpenAI API (May, 2022). External Knowledge Graph Conceptnet5 define a set of 34 relations ( 2 ).
Within the relations we consider in the procedural planning task, the averaged sampling time of subgraph sampling is 0.
milliseconds per task program.
B. H YPERPARAMETER S EARCH
We perform a hyperparameter search for all evaluated methods.
The confidence threshold θ , which terminate the generation when below it, is searched in { 0 , 0 . 5 , 0 .
The steps horizon, which constrains the maximal number of procedural planning steps, is searched in { 10 , 20 , 40 } .
The number of hops for retrieving the subgraph from the external knowledge base is searched in { 1 , 2 , 3 } .
The ratio of maximal concepts to the length of the task name is searched in { 1 , 2 , 3 } .
The cosine similarity threshold for keeping the task-specific concept is searched in { 0 . 4 , 0 . 6 , 0 . 8 } .
The edge weight threshold θ e is searched in { 0 . 1 , 0 . 2 , 0 . 3 , 0 . 4 , 0 . 5 , 0 . 6 , 0 . 7 , 0 . 8 } .
The top- k task-specific nodes value is searched in { 1 , 5 , 10 , 15 , 20 , 25 , 50 , 100 } .
The configurations used in the experiments are: θ =0.7, 20 step horizon, 3 hops, 3 ratio of concepts to task length, cosine similarity threshold 0 .
4 , θ e =0.6 and k =10.
B. C OMPUTATION AND R ESOURCES
We use one single NVIDIA A100 GPU Server for all the experiments.
Since there is no training in our zero-shot settings, the computation is only used for the inference stage of the experiments.
C E VALUATION D ETAILS C. C ROWDSOURCING H UMAN E VALUATION
We conduct all the human evaluations (rating and win-lose comparison) on Amazon Mechanical Turk platform.
Each example is rated by 3 annotators.
We ask Amazon Mechanical Turk workers, for every assignment, to evaluate the quality of the provided low-level steps given the high-level task description.
For the Win-Lose Comparison , they were asked to choose one from the two provided model generated results by 1:the first one is better , 2:equal and 3:the second one is better .
For the Human Ratings , they were asked to score each sample with 5 -point Likert scale.
This process does not involve collecting any personal information.
And we manually check no offensive content is produced by the models.
The assignment layout templates for workers are shown in Figure 6 and Figure 5.
Specifically, we evaluate randomly selected 50 task examples from each dataset (RobotHow and WikiHow)
under all the settings (standard and counterfactual).
We only collect the examples that the workers read the instructions carefully by checking whether they give 1 score for the empty program as a sanity check.
The hourly wage paid to participants is estimated $9.
And the total amount spent on participant compensation is $1296.
The details of the Human Intelligence Tasks process are described in the following sections.
[Equation]
During the process of Human Intelligence Tasks, the workers are shown the following instructions:
Read the given task and the sequence of steps, determine which set of steps can better complete the target task.
In other words, can the task be decomposed into these steps?
Please consider the sequential order of the steps.
Then the program to be evaluated is provided as:
Question Task: Study
Sequence 1: : Step 1: Walk to
textbook Step Read book Step
: Walk to book Sequence Step 1: Walk to home office Step : Find
desk Finally, the workers are asked to score the program by following the instructions below: Select an option: 1 - Sequence 1 is better; 2 - Tie; 3 - Sequence 2 is better
The above example is to evaluate the order metric, for the coverage metric, the same process are conducted, except for the instructions are: Read the given task and the sequence of steps, and determine which sequence covers more steps that are necessary to complete the target task.
Please ignore the sequential order of the steps.
C.1. H UMAN R ATINGS
Similar as the Win-Lose Comparison Human Intelligence Tasks, the workers are shown the following instructions:
For every question below, determine whether the task can be completed in any reasonable scenario using the provided steps (Please consider the sequential order of the steps.).
You could directly give the lowest score (1) for the empty steps.
In other words, can the task be decomposed into these steps?
(Please consider the sequential order of the steps.)
Then the program to be evaluated is provided as:
Question Task: Write an email
Sequence of Steps : Step 1: Walk to home office Step 2: Walk to computer Step 3: Find computer
Step 4: Turn to computer Step 5: Look at computer Step 6:
Walk to computer Step 7: Find chair Step 8: Sit on chair Step 9: Find keyboard Step 10: Grab keyboard Step 11: Find mouse Step 12:
Grab
mouse Step 13: Type on keyboard
Finally, the workers are asked to score the program by following the instructions below: Use the slider below to indicate how much you agree with the following statement (1 = Strongly disagree,= Strongly agree).
If ”sequence of steps” are blank, please directly choose 1 (lowest score).
The task can be completed in any reasonable scenario using the provided steps.
[SLIDER PROVIDED
HERE]
The above example is to evaluate the order metric, for the coverage metric, the same process is conducted, except for the instructions are:
For every question below, determine whether the task can be completed in any reasonable scenario using the provided steps (Please ignore the sequential order of the steps.).
You could directly give the lowest score (1) for the empty steps.
In other words, can the task be decomposed into these steps?
(Please ignore the sequential order of the steps.)
C. M ORE R ESULTS
Significance Test We provide paired-t test (p¡ 0 . 05 )
statistics results for Table 2.
On RobotHow, our PLAN significantly outperforms all baselines on Original-Order(BART) and CounterfactualCoverage(GPT2).
On WikiHow, our PLAN significantly outperforms all baselines on OriginalCoverage(BART, GPT2), Counterfactual-Coverage(BART, GPT2), and Counterfactual-Order(BART).
For the coverage metric under the counterfactual setting, the human-provided program is not significantly better than our PLAN .
Results on GPT-
In addition, we conduct experiments with GPT-3 (davinci version) using OpenAI
API.
We showcase the comparison in Table 10.
[Table]
[Table]
[Table]
D Q UALITATIVE E XAMPLES
More qualitative examples that are randomly selected are provided.
Table 11 show random samples on the original dataset.
Table 12 show random samples on the counterfactual datasets with the
Intermediate Step intervention method.
And Table 13 shows random samples on the counterfactual
RobotHow with the Initial Configuration and Final Goal intervention methods
[Table]
[Table]
[Table] Step 5: Work on being the best you.
Step 6: Paint patterns with brushes of suitable size for the particular portion of work you are painting.
Step 7: Put together a schedule and chart.
Step 8: Buy your investment art when you feel confident of its worth, its price and its ability to grow in value.
Step 9: Make a clean brea.
[Table]
First, you will
[Table]
to make sure you have all of the materials listed below.
[Table]
Read the manufacturer’s directions.
, Step 2: Avoid lye heavy products.
, Step 3: Make your own saddle soap.
[Table]
space.
[Table]
: Let
[Table]
[Table]
kind to
[Table]
[Table]
: Offer him a treat.
[Table]
: Dip a damp cloth in the saddle soap.
[Table]
: Dampen several cloths and work them into a lather with the saddle soap.
[Table]
: Dip a cloth into the mixture.
[Table]
: Rub the product on with a cloth.
[Table]
5: Clean the grime off with the cloth.
Step 6: Dampen a cloth with water.
[Table]
7: Rub a damp microfiber cloth over the surface.
Step 8: Use a damp cloth to wipe once again.
[Table]
9: Dampen a towel with lukewarm water.
Step 10:
Wipe the area clean with a damp towel.
[Table]
: Soak a towel in warm water.
[Table]
Step 1: Brush your horse.
Step 2: Clean the saddle.
Step 3: Start by using the first cloth to rub down the leather, making sure you remove any built up grass and dirt.
Step 4: Rub the leather down so you remove most of the oil and wax.
Step 5: Wipe off excess oil.
Step 6: Rinse the leather.
Step 7: Clean any other leather tack items (martingale, breastplate, draw reins, cruppers, etc.
[Table]
[Table]
Step 1: plug out lighting.
Step 2: put cleaning solution on desk.
Step 3: find dish soap.
Step 4: scrub light switch. Step 5:
[Table]
E D ISCUSSION E. L IMITATIONS
Though pointing out a direction to prompt out actionable knowledge in large-scale pre-trained language models with external commonsense knowledge, the limitations of reasoning long-horizon procedural plan still exist.
Existing datasets for procedural planning like WikiHow and RobotHow are all monolingual supporting only English goals and plans.
In the future, it is important to expand these datasets or having novel datasets that support multiple languages used across the world.
The inherent difference between these languages may also result in different planning strategies in granularity or abstraction levels, which is potentially challenging.
In addition, the long-horizon and complex composite tasks still remain challenging for the existing procedural planners.
E. E THICAL CONSIDERATIONS
We hope to debias the procedural planning to avoid misleading either humans or robots with daily life instructions, which may result in unsafe situations.
The cultural bias behind these datasets can be a critical issue for future work.
As the ground truth planning steps usually reflect the culture shared by the English-speaking group, other cultures may have a completely different practical consideration that leads to different orders of these steps or even novel steps that are failed to be proposed by the
LLMs we utilized in this paper.
In the future, we will consider the cultural bias as a proxy variable so that we could adjust the implicit knowledge from LLM or commonsense from external sources according to different needs of cultural backgrounds.