Back to the Future: Unsupervised Backprop-based Decoding for Counterfactual and Abductive Commonsense Reasoning (2020)

Abstract: Abductive and counterfactual reasoning, core abilities of everyday human cognition, require reasoning about what might have happened at time t, while conditioning on multiple contexts from the relative past and future. However, simultaneous incorporation of past and future contexts using generative language models (LMs) can be challenging, as they are trained either to condition only on the past context or to perform narrowly scoped text-infilling. In this paper, we propose DeLorean, a new unsupervised decoding algorithm that can flexibly incorporate both the past and future contexts using only off-the-shelf, left-to-right language models and no supervision. The key intuition of our algorithm is incorporating the future through back-propagation, during which, we only update the internal representation of the output while fixing the model parameters. By alternating between forward and backward propagation, DeLorean can decode the output representation that reflects both the left and right contexts. We demonstrate that our approach is general and applicable to two nonmonotonic reasoning tasks: abductive text generation and counterfactual story revision, where DeLorean outperforms a range of unsupervised and some supervised methods, based on automatic and human evaluation.

## introduction everyday causal reasoning requires reasoning about the likely explanations to partially observable past and future (abductive reasoning @xcite ) and reasoning about the alternative future based on counterfactual past (counterfactual reasoning). such nonmonotonic reasoning requires she hit the rope and the tire fell on top of her. ## background most nlp benchmarks have focused on reasoning about information that is entailed from the premise. for instance, natural language inference (nli; @xcite focuses primarily on whether a hypothesis is entailed from a given premise, which means the information stated in the hypothesis is a subset of the information provided in the premise. however, it has been noted that human reasoning is often the other way, where hypotheses often contain new information that was not available in the premise, but plausibly true (but … ỹ f 1 ỹ f 2 ỹ f n ỹ f 3 ỹb 1 ỹb 2 ỹb n ỹb 3 ỹ2 ỹn ỹ3 … … ray past context x input: ray hung a tire on a rope to make his daughter a swing. x 1 x 2 x n x … lm repeat t times generation y ỹ1 output: she hit the rope and the tire fell on top of her lm forward pass lm backward pass forward backward mix forward logits backward logits ỹ = {ỹ 1 , . . . , ỹn } of the hypothesis by reading the past context x and generating a continuation with regular decoding. at each forward-backward iteration, we compute the task-specific loss l ỹ of the logits … ỹ f 1 ỹ f 2 ỹ f n ỹ f 3 ỹb 1 ỹb 2 ỹb n ỹb 3 ỹ2 ỹn ỹ3 … … … ray ran … computing los backprop past context x input: ray hung a tire on a rope to make his daughter a swing. x 1 x 2 x n x … future constra input: ray ran to his daugh make sure she was o z 1 z 2 … to lm repeat t times generation y ỹ1 output: she hit the rope and the tire fell on top of her. lm forward pass lm backward pass forward backward mix forward logits backward logits based on the future constraint z (red box). the backward pass then performs back-propagation and produces the backward logits … ỹ f 1 ỹ f 2 ỹ f 3 ỹb 1 ỹb 2 ỹ ỹb 3 ỹ2 ỹ3 … … past context x input: ray hung a tire on a rope to make his daughter a swing. x 1 x 2 x n x … lm repeat t times generation y ỹ1 output: she hit the rope and the tire fe lm forward pass lm backward pass forward backward mix forward logits backward logits ỹ @xmath0, . . . , ỹb n }. in the subsequent forward pass, for each step n, we compute the forward logits … ỹ f 1 ỹ f 2 ỹ f n ỹ f 3 ỹb 1 ỹb 2 ỹb n ỹb 3 ỹ2 ỹn ỹ3 … … ray c past context x input: ray hung a tire on a rope to make his daughter a swing. x 1 x 2 x n x … f inp ra ma lm repeat t times generation y ỹ1 output: she hit the rope and the tire fell on top of her. lm forward pass lm backward pass forward backward mix forward logits backward logits ỹf n conditioning on the preceding logits … ỹ f 1 ỹ f 2 ỹ f n ỹ f 3 ỹb 1 ỹb 2 ỹb n ỹb 3 ỹ2 ỹn ỹ3 … … … ray ran [s] … computing loss backpropagation past context x input: ray hung a tire on a rope to make his daughter a swing. future constraint z input: ray ran to his daughter to make sure she was okay. output: she hit the rope and the tire fell on top of her. possibly defeasible with new additional context) @xcite . this type of reasoning corresponds to nonmonotonic reasoning @xcite , as it contradicts the monotonicity property according to which valid arguments cannot be made invalid by adding premises. we study two tasks of that nature: abductive reasoning ( §2.1) and counterfactual reasoning ( §2.2). ## the delorean approach humans make inferences based on available information and refine them when new information arrives. since currently available pre-trained lms generate text by sequentially predicting the next token from left to right, they are incapable of conditioning on future constraints. therefore, we propose delorean: an unsupervised backprop-based decoding algorithm, which is summarized in algorithm 1, illustrated in figure 2 , and detailed below. delorean intermittently refines the predictions to cohere with either the context or the constraints (section 3.1). the candidate generations are then ranked by coherence (section 3.2). ## task 2: counterfactual reasoning given an original story ending z of story context x ori , and a counterfactual condition x that changes x ori to invalidate z (see fig. 1 ), the task is to generate a new story ending y that minimally edits the original ending z to regain coherence with the counterfactual condition x @xcite . ## conclusion we presented delorean, an unsupervised lmbased approach to generate text conditioned on past context as well as future constraints, through forward and backward passes considering each condition. we demonstrated its effectiveness for abductive and counterfactual reasoning, on which it performed substantially better than unsupervised baselines. our method is general and can be easily adapted for other generative reasoning tasks.