IP Library › Granted Patent US 12,530,565
Granted Patent B2
US 12,530,565 · App. 17/500,855 · Granted Jan 20, 2026

Systems and methods for safe policy improvement for task oriented dialogues

Inventors: Govardana Sachithanandam Ramachandran (Palo Alto, CA); Kazuma Hashimoto (Menlo Park, CA); Caiming Xiong (Menlo Park, CA); Richard Socher (Menlo Park, CA)
Assignee: Salesforce, Inc.
G06N3/047G06F18/2155G06F18/217G06N3/044G06N3/08G06F18/21326
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,530,565
App. No.
17/500,855
Filed
Oct 13, 2021
Granted
Jan 20, 2026
Kind
B2
Art Unit
2121
USPC
706/12
Abstract

Embodiments described herein provide safe policy improvement (SPI) in a batch reinforcement learning framework for a task-oriented dialogue. Specifically, a batch reinforcement learning framework for dialogue policy learning is provided, which improves the performance of the dialogue and learns to shape a reward that reasons the invention behind human response rather than just imitating the human demonstration.

Claims (82)

1 . A method for causal-aware safety policy improvement in task-oriented learning, comprising:

receiving a training dataset comprising a plurality of dialogues, wherein the plurality of dialogues includes a first dialogue rollout generated according to a latent stochastic behavior policy;

repeatedly sampling the training dataset for a number of times to generate a number of training subsets and a number of validation subsets;

training a task-oriented dialogue model based on a cross-entropy loss using training data in a first training subset of the number of training subsets;

generating, by the task-oriented dialogue model, predicted dialogue rollouts based on dialogue data in a first validation subset of the number of validation subsets;

adding the predicted dialogue rollouts to a pairwise causal learning subset;

sampling a pair of dialogue rollouts from the pairwise causal learning subset; and

training the task-oriented dialogue model based on a binary cross-entropy loss between a preferred probability between the pair of dialogue rollouts and a normalized metric score based on the pair of dialogue rollouts.

2 . The method of claim 1 , further comprising:

retrieving a dataset from the number of training subsets or the number of validation subsets; and

training the task-oriented dialogue model by minimizing a cross-entropy of a predicted dialogue action conditioned on a current state of a dialogue according to a target policy using dialogue data from the retrieved dataset.

3 . The method of claim 2 , wherein the predicted dialogue rollouts are repeatedly generated according to the target policy by iterating the number of validation subsets.

4 . The method of claim 1 , wherein the training the task-oriented dialogue model based on a binary cross-entropy loss is performed by repeatedly sampling different pairs of dialogue rollouts from the pairwise causal learning subset and re-training the task-oriented dialogue model based on the binary cross-entropy loss until a convergence is reached in training.

5 . The method of claim 1 , wherein the training the task-oriented dialogue model, based on a binary cross-entropy loss further comprises:

encoding, via three bi-LSTM layers, respectively, a goal, a belief state and a dialogue act or response sequence at each dialogue turn of each of the sampled pair of dialogue rollouts into three encoded representations;

concatenating the three encoded representations;

feeding the concatenated encoded representations to one or more feed-forward layers that generates a reward prediction for each dialogue turn;

summing generated reward predictions into a dialogue reward for each one of the sampled pair of dialogue rollouts;

computing the preferred probability between the pair of dialogue rollouts based on dialogue rewards corresponding to the sampled pair of dialogue rollouts; and

computing the binary cross-entropy loss between the preferred probability between the pair of dialogue rollouts and the normalized metric score based on the pair of dialogue rollouts.

6 . The method of claim 5 , wherein the preferred probability between the pair of dialogue rollouts is computed using normalization or a softmax function.

7 . The method of claim 1 , further comprising:

repeatedly training the task-oriented dialogue model based on a policy optimization loss that optimizes over the target policy using the training dataset until a training convergence is reached.

8 . The method of claim 7 , wherein the policy optimization loss is computed by:

generating, by the task-oriented dialogue model, a first predicted action distribution based on a current state of a dialogue according to a target policy;

computing a first discounted sum of future reward based on a discount parameter and a reward function of actions and states of the dialogue according to the latent behavior policy;

