Automatically modifying responses from generative models using artificial intelligence techniques

Methods, systems, and computer program products for automatically modifying responses from generative models using artificial intelligence techniques are provided herein. A computer-implemented method includes obtaining data pertaining to at least one conversation involving at least one automated conversation exchange software program and at least one user; identifying, among words proposed by the at least one automated conversation exchange software program in connection with the at least one conversation, words qualifying as belonging to one or more predetermined categories by processing the obtained data using artificial intelligence techniques; determining, by processing the identified words and at least one word-based data source, one or more alternate words; modifying at least a portion of the proposed words by replacing at least a portion of the identified words with at least a portion of the one or more alternate words; and performing at least one automated action based on the modifying.

BACKGROUND

The present application generally relates to information technology and, more particularly, to text generation techniques. More specifically, text generation techniques are commonly used in connection with automated conversation exchange software programs (also referred to herein as chatbots) across a variety of contexts and enterprise sectors. However, as such software programs are designed by human actors, the programs can contain (often unintentional) human biases. For example, a chatbot can drive a given conversation towards a protected attribute-specific bias (e.g., nationality) rather than infer linguistic nuances and context from question text, which can lead to issues with the user(s) of the given conversation.

SUMMARY

In one embodiment of the present invention, techniques for automatically modifying responses from generative models using artificial intelligence (AI) techniques are provided. An exemplary computer-implemented method can include obtaining data pertaining to at least one conversation involving at least one automated conversation exchange software program and at least one user, and identifying, among words proposed by the at least one automated conversation exchange software program in connection with the at least one conversation, one or more words qualifying as belonging to one or more predetermined categories by processing at least a portion of the obtained data using one or more artificial intelligence techniques. The method also includes determining, by processing the one or more identified words and at least one word-based data source, one or more alternate words, and modifying at least a portion of the words proposed by the at least one automated conversation exchange software program in connection with the at least one conversation by replacing at least a portion of the one or more identified words with at least a portion of the one or more alternate words. Further, the method includes performing at least one automated action based at least in part on the modifying.

Another embodiment of the invention or elements thereof can be implemented in the form of a computer program product tangibly embodying computer readable instructions which, when implemented, cause a computer to carry out a plurality of method steps, as described herein. Furthermore, another embodiment of the invention or elements thereof can be implemented in the form of a system including a memory and at least one processor that is coupled to the memory and configured to perform noted method steps. Yet further, another embodiment of the invention or elements thereof can be implemented in the form of means for carrying out the method steps described herein, or elements thereof; the means can include hardware module(s) or a combination of hardware and software modules, wherein the software modules are stored in a tangible computer-readable storage medium (or multiple such media).

DETAILED DESCRIPTION

As described herein, at least one embodiment includes automatically modifying responses from generative models using AI techniques. More specifically, such an embodiment can include neutralizing one or more forms of bias towards specific protected attributes in responses from one or more AI models (e.g., one or more AI-based generative models) in unstructured data and/or chatbot-driven conversations. Such AI models, in one or more embodiments, can include at least one generative pre-trained transformer 2 (GPT-2) language model, at least one bidirectional encoder representations from transformers (BERT) generative model, etc.

As further detailed herein, one or more embodiments include processing a chatbot-driven conversation and determining one or more alternate words if the most likely word to be used by the chatbot (via a corresponding AI-based generative model) at a given instance of the conversation belongs to one or more predetermined categories (e.g., age, gender, race, nationality, etc.). Based at least in part on such a determination, at least one embodiment includes changing one or more words generated by an AI model (e.g., an AI-based natural language generative model) by replacing one or more words with one or more different words as part of the model output.

Accordingly, one or more embodiments include providing (via a natural language generative model) one or more recommendations pertaining to certain attributes for a neutral and/or unbiased conversation response in a given chatbot-driven conversation. Such an embodiment includes learning, by processing conversation data, conversation context and updating and/or retraining at least portions of the AI model by identifying one or more protected attributes and/or domains (e.g., age, gender, race, nationality, etc.) that are prone to discrimination in at least one framework.

