US-12619865-B2 - Decoupling memory and computation to enable privacy across multiple knowledge bases of user data
Abstract
Systems and methods are provided herein for utilizing a knowledge base to improve online automated dialogue responses based on machine learning models. Contextual customer data stored in external memory may be used for retraining a machine learning model to incorporate new observations into the model and to reduce bias and/or improve fairness in associated automated responses without having to retrain an entire memory architecture. The disclosed technology may improve the accuracy of machine learning models by using potentially private contextual customer data to inform the model while eliminating the ability of an intruder to access such data when the model is utilized in cloud-based services.
Inventors
- Omar Florez CHOQUE
- Rui Zhang
- Erik T. Mueller
Assignees
- CAPITAL ONE SERVICES, LLC
Dates
- Publication Date
- 20260505
- Application Date
- 20200825
Claims (19)
- 1 . A system for adapting a response of a trained neural network using customer contextual data while controlling bias, the system comprising: one or more processors; a trained neural network comprising a long-short term memory (LSTM) encoder and a LSTM decoder; one or more knowledge bases external to the trained neural network and configured to store sensitive customer data; a contextual trainer in communication with the trained neural network and the one or more knowledge bases; and memory in communication with the one or more processors and storing instructions that, when executed by the one or more processors, cause the one or more processors to: translate, by the contextual trainer, the sensitive customer data from the one or more knowledge bases into keys; receive, by the trained neural network, an input observation x comprising a customer query; continuously listen for, by the trained neural network, one or more commands issued by the contextual trainer, wherein the one or more commands are configured to program the trained neural network to formulate and revise responses to the customer query based on one or more rules; generate, by the trained neural network, a latent activation representation h based on the input observation x by: receiving, by the LSTM encoder, the input observation x; outputting, by the LSTM encoder, a context-sensitive hidden representation of the input observation x; receiving, by the LSTM decoder, the context-sensitive hidden representation of the input observation x; and predicting, by the LSTM decoder, a sequence of words associated with the input observation x based on the context-sensitive hidden representation of the input observation x; modify, by the contextual trainer, the latent activation representation h from the trained neural network based on one or more of the keys to generate a modified latent activation representation h fair , wherein the one or more keys provide a uniform distribution over the sensitive customer data to eliminate bias in a first response to the customer query; generate, by the contextual trainer, a normalized version of the modified latent activation representation h fair ; store the normalized version of the modified latent activation representation h fair in the memory thereby increasing the capacity of the trained neural network; and output, by the contextual trainer, a predicted sequence v based at least in part on the normalized version of the modified latent activation representation h fair , wherein the predicted sequence ŷ comprises the first response to the customer query, the first response based on the sensitive customer data and free of the sensitive customer data.
- 2 . The system of claim 1 , wherein the trained neural network comprises the LSTM encoder in communication with the LSTM decoder, wherein the LSTM encoder is configured to receive the input observation x and provide an encoded latent activation output h enco , wherein the LSTM decoder is configured to receive the encoded latent activation output h enco and a target response input y to produce a decoded latent activation representation h deco for input to the contextual trainer.
- 3 . The system of claim 2 , further comprising a Natural Language Processing (NLP) device in communication with the contextual trainer, wherein the input observation x comprises dialogue received from a customer, and the target response input y comprises an intermediate response generated by the Natural Language Processing (NLP) device.
- 4 . The system of claim 1 , wherein the predicted sequence ŷ is a word-by-word concatenation based on the sensitive customer data.
- 5 . The system of claim 1 , wherein the predicted sequence v is output for review by a customer in response to the input observation x.
- 6 . The system of claim 1 , wherein the contextual trainer is configured to compute an Attention score, wherein logits of the Attention score comprise unnormalized probabilities for predicting an i th token of the predicted sequence ŷ.
- 7 . The system of claim 1 , wherein the trained neural network comprises one or more Seq2seq models.
- 8 . The system of claim 1 , wherein the contextual trainer occupies memory external to the trained neural network.
- 9 . The system of claim 1 , wherein the trained neural network is trained offline and is configured to receive textual data and memorize sequential patterns.
- 10 . The system of claim 1 , wherein the sensitive customer data comprises information associated with one or more of age, gender, or combinations thereof.
- 11 . The system of claim 1 , wherein the uniform distribution comprises a uniform gender distribution comprising a sequence of tokens annotated with first gender information.
- 12 . A contextual trainer comprising: one or more processors; and memory in communication with the one or more processors and storing instructions that, when executed by the one or more processors, cause the one or more processors to: receive sensitive customer data; translate the sensitive customer data into keys, wherein the keys provide a uniform distribution over the sensitive customer data to eliminate bias in a first response to a customer query; issue one or more commands to a trained neural network thereby programming the trained neural network to formulate and revise responses to the customer query based on one or more rules; receive, from the trained neural network, a latent activation representation h based on an input observation x received by the trained neural network, the input observation x comprising the customer query; store a normalized version of the latent activation representation h in the memory thereby increasing the capacity of the trained neural network; input the latent activation representation h and the keys into an Attention mechanism configured to determine unnormalized probabilities for predicting an i th token of a predicted sequence ŷ; generate an Attention mechanism output responsive to inputting the latent activation representation h and the keys into the Attention mechanism; apply a Softmax function to the Attention mechanism output to generate a Softmax output; and output the predicted sequence ŷ based at least in part on the Softmax output, wherein the predicted sequence ŷ comprises the first response to the customer query, the first response based on the sensitive customer data and free of the sensitive customer data.
- 13 . The contextual trainer of claim 12 , wherein the predicted sequence v comprises a revised trained neural network response adapted using the sensitive customer data.
- 14 . A method for adapting a trained neural network response using customer contextual data while controlling bias, the method comprising: translating, by a contextual trainer, sensitive customer data from one or more knowledge bases into keys using a contextual trainer; receiving, by a trained neural network, an input observation x, wherein the trained neural network comprises a long-short term memory (LSTM) encoder and a LSTM decoder, and wherein the input observation x comprises a customer query; continuously listening for, by the trained neural network, one or more commands issued by the contextual trainer, wherein the one or more commands are configured to program the trained neural network to formulate and revise responses to the customer query based on one or more rules; generating, by the trained neural network, a latent activation representation h based on the input observation x by: receiving, by the LSTM encoder, the input observation x; outputting, by the LSTM encoder, a context-sensitive hidden representation of the input observation x; receiving, by the LSTM decoder, the context-sensitive hidden representation of the input observation x; and predicting, by the LSTM decoder, a sequence of words associated with the input observation x based on the context-sensitive hidden representation of the input observation x; modifying, by the contextual trainer, the latent activation representation h from the trained neural network based on one or more of the keys to generate a modified latent activation representation h fair , wherein the one or more keys provide a uniform distribution over the sensitive customer data to eliminate bias in a response to the customer query; generating, by the contextual trainer, a normalized version of the modified latent activation representation h fair , storing the normalized version of the modified latent activation representation h fair in a memory thereby increasing the capacity of the trained neural network; and outputting, by the contextual trainer, a predicted sequence ŷ based at least in part on the normalized version of the modified latent activation representation h fair , wherein the predicted sequence v comprises the response to the customer query, the response based on the sensitive customer data and free of the sensitive customer data.
- 15 . The method of claim 14 , wherein the trained neural network comprises the LSTM encoder in communication with the LSTM decoder, wherein the LSTM encoder is configured to receive the input observation x and provide an encoded latent activation output h enco , wherein the LSTM decoder is configured to receive the encoded latent activation output h enco and a target response input y to produce a decoded latent activation representation h deco for input to the contextual trainer.
- 16 . The method of claim 15 , wherein the input observation x comprises dialogue received from a customer, and the target response input y comprises an intermediate response generated by a Natural Language Processing (NLP) device.
- 17 . The method of claim 14 , wherein the predicted sequence ŷ is a word-by-word concatenation based on the sensitive customer data received from the one or more knowledge bases.
- 18 . The method of claim 14 , wherein the customer query is received from a customer and the predicted sequence ŷ is output for review by the customer.
- 19 . The method of claim 14 , wherein the contextual trainer occupies memory external to the trained neural network.
Description
FIELD The disclosed technology relates to training machine learning models using potentially biased and/or sensitive contextual user data to improve response fairness without compromising user privacy when the model is used with cloud-based services. BACKGROUND The deployment of deep learning solutions in cloud-based services often involves regularly re-training neural network models to improve or refine the model and/or to increase the accuracy of the service. In certain cloud-based machine-learning applications, such as intelligent automated virtual assistants, a neural network model can be improved by using available contextual data for the training and/or re-training. Training a neural network model typically involves mapping one or more functions from inputs to outputs of the model using a training dataset while keeping track of errors. The errors may be utilized to update weights that are applied to the various neural network connections and such updates may be iteratively made until the model is considered good enough and/or the error reduction process has stalled. The process of training/re-training a neural network can be computationally complex, time-consuming, and technically challenging. In most cases, therefore, such training/re-training (and testing) of a neural network model is done offline before being deployed for use in cloud-based services. The integration of a knowledge base into a neural dialogue agent is one of the key challenges in conversational artificial intelligence. The use of memory for encoding knowledge base information can be effective in generating more fluent and informed responses. Unfortunately, such memory can be biased and may become full of latent representations during training, so the most common strategy is to randomly overwrite old memory entries. Existing neural dialogue agents struggle to utilize structured data stored in a knowledge base, and often assume that the dialogue history carries the information needed to provide an answer, which can limit the value and accuracy of information produced. Intelligent automated virtual assistants, chatbots, etc., for example, utilize machine learning to interpret dialogue/chat and provide automated contextual information to the customer. Some learning models may utilize multiple knowledge bases (calendars, locations, weather, etc.) to solve different problems and/or to enhance the accuracy of the response. Potentially sensitive contextual customer data in the knowledge base (gender, age, location, etc.) may be used to improve the accuracy of the model, but the use of such information may create biasing and/or privacy concerns. Prior methods have dealt with such issues by using encryption and other brute-force methods to mask sensitive customer data. There exists a need for flexible training and/or re-training of deep learning models using contextual data to improve fairness in virtual assistant dialogue results without creating customer privacy issues and without retraining the entire neural network memory architecture. Embodiments of the present disclosure are directed to this and other considerations. SUMMARY Disclosed herein are systems and methods for utilizing customer contextual data securely stored in one or more knowledge bases to improve online automated dialogue responses based on machine learning models that may be initially trained offline. Certain implementations may utilize external memory for training models, for example, to incorporate new observations without having to retrain the entire memory architecture. Consistent with the disclosed embodiments, a system is provided for adapting a response of a trained neural network using customer contextual data while controlling fairness in the corresponding response. The system includes one or more processors, a trained neural network, one or more knowledge bases, and a contextual trainer memory module in communication with the trained neural network and the one or more knowledge bases. The contextual trainer memory module is configured to: translate contextual data values from the one or more knowledge bases into keys; generate gradients based on the keys; generate a Fair Region vector, the Fair Region vector including a subset of the gradients selected to provide a predetermined distribution over the contextual data values. The system includes memory in communication with the one or more processors and storing instructions that, when executed by the one or more processors, cause the system to: receive, by the trained neural network, an input observation x; generate, by the trained neural network, a latent activation representation h based on the input observation x; query the contextual trainer memory module with the latent activation representation h to generate an associated Fair Region vector; combine the latent activation representation and the Fair Region vector, and output a predicted sequence § based at least in part on the combined latent activation repr