computing a first loss objective based on a first expectation of the first discounted sum of future reward and the first predicted action distribution, wherein the first expectation is taken over a probability distribution of the states and the actions according to the latent stochastic behavior policy;

generating, by the task-oriented dialogue model, a second predicted action distribution based on a current observation from a time series of observations according to the target policy;

computing a second discounted sum of future reward based on the discount parameter and the reward function for a specific rollout, wherein the second discounted sum of future reward is a collapsed near-deterministic approximation of the first discounted sum of future reward;

computing a second loss objective based on a second expectation of the second discounted sum of future reward and the second predicted action distribution, wherein the second expectation is taken over an average of the observations across the training dataset; and

computing a sum of the first loss objective and the second loss objective.

9 . The method of claim 8 , further comprising:

computing a gradient update component based on a learnt reward from the reward function of actions and states of the dialogue and a gradient of the target policy of the actions conditioned on the states and parameters of the task-oriented dialogue model; and

updating the parameters of the task-oriented dialogue model using the gradient update component.

10 . The method of claim 1 , further comprising:

randomly selecting a dialogue turn during validation of the trained task-oriented dialogue model; and

receiving a set of manually created evaluation scores of a prediction on the dialogue turn from a plurality of evaluators.

11 . A system for causal-aware safety policy improvement in task-oriented learning, the system comprising:

a communication interface receiving a training dataset comprising a plurality of dialogues, wherein the plurality of dialogues includes a first dialogue rollout generated according to a latent stochastic behavior policy;

a memory storing a plurality of processor-executable instructions; and

a processor reading the plurality of processor-executable instructions from the memory to perform operations comprising:

repeatedly sampling the training dataset for a number of times to generate a number of training subsets and a number of validation subsets;

training a task-oriented dialogue model based on an entropy loss using training data in a first training subset of the number of training subsets;

generating, by the task-oriented dialogue model, predicted dialogue rollouts from dialogue data in a first validation subset of the number of validation subsets;

adding the predicted dialogue rollouts to a pairwise causal learning subset;

sampling a pair of dialogue rollouts from the pairwise causal learning subset; and

training the task-oriented dialogue model based on a binary cross-entropy loss between a preferred probability between the pair of dialogue rollouts and a normalized metric score based on the pair of dialogue rollouts.

12 . The system of claim 11 , wherein the operations further comprise:

retrieving a dataset from the number of training subsets or the number of validation subsets; and

training the task-oriented dialogue model by minimizing an entropy of a predicted dialogue action conditioned on a current state of a dialogue according to a target policy using dialogue data from the retrieved dataset.

13 . The system of claim 12 , wherein the predicted dialogue rollouts are repeatedly generated according to the target policy by iterating the number of validation subsets.

14 . The system of claim 11 , wherein the operation of training the task-oriented dialogue model based on a binary cross-entropy loss is performed by repeatedly sampling different pairs of dialogue rollouts from the pairwise causal learning subset and re-training the task-oriented dialogue model based on the binary cross-entropy loss until a convergence is reached in training.

15 . The system of claim 11 , wherein the operation of training the task-oriented dialogue model based on a binary cross-entropy loss further comprises:

encoding, via three bi-LSTM layers, respectively, a goal, a belief state and a dialogue act or response sequence at each dialogue turn of each of the sampled pair of dialogue rollouts into three encoded representations;

concatenating the three encoded representations;

feeding the concatenated encoded representations to one or more feed-forward layers that generates a reward prediction for each dialogue turn;

summing generated reward predictions into a dialogue reward for each one of the sampled pair of dialogue rollouts;

computing the preferred probability between the pair of dialogue rollouts based on dialogue rewards corresponding to the sampled pair of dialogue rollouts; and

computing the binary cross-entropy loss between the preferred probability between the pair of dialogue rollouts and the normalized metric score based on the pair of dialogue rollouts.

16 . The system of claim 15 , wherein the preferred probability between the pair of dialogue rollouts is computed using normalization or a softmax function.

17 . The system of claim 11 , wherein the operations further comprise:

generating, by the task-oriented dialogue model, a first predicted action distribution based on a current state of a dialogue according to a target policy;

computing a first discounted sum of future reward based on a discount parameter and a reward function of actions and states of the dialogue according to the latent behavior policy;