It is to be appreciated that although the techniques detailed herein are primarily described within the context of a text generation framework in connection with AI-based natural language interfaces, one or more embodiments can be implemented and/or incorporated into other contexts and/or use cases.

FIG.1is a diagram illustrating system architecture, according to an embodiment of the invention. By way of illustration,FIG.1depicts an automated bias neutralization system105, which includes an AI-based generative model102and a response debiaser component104. As also depicted inFIG.1, input seed words101are provided to AI-based generative model102, and context-related data103(e.g., data pertaining to the context of one or more given chatbot-driven conversations) are provided to AI-based generative model102and response debiaser component104. In one or more embodiments, input seed words101can include words from which a sentence generation process starts. In such an embodiment, during a training process, the first two words of a sentence can be used as seed words, and context-related data can represent the domain and/or theme of generation (e.g., science, technology, sport, etc.), from which responses are generated.

Additionally, and as further detailed herein (e.g., in connection withFIG.2), response debiaser104processes at least a portion of generated text (i.e., generated text yet to be output to a given conversation) and modifies one or more words in the generated text to produce and output unbiased text107. As also illustrated inFIG.1, determinations and/or word modifications produced by the response debiaser component104can be used to retrain and/or fine-tune AI-based generative model102.

FIG.2is a diagram illustrating system architecture, according to an exemplary embodiment of the invention. By way of illustration,FIG.2depicts AI-based generative model202and response debiaser component204. More specifically, in the example embodiment depicted inFIG.2, AI-based generative model202includes seed inputs220, which provides input(s) to model222, which, based at least in part on processing the input(s) from seed inputs220, generates one or more predicted probabilities224. Such probabilities can be used as at least part of one or more outputs from AI-based generative model202and/or can be provided as input to response debiaser component204.

As additionally depicted inFIG.2, within response debiaser component204, probability data226(based at least in part on predicted probabilities224provided by AI-based generative model202) are provided as input to at least one connected debiased network228, which generates a protected attribute modified output230.

In an embodiment such as depicted inFIG.2, bias is detected via AI-based generative model pertaining to at least one certain protected attribute. This is carried out by first identifying the protected attribute(s) in text that are of interest, and then performing attribute-based generation and debiasing by implementing a gradient-reversal between debiasing network and attribute-based generation component to generate a debiased output response.

Additionally or alternatively, one or more embodiments include implementing at least one fairness regularizer to AI-based generative model loss (that is, the loss function and/or objective function of the model, which is used during the training of the model) to penalize protected attributes being proposed in one or more responses. In such an embodiment, a fairness regularizer can be implemented by adding, to the AI-based generative model, at least one protected attribute-specific discriminator such that output by the AI-based generative model is increased and/or maximized and biased generation on a specific protected attribute is reduced and/or minimized. Such a functionality can be, for example, accommodated into a loss function such as: L(x)=min(G(x)−F(x)), wherein G(x) represents loss of the generative model, F(x) represents fairness loss of a protected attribute, and L(x) represents combined loss. Further, at least one embodiment can include solving such a formulation using one or more gradient reversal methods. By way of example, in one or more embodiments, a gradient reversal layer can be placed between an attribute-based generator (model) and a debiasing component. In such an embodiment, the gradient reversal layer acts as an identity function (i.e., the output is the same as the input) during forward propagation, but during back propagation, the input is multiplied by −1.

Additionally or alternatively, one or more embodiments include using bias-neutral BERT embeddings for training an AI-based generative model, and using such a trained model to predict one or more words in connection with a chatbot-driven conversation. While predicting a word, if the most likely word belongs to a predetermined category (e.g., an age-related category, a gender-related category, a race-related category, a nationality-related category, etc.), then such an embodiment includes determining if an attribute-distinct and/or attribute-opposite word also has the same likelihood of belonging to a predetermined category. Such a step can at least in part validate that the AI-based generative model is bias-neutrally trained. Further, in such a scenario, at least one embodiment can include selecting at least one word using context information derived from a portion of the conversation (e.g., from a preceding question awaiting a response).

FIG.3is a flow diagram illustrating techniques according to an embodiment of the present invention. Step302includes obtaining data pertaining to at least one conversation involving at least one automated conversation exchange software program and at least one user. In at least one embodiment, the obtained data can include unstructured text data derived from the at least one conversation and/or context-related information derived from the at least one conversation.

Step304includes identifying, among words proposed by the at least one automated conversation exchange software program in connection with the at least one conversation, one or more words qualifying as belonging to one or more predetermined categories by processing at least a portion of the obtained data using one or more AI techniques. In at least one embodiment, the one or more AI techniques include at least one AI-based natural language generative model. Also, in one or more embodiments, the one or more predetermined categories include one or more categories associated with human bias (e.g., age, gender, race, nationality, etc.).

Step306includes determining, by processing the one or more identified words and at least one word-based data source, one or more alternate words. Step308includes modifying at least a portion of the words proposed by the at least one automated conversation exchange software program in connection with the at least one conversation by replacing at least a portion of the one or more identified words with at least a portion of the one or more alternate words.

Step310includes performing at least one automated action based at least in part on the modifying. In at least one embodiment, performing the at least one automated action includes outputting a set of words, including the modified portion, in furtherance of the at least one conversation. Additionally or alternatively, performing the at least one automated action includes training the one or more AI techniques using at least one of the one or more identified words and the one or more determined alternate words. In such an embodiment, training the one or more AI techniques includes incorporating, as part of the one or more AI techniques, at least one discriminator which penalizes proposal of the one or more identified words. Additionally or alternatively, training the one or more AI techniques includes using bidirectional encoder representations from transformers embeddings based at least in part on at least one of the one or more identified words and the one or more determined alternate words.

Also, in one or more embodiments, software implementing the techniques depicted inFIG.3can be provided as a service in a cloud environment.

A data processing system suitable for storing and/or executing program code will include at least one processor402coupled directly or indirectly to memory elements404through a system bus410. The memory elements can include local memory employed during actual implementation of the program code, bulk storage, and cache memories which provide temporary storage of at least some program code in order to reduce the number of times code must be retrieved from bulk storage during implementation.

Input/output or I/O devices (including, but not limited to, keyboards408, displays406, pointing devices, and the like) can be coupled to the system either directly (such as via bus410) or through intervening I/O controllers (omitted for clarity).

Additionally, it is understood in advance that implementation of the teachings recited herein are not limited to a particular computing environment. Rather, embodiments of the present invention are capable of being implemented in conjunction with any type of computing environment now known or later developed.

Characteristics are as follows:

Service Models are as follows:

Deployment Models are as follows:

Virtualization layer70provides an abstraction layer from which the following examples of virtual entities may be provided: virtual servers71; virtual storage72; virtual networks73, including virtual private networks; virtual applications and operating systems74; and virtual clients75. In one example, management layer80may provide the functions described below. Resource provisioning81provides dynamic procurement of computing resources and other resources that are utilized to perform tasks within the cloud computing environment. Metering and Pricing82provide cost tracking as resources are utilized within the cloud computing environment, and billing or invoicing for consumption of these resources.

In one example, these resources may include application software licenses. Security provides identity verification for cloud consumers and tasks, as well as protection for data and other resources. User portal83provides access to the cloud computing environment for consumers and system administrators. Service level management84provides cloud computing resource allocation and management such that required service levels are met. Service Level Agreement (SLA) planning and fulfillment85provide pre-arrangement for, and procurement of, cloud computing resources for which a future requirement is anticipated in accordance with an SLA.

At least one embodiment of the present invention may provide a beneficial effect such as, for example, automatically modifying responses from generative models using artificial intelligence techniques.