computing a first loss objective based on a first expectation of the first discounted sum of future reward and the first predicted action distribution, wherein the first expectation is taken over a probability distribution of the states and the actions according to the latent stochastic behavior policy;

generating, by the task-oriented dialogue model, a second predicted action distribution based on a current observation from a time series of observations according to the target policy;

computing a second discounted sum of future reward based on the discount parameter and the reward function for a specific rollout, wherein the second discounted sum of future reward is a collapsed near-deterministic approximation of the first discounted sum of future reward;

computing a second loss objective based on a second expectation of the second discounted sum of future reward and the second predicted action distribution, wherein the second expectation is taken over an average of the observations across the training dataset; and

computing a sum of the first loss objective and the second loss objective.

18 . The system of claim 17 , wherein the operations further comprise:

computing a gradient update component based on a learnt reward from the reward function of actions and states of the dialogue and a gradient of the target policy of the actions conditioned on the states and parameters of the task-oriented dialogue model; and

updating the parameters of the task-oriented dialogue model using the gradient update component.

19 . The system of claim 11 , wherein the operations further comprise:

randomly selecting a dialogue turn during validation of the trained task-oriented dialogue model; and

receiving a set of manually created evaluation scores of a prediction on the dialogue turn from a plurality of evaluators.

20 . A non-transitory processor-readable storage medium storing a plurality of processor-executable instructions for causal-aware safety policy improvement in task-oriented learning, the instructions being executed by a processor to perform operations comprising:

receiving a training dataset comprising a plurality of dialogues, wherein the plurality of dialogues includes a first dialogue rollout generated according to a latent stochastic behavior policy;

repeatedly sampling the training dataset for a number of times to generate a number of training subsets and a number of validation subsets;

training a task-oriented dialogue model based on an entropy loss using training data in a first training subset of the number of training subsets;

generating, by the task-oriented dialogue model, predicted dialogue rollouts from dialogue data in a first validation subset of the number of validation subsets;

adding the predicted dialogue rollouts to a pairwise causal learning subset;

sampling a pair of dialogue rollouts from the pairwise causal learning subset; and

training the task-oriented dialogue model based on a binary cross-entropy loss between a preferred probability between the pair of dialogue rollouts and a normalized metric score based on the pair of dialogue rollouts.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 30, 2022
From: RAMACHANDRAN, GOVARDANA SACHITHANANDAM; HASHIMOTO, KAZUMA; XIONG, CAIMING; SOCHER, RICHARD
To: SALESFORCE, INC.
Reel/Frame 061273/0519 →
Continuity (4)
Continuation In Part 17105262 · Nov 25, 2020
Provisional Application 63148861 · Feb 12, 2021
Provisional Application 63034653 · Jun 4, 2020
Related Publication 20220036884A1 · Feb 3, 2022
References Cited (32)
US 9589565B2 · Daniel et al. · 2017 [cited by applicant]
US 20180052825A1 · Chase et al. · 2018 [cited by applicant]
US 20190115027A1 · Pararth et al. · 2019 [cited by applicant]
US 20210150151A1 · Xu · 2021 [cited by examiner]
CN 108804611A · 2018 [cited by applicant]
CN 110866101A · 2020 [cited by applicant]
CN 111046157A · 2020 [cited by applicant]
International Search Report and Written Opinion for PCT/US2022/014034, dated May 27, 2022, 9 pages. [cited by applicant]
Budzianowski et al., “Multiwoz—a large-scale multi-domain wizard-of-oz dataset for task-oriented dialogue modelling,” arXiv preprint arXiv: 1810.00278, Sep. 29, 2018, 14 pages. [cited by applicant]
Chen et al., “Semantically conditioned dialog response generation via hierarchical disentangled self-attention,” arXiv preprint arXiv: 1905.12866, Jun. 9, 2019, 14 pages. [cited by applicant]
Christiano et al., “Deep reinforcement learning from human preferences,” In Advances in Neural Information Processing Systems, Jul. 13, 2017, 17 pages. [cited by applicant]
Devlin et al., “Bert: Pre-training of deep bidirectional transformers for language understanding,” arXiv preprint arXiv:1810.04805, Oct. 11, 2018, 14 pages. [cited by applicant]
Hosseini-Asl et al., “A simple language model for task-oriented dialogue,” arXiv preprint arXiv:2005.00796, Jul. 7, 2020, 22 pages. [cited by applicant]
Jaques et al., “Way off-policy batch deep reinforcement learning of implicit human preferences in dialog,” arXiv preprint arXiv: 1907.00456, Jul. 8, 2019, 16 pages. [cited by applicant]
Mehri et al., Structured fusion networks for dialog, arXiv preprint arXiv:1907.10016, Jul. 23, 2019, 12 pages. [cited by applicant]
Norouzi et al., “Reward augmented maximum likelihood for neural structured prediction,” In Advances In Neural Information Processing Systems, Sep. 1, 2016, 11 pages. [cited by applicant]
Paul et al., “Feature selection as causal inference: Experiments with text classification,” In Proceedings of the 21st Conference on Computational Natural Language Learning (CoNLL 2017), Aug. 3-Aug. 4, 2017, pp. 163-172. [cited by applicant]
Rastogi et al., “Towards scalable multi-domain conversational agents: The schema-guided dialogue dataset,” arXiv preprint arXiv: 1909.05855, Sep. 12, 2019, 11 pages. [cited by applicant]
Schulman et al., “Trust region policy optimization,” In Intemational conference on machine Learning, Feb. 19, 2015, 16 pages. [cited by applicant]
Sutton et al., “Reinforcement learning: An introduction,” MIT press, 2018, 548 pages. [cited by applicant]
Thananjeyan et al., “Safety augmented value estimation from demonstrations (saved): Safe deep model-based rl for sparse cost robotic tasks,” IEEE Robotics and Automation Letters, vol. 5, No. 2, May 16, 2020, 14 pages. [cited by applicant]
Thomas et al., “Data efficient off-policy policy evaluation for reinforcement learning,” In International Conference on Machine Leaming, Apr. 4, 2016, 37 pages. [cited by applicant]
Wen et al., “A networkbased end-to-end trainable task-oriented dialogue system,” arXiv preprint arXiv:1604.04562, Apr. 15, 2016, 11 pages. [cited by applicant]
Zhang et al., “Find or Classify? Dual Strategy for Slot-Value Predictions on Multi-Domain Dialog State Tracking”, ARXVIV.Org, Cornell University Library, 201 Olin Library, Cornell University Ithaca, NY 14853, Oct. 8, 20… [cited by applicant]
Zhang et al., “Task-oriented dialog systems that consider multiple appropriate responses under the same context,” arXiv preprint arXiv:1911.10484, Dec. 2, 2019, 8 pages. [cited by applicant]
Zhao et al., “Rethinking action spaces for reinforcement learning in end-to-end dialog agents with latent variable models,” arXiv preprint arXiv:1902.08858, Apr. 15, 2019, 12 pages. [cited by applicant]
Ziebart et al., “Maximum entropy inverse reinforcement learning,” Proceedings of the Twenty-Third AAAI Conference on Artificial Intelligence, 2008, pp. 1433-1438. [cited by applicant]
Liu et al., “Dialogue Policy Optimization Based on KL-GAN-A2C Model”, 16th International Computer Conference in Wavelet Active Media Technology and Information Processing, 2019, pp. 417-420. [cited by applicant]
Liu et al., . “Iterative Policy Learning in End-to-End Trainable Task-Oriented Neural Dialog Models”, 2017 IEEE, Automatic Speech Recognition and Understanding Workshop., 2017, pp. 482-489. [cited by applicant]
Su et al., “On-line Active Reward Learning for Policy Optimisation in Spoken Dialogue Systems”, arXiv:1605.07669v2, Jun. 2, 2016, 11 pages. [cited by applicant]
Takanobu et al., “Guided Dialog Policy Learning: Reward Estimation for Multi-Domain Task-Oriented Dialog”, arXiv: 1908.10719v1, Aug. 28, 2019, 13 pages. [cited by applicant]
Zhang, J., et al., “Find or Classify? Dual Strategy for Slot-Value Predictions on Multi-Domain Dialog State Tracking,” University of Illinois at Chicago, Zhejiang University, arXiv preprint arXiv:1910.03544v1 [cs.CL], O… [cited by applicant]