Dynamic gradient strategies for adversarial examples in machine learning models

By adding noise to neural network outputs, the model's gradients are obscured, thwarting attackers' attempts to replicate or misclassify, thus safeguarding the model's integrity and revenue streams.

JP7754599B2Active Publication Date: 2025-10-15INTERNATIONAL BUSINESS MACHINE CORPORATION
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2023534141
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-12-08
Filing Date
2021-11-22
Publication Date
2025-10-15
Estimated Expiration
2041-11-22

AI Technical Summary

Technical Problem

Existing neural network-based machine learning models are vulnerable to adversarial attacks such as model theft and evasion, where attackers replicate the model's training by using the service provider's API to obtain labeled data sets, leading to lost revenue and resource theft.

Method used

Introduce variation or noise into the output probabilities of neural networks to create misleading gradients, making it impossible for attackers to accurately reproduce the model or cause misclassification, while preserving the model's classification accuracy.

Benefits of technology

Protects neural networks from model theft and evasion attacks by introducing ambiguity in gradients, ensuring the model's functionality is maintained while preventing unauthorized replication and misclassification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007754599000001
    Figure 0007754599000001
  • Figure 0007754599000002
    Figure 0007754599000002
  • Figure 0007754599000003
    Figure 0007754599000003
Patent Text Reader

Abstract

A mechanism is provided for obfuscating a trained configuration of a trained machine learning model. The trained machine learning model processes input data to generate an initial output vector having classification values ​​for each of a plurality of predetermined classes. A variation insertion engine determines a subset of classification values ​​in the initial output vector into which to insert variations. The variation insertion engine modifies classification values ​​in the subset of classification values ​​by inserting variations into a function associated with generating the output vector for the classification values ​​in the subset of classification values, thereby generating a modified output vector. The trained machine learning model outputs the modified output vector. The variations modify the subset of classification values ​​to obfuscate the trained configuration of the trained machine learning model while maintaining accuracy in classifying the input data.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This application relates generally to improved data processing apparatus and methods, and more particularly to mechanisms for protecting machine learning models from adversarial example-based attacks by using dynamic gradient strategies. [Background technology]

[0002] Neural network-based deep learning is a type of machine learning model that uses a cascade of many layers of nonlinear processing units for feature extraction and transformation. Each successive layer uses the output from the previous layer as input. The machine learning algorithms used to train these machine learning models can be supervised or unsupervised, and applications include pattern analysis (unsupervised) and classification (supervised).

[0003] Neural network-based deep learning is based on learning multiple levels of features or representations of data, where higher-level features are derived from lower-level features to form hierarchical representations. The configuration of layers of nonlinear processing units in neural networks used in deep learning algorithms depends on the problem to be solved. Layers that have been used in deep learning include hidden layers in artificial neural networks and sets of complex propositional formulas. These may also include latent variables organized in terms of layers in deep generative models, such as the nodes in deep belief networks and deep Boltzmann machines. Summary of the Invention

[0004] This Summary is provided to introduce a selection of concepts in a simplified form that are further described herein in the Detailed Description. This Summary is not intended to identify key elements or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.

[0005] In one exemplary embodiment, a method for obfuscating a trained configuration of a trained machine learning model is provided. The method is implemented in a data processing system including at least one processor and at least one memory, wherein the at least one memory includes instructions executed by the at least one processor to specifically configure the at least one processor to execute the trained machine learning model, a selection classification output variation engine, and a variation insertion engine. The method includes processing input data by the trained machine learning model to generate an initial output vector having classification values ​​for each of a plurality of predetermined classes. Additionally, the method includes determining, by the variation insertion engine, a subset of classification values ​​in the initial output vector into which to insert perturbations. The subset of classification values ​​is less than all of the classification values ​​in the initial output vector. Additionally, the method includes modifying, by the variation insertion engine, classification values ​​in the subset of classification values ​​by inserting perturbations into a function associated with generating the output vector for the classification values ​​in the subset of classification values, thereby generating a modified output vector. Furthermore, the method includes outputting the modified output vector by the trained machine learning model. The variation modifies a subset of classification values ​​to obfuscate the trained configuration of the trained machine learning model while preserving the classification accuracy of the input data.

[0006] In another exemplary embodiment, a computer program product is provided that includes a computer usable or readable medium bearing a computer readable program that, when executed on a computing device, causes the computing device to perform various ones and combinations of the operations outlined above with respect to the exemplary embodiment of the method.

[0007] In yet another exemplary embodiment, a system / apparatus is provided. The system / apparatus may include one or more processors and a memory coupled to the one or more processors. The memory may include instructions that, when executed by the one or more processors, cause the one or more processors to perform various ones and combinations of the operations outlined above with respect to the exemplary embodiment of the method.

[0008] These and other features and advantages of the present invention will be described in, or will become apparent to those skilled in the art in view of, the following detailed description of illustrative embodiments of the invention.

[0009] The invention, together with its preferred mode of use, objects and advantages, will best be understood by reference to the following detailed description of illustrative embodiments when read in conjunction with the accompanying drawings. [Brief explanation of the drawings]

[0010] [Figure 1A] 1 is a block diagram illustrating the problem of model stealing attacks addressed by the present invention and the solution provided by the mechanisms of an exemplary embodiment; FIG. [Figure 1B] FIG. 1 is a block diagram illustrating the problem of model theft attacks addressed by the present invention and the solution provided by the mechanisms of an exemplary embodiment. [Figure 1C] FIG. 1 is a block diagram illustrating the problem of model evasion attacks and the variation insertion engine 160 solution provided by the mechanisms of the exemplary embodiment. [Figure 1D] FIG. 1 is a block diagram illustrating the problem of model evasion attacks and the variation insertion engine 160 solution provided by the mechanisms of the exemplary embodiments. [Figure 2A] Diagram of the sigmoid or softmax function typically used with neural network models. [Figure 2B] 1 is a diagram of a sigmoid or softmax function in which variation or noise is introduced into the curve to prevent an attacker from identifying the correct slope of the curve, according to one example embodiment. [Figure 3] 1 is a schematic diagram of one exemplary embodiment of a cognitive system in a computer network. [Figure 4] 1 is a block diagram of an example data processing system in which aspects of the illustrative embodiments may be implemented; [Figure 5] FIG. 1 is a diagram of a cognitive system processing pipeline for processing natural language input to generate a response or result, according to one exemplary embodiment. [Figure 6] 1 is a flowchart outlining an example operation for obfuscating a trained configuration of a trained machine learning model, according to one illustrative embodiment. [Figure 7] FIG. 1 is a diagram of an example of a cognitive system processing pipeline in which selective classification output variation is implemented, according to one illustrative embodiment. [Figure 8] 10 is a flowchart outlining the operation of a further illustrative embodiment example in which dynamic modification of variation insertion is implemented; DETAILED DESCRIPTION OF THE INVENTION

[0011] Exemplary embodiments provide mechanisms for protecting cognitive systems, such as those comprising neural networks, machine learning, or deep learning mechanisms, or combinations thereof, from attacks using gradients or their estimates, such as model theft attacks and evasion attacks. While exemplary embodiments are described in the context of neural network-based mechanisms and cognitive systems, exemplary embodiments are not limited to such. Rather, the mechanisms of exemplary embodiments may be utilized with any artificial intelligence mechanism, machine learning mechanism, deep learning mechanism, or the like, the output of which may be modified in accordance with exemplary embodiments described below, thereby obfuscating internal mechanisms, such as machine learning computer models (or simply "models"), training of various types of neural networks, e.g., recurrent neural networks (RNNs), convolutional neural networks (CNNs), deep learning (DL) neural networks, cognitive computing systems implementing machine learning computer models, or the like. Obfuscating the training of the internal mechanisms makes it impossible to accurately calculate the gradients and therefore impossible to reproduce the internal mechanisms via model stealing attacks or to craft adversarial examples to misclassify the model. These machine learning-based mechanisms will be collectively referred to herein as computer "models," a term intended to refer to any of various types of machine learning computer models that are susceptible to gradient-based attacks.

[0012] Exemplary embodiments introduce noise into the output of a protected cognitive system that prevents external parties from reproducing the configuration and training of the cognitive system. That is, the noise obscures the actual output produced by the cognitive system while preserving the validity of the output. In this way, the cognitive system can be used to enforce the operation of the cognitive system while preventing others from generating their own version of the trained and configured cognitive system that would produce the correct output. An attacker may be able to assume the noisy output is the correct output for training their own cognitive system model, but the attacker's model will still not produce the same output of the cognitive system model they are attempting to recreate. This is because, even with a noisy output, the correct output may be one of multiple possibilities, and only an identical cognitive system model architecture with the same model weights can correctly identify which of the multiple possibilities is correct. Furthermore, exemplary embodiments provide mechanisms for ensuring that the mechanisms of the exemplary embodiments introduce noise to prevent gradient determination and prevent output misclassification, thereby providing the correct output of the model while preventing evasion attacks, i.e., attacks in which an attacker introduces noise to force a misclassification without arousing suspicion.

[0013] The success of neural network-based systems has spawned many web services based on them. Service providers offer application program interfaces (APIs) to end users of the web service, allowing the end users to submit input data via their client computing devices to be processed by the web service, which then provides result data indicating the results of the web service's operation on the input data. Cognitive systems often utilize neural networks to perform classification-type operations, classifying the input data into various predefined categories of information. For example, in an image processing web service, an input image containing multiple data points, such as pixels, may be input to the web service, and the web service operates on the input image data to classify the elements of the input image into types of objects present in the image, thereby performing object or image recognition (e.g., the image may contain a person, a car, a building, a dog, etc.). Similar types of classification analyses can be performed on various other types of input data, including, but not limited to, language recognition, natural language processing, speech recognition, social network filtering, machine translation, and bioinformatics. Of particular interest to some exemplary embodiments described herein, such web services may provide functionality for analyzing patient information in a patient's electronic medical record (EMR) using natural language processing, analyzing medical images such as X-ray images, magnetic resonance imaging (MRI) images, computed tomography (CT) scan images, and the like.

[0014] Service providers often charge end users for the use of web services provided by the service provider to run neural network-based cognitive systems. However, it has been recognized that end users can utilize APIs provided by the service provider to input a set of input data and obtain sufficient output data to replicate the training of the cognitive system's neural network, thereby generating their own trained neural networks and thereby avoiding the need to use the service provider's services, resulting in lost revenue for the service provider. That is, if an end user uses the service provider's web service to label a set of input data based on a classification operation performed on the input data, after inputting a sufficient input data set, e.g., a 10,000-item input data set (herein, the term "data set" as used herein refers to a set of one or more data samples), and obtaining corresponding output labels, the output labels can be used as a "golden" set or ground truth for training another neural network, e.g., the end user's own neural network, to perform a similar classification operation. This is referred to herein as a model theft attack, where an end user, hereafter referred to as the "attacker", is motivated to secretly recreate a trained neural network and attempts to steal a neural network model that was created and trained by a service provider through the use of the service provider's API.

[0015] Exemplary embodiments reduce or eliminate an attacker's ability to conduct attacks using gradients or their estimates, such as model stealing and evasion attacks, by introducing variation, or noise, into the output probabilities generated by a neural network to produce misleading gradients that protect against attackers attempting to replicate or circumvent the neural network model. The introduced variation (noise) causes the attacker's gradients to deviate from the correct direction and amount, minimizing degradation of the accuracy of the protected neural network model. To meet these two criteria, some exemplary embodiments follow two general guidelines when generating variation: (1) one or more methods that use variation to learn machine learning parameters are added to create gradient ambiguity; for example, in one exemplary embodiment, the sign of the first derivative is reversed (the first derivative identifies the direction, e.g., increase / decrease, of a function or curve), and (2) noise is first added to either end of a function, such as a softmax or sigmoid function, up to + / - 0.5.

[0016] It should be understood that these are merely example guidelines for some exemplary embodiments, and that many different modifications may be made thereto without departing from the spirit and scope of the present invention. For example, while the activation function was chosen for the exemplary embodiments due to its standard intended use for deep learning classifiers, the activation function need not be a softmax or sigmoid function. Any activation function of a protected neural network, with added ambiguity due to the introduction of noise by the exemplary embodiments, may be utilized.

[0017] In general, the illustrative embodiments provide various methods and mechanisms for adding variation without adversely affecting the accuracy of a model or neural network. For example, arbitrary noise may be added to the activation function of a model or neural network, which may result in ambiguity in the output that could fool a gradient-based attacker. Nevertheless, in some illustrative embodiments, the variation mechanisms of the illustrative embodiments add arbitrary noise that does not change the resulting classification, i.e., the output of the class with the highest probability, produced by a trained model or neural network. That is, given the output probability vector y=[y_1,...,y_n], the variation mechanisms of these illustrative embodiments may add noise d such that argmax_i{y_i+d_i}=argmax_i{y_i}.

[0018] Due to the ambiguity added to the output of a trained model or neural network, the variation mechanism of an example embodiment may add noise that not only adds ambiguity but also changes the sign of the gradient. In such an embodiment, the variation mechanism adds more variation to obvious cases where the class probability is closer to 1 or 0, and therefore the resulting class of the output is more likely to be protected. By adding noise to these cases, the variation mechanism also adds ambiguity to the learning. Finally, with the added noise, the gradient direction is reversed relative to the original gradient, as the original model has a higher probability for the more obvious cases, as opposed to the perturbed output having a lower probability for the more obvious cases.

[0019] There may be many different implementations of variance that meet this criterion, and all such variances are considered to be within the spirit and scope of the present invention. That is, any function that produces variance in the output of a neural network that meets the above criterion and guidelines may be used without departing from the spirit and scope of the present invention.

[0020] For example, suppose we have a given neural network f(x) = sigma(h(x)), where sigma is the softmax or sigmoid function, h(x) is a function representing the residual of the neural network, and x is the input data. Various possible variations satisfy the above criteria and guidelines, examples of which are as follows: 1. Copy protection(f(x)) = normalize(sigma(h(x)) - 0.5(sigma(0.25h(x)) 0.5)), 2. Gaussian noise up to + / - 0.5 on [h1,inf) and (-inf,-h1], where h1 is the smallest h(x) such that sigma(h(x))>0.99, and 3. Random noise h'(x) such that the dimension ranking of sigma(h(x)+h'(x)) is equal to sigma(h(x)). Here, normalization is either the identity function if sigma is a sigmoid function, or a function that divides the input vector by the sum of its values ​​if sigma is a softmax function.

[0021] Variation 1 in the example above keeps the ambiguous cases as they are, but variations make the model or neural network output less certain when the output for the same input is more certain, up to 0.5, which keeps the result class the same. That is, the higher the probability / confidence in the original model, the lower the probability / confidence in the protected model.

[0022] In the example above, variation 2 adds one type of random noise (called Gaussian noise) when the output is certain or certain, i.e., when the probability of classification is high, e.g., 1.0, 0.9, etc., depending on the implementation. The difference between variation 1 above and variation 2 above is that variation 1 adds more noise when the result is more certain, while variation 2 does not require such adjustment and therefore, in some cases, the more certain the output, the less noise there is. Variation 3 adds noise that does not change the relative order of the possible classes given the input data; for example, if the input image data is more likely to be a bird than a cow, variation 3 adds noise as long as this order is preserved.

[0023] These variations minimize the variation in boundary cases, such as f(x) = 0.5, so that there is little change in this area. However, when the probability score is high, for example, near f(x) = 1.0, or low, for example, near f(x) = 0.0, the variation is large. Nevertheless, in this case, the ranking of the output classification does not change because the variation is only up to + / - 0.25 relative to the highest-ranked classification (#1), and 1.0 - 0.25 = 0.75 is still the highest probability score among the classifications. That is, if the original probability of a classification is 1.0 and the probability is reduced to 0.75 through the introduction of noise according to the exemplary embodiment presented herein, this may still be considered high, and the classification of the input remains the same. Nevertheless, if the probability drops to 0.5, the average user would consider this uncertain, indicating that the output may be unusable and further analysis may be required.

[0024] Thus, the mechanisms of the exemplary embodiments improve the operation of neural networks and cognitive systems that implement them by adding additional, uncommon functionality not previously present in the neural network mechanisms or cognitive systems to specifically avoid model theft attacks and / or model evasion attacks. The mechanisms of the exemplary embodiments add additional technical logic in the neural networks and cognitive systems that specifically implements the introduction of variation according to the measures and guidelines described above to enable obfuscation of the training of neural networks, machine learning models, deep learning models, or the like while preserving the usefulness of the resulting output; for example, even if the actual probability values ​​generated by the model are not accurate relative to the training of the model, the classification and labeling of the output data is still accurate. The mechanisms of the exemplary embodiments are specific to a technical environment with one or more data processing systems and / or computing devices, specifically configured to implement the additional logic of the present invention, thereby resulting in an uncommon technical environment comprising one or more uncommon data processing systems and / or computing devices. Moreover, exemplary embodiments are particularly directed to solving the technical problem of model theft attacks, which involve reproducing the training of a dedicated computing device having a neural network model, a machine learning model, a deep learning model, or other such artificial intelligence or cognitive behavior-based computing mechanism. Additionally, exemplary embodiments solve the technical problem of model evasion attacks, which involve determining the correct level of noise to introduce based on determined gradients of the trained model to cause the model to misclassify inputs.

[0025] Before beginning to discuss various aspects of the exemplary embodiments in more detail, it should first be understood that the term "mechanism" will be used throughout this description to refer to elements of the present invention that perform various operations, functions, and the like. A "mechanism," as the term is used herein, may be an implementation of a function or aspect of an exemplary embodiment in the form of an apparatus, a procedure, or a computer program product. In the case of a procedure, the procedure is performed by one or more devices, apparatuses, computers, data processing systems, or the like. In the case of a computer program product, the logic represented by computer code or instructions contained in or on the computer program product is executed by one or more hardware devices to perform the function or perform the operation associated with the particular "mechanism." As such, the mechanisms described herein may be implemented as dedicated hardware, software executing on general-purpose hardware, software instructions stored on a medium such that the instructions are readily executable by dedicated or general-purpose hardware, a procedure or method for performing a function, or any combination of the above.

[0026] The description and claims may use the terms "a," "at least one of," and "one or more of" in reference to particular features and elements of exemplary embodiments. It should be understood that these terms and phrases are intended to state that there is at least one of a particular feature or element present in a particular exemplary embodiment, but that there may be more than one. That is, these terms / phrases are not intended to limit the description or claims to the presence of a single feature / element, nor are they intended to require the presence of a plurality of such features / elements. In contrast, these terms / phrases simply require at least a single feature / element, and there may be a plurality of such features / elements within the scope of the description and claims.

[0027] It should also be understood that the use of the term “engine,” when used herein in connection with describing embodiments and features of the present invention, is not intended to limit any particular implementation to perform and / or implement actions, steps, processes, etc. that may be attributed to and / or performed by the engine. An engine may be software, hardware, or firmware, or any combination thereof, that performs the specified functions, including, but not limited to, the use of either a general-purpose or special-purpose processor, or both, in combination with appropriate software loaded or stored in machine-readable memory and executed by the processor. Furthermore, any name associated with a particular engine, unless otherwise specified, is for convenience of reference and is not intended to limit it to a particular implementation. Additionally, any functionality attributed to an engine may equally be performed by multiple engines, either incorporated into or combined with the functionality of another engine of the same or different type, or both, or distributed across one or more engines in various configurations.

[0028] Furthermore, it should be understood that the following description uses multiple different examples of various elements of the exemplary embodiments to further illustrate implementations of the exemplary embodiments and to aid in understanding the mechanisms of the exemplary embodiments. These examples are intended to be non-limiting and do not exhaust the various possibilities for implementing the mechanisms of the exemplary embodiments. Those skilled in the art will recognize in view of this description that there are many other alternative implementations for these various elements that can be utilized in addition to or in place of the examples provided herein without departing from the spirit and scope of the present invention.

[0029] The present invention may be a system, a method, and / or a computer program product, which may include a computer-readable storage medium (or media) having computer-readable program instructions for causing a processor to perform aspects of the present invention.

[0030] A computer-readable storage medium may be a tangible device capable of retaining and storing instructions for use by an instruction-execution device. A computer-readable storage medium may be, for example, but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of computer-readable storage media includes portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanically encoded devices such as punch cards or ridge-in-groove structures with instructions recorded on them, and any suitable combination of the foregoing. Computer-readable storage medium, as used herein, should not be construed as a transitory signal per se, such as an electric wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse passing through a fiber optic cable), or an electrical signal transmitted through a wire.

[0031] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device or to an external computer or external storage device over a network, such as the Internet, a local area network, a wide area network, or a wireless network, or a combination thereof. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, or edge servers, or a combination thereof. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage on a computer-readable storage medium in the respective computing / processing device.

[0032] Computer-readable program instructions for carrying out the operations of the present invention may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine language instructions, machine-dependent instructions, microcode, firmware instructions, state-setting data, or source or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java®, Smalltalk®, C++, or the like, and conventional procedural programming languages ​​such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server, as a standalone software package. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be to an external computer (e.g., through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry devices, including, for example, programmable logic devices, field programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), can execute computer readable program instructions by utilizing state information of the computer readable program instructions to individualize the electronic circuitry devices to implement aspects of the present invention.

[0033] Aspects of the present invention are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.

[0034] These computer-readable program instructions may be provided to a processor of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that the instructions, which execute on the processor of the computer or other programmable data processing apparatus, create means for performing the functions / acts specified in one or more blocks of the flowcharts and / or block diagrams, to create a machine. These computer-readable program instructions may also be stored on a computer-readable storage medium having stored thereon instructions that can direct a computer, programmable data processing apparatus, or other device, or combination thereof, to function in a particular manner, such that the computer-readable storage medium comprises an article of manufacture including instructions that perform aspects of the functions / acts specified in one or more blocks of the flowcharts and / or block diagrams.

[0035] Furthermore, the computer-readable program instructions may be loaded into a computer, other programmable data processing apparatus, or other device to produce a computer-executed process that performs the functions / acts specified in one or more blocks of the flowcharts and / or block diagrams, causing the computer, other programmable apparatus, or other device to perform a series of operational steps.

[0036] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of instructions, including one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending on the functionality involved. It should also be noted that each block of the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified functions or acts or executes a combination of dedicated hardware and computer instructions.

[0037] As described above, the present invention provides mechanisms for protecting cognitive systems, such as cognitive systems comprising neural networks and / or deep learning mechanisms, from attacks using gradients or their estimates, such as model theft or model evasion. FIGS. 1A-1D are block diagrams illustrating the problem addressed by the present invention and the solution provided by the mechanisms of exemplary embodiments. The diagrams in FIGS. 1A-1D assume that a neural network model has been trained using training data, such as through supervised or semi-supervised processing using a ground truth data structure or the like, or any other known or later-developed method for training a neural network model. FIGS. 1A and 1B show block diagrams illustrating the problem of model theft attacks and the solution provided by the mechanisms of exemplary embodiments, i.e., the variation injection engine 160. FIGS. 1C and 1D show block diagrams illustrating the problem of model evasion attacks and the solution provided by the mechanisms of exemplary embodiments, i.e., the variation injection engine 160.

[0038] The example shown in FIGS. 1A-1D assumes that a neural network model is being used to perform a classification operation on an image of a digit, thereby classifying the image of the digit as a digit between "0" and "9." This is used only as an example of one possible simple classification operation that may be performed using a neural network model and should not be considered a limitation on the use of neural network models that may implement the mechanisms of the exemplary embodiments. As noted above, the mechanisms of the exemplary embodiments may utilize the output of any neural network model, machine learning model, or the like, regardless of the specific artificial intelligence operation performed by the neural network model, machine learning model, or the like. Moreover, although not explicitly shown in FIGS. 1A-1D , a neural network model, machine learning model, deep learning model, or the like may be part of a more complex cognitive system that implements such models to perform complex cognitive operations, such as natural language processing, image analysis, patient treatment recommendations, medical image analysis, or any of a host of other cognitive operations, as described below.

[0039] 1A, for a model stealing attack, an attacker 110 may input one or more sets of input data 120 into a trained neural network model 130 to obtain a labeled data set 140 that is output as result data to the attacker 110. Again, it should be understood that the term "data set" as used herein refers to a set of data that may include one or more data samples. If a data set includes two or more data samples, these data samples may be input into the trained neural network model 130 as a batch.

[0040] This process may be repeated for multiple sets of input data 120, generating multiple labeled data sets 140 (which may also include labels for one or more data samples). A labeled data set 140 is a set of output data generated by the trained neural network model 130, in which the unlabeled input data has been augmented with additional tags or labels of information important to the particular cognitive operation for which the data will be used. For example, in a patient treatment advisory cognitive system, the labeled data may include labels, tags, or annotations specifying various medical concepts to which the data is associated, such as disease, treatment, patient age, and patient gender. In the above example, the operation of the neural network model 130 is to classify a portion of the input images specified in the set of input data 120 into one of ten categories representing numeric values, e.g., classes "0" through "9." Thus, the label attached to the set of input data 120 may be a label such as "0" or "1" or "2."

[0041] An attacker 110 that has obtained multiple labeled data sets 140 based on multiple input data sets 120 can use this correspondence between inputs and outputs to train its own model 150 to replicate the trained neural network model 130. Once the attacker 110 has its own replicated version 150 of the trained neural network model 130, it no longer needs to use the original trained neural network model 130 to obtain labeled data sets 140 for future input data sets 120, but can instead use its own replicated model 150. This causes the provider of the original trained neural network model 130 to lose revenue from fees that may be charged for use of the original trained neural network model 130. Additionally, this may create a competitor of the service provider that can surreptitiously capture the benefits of the service provider's resource investment in training the neural network model 130 without actually having to make such resource investment.

[0042] As shown in FIG. 1A , a trained neural network 130 performs a classification operation to classify an input data set 120. The output of the classification operation is a vector 135 of probability values, with each slot of the vector output 135 representing a distinct possible classification of the input data set 120. Training of neural networks, machine learning, deep learning, or other artificial intelligence models is generally known in the art, and it is assumed that any such method may be used to perform such training. Training generally involves modifying the weighted values ​​associated with various features scored by the model's nodes based on the training data set to cause the model to output a correct vector output 135 that correctly labels the input data set 120 based on supervised or semi-supervised feedback. The neural network model 130 processes the input data set 120 through nodes at various levels in the neural network model 130 to generate probability values ​​at the output nodes that correspond to the particular class or label that the output node represents, i.e., the value of the output node indicates the probability that the class or label of the corresponding vector slot applies to the input data set 120.

[0043] In this above example, each slot of vector output 135 corresponds to a possible classification from "0" to "9," indicating a possible numeric value that a portion of the input image may represent. Probability values ​​may range from 0% (e.g., 0.0) to 100% (e.g., 1.0) and may have various levels of accuracy based on the particular implementation desired. Thus, if a label or classification of "1" has a probability value of 1.0, this indicates absolute confidence that input data set 120 represents the numeric value of "1," while a probability value of 0.0 indicates that input data set 120 does not represent the corresponding value; i.e., the label in this vector slot does not apply to input data set 120.

[0044] While this is a simple example used for illustrative purposes, it should be understood that the number of classifications and corresponding labels, as well as the corresponding vector output 135, can be very complex. As another example, these classifications may be in a medical imaging application where the internal structures of a human anatomy, for example, in a patient's thorax, are being classified, such as the aorta, heart valves, left ventricle, right ventricle, lungs, etc. It should be understood that the vector output 135 may include any number of potential vector slots or classifications at various levels of granularity depending on the particular application and implementation, and the vector output 135 may be of correspondingly various sizes.

[0045] The highest probability value vector slot (or simply "slot") in vector output 135 may be selected to label the corresponding input data set 120. Thus, for example, assuming trained neural network model 130 is properly trained, an input data set 120 having images of the number "2" will have an output vector 135 similar to that shown in FIG. 1A, with the slot of output vector 135 having a corresponding probability value that is the highest probability value among all of the slots of vector output 135, e.g., "0.9" in this example. Thus, labeled data output 140 would include a labeled data set having a label of "2" associated with input data set 120 showing the portion of the image corresponding to the number "2."

[0046] FIG. 1B provides a block diagram illustrating an overview of one exemplary embodiment of a mechanism used to prevent model theft attacks. The diagram shown in FIG. 1B is similar to that of FIG. 1A, except that a variation injection engine 160 is provided associated with or as part of the trained neural network model 130. For example, in an embodiment in which the variation injection engine 160 is provided as part of the model 130 itself, the variation injection engine 160 operates as an additional layer of the model 130 immediately before the model's output layer, thereby introducing variation in the probability values ​​generated in the layer of the trained neural network model 130 immediately before the model's output layer. In an embodiment in which the variation injection engine 160 is external to the model 130, the variation may be injected into the output vector 135 of the trained neural network model 130, thereby modifying the original vector output 135 generated by the trained neural network model 130 to result in a modified vector output 165 before generating the labeled dataset 140 output to the attacker 110.

[0047] As shown in FIG. 1B, modified vector output 165 provides a modified set of probability values ​​associated with different labels or classes corresponding to the vector slots. These modified probability values ​​are generated by introducing variation, i.e., noise, into the probability values ​​calculated from trained neural network model 130. Thus, in this example, rather than the correct classification of "2" with a probability value of "0.9," which would overwhelmingly indicate that label "2" is the correct label, vector output 165 indicates a probability value of "0.6," with label "3" now having a probability value of "0.4." The result is still the same label "2" applied to the input data set, but with probability values ​​different from those successfully generated by the trained neural network. Thus, if attacker 110 were to train their own neural network model using the modified probability values ​​of modified vector output 165, the resulting training would not replicate trained neural network model 130 because incorrect probability values ​​would be used.

[0048] The introduction of variation, or noise, into the output of the trained neural network model 130 results in a modified or manipulated labeled data set 170 being provided to the attacker 110, rather than the actual labeled data set 140 that would otherwise have been produced by operation of the trained neural network model 130. If the attacker uses the manipulated labeled data set 170 to train their own neural network model 150, the result will be an improperly replicated model with poor performance.

[0049] As mentioned above, in addition to protecting against model stealing attacks such as those described above with respect to FIGS. 1A-1B, exemplary embodiments further provide protection against model evasion attacks, as illustrated in FIGS. 1C-1D. As shown in FIG. 1C, in a model evasion attack, an attacker 110 attempts to calculate gradients 172 of a trained model 130 based on outputs 135 using a gradient calculation tool 170. Such gradient calculations as part of a model evasion attack are generally known in the art. Based on the calculated gradients 172, the attacker 110 determines a level of noise that can be introduced into the data 120 to cause the model 130 to misclassify the data 120 and generate inaccurately labeled data 140, i.e., misclassified data 140. Thus, noisy data 176 is generated by modifying input data 120 by introducing misclassification noise 174, which causes model 130 to misclassify the input data into a class different from what it would otherwise be classified into, e.g., rather than data 120 representing an image of a stop sign being classified into the class of "stop sign," the noisy version of input data 120, i.e., data 176, causes input data 120 to be misclassified into a different class, such as "speed limit sign." The amount of noise introduced causes model 130 to misclassify input data 120, but is not significant enough to detect the attack.

[0050] 1D , the perturbation injection engine 160 operates in a similar manner as described above, but modifies the gradients so that the attacker's gradient calculation tool 170 cannot correctly identify the gradients of the model 130. Thus, rather than the gradient calculation tool 170 generating a correct gradient 172, an incorrect gradient 180 is determined based on the output 135 generated based on the perturbations introduced into the gradient of the model 130. Thus, the attacker 110 generates incorrect misclassification noise 183 that does not cause misclassification by the model 130. That is, the noisy data 184, while introducing misclassification noise 182 into the noisy data 184, is still not salient enough to cause the model 130 to incorrectly classify the data 120. Thus, the model 130 will still output correctly labeled (classified) data 140.

[0051] To illustrate how the introduction of variation, or noise, into the output generated by a trained neural network model operates to obfuscate the training of the neural network model, consider the example diagrams in FIGS. 2A and 2B. FIG. 2A shows a sigmoid function typically used with neural network models. As shown in FIG. 2A, probability values ​​follow the sigmoid function curve in a predictable manner. That is, as data samples from an input data set are processed through multiple layers of the neural network model, features of the data samples (e.g., the shape or layout of black pixels) are aggregated to produce a "score." This score is highly related to the output probability but is not normalized. In some exemplary embodiments, the score is a probability ranging from 0.0 to 1.0, although the score can be any value. A sigmoid or softmax function is a function for normalizing such scores to a [0, 1] bound. The sigmoid function looks at a single score (e.g., label "2" has a score of 100, and therefore a probability of 0.9), while softmax considers multiple competing scores (e.g., label "2" has a score of 100, and label "3" has a score of 300), in which case the probability of label "2" is 0.2 and the probability of label "3" is 0.8. The sigmoid function is only used in binary classification where there are only two distinct classes. The softmax function is a generalization of the sigmoid function to more classes, and therefore shares many similarities with the sigmoid.

[0052] The sigmoid or softmax function can be thought of as being stretched or shrunk as the neural network model is trained by updating the model weights, but is predictable to an attacker 110 given a labeled data set 140, for example through curve fitting or the like, i.e., the attacker attempts to learn the same curve used by the trained neural network model 130 based on a collection of input data sets 120 and the corresponding output labeled data 140 obtained from the trained neural network model 130. Typically, such learning of a curve requires calculating the gradient from points along the curve (e.g., dividing the change in y-coordinate of a graphed curve by the change in x-coordinate) to know the direction and magnitude of the curve's curvature.

[0053] Referring now to FIG. 2B , according to the mechanism of the exemplary embodiment, perturbations, or noise, are introduced into a curve to prevent an attacker 110 from identifying the correct slope of the curve. As shown in FIG. 2B , in the portion of the curve where perturbations have been introduced, the perturbations can fool the attacker 110 into identifying an incorrect location for a point along the curve. For example, because the attacker relies on the probability score (Y-axis) to find a location, the attacker 110 may be fooled by the perturbations 200 introduced into the curve and identify location P1 as being at location P2. That is, in the absence of perturbations, the attacker can infer the correct location (X-axis value) by considering the probability (Y-axis value). However, with this perturbation, there are more than one location with a given probability. As a result, the attacker cannot accurately determine to which location the duplicated curve should be fitted. Furthermore, depending on the type of variation, as shown in Figure 2B, the gradients computed by the attacker to train the cloned model (model stealing attack) or to determine the misclassification noise to introduce (evasion attack) can be in the opposite direction to the real one, which can reverse at least part of the training and replication process.

[0054] Due to the nature of softmax or sigmoid function curves, there are more areas of the curve where variation, or noise, can be added at the ends of the curve. Therefore, the mechanism of some example embodiments utilizes variation injection logic, as described above, to introduce such variation at the ends of the curve near 0.0 and 1.0, i.e., areas of very low and very high probability values, so that an attacker attempting to train their own neural network model using the output of the trained neural network model 130 would result in a lower-performing model. Introducing variation, or noise, at the ends of the curve can be facilitated by subtracting a sigmoid function or hyperbolic tangent function with a higher absolute value at the ends of the curve, such as 0.5 (sigma(0.25h(x))-0.5)) at the variation 1 described above.

[0055] Thus, exemplary embodiments provide a mechanism for obfuscating pre-trained neural network, machine learning, or deep learning configurations of other artificial intelligence / cognitive models by introducing noise into the output of such trained models in a manner that manipulates the output values ​​to make it more difficult for the model to reproduce the detection of a correlated unique curve or function, while preserving the accuracy of the output. The introduction of variation, or noise, is done in a manner that minimizes boundary case changes but introduces large-sized variations in areas of the curve or function where probability values ​​are relatively high / low, e.g., near 1.0 and 0.0 in the case of a sigmoid / softmax function. While such variations are introduced in these areas of the function or curve, the variations are sized such that the output class does not change the modified output, since the modification of the variation is limited to changes below a predetermined amount that will not modify the output classification.

[0056] As described above, the mechanisms of the exemplary embodiments are directed to protecting trained neural network models, machine learning models, deep learning models, and the like, executing in a technology environment, such as dedicated logic on a specially configured computing device, a data processing system, or the like. Accordingly, the exemplary embodiments may be utilized in many different types of data processing environments. To provide a context for the description of the specific elements and functionality of the exemplary embodiments, Figures 3-5 are provided below as illustrative environments in which aspects of the exemplary embodiments may be implemented. It should be understood that Figures 3-5 are merely examples and are not intended to assert or imply any limitation with respect to the environments in which aspects or embodiments of the invention may be implemented. Many modifications to the depicted environments may be made without departing from the spirit and scope of the present invention.

[0057] 3-5 are directed to illustrating an example cognitive system executing a request processing pipeline, such as a question-answering (QA) pipeline (also referred to as a question / answer pipeline or question and answer pipeline), as well as a request processing computer program product in which mechanisms of example embodiments are implemented. These requests may be provided as structured or unstructured request messages, natural language questions, or any other suitable format for requesting an action to be performed by the cognitive system. In some example embodiments, the requests may be in the form of an input data set to be classified according to a cognitive classification operation performed by a machine learning, neural network, deep learning, or other artificial intelligence-based model performed by the cognitive system. The input data set may represent various types of input data depending on the particular implementation, such as audio input data, image input data, text input data, or the like. For example, in one possible implementation, the input data set may represent medical images, such as X-ray images, CT scan images, MRI images, or the like, having portions of the images or the images as a whole classified into one or more predetermined classifications.

[0058] It should be understood that classification of input data may result in a labeled set of data having labels or annotations representing the corresponding classes into which the unlabeled input data set is classified. This may also be an intermediate step in performing other cognitive operations by the cognitive system to support decision-making by a human user; for example, the cognitive system may be a decision support system. For example, in the medical domain, a cognitive system may operate to perform medical image analysis to identify identifying anomalies, recommend patient diagnoses or treatments, or both, drug interaction analysis, or any of a plethora of other possible decision support operations.

[0059] While the cognitive system is illustrated in the following examples as having a single request processing pipeline, it should be understood that in practice, the cognitive system may have multiple request processing pipelines. Depending on the desired implementation, each request processing pipeline may be separately trained and / or configured to process requests associated with different domains or configured to perform the same or different analyses on input requests (or questions, in implementations using a QA pipeline). For example, in some cases, a first request processing pipeline may be trained to operate on input requests directed to medical image analysis, while a second request processing pipeline may be configured and trained to operate on input requests related to patient electronic medical record (EMR) analysis involving natural language processing. In other cases, the request processing pipelines may be configured to provide different types of cognitive functions or support different types of applications, such as one request processing pipeline being used to generate patient treatment recommendations while another pipeline may be trained for financial industry-based predictions.

[0060] Additionally, each request processing pipeline may have its own associated corpus or corpora, e.g., in the above example, incorporating and operating on one corpus for medical procedure documents and another corpus for financial industry domain documents. In some cases, the request processing pipelines may each operate on input questions from the same domain, but may have different configurations, e.g., different annotators or annotators trained separately, thus generating different analyses and potential answers. The cognitive system may provide additional logic for routing input questions to the appropriate request processing pipeline, e.g., based on the determined domain of the input request, for combining and evaluating the final results produced by the processing performed by the multiple request processing pipelines, and other control and interaction logic to facilitate the use of multiple request processing pipelines.

[0061] As mentioned above, one type of request processing pipeline in which mechanisms of the exemplary embodiments may be utilized is a question-answering (QA) pipeline. The following description of illustrative embodiments of the present invention utilizes a QA pipeline as an example of a request processing pipeline that may be extended to include mechanisms according to one or more exemplary embodiments. While the present invention is described in the context of a cognitive system executing one or more QA pipelines that operate on input questions, it should be understood that the exemplary embodiments are not limited to such. Rather, the mechanisms of the exemplary embodiments may operate on requests that are not posed as "questions," but are formatted as requests for the cognitive system to perform cognitive operations on a specified set of input data using one or more associated corpora and specific configuration information used to configure the cognitive system. For example, rather than asking the natural language question "Which diagnosis do you apply to patient P?", the cognitive system may instead receive a request such as "Generate a diagnosis for patient P." It should be understood that mechanisms of a QA system pipeline may operate on requests similar to those of input natural language questions with minor modifications. Indeed, in some cases, requests may be converted into natural language questions for processing by the QA system pipeline, as needed for a particular implementation.

[0062] As discussed in more detail below, exemplary embodiments may be integrated into, extend, and expand the functionality of these QA pipeline or request processing pipeline mechanisms to protect models executed in these pipelines, or by the cognitive system as a whole, from model theft attacks. In particular, in portions of cognitive systems that employ trained neural network models, machine learning models, deep learning models, or the like, to generate labeled dataset output, mechanisms of exemplary embodiments may be implemented to modify the labeled dataset output by introducing noise into the probability values ​​generated by the trained model, thereby obfuscating the training of the model.

[0063] Because the mechanisms of the exemplary embodiments may be part of a cognitive system and may improve the operation of the cognitive system by protecting it from model theft attacks, it is important to first understand how cognitive systems and question and answer generation are implemented in cognitive systems that run QA pipelines before describing how the mechanisms of the exemplary embodiments integrate with and extend such cognitive systems and request processing pipeline mechanisms or QA pipeline mechanisms. It should be understood that the mechanisms described in Figures 3-5 are examples only and are not intended to specify or suggest any limitations regarding the types of cognitive system mechanisms with which the exemplary embodiments are implemented. Many modifications to the example cognitive systems shown in Figures 3-5 may be implemented in various embodiments of the present invention without departing from the spirit and scope of the present invention.

[0064] Overall, a cognitive system is a dedicated computer system, or set of computer systems, configured to emulate human cognitive functions using hardware logic, software logic (combined with software-executed hardware logic), or both. These cognitive systems apply human-like characteristics to communicating and manipulating ideas, which, when combined with the inherent strengths of digital computing, can solve problems at scale with high accuracy and resilience. Cognitive systems perform one or more computer-implemented cognitive operations that extend and expand human expertise and cognition, approximate human thought processes, and enable people and machines to interact in a more natural way. Cognitive systems comprise artificial intelligence logic, such as natural language processing (NLP)-based logic, and machine learning logic, which can be provided as dedicated hardware, software running on hardware, or any combination of dedicated hardware and software running on hardware. This logic may execute one or more models, such as neural network models, machine learning models, or deep learning models, that can be trained for specific purposes to support the specific cognitive operations performed by the cognitive system. In accordance with the mechanisms of the exemplary embodiments, the logic further executes the variation injection engine mechanisms described above and below for introducing variation, i.e., noise, into the output of the executed model in a manner that obfuscates the training of the model from those who might attempt to conduct a model theft attack.

[0065] The logic of the cognitive system performs cognitive computing operations, examples of which include, but are not limited to, question answering, identifying related concepts contained in various portions of content within a corpus, intelligent search algorithms such as internet web page searches, e.g., medical diagnosis and treatment recommendations, other types of recommendation generation, e.g., items of interest to a particular user, recommendations for potential new contacts, image analysis, audio analysis, and the like. The types and number of cognitive operations that can be performed using the cognitive system of the exemplary embodiments are numerous and cannot be fully documented herein. Any cognitive computing operations that emulate decision-making and analysis performed by a human, but in an artificial intelligence or cognitive computing fashion, are intended to be within the spirit and scope of the present invention.

[0066] IBM Watson™ is an example of one such cognitive computing system that can process human-readable language and identify inferences between passages of text with human-like accuracy, at speeds much faster than humans and at a much larger scale. In general, such cognitive systems can perform the following functions: Navigating the complexities of human language and understanding Accepting and processing vast amounts of structured and unstructured data Generate and evaluate hypotheses Consider and evaluate responses based only on relevant evidence · Providing situation-specific advice, insights, and guidance Improve knowledge through machine learning processes, learning with each iteration and interaction Enabling decision-making at the point of impact (contextual guidance) · Scaling proportionally to the tasks ·Extending and expanding human expertise and cognition Identifying resonant, human-like attributes and qualities from natural language Inferring various language-specific or agnostic attributes from natural language High-level association recall (memories and recollections) from data points (images, text, audio) Predict and detect with situational awareness that mimics experience-based human cognition Answering questions based on natural language and intrinsic evidence

[0067] In one aspect, cognitive computing systems (or simply "cognitive systems") use question-answering pipelines or systems (QA systems) to provide a mechanism for answering questions posed to these cognitive systems and / or process requests that may or may not be posed as natural language questions. A QA pipeline or system is an artificial intelligence application running on data processing hardware that answers questions about a given subject area posed in natural language. A QA pipeline receives input from various sources, including network input, a corpus of electronic documents or other data, data from content creators, information from one or more content users, and other such input from other possible sources of input. A data storage device stores the corpus of data. Content creators create content in documents for use as part of the corpus of data in the QA pipeline. A document can include any file, text, article, or source of data for use by the QA system. For example, a QA pipeline accesses a body of knowledge about a domain or subject area, such as the financial domain, medical domain, legal domain, etc., where the body of knowledge (knowledge base) can be organized in various configurations, such as a structured repository of domain-specific information such as an ontology, or unstructured data related to the domain, or a collection of natural language documents about the domain.

[0068] A content user inputs a question into a cognitive system that runs a QA pipeline. The QA pipeline then answers the input question using content in the corpus of data by evaluating documents, sections of documents, portions of data in the corpus, or the like. When the process evaluates a given section of a document for semantic content, it can use various traditional techniques to query such documents from the QA pipeline, such as sending a query to the QA pipeline as a qualified question that is then interpreted by the QA pipeline and provides a response that contains one or more answers to the question. Semantic content is content based on the relationship between symbolic expressions, such as words, phrases, signs, and symbols, and what they represent, their explicit or implied meanings. In other words, semantic content is content that interprets expressions, such as by using natural language processing.

[0069] As described in more detail below, the QA pipeline receives an input question, parses the question to extract key features of the question, formulates queries using the extracted features, and then applies these queries to a corpus of data. Based on the application of the query to the corpus of data, the QA pipeline generates a set of hypotheses, or candidate answers to the input question, by scanning the corpus of data for portions of the corpus of data that may contain a valuable response to the input question. The QA pipeline then uses various inference algorithms to perform a deep analysis of the terms of the input question and the terms used in each of the portions of the corpus of data found during the application of the query. There may be hundreds, or perhaps thousands, of inference algorithms applied, each of which performs a different analysis and generates a score, such as comparison, natural language analysis, lexical analysis, or the like. For example, some inference algorithms may look at the degree of agreement of terms and synonyms between the terms of the input question and the found portions of the corpus of data. Other inference algorithms can look at temporal or spatial features in words, and other inference algorithms can assess the origin of a piece of a corpus of data to assess its veracity.

[0070] The scores obtained from the various inference algorithms indicate the degree to which a potential response is inferred by the input question based on the particular area of ​​focus of the inference algorithm. Each resulting score is then weighted against a statistical model. The statistical model captures how well the inference algorithm performed during the training period of the QA pipeline at establishing inferences between two similar statements for a particular domain. The statistical model is used to outline the level of confidence the QA pipeline has in the evidence that a potential response, or candidate answer, is inferred by the question. This process is repeated for each candidate answer until the QA pipeline identifies one that emerges as significantly stronger than the others, thus generating a final answer, or ranked set of answers, for the input question.

[0071] As described above, a QA pipeline mechanism operates by accessing information from a corpus of data or information (also called a corpus of content), analyzing this information, and then generating answer results based on the analysis of this data. Accessing information from a corpus of data typically involves database queries that answer questions about what is in a collection of structured records and searches that deliver collections of document links in response to queries against collections of unstructured data (text, markup languages, etc.). Traditional question-answering systems can generate answers based on a corpus of data and an input question, validate answers to a collection of questions against a corpus of data, correct errors in digital text using a corpus of data, and select an answer to a question from a pool of potential answers, or candidate answers.

[0072] Before writing content, content creators, such as article authors, electronic document creators, web page authors, and document database creators, determine the use cases for the products, solutions, and services described in such content. As a result, content creators know which questions the content is intended to answer within the specific topic addressed by the content. Categorizing questions in each document in a corpus of data in terms of the role, information type, task, etc. associated with the question allows a QA pipeline to more quickly and efficiently identify documents containing content relevant to a particular query. The content may also answer other questions that the content creator did not anticipate might be useful to content users. For a given document, the content creator can verify that the question and answer are contained in the content. These capabilities contribute to improved accuracy, system performance, machine learning, and reliability of the QA pipeline. Content creators, automated tools, and others annotate or otherwise generate metadata to provide information usable by the QA pipeline to identify these question and answer attributes of the content.

[0073] Operating on such content, the QA pipeline generates answers to the input questions using multiple focused analytical mechanisms that evaluate the content and identify the most probable answers, i.e., candidate answers, to the input questions. The most probable answers are output as a ranked list of candidate answers ranked according to their relative scores or confidence measures calculated during the evaluation of the candidate answers, as a single final answer that holds the highest ranking score or confidence measure or is the best match to the input question, or as a combination of the ranked list and the final answer.

[0074] FIG. 3 shows a schematic diagram of one exemplary embodiment of a cognitive system 300 executing a request processing pipeline 308, which in some embodiments may be a question-answering (QA) pipeline, on a computer network 302. For purposes of this description, we will assume that the request processing pipeline 308 is implemented as a QA pipeline that operates on structured and / or unstructured requests in the form of input questions. One example of a question processing operation that can be used with the principles described herein is described in U.S. Patent Application Publication No. 2011 / 0125734, which is incorporated herein by reference in its entirety. The cognitive system 300 executes on one or more computing devices 304A-304D (comprising one or more processors and one or more memories, and potentially any other computing device elements commonly known in the art, including buses, storage devices, communication interfaces, and the like) connected to the computer network 302. 3 shows the cognitive system 300 running solely on computing device 304A, but as noted above, the cognitive system 300 may be distributed across multiple computing devices, such as multiple computing devices 304A-304D. The network 302 includes multiple computing devices 304A-304D, which may act as server computing devices, and multiple computing devices 310-312, which may act as client computing devices, in communication with each other and with other devices or components via one or more wired and / or wireless data communication links, where each communication link comprises one or more wires, routers, switches, transmitters, receivers, or the like.In some exemplary embodiments, cognitive system 300 and network 302 enable question processing and answer generation (QA) functions for one or more cognitive system users via their respective computing devices 310-312. In other embodiments, cognitive system 300 and network 302 may provide other types of cognitive operations, including, but not limited to, request processing and cognitive response generation, which may take many different forms depending on the desired implementation, such as, for example, cognitive information retrieval, user training / instruction, cognitive evaluation of data, or the like. Other embodiments of cognitive system 300 may be used with components, systems, subsystems, and / or devices other than those shown herein.

[0075] The cognitive system 300 is configured to execute a request processing pipeline 308 that receives input from various sources. Requests can be submitted in the form of natural language questions, natural language requests for information, natural language requests to perform cognitive operations, or the like. For example, the cognitive system 300 receives input from a network 302, one or more corpora 306 of electronic documents, cognitive system users, or other data and other possible sources of input, or a combination thereof. In one embodiment, some or all of the input to the cognitive system 300 is routed through the network 302. Various computing devices 304A-304D on the network 302 include access points for content creators and cognitive system users. Some of the computing devices 304A-304D include devices for databases that store one or more corpora 306 of data (shown as separate entities in FIG. 3 for illustrative purposes only). Portions of the one or more corpora 306 of data may also be provided on one or more other network-attached storage devices, in one or more databases, or other computing devices not explicitly shown in Figure 3. Network 302 includes local network connections and remote connections in various embodiments, allowing cognitive system 300 to operate in any size environment, including local and global, such as the Internet.

[0076] In one embodiment, content creators author content in documents in one or more corpora 306 of data for use as part of the corpus of data in cognitive system 300. Documents include any files, text, articles, or data sources for use in cognitive system 300. Cognitive system users access cognitive system 300 via a network or internet connection to network 302 and enter questions / requests to cognitive system 300 that are answered / processed based on content in one or more corpora 306 of data. In one embodiment, the questions / requests are formulated using natural language. Cognitive system 300 parses and interprets the questions / requests via pipeline 308 and provides a response to a cognitive system user, such as cognitive system user 310, including one or more answers to the question posed, a response to the request, results of processing the request, or the like. In some embodiments, the cognitive system 300 provides responses to the user in a ranked list of answer candidates / responses, while in other exemplary embodiments, the cognitive system 300 provides a single final answer / response or a combination of final answers / responses and a ranked list of other answer candidates / responses.

[0077] The cognitive system 300 executes a pipeline 308 comprising multiple stages for processing an input question / request based on information obtained from one or more corpora of data 306. The pipeline 308 generates an answer / response to the input question or request based on the processing of the input question / request and the one or more corpora of data 306. The pipeline 308 is described in more detail below with respect to FIG.

[0078] In some exemplary embodiments, the cognitive system 300 may be an IBM Watson™ cognitive system available from International Business Machines Corporation of Armonk, New York, extended with mechanisms in the exemplary embodiments described below. As previously outlined, the IBM Watson™ cognitive system's pipeline receives an input question or request, then parses it to extract key features of the question / request, which are then used to formulate a query that is applied to one or more corpora 306 of data. Based on application of the query to the one or more corpora 306 of data, a set of hypotheses, i.e., candidate answers / responses to the input question / request, is generated by scanning the one or more corpora 306 of data (hereinafter simply referred to as corpora 306) for portions of the one or more corpora 306 of data that have some likelihood of containing a valuable response to the input question / response (hereinafter assumed to be the input question). The IBM Watson™ cognitive system pipeline 308 then uses various inference algorithms to perform a deep analysis of the terms of the input question and the terms used in each of the portions of the corpus 306 found during the application of the query.

[0079] The scores obtained from the various inference algorithms are then weighted against a statistical model outlining the level of confidence that the potential answer candidate has in the evidence that the question infers, in this example, the pipeline 308 of the IBM Watson™ cognitive system 300. This process is repeated for each of the answer candidates to generate a ranked list of answer candidates, which can then be presented to the user who submitted the input question, e.g., a user of the client computing device 310, or from the ranked list of answer candidates, a final answer is selected and presented to the user. More information about the pipeline 308 of the IBM Watson™ cognitive system 300 can be obtained, for example, from the IBM Corporation website, IBM Redbooks®, and the like. For example, information about the IBM Watson™ cognitive system pipeline can be found in Yuan et al., "Watson and Healthcare," IBM DeveloperWorks, 2011, and Rob High, "The Era of Cognitive Systems: An Inside Look at IBM Watson and How it Works," IBM Redbooks, 2012.

[0080] As noted above, input to cognitive system 300 from a client device may be posed in the form of a natural language question, although exemplary embodiments are not limited to such. Rather, the input question may be formatted or structured as any suitable type of request that can be parsed and analyzed using structured and / or unstructured input analysis, including, but not limited to, the natural language parsing and analysis mechanisms of a cognitive system such as IBM Watson™, to determine the basis for conducting the cognitive analysis and providing the results of the cognitive analysis.

[0081] Regardless of the manner in which a question or request is input to the cognitive system 300, processing the request or question involves the application of a trained model, such as a neural network model, a machine learning model, or a deep learning model, to an input data set, as previously described above. This input data set may represent features of the actual request or question itself, data submitted with the request or question to be processed, or the like. The application of a trained model to an input data set may occur at various points during the performance of a cognitive computing operation by the cognitive system. For example, a trained model may be utilized during feature extraction and classification by the feature extraction stage of request or input question processing, such as capturing a natural language term in a request or question and classifying it as one of multiple possible concepts to which this term corresponds, such as classifying the term "truck" in an input question or request into multiple possible classes, one of which may be "vehicle." As another example, a portion of an image containing multiple pixel data may have a trained model applied to the image to determine the identity of an object in the portion of the image. The mechanisms of the exemplary embodiments operate on the output of a trained model as previously discussed above, which may be an intermediate operation within the cognitive computing operations of an overall cognitive system; for example, classifying a portion of a medical image into one of multiple different anatomical structures may be an intermediate operation to performing the cognitive computing operations of anomaly identification and treatment recommendation.

[0082] As shown in FIG. 3 , the perception system 300 is further extended, in accordance with the mechanisms of the exemplary embodiment, to include logic executed in dedicated hardware, software executed on the hardware, or any combination of dedicated hardware and software executed on the hardware to execute the variation injection engine 320. The variation injection engine 320 may be provided as an engine external to the logic executing the trained model 360 of the perception system 300, or may be integrated into the trained model logic 360, such as in a layer of the model prior to outputting a vector output of probability values ​​representing the classification of input data and its corresponding label. The variation injection engine 320 operates to inject variation into the output probabilities generated by the trained model logic 360 such that the gradient calculated for points along the curve represented by the output probabilities deviates from the correct direction and amount, minimizing any loss of accuracy in the revised output classification and corresponding label.

[0083] In one exemplary embodiment, the variation insertion engine 320 meets these criteria by using a variation function that inverts the sign of the first derivative of the output probability curve, such as, for example, a sigmoid or softmax curve of the probability values, and adds noise or variation to the ends of the curve, near the maximum and minimum values ​​of the curve, up to + / - half of the range from the minimum to the maximum; for example, for a softmax or sigmoid probability value curve ranging from 0% to 100%, the noise or variation has a magnitude of up to + / -0.5. As noted above, the particular variation function utilized can take many different forms, including those previously listed above, as well as others that meet the above-mentioned criteria and guidelines.

[0084] The resulting modified output vector provides modified probability values ​​while preserving the validity of the classifications and associated labels associated with the input data in the labeled data set. Thus, correct classification and labeling of the input data set is still achieved while obfuscating the actual trained configuration of trained model logic 360. The resulting classified or labeled data set may be provided to further stages of processing downstream in pipeline 306 for further processing and performance of the overall cognitive operation employed by perception system 300.

[0085] Thus, an attacker, such as a user of client computing device 310 or the like, cannot input multiple input data sets, obtain corresponding labeled output data sets and corresponding probability values ​​for the output vectors, and thereby train their own trained model to exactly replicate the training of trained model logic 360 by utilizing the labeled data sets and their associated probability values ​​in the vector outputs as training data. To the contrary, doing so would result in a model that provides significantly lower performance than trained model logic 360, creating a need for continued use of trained model logic 360. In cases where a service provider charges fees for use of cognitive system 300 and / or trained model logic 360, this would create a continuing revenue stream for the service provider. Furthermore, an attacker cannot determine the gradient of trained model logic 360 to determine the misclassification noise that can cause trained model logic 360 to misclassify input data sets, i.e., cannot successfully conduct a model evasion attack. Thus, for example, an attacker cannot circumvent a security system using such trained model logic 360 by causing the model to classify an image as an authorized user image when the image is not associated with an authorized user, such as a face. Moreover, as another example, an attacker cannot cause the system to operate incorrectly based on misclassified input data, such as an automotive braking system not being activated because an in-vehicle imaging system misclassifies a stop sign as a speed limit sign.

[0086] While FIG. 3 illustrates an implementation of trained model logic 360 as part of cognitive system 300, it should be understood that exemplary embodiments are not limited as such. Rather, trained model logic 360 may itself, in some exemplary embodiments, be offered as a service from which users of client computing devices 310 may request processing of input data sets. Moreover, other providers of services, which may include other cognitive systems, may utilize such trained models 360 to enhance the operation of their own cognitive systems. Thus, in some exemplary embodiments, trained model logic 360 may execute on one or more server computing devices, accessed via one or more APIs via other computing devices, where input data sets are input into trained model logic 360 and corresponding labeled data sets are returned. Thus, integration of the mechanisms of the exemplary embodiments into cognitive system 300 is not required, but may be implemented depending on the desired implementation.

[0087] As noted above, the mechanisms of the exemplary embodiments are rooted in the computer technology arts and are implemented using logic residing within such computing or data processing systems. These computing or data processing systems are specifically configured to perform the various operations described above through hardware, software, or a combination of hardware and software. Accordingly, FIG. 4 is provided as an example of one type of data processing system capable of implementing aspects of the present invention. Many other types of data processing systems can be similarly configured to specifically implement the mechanisms of the exemplary embodiments.

[0088] Figure 4 is a block diagram of an example data processing system for performing aspects of the exemplary embodiments. Data processing system 400 is an example computer, such as server computing device 304 or client computing device 310 of Figure 3, on which computer-usable code or instructions for performing processes for the exemplary embodiments of the present invention may reside. In one exemplary embodiment, Figure 4 represents a server computing device, such as server 304, running cognitive system 300 and request or QA system pipeline 308 extended to include additional exemplary embodiment mechanisms described herein with respect to a variation injection engine for protecting trained neural networks, machine learning, deep learning, or other artificial intelligence model logic from model theft attacks.

[0089] In the above example, data processing system 400 employs a hub architecture including a north bridge and memory controller hub (NB / MCH) 402 and a south bridge and input / output (I / O) controller hub (SB / ICH) 404. A processing unit 406, main memory 408, and a graphics processor 410 are connected to NB / MCH 402. Graphics processor 410 is connected to NB / MCH 402 through an accelerated graphics port (AGP).

[0090] In the above example, a local area network (LAN) adapter 412 connects to the SB / ICH 404. An audio adapter 416, a keyboard and mouse adapter 420, a modem 422, a read-only memory (ROM) 424, a hard disk drive (HDD) 426, a CD-ROM drive 430, a universal serial bus (USB) port and other communication ports 432, and PCI / PCIe devices 434 connect to the SB / ICH 404 through bus 438 and bus 440. PCI / PCIe devices can include, for example, Ethernet adapters, add-in cards, and PC cards for notebook computers. PCI uses a card bus controller, while PCIe does not. ROM 424 can be, for example, a flash basic input / output system (BIOS).

[0091] The HDD 426 and CD-ROM drive 430 connect to the SB / ICH 404 through a bus 440. The HDD 426 and CD-ROM drive 430 may use, for example, an Integrated Drive Electronics (IDE) or a Serial Advanced Technology Attachment (SATA) interface. A Super I / O (SIO) device 436 connects to the SB / ICH 404.

[0092] An operating system runs on processing unit 406. The operating system coordinates and provides control of various components within data processing system 400 of FIG. 4. The client operating system may be a commercially available operating system, such as Microsoft® Windows 10®. An object-oriented programming system, such as a Java® programming system, may run alongside the operating system and provide calls to the operating system from Java® programs or applications executing on data processing system 400.

[0093] Server data processing system 400 may be, for example, an IBM® eServer™ System p® computer system running the Advanced Interactive Executive (AIX®) operating system or the LINUX® operating system. Data processing system 400 may be a symmetric multiprocessor (SMP) system that includes multiple processors within processing unit 406. Alternatively, a single processor system may be employed.

[0094] Instructions for the operating system, object-oriented programming system, and applications or programs are located in a storage device, such as HDD 426, and loaded into main memory 408 for execution by processing unit 406. Processing for exemplary embodiments of the present invention is performed by processing unit 406 using computer-usable program code, which is located in a memory, such as main memory 408, ROM 424, or in one or more peripheral devices 426 and 430, for example.

[0095] A bus system, such as bus 438 or bus 440 shown in FIG. 4, includes one or more buses. Of course, a bus system may be implemented using any type of communications fabric or architecture that provides for a transfer of data between various components or devices attached to the fabric or architecture. A communications unit, such as modem 422 or network adapter 412 of FIG. 4, includes one or more devices used to transmit and receive data. A memory may be, for example, main memory 408, ROM 424, or a cache such as found in NB / MCH 402 of FIG. 4.

[0096] Those skilled in the art will appreciate that the hardware depicted in Figures 3 and 4 may vary depending on the implementation. Other internal hardware or peripheral devices, such as flash memory, equivalent non-volatile memory, or optical disk drives, and the like, may be used in addition to or in place of the hardware depicted in Figures 3 and 4. Additionally, the processes of the illustrative embodiments may be applied to multiprocessor data processing systems other than the SMP systems referenced above without departing from the spirit and scope of the present invention.

[0097] Additionally, data processing system 400 may take the form of any of several different data processing systems, including a client computing device, a server computing device, a tablet computer, a laptop computer, a telephone or other communications device, a personal digital assistant (PDA), or the like. In some illustrative examples, data processing system 400 may be a portable computing device configured with flash memory to provide non-volatile memory for storing, for example, operating system files and / or user-generated data. In essence, data processing system 400 may be any known or later-developed data processing system without architectural limitations.

[0098] Figure 5 illustrates an example of a cognitive system processing pipeline, which in the above example is a question and answer (QA) system pipeline used to process an input question according to one illustrative embodiment. As noted above, cognitive systems with which illustrative embodiments may be utilized are not limited to QA systems and, therefore, are not limited to use with QA system pipelines. Figure 5 is provided only as one example of a processing structure that may be implemented to process natural language input requesting operation of a cognitive system and present a response or result to the natural language input.

[0099] The QA system pipeline of FIG. 5 may be implemented, for example, as the QA pipeline 308 of the perception system 300 of FIG. 3. It should be understood that the stages of the QA pipeline shown in FIG. 5 are implemented as one or more software engines, components, or the like, configured with logic for performing the functions attributed to the particular stage. Each stage is executed using one or more of such software engines, components, or the like. The software engines, components, etc. execute on one or more processors of one or more data processing systems or devices and utilize or operate on data stored in one or more data storage devices, memories, or the like on one or more of the data processing systems. The QA pipeline of FIG. 5 may be extended in one or more of its stages, for example, to perform the improved mechanisms of the exemplary embodiments described below, and additional stages may be provided to perform the improved mechanisms, or separate logic from the pipeline 300 may be provided to interface with the pipeline 300 and perform the improved functions and operations of the exemplary embodiments.

[0100] As shown in FIG. 5, the QA pipeline 500 includes multiple stages 510-580 in which a cognitive system operates to analyze an input question and generate a final response. In the initial question input stage 510, the QA pipeline 500 receives an input question presented in a natural language format. That is, a user enters, via a user interface, an input question for which the user wishes to obtain an answer, such as, for example, "Who is the closest advisor to Washington?" In response to receiving the input question, the next stage of the QA pipeline 500, the question and topic analysis stage 520, uses natural language processing (NLP) techniques to parse the input question, extract key features from the input question, and classify the key features according to type, such as a name, a date, or one of a large number of other defined topics. For example, in the example question above, the term "who" may be associated with a topic about "people" indicating a person's identity is being sought, "Washington" may be identified as the correct name of the person with whom the question is associated, "closest" may be identified as a word indicating proximity or relationship, and "advisor" may indicate a noun or other linguistic topic.

[0101] Additionally, extracted key features include keywords and phrases categorized into question characteristics, such as the question focus, the question's lexical answer type (LAT), and the like. As referred to herein, a lexical answer type (LAT) is a word in the input question, or a word inferred from the input question, that indicates the type of answer, regardless of assigning semantics to this word. For example, in the question "What device was invented in the 1500s to speed up games, and does it involve two of the same color?", the LAT is the string "device." The question focus is the part of the question that, when replaced with an answer, makes the question a standalone statement. For example, in the question "Which drug has been shown to relieve the symptoms of ADD with relatively few side effects?", the focus is "drug" because, if this word were replaced with an answer, the answer "Adderall" could be used to replace the term "drug" and generate the sentence "Adderall has been shown to relieve the symptoms of ADD with relatively few side effects." While the focus often, but not always, includes the LAT, in many cases the important LAT cannot be inferred from the focus.

[0102] Classification of features extracted from the input question may be performed using one or more trained models 525, which may be implemented, for example, as neural network models, machine learning models, deep learning models, or other types of artificial intelligence-based models. As described above, the mechanisms of exemplary embodiments may be implemented in the question and topic analysis stage 520 with respect to classification of extracted features of the input question by such trained models 525. That is, because the trained models 525 operate on input data, e.g., features extracted from the input question, to classify the input data prior to output of vector outputs, the variation injection engine 590 of exemplary embodiments may operate to introduce variation into the generated probability values ​​in the output vector while preserving classification accuracy, as described above. Thus, while correct classifications are still provided downstream along the QA system pipeline 500, any attacker who gains access to the probability values ​​of the output vector to train their own model using a model stealing attack would be presented with inaccurate probability values, causing any model trained against such probability values ​​to perform worse than the trained models 525.

[0103] It should be understood that, in some exemplary embodiments, the input data need not be a formulated request or question, structured or unstructured, but instead may simply be an input data set accompanied by a suggested request, where the input data set is processed by the pipeline 500. For example, in an embodiment in which the pipeline 500 is configured to perform image analysis cognitive operations, an input image may be provided as an input to the pipeline 500, which extracts key features of the input image, classifies the key features according to the trained model 525, and performs other processing of the pipeline 500 as described below to score hypotheses about what is shown in the image, thereby generating a final result output. In other cases, audio input data may be analyzed similarly. Regardless of the nature of the input data being processed, mechanisms of the exemplary embodiments may be employed to inject variation into probability values ​​associated with classification operations performed by the trained model 525 so as to obfuscate the training of the trained model.

[0104] Referring again to FIG. 5 , the identified key features are then used in a question decomposition stage 530 to decompose the question into one or more queries that are applied to a corpus of data / information 545 to generate one or more hypotheses. The queries are generated in any known or later-developed query language, such as Structured Query Language (SQL) or the like. The queries are applied to one or more databases storing information about electronic texts, documents, articles, websites, and the like, which make up the corpus of data / information 545. That is, these various sources themselves, various collections of sources, and the like represent various corpora 547 within the corpus 545. There may be various corpora 547 defined for various collections of documents based on various measures depending on the particular implementation. For example, various corpora may be established for different topics, subject categories, sources, or the like. As one example, a first corpus may be associated with healthcare documents, while a second corpus may be associated with financial documents. Alternatively, one corpus may be documents published by the U.S. Department of Energy, while another corpus may be IBM Redbooks documents. Any collection of content with some similar attributes may be considered a corpus 547 within corpus 545.

[0105] The query is applied to one or more databases storing information about electronic texts, documents, articles, websites, and the like, making up a corpus of data / information, such as, for example, corpus of data 306 of FIG. 3 . The query is applied to the corpus of data / information in a hypothesis generation stage 540 to generate results that identify potential hypotheses for answering the input question, and the results can then be evaluated. That is, application of the query results in extraction of portions of the corpus of data / information that match the measures of the particular query. These portions of the corpus are then analyzed and used in the hypothesis generation stage 540 to generate hypotheses for answering the input question. These hypotheses are also referred to herein as “candidate answers” ​​to the input question. For any input question, this stage 540 may generate hundreds of hypotheses or candidate answers that may need to be evaluated.

[0106] The QA pipeline 500 then, at stage 550, performs a deep analysis and comparison of the language of the input question with the language of each hypothesis or "candidate answer," and performs evidence scoring to assess the likelihood that a particular hypothesis is the correct answer to the input question. As discussed above, this involves using multiple inference algorithms, each performing a distinct type of analysis of the language of the input question and / or content of the corpus to provide evidence that either supports or discourages the hypothesis. Each inference algorithm generates a score based on the analysis it performed, indicating a measure of the relevance of the particular portion of the corpus of data / information extracted by application of the query and a measure of the validity of the corresponding hypothesis, i.e., a measure of the confidence of the hypothesis. There are various ways to generate such a score depending on the particular analysis performed. Generally, however, these algorithms look for specific terms, phrases, or patterns of text that indicate terms, phrases, or patterns of interest, and determine the degree of match, with higher degrees of match being given relatively higher scores than lower degrees of match.

[0107] Thus, for example, an algorithm may be configured to search for exact terms, such as exact terms or synonyms of the term "movie," from the input question or synonyms of this term in the input question, and generate a score based on the frequency of use of these exact terms or synonyms. In such cases, exact matches would be given the highest score, while synonyms may be given lower scores based on their relative ranking, as may be specified by a subject matter expert (someone with knowledge of the particular domain and terminology used) or automatically determined from the frequency of use of synonyms in a corpus corresponding to this domain. Thus, for example, exact matches (also called evidence or passages of evidence) of the term "movie" in the content of a corpus would be given the highest score. Synonyms of movie, such as "motion picture," may be given lower scores but still score higher than synonyms of the type "film" or "moving picture show." The exact matches and synonym instances of each evidence passage may be compiled and used in a quantitative function to generate a score of the degree of match of the evidence passage to the input question.

[0108] So, for example, a hypothesis or candidate answer to the input question "What was the first movie?" is "The Horse in Motion." If the evidence passage contains the statement "The first motion picture ever made was 'The Horse in Motion' in 1878 by Eadweard Muybridge. It was a movie of a running horse," and the algorithm is looking for an exact match or synonym for the focus of the input question, i.e., "movie," an exact match for "movie" will be found in the second sentence of the evidence passage, and a highly scored synonym for "movie," i.e., "motion picture," will be found in the first sentence of the evidence passage. This may be combined with further analysis of the evidence passage to identify that the text of the candidate answer is also present in the evidence passage, i.e., "The Horse in Motion." These factors may be combined to give this evidence passage a relatively high score as supporting evidence that the candidate answer "The Horse in Motion" is the correct answer.

[0109] It should be understood that this is just one simple example of how scoring can be performed: many other algorithms of varying complexity can be used to generate scores for candidate answers and evidence without departing from the spirit and scope of the present invention.

[0110] In the combination stage 560, the scores generated by the various inference algorithms are combined into confidence scores or measures for the various hypotheses. This process involves applying weights to the various scores, which may be determined through training of statistical models employed by the QA pipeline 500 and / or dynamically updated. For example, scores generated by algorithms that identify exact match terms and synonyms may be weighted relatively higher than other algorithms that evaluate the publication date of the evidence passages. The weights themselves may be specified by subject matter experts or learned through a machine learning process that evaluates the dominance of characteristic evidence passages and their relative importance to overall answer candidate generation.

[0111] The weighted scores are processed according to a statistical model generated through training of QA pipeline 500 that identifies ways in which these scores can be combined to generate a confidence score or measure for each hypothesis or candidate answer. This confidence score or measure outlines the level of confidence QA pipeline 500 has in the evidence that the candidate answer is inferred by the input question, i.e., that the candidate answer is the correct answer to the input question.

[0112] The resulting confidence scores or measures are processed by a final confidence merging and ranking stage 570, which compares the confidence scores and measures with each other, with predetermined thresholds, or performs any other analysis on the confidence scores to determine which hypothesis / candidate answer is most likely to be the correct answer to the input question. The candidate hypotheses / answers are ranked according to these comparisons to generate a ranked list of candidate hypotheses / answers (hereafter simply referred to as "candidate answers"). From the ranked list of candidate answers, a final answer and confidence score, or a final set of candidate answers and confidence scores, is generated in stage 580 and output to the originator of the original input question via a graphical user interface or other mechanism for outputting information.

[0113] Thus, illustrative embodiments provide a mechanism for protecting trained artificial intelligence or cognitive models, such as neural network models, from model theft attacks. The illustrative embodiments introduce fluctuations, or noise, into the probability values ​​output by a trained model to cause an attacker's gradient calculations based on the output probability values ​​to deviate from the correct direction and magnitude while minimizing degradation of the accuracy of the trained model's classification or labeled data set. In some illustrative embodiments, this result is achieved by using a fluctuation function that reverses the sign of the first derivative of the trained model's sigmoid or softmax function and adds noise, or fluctuations, to the tails of the sigmoid or softmax function curve near its minimum and maximum values. The result is that if an attacker uses the modified probability values ​​output by the trained model as the basis for training their own model, the resulting attacker's model will be less accurate than the trained model they are attempting to replicate, or the attacker (in the case of an evasion attack) will be unable to generate noise to introduce into input data that will cause the trained model to misclassify the input data.

[0114] FIG. 6 is a flowchart outlining an example operation for obfuscating a trained configuration of a trained model in an output vector of the trained model, according to one exemplary embodiment. As shown in FIG. 6, the operation begins by receiving an input data set (step 610). The input data set is processed by the trained model to generate an initial set of output values ​​(step 620). Variations are inserted into the output values ​​to modify the initial set of output values ​​to generate a modified set of output values ​​that includes the introduced noise represented by the variations (step 630). The modified set of output values ​​is used to identify classifications and / or labels for the input data set (step 640). The modified set of output values ​​is used to generate an augmented output set of data that has been augmented to include labels corresponding to the classifications identified by the modified set of output values ​​(step 650). The augmented (labeled) data set, which may include the modified set of output values, is then output (step 660). The augmented (labeled) data set may then be provided as input to a cognitive computing operation engine that processes the labeled data set to perform cognitive operations (step 670). The operation then terminates.

[0115] 6 includes steps 650-670 as part of the example operations, it should be understood that the operations may end at step 640 in some exemplary embodiments and steps 650-670 need not be included. That is, rather than the classification / labeling and cognitive computing operations as performed in steps 650-670, the modified output values ​​(step 640) may be output for use by a user or other computing system. Thus, the user and / or other computing system may operate on the modified output values ​​themselves and may not utilize the classifications / labels as provided in steps 650-670.

[0116] Thus, the exemplary embodiments described above add small, deceptive variations to the output of a machine learning model, such as a neural network, such that the loss surface changes to perturb the gradient and trap or deceive attacks. In the exemplary embodiments described above, the noise (variations) introduced into the output (classification probability values) of a trained model, such as a neural network, such as trained model 525 of FIG. 5 by variation injection engine 320 of FIG. 3 or 590 of FIG. 5 to modify the initial set of output values ​​and generate a modified set of output values ​​affect all of the output classifications. This can result in a significant amount of noise being introduced into the model, thus diluting the value of the returned probabilities. For example, assume the original probability vector (output) is [1.0, 0, 0, 0, 0, 0, 0, 0, 0, 0], and the perturbation introduction of the above exemplary embodiment modifies the probability vector to [0.9, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1] before normalization. Normalization produces a final perturbed probability vector of [0.5, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06]. Thus, the leading probability of 1.0 becomes the significantly smaller value of 0.5. This effect can be even more severe with a larger number of classes.

[0117] To minimize the amount of noise introduced into the trained model overall, further exemplary embodiments may selectively introduce variation into selected probability outputs rather than introducing variation into all of the probabilities in the output of a trained model, such as a neural network. The selective introduction of variation may be performed for a predetermined subset of the classifications, or the magnitude or amount of variation may be modified for all or a selected subset of the classifications, or both. This selective insertion of variation and / or modification of the magnitude of variation may be performed dynamically. Moreover, this selective insertion of variation and / or modification of the magnitude of variation may be performed based on a variety of different dynamic modification measures, such as a request pattern analysis prediction that the source of the request is an attacker, a requester-specified level of acceptable model noise, compensation-based evaluation, a classification subset selection algorithm based on top-K analysis, or the like. Although example mechanisms for selecting a subset of the model's output classifications into which to insert variation in the manner previously discussed above and / or modifying the magnitude or amount of variation introduced are described, it should be understood that other measures for selecting a subset of the output classifications and / or modifying the magnitude of variation introduced may be used without departing from the spirit and scope of the present invention.

[0118] In a further exemplary embodiment, a selective classification output variation engine is provided that includes logic for specifying a subset of classification outputs for which variation should be injected into the trained model's output, or the magnitude of variation to be injected into the trained model's output. The selective classification output variation engine may be implemented as logic external to the trained model, for example, as part of an additional layer of nodes immediately before and / or after the original output layer that operates on the output classification probability values ​​to determine the classification outputs for which variation should be injected and / or the magnitude of variation to be injected into all or a selected subset of the classification outputs, or as an additional layer of logic nodes within the trained model. For example, in an embodiment in which variation is injected into all of the classification output probability values, such as in the aforementioned embodiment above, the selective classification output variation engine logic may operate as an additional layer before the output layer of the trained model's node to introduce variation into the output probability values ​​before the output layer, with the magnitude of variation being determined based on the operation of the selective classification output variation engine, as described below.

[0119] In another exemplary embodiment, where the operation of the selective classification output variation engine operation depends on the specific probability values ​​of the various classifications actually generated by the trained model, such as selecting the classification outputs into which to inject variation based on the selection of the top K classes, and the logic needs to know which classifications are in the top K classes to select the top K classes, the selective classification output variation engine logic may be provided as a logic layer present in the trained model after the original output layer of the trained model's logic and before an additional modified output layer of logic (nodes). In this case, the selective classification output variation engine logic operates on the original output probability values ​​generated by the trained model to determine a subset of the classification probability output values ​​into which to inject variation, controls the variation injection engine to inject variation of the determined magnitude and / or into the selected subset of classification outputs, and causes the trained model to output modified or perturbed output classification probabilities in a manner similar to that described above.

[0120] The operation of the selective classification output variation engine may be dynamically based on a dynamic variation modification measure such that one or more of the magnitude / amount of variation introduced, or the particular classification probability output value output by the trained model into which variation is inserted, or both, may change dynamically as the trained model operates to process input data, such as input data provided by a request submitted to a cognitive computing system, pipeline, or the like. This dynamic operation of the selective classification output variation engine may dynamically adjust the application of variation to the output of the trained model in response to a predetermined situation or the dynamic variation measure being satisfied by the current situation. For example, the dynamic adjustment of variation may include modifying the particular class of output probability into which variation is introduced, such that variation is not introduced into all of the output classes of the trained model based on the dynamic variation measure. As another example, the amount or magnitude of variation introduced into the output probability values ​​of all or a selected subset of the output probability values ​​for a classification may be dynamically modified based on the dynamic variation measure. These dynamic modifications of variability may be based on various dynamic variability measures, such as an evaluation of the request / query patterns input to a trained model / neural network, cognitive computing system, or the like, the amount of noise in the output of a trained model that is acceptable to a user, a compensation hierarchy, a classification subset selection algorithm based on top-K analysis, or the like.

[0121] In some exemplary embodiments, dynamic modification of variance may be performed based on the determined importance of a particular input query. For example, a user may "opt in" to pay a higher cost to have one or more of the user's queries identified as relatively more important than other queries by the same or different users. More important queries may be provided with, for example, more accurate results with less variance. In other exemplary embodiments, variance may be dynamically modified per class based on the relative importance of a particular class. For example, one or more classifications may be defined as "critical classes" (relatively high importance), while other classifications may be considered non-critical classes (relatively low importance), such as tuberculosis (vs. the common cold class) in a medical classification scenario. For critical (or important) classes, the amount of variance may be reduced to provide more accurate results for these critical classes, so that more accurate results may be provided to medical professionals for these critical classes.

[0122] FIG. 7 illustrates an example of a cognitive system processing pipeline in which selective classification output variation is implemented, according to one illustrative embodiment. FIG. 7 is similar to that of FIG. 5 , but adds a selective classification output variation engine 710 and variation selection data storage 720, which are utilized by further illustrative embodiments to control the selective introduction of variation by variation injection engine 590. While the logic of engines 710 and 590 is shown as separate from trained model 525, it should be understood that the logic may be integrated with one another, such as a modified variation injection engine 590 comprising the logic of engine 710, as discussed herein, or rather, may be combined with the logic of trained model 525 as an additional logic layer before and / or after the original output layer of trained model 525. Elements in FIG. 7 having reference numbers corresponding to those of FIG. 5 operate in a similar manner as described above unless otherwise indicated below. It should be further recognized that the mechanisms of these further illustrative embodiments are similarly not limited to use with cognitive computing systems or with QA pipelines, but may be implemented with any trained model that performs classification operations.

[0123] 5 , a further exemplary embodiment includes a selective classification output variation engine 710 that operates in cooperation with the variation injection engine 590 to control the variation injection performed by the variation injection engine 590 to minimize the introduction of noise into the trained model 525 while achieving the protection described above with respect to model theft attacks and adversarial samples. That is, the variation injection engine 590 of the exemplary embodiment operates to introduce variation into the generated probability values ​​in the output vector while preserving classification accuracy as described above. Nevertheless, the selective classification output variation engine 710 operates to minimize the amount of noise introduced by the variation injection by selecting at least one of the magnitude of the introduced variation or the subset of classification outputs into which the variation is introduced, while preserving classification accuracy. Thus, while correct classifications will still be provided downstream along the QA system pipeline 500, any attacker who gains access to the output vector probability values ​​to train their own models using model stealing attacks and / or adversarial samples will be presented with inaccurate probability values ​​that will cause any models trained against such probability values ​​to perform worse than the trained model 525.

[0124] As with previous exemplary embodiments, the variation injection engine 590 operates to inject variation into the output probabilities generated by the trained model 525 so that the gradients calculated for points along the curve represented by the output probabilities deviate from the correct direction and amount, minimizing any degradation in the accuracy of the revised output classification and corresponding label. In some exemplary embodiments, the variation injection engine 525 meets these criteria by using a variation function that reverses the sign of the first derivative of the output probability curve, e.g., a sigmoid or softmax curve of the probability values, and adds noise or variation to the ends of the curve, near the maximum and minimum values ​​of the curve, up to + / - half of the range from the minimum to the maximum value; e.g., for a softmax or sigmoid probability value curve ranging from 0% to 100%, the noise or variation has a magnitude of up to + / -0.5. As noted above, the particular variation function utilized can take many different forms, including those previously listed above, as well as others that meet the above-mentioned criteria and guidelines.

[0125] The resulting modified output vector provides modified probability values ​​while preserving the validity of the classifications and associated labels associated with the input data in the labeled data set. Thus, correct classification and labeling of the input data set is still achieved while obfuscating the actual trained configuration of the trained model 525. The resulting classified or labeled data set may be provided to further stages of downstream processing in the pipeline 500, such as question and topic analysis 520, for further processing and performance of the overall cognitive operations employed by the cognitive system.

[0126] Thus, an attacker cannot train their own trained model to exactly replicate the training of trained model 525 by inputting multiple input data sets, obtaining the corresponding labeled output data sets and corresponding probability values ​​for the output vectors, and thereby utilizing the labeled data sets and their associated probability values ​​in the vector outputs as training data. To the contrary, doing so would result in a model that provides significantly lower performance than that of trained model 525, creating the need to continue utilizing pre-trained model 525.

[0127] 7 , the selective classification output variation engine 710 operates to control the variation insertion engine 590 to instruct the variation insertion engine 590 regarding the magnitude of variation to introduce into one or more of the classification output probabilities, or the classification output probabilities into which to insert a variation, or both. The selection performed by the selective classification output variation engine 710 may be performed based on various selection measures and selection data, which may be from the input request / query processed by the trained model 525, such as the request / query input to the QA pipeline 500, the original output probability values ​​generated by the trained model 525, or data stored in the variation selection data storage 720, or a combination thereof. Because the selection performed by the selective classification output variation engine 710 can take many different forms, the following description will set forth examples of selection methods and logic performed by various exemplary embodiments of the selective classification output variation engine 710; however, it should be understood that other methods and logic may be performed as will be apparent to those skilled in the art in view of this description without departing from the spirit and scope of the present invention.

[0128] In some exemplary embodiments, the variation selection data storage 720 stores data that serves as the basis for performing a selection of classification output probability values ​​into which variation should be inserted and / or for selecting the magnitude of variation to be inserted into the output probabilities of the trained models 525. For example, the variation selection data storage 720 stores data indicative of the source of the request, the pattern of input data introduced by the source of the request, and the like. Additionally, the variation selection data storage 720 may store a registry of registered owners / operators of cognitive computing systems, e.g., the QA pipeline 500 and / or the trained models 525, which may include information specifying the desired selection method to be performed for requests / input data from users (sources), the acceptable level of noise in the output probabilities of the trained models, the subscription or compensation level associated with the owner / operator that may be mapped to the magnitude of variation introduced into the corresponding trained models 525 and / or the particular selection method for use in selecting a subset of probability value outputs into which variation (noise) should be inserted, and the like. The registry may also store information about the user (source) of a request to determine whether the user (source) is likely to be an attacker or to require further investigation. In some exemplary embodiments, the variation selection data storage 720 may not be provided, and the selective classification output variation engine 710 may operate in the same manner for all sources, e.g., for all users (sources), the top K output probability values ​​will undergo variation insertion, where K is the same value for all users (sources).

[0129] In one exemplary embodiment, the selective classification output variation engine 710 operates based on a top K selection method that selects the top K ranked output probability values ​​in the original output values ​​generated by the trained model 525 into which the generated variations should be inserted. For example, if K is 5, the top 5 ranked output probability values ​​are the original output probability values ​​that will be varied by the variation injection engine 590. The selective classification output variation engine 710 may receive the original output values ​​generated by the trained model 525 by processing the input data, and may select the K highest valued output probability value classes as the ones into which the variation injection engine 590 will insert variations, rather than injecting variations into all of the output probability values ​​of the trained model 525. Thus, for example, if the original output probability values ​​generated by the trained model 525 for classes C1, C2, C3, C4, C5, C6, C7, C8, C9, and C10 are 0.92, 0.72, 0.05, 0.12, 0.45, 0.32, 0.68, 0.22, 0.10, and 0.06, respectively, then for a K value of 4, the top K selection method would select classes C1, C2, C5, and C7 as the classes for which variations will be inserted into their respective probability output values ​​by the variation insertion engine 590, since C1, C2, C5, and C7 are the top four ranked output probability values ​​in the set.

[0130] The selected class output probability values ​​may be identified by the selective classification output variation engine 710 based on the original output probability values ​​generated by the trained model 525 and the control signals or outputs sent to the variation injection engine 590 to instruct the variation injection engine 590 into which output probability values ​​to insert variation. The variation injection engine 590 will then perform its operations, as previously described above, on the selected subset of classification output probability values ​​to cause the trained model 525 to output modified output probability values ​​for the selected subset of classification output probability values.

[0131] By inserting variation into only a selected subset of the output probability values ​​of selected classes, the amount of noise introduced into the output of the trained model 525 can be minimized while still being able to thwart any model-stealing attacks and / or adversarial example-based attacks. That is, the overall amount of noise introduced into the output of the trained model 525 is minimized while preserving the usefulness of the output of the trained model 525. Nevertheless, even if the introduction of noise is minimized, the effectiveness of the defense provided by the introduction of variation to thwart model-stealing attacks and adversarial example-based attacks is still achieved because the class that misclassifies the modified output probability values ​​produced by the trained model 525 due to the introduction of variation into the top K output probability values ​​will be one of the top K classes affected by the misleading variation.

[0132] It should be understood that the value K is a tunable parameter, tunable between K=0 and K=max(K), with a potentially defined default K value for a desired implementation, and that the K value utilized by the selective classification output variation engine 710 may be selected based on the desired implementation of an exemplary embodiment. The value K may be fixed, or in some exemplary embodiments, K may be dynamically tunable based on, for example, various different variation selection data that may be obtained from an input request, an input data set being processed, the output of a trained model, and / or data stored in the variation selection data storage 720. For example, the selective classification output variation engine 710 may receive, from an input request, source identification information, session information, and / or characteristic information about the input request / data set being fed into the cognitive computing system and / or trained model 525, and may receive stored information from the variation selection data storage 720, and may dynamically determine the value K for use in the top-K selection algorithm based on an analysis of one or more of these data. For example, in some exemplary embodiments, the selective classification output variation engine 710 may perform pattern analysis logic on input data of one or more requests from the same source to determine whether the pattern as a whole represents an attack on the trained model 525 and / or the cognitive computing system. This pattern analysis may use information stored in the variation selection data storage 720. This stored information may include requests received from the same source within the same session, multiple sessions, a predetermined period of time, or the like.

[0133] The selective classification output variation engine 710 may use a classification model, such as another trained neural network or the like, operating on various features extracted from the input request / data set, a history of requests / data sets received from the same source, or the like, to evaluate the features of the request and input data set and predict whether an input request from the source is part of an attack against the trained model 525. For example, if the same source has sent numerous requests or large data sets with similar input data for classification, such as images, over a predetermined period of time, within the same session, or the like, this may be indicative of an attack. If the source is located in a particular geographic area known to be an area where attacks occur, as can be determined from an IP address or the like, the selective classification output variation engine 710 may determine that the request may be part of an attack or has a high probability of being associated with an attack. If the source is not a registered source, further investigation may be applicable, and the engine 710 may therefore determine a high likelihood that the request is part of an attack. Other analyses of the characteristics of the request and / or input data may be performed to assess the likelihood that the request is part of an attack.

[0134] If the request / input data is determined to be likely to be part of an attack, e.g., the prediction value is above a predetermined threshold, increased noise may be input into the output probability values ​​generated by the trained model 525. This increased noise introduction may result in increasing the value of K from what would otherwise be used; for example, if the default K value is 4, the value K may be increased to 10 or all output classifications. As shown, this modification of the amount of noise introduced into the output of the trained model 525 may be performed dynamically based on an evaluation of the received request / input data set and an evaluation of the source of the request.

[0135] Dynamic modification of the amount of noise introduced by the variation injection engine 590 into the output of the trained model 525, including but not limited to predicting whether a request / data set is associated with an attack, may further be performed based on the owner / operator of the trained model 525's desired level of noise introduction through variation injection. This desired level may be determined based on a registry of trained model owner information maintained as part of the variation selection data storage 720. For example, owners / operators of various trained models 525 may desire different levels of protection for their trained models 525, and the protection may be based on operational performance, the amount of protection the owner / operator can afford financially, or the like. For example, the owner / operator may desire more or less protection based on the desired performance of the trained model 525. For an owner / operator desiring increased protection, a relatively greater amount of noise may be introduced into the output probability values ​​generated by the owner / operator's trained model 525, such as by increasing the K value above the default K value in the top-K algorithm described above. For owners / operators who do not desire increased protection, a default noise or a lesser amount of noise may be introduced into the output probability values ​​generated by the owner / operator trained model 525, such as a default K value or a reduced K value below the default K value in the top K algorithm described above.

[0136] In some exemplary embodiments, different tiers of protection may carry different costs to the owner / operator of the trained model 525. Thus, if the owner / operator subscribes to a higher tier level corresponding to a higher level of protection, more noise may be introduced into the output of the owner / operator's trained model than lower level protection, or higher performance may be achieved than lower level protection tiers. Alternatively, higher tiers may be associated with more selective input of noise into the trained model, such that an owner / operator subscribed to a lower tier introduces more noise, e.g., the same size variation introduced into all output classification probability values, while an owner / operator subscribed to a higher tier may minimize the injected noise, i.e., the selected classification output variation, according to further exemplary embodiments.

[0137] Thus, depending on the particular implementation, various customizations of the dynamic selection of classification output probability values ​​into which variations should be inserted can be achieved. The customization can be based on the particular trained model 525 used to process the input request / data set. For example, if a request targets or requests a particular operation to be performed by a particular trained model 525, the corresponding owner / operator information from the registry stored in the variation selection data storage 720 can be retrieved by the selective classification output variation engine 710 and used along with the original output values ​​from the trained model 525 to determine the top K output probability values ​​into which variations should be inserted. This information can then be used to generate a control signal or output to the variation insertion engine 590, causing the variation insertion engine 590 to perform variation insertion on a selected subset of the output classification probability values, thereby generating modified classification probability values.

[0138] In other exemplary embodiments, the size or amount of variation inserted into the classification output probability values ​​generated by the trained model 525 may be modified to minimize the amount of noise introduced into the trained model 525 output as a whole. For example, the size / amount of variation may be increased / decreased based on various measures, such as those discussed above, for dynamically modifying the K value of the top K algorithms based on information source, owner / operator registry information, pattern analysis indicating the likelihood that a request is part of an attack, or the like. For example, using the top K approach as described above, the top K original output values ​​may be identified, and the variation inserted into these top K original output values ​​may be increased, while all other original output values ​​would have a smaller size / amount of variation inserted into their original output probability values; for example, the top K values ​​may have the variation increased by 0.05, while all other values ​​may have the variation decreased by 0.05 from the default size / amount of variation. Alternatively, if an owner / operator subscribes to a higher tier of protection, an increased size of variation may be utilized compared to an owner / operator subscribed to a relatively lower tier of protection. Various customizations of the magnitude of variation may be implemented to control the amount of noise introduced into the output of the trained model 525 and can be implemented without departing from the spirit and scope of the present invention.

[0139] Additionally, customization and dynamic modification may be implemented for both the magnitude / amount of variation and the subset of classification output probability values ​​into which variation is inserted. These customizations may again be based on the specific original output values ​​generated by the trained model 525, characteristics of the request / input data set extracted from the received request flowing to the cognitive computing system and / or the trained model 525, and / or information stored in the variation selection data storage 720. Thus, variations of larger or smaller size may be introduced into the output of the trained model 525 based on whether the information source is likely to be an attacker, whether the request / input data set is likely to be an attacker, a subscriber's preference for the level of noise insertion into the output of the trained model 525, or the like. Furthermore, more or fewer class prediction outputs may have variation (noise) inserted based on whether the information source is likely to be an attacker, whether the request / input data set is likely to be an attacker, a subscriber's preference for the level of noise insertion into the output of the trained model 525, or the like.

[0140] It should be appreciated that the variation selection data storage 720 may store preferences of the owner / operator of the trained model 525 regarding whether to use one or both types of variation (noise) injection control and to what extent to use one or both of these types of variation injection control. For example, preferences may be stored in a registry in the data storage 720 indicating that a particular owner / operator may want to use only the top K selection control of the variation injection engine and may specify a desired or default K value along with a measure for determining whether and when to modify the K value by increasing / decreasing it, e.g., a measure for determining whether a request is part of an attack. For another owner / operator of the trained model 525, different preferences and / or measures for dynamically modifying the variation injection control may be specified, e.g., using both the top K selection and variation size control along with a specified measure for increasing / decreasing K and / or increasing / decreasing the variation size. The selective classification output variation engine 710 may retrieve the appropriate registry entry for the corresponding trained model 525 used to process the request / input data set and generate a corresponding variation insertion control signal or output that is sent from the selective classification output variation engine 710 to the variation insertion engine 590.

[0141] In some exemplary embodiments, dynamic control of variation insertion to customize the inserted noise in the output of the trained model 525 may be based on the determined importance of received requests / data sets. Using such a mechanism, selective classification output variation may be implemented, such that relatively more important requests / data sets will have a relatively smaller amount of noise introduced into the output of the trained model 525, thereby selecting a subset of classification output probability values ​​for variation, or modifying the magnitude of variation to reduce noise, thereby reducing the magnitude of variation, or both. As previously mentioned, the “importance” of a request / data set (or query) may be based on various factors, including, for example, a user marking requests / data sets with higher ratings or rankings (requests / data sets of a different tier) and potentially paying a premium for relatively more important requests / data sets. In some embodiments, a predetermined list of significant or “important” classes (again, different “tiers” of importance) may be defined, and the importance of a request / data set may be determined based on these tiers of importance. For example, the top tier classifications (e.g., "cancer," "heart attack," "stroke," etc.) may have no variation introduced, while lower tier classifications (e.g., "tuberculosis," "flu," etc.) may have less variation introduced. The lowest tier classifications, e.g., "cold," may have more variation (more noise) introduced. A function or predetermined scaling factor may be provided for adding variation to the different tiers, with 0 indicating no variation added and 1 indicating full or maximum variation added.

[0142] Note that for either dynamically modified variation selection or customization, the amount of reduction is limited to a level where model stealing attacks or adversarial sample-based attacks (evasion attacks) are still thwarted by the gradient trickery mechanism of the exemplary embodiments. Thus, there is a range of noise within which the dynamic modification of injected variations can be adjusted, e.g., a range that includes an upper limit where too much noise is introduced to allow for proper classification output by the trained machine learning model, and a lower limit where too little noise is introduced to adequately thwart attacks. Logically, for the top "k" embodiments, k can be 1 or greater. The defensive effectiveness of the exemplary embodiments should be there for k=1, since in this case, gradients toward or away from the top 1 class can still be deceptive. As k increases, the number of such classes with deceptive directions increases. The most beneficial direction for model evasion and stealing is the top 1 class. Therefore, the effect is still there. The magnitude of the variations depends on the particular method for injecting such noise, which can be determined empirically.

[0143] While the selection of the top K and control of the variation size are described above, it should be understood that various embodiments of the present invention may implement other controls to modify the amount of noise introduced without departing from the spirit and scope of the present invention. Indeed, in some exemplary embodiments, whether or not to add noise overall may be optional. For example, as described above, the top-level queries may have no variation, while lower levels may have noise for all classes. Moreover, in some embodiments, when important or critical classes are defined, noise (variation) may be selectively applied only to unimportant classes.

[0144] In another embodiment, dynamic control of variation introduction can be based on risk assessment. For example, a query pattern analysis engine or an artificial intelligence (AI) model may analyze a series of queries (requests / input data sets) originating from the same source to determine whether a pattern represents potentially malicious action. For example, adversarial sample generation typically requires querying similar images multiple times. As a source submits more queries for similar images, e.g., multiple images of a stop sign, within a given time period, within the same session, or the like, the query pattern analysis engine or AI model can detect this pattern and control the variation injection engine to gradually add more noise, e.g., larger variations, or increase k in a leading-k mechanism to increase the noise in queries suspected of being part of an attack against the trained model, e.g., a model theft or evasion attack.

[0145] In some embodiments, instead of a top-K-based mechanism, a predefined set of significant or important classes, or all / none, the mechanism of the exemplary embodiments may further add noise to a random set of classes. That is, the specific classes into which noise is introduced may be determined dynamically and randomly, while still maintaining the amount of noise introduced into the model as a whole at an acceptable level. For example, in some embodiments, a predetermined number of classes may be selected for noise introduction, but the specific classes selected may not be known a priori. In short, any mechanism that allows for the selection of a subset of classes into which noise is introduced, or the selection of various levels of variation to be introduced, or both, may be used without departing from the spirit and scope of the present invention.

[0146] Thus, these further exemplary embodiments provide a mechanism for minimizing the amount of noise introduced into the output of the trained model 525 by the injection of variation into the output of the trained model 525 by the variation injection engine 590. Minimizing noise helps avoid the problems of lowering the output classification probability values ​​discussed above while preserving the utility of the gradient trickery mechanism for thwarting model theft attacks and adversarial example-based attacks. The amount of noise minimization may be a tunable characteristic of the exemplary embodiments and may be tuned in response to static or dynamic measures, such as model owner / operator preferences, subscription or other compensation level, the importance of the request / data set being processed, patterns of activity that indicate the request / data set may be part of an attack, an assessment of the source of the request / data set regarding the likelihood that the source is an attacker, etc.

[0147] 8 is a flowchart outlining the operation of a further illustrative embodiment in which dynamic modification of variation insertion is implemented. The operations outlined in FIG. 8 may be performed, for example, by the selective classification output variation engine 710 of FIG. 7 in cooperation with the variation insertion engine 590 to control, for example, the magnitude of variation inserted into the output classification probability values ​​generated by the trained model 525, and / or the insertion of variation into a selected subset of the output classification probability values ​​generated by the trained model 525.

[0148] As shown in FIG. 8 , the operation begins by receiving a request to process an input data set, which may be further provided or otherwise accessed as a result of the request (step 810). The input data set is processed by the trained model to generate an initial set of output values ​​(step 820). Characteristics of the received request, such as a source identifier (IP address, username, etc.), a session identifier, the requested classification action to be performed, an importance indicator of the request, etc., and / or characteristics of the input data set, such as the number and type of data to be processed, e.g., image type, or the like, may be extracted from the request / input data set and provided as input to a selective classification variation engine along with the initial set of output values ​​generated by the model (step 830). A subset of classification outputs to vary and / or the magnitude of variation to introduce into the output classification probability values ​​are determined based on the extracted characteristics and the initial set of output values ​​(step 840). This operation may take many different forms depending on the particular embodiment selected and the type of customization and dynamic modification enabled by its implementation. For example, a top K analysis may be performed to select the top K classification outputs in the initial set of outputs to perturb by perturbation insertion, where the value K may be a fixed value or a dynamically determined value based on other factors such as those previously described above. Additionally, source information may be used to predict whether the source is likely to be an attacker, and owner / operator information may be evaluated to determine a desired level of noise to introduce into the model's output.

[0149] After determining control over variation insertion in step 840, the variation insertion engine is controlled to insert variations of a selected size and / or to a selected subset of outputs to generate a modified set of output values ​​(step 850). The modified set of output values ​​is used to identify classifications / labels for the input data set (step 860), generating an augmented output set of data that has been expanded to include labels corresponding to the classifications identified by the modified set of output values ​​(step 870). An augmented (labeled) data set that may include the modified set of output values ​​is then output (step 880). The augmented (labeled) data set may then be provided as input to a cognitive computing operation engine that processes the labeled data set to perform cognitive operations (step 890). The operation then terminates.

[0150] 8 includes steps 860-890 as part of the example operation, it should be understood that the operation may end at step 850 in some exemplary embodiments, and steps 860-890 need not be included. That is, rather than the classification / labeling and cognitive computing operations as performed in steps 860-890, the modified output values ​​(step 850) may be output for use by a user or other computing system. Thus, the user and / or other computing system may operate on the modified output values ​​themselves and may not utilize the classifications / labels as provided in steps 860-890.

[0151] As noted above, it should be understood that the exemplary embodiments may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment containing both hardware and software elements. In one illustrative embodiment, the mechanisms of the exemplary embodiments are implemented in software or program code, including but not limited to firmware, resident software, microcode, etc.

[0152] A data processing system suitable for storing and / or executing program code includes at least one processor coupled directly or indirectly to memory elements through a communications bus, such as a system bus. The memory elements may include local memory used during the actual execution of the program code, mass storage, and cache memory for temporary storage of at least some program code to reduce the number of times the code must be retrieved from mass storage during execution. The memory may be of various types, including but not limited to ROM, PROM, EPROM, EEPROM, DRAM, SRAM, flash memory, solid-state memory, and the like.

[0153] Input / output or I / O devices (including but not limited to keyboards, displays, pointing devices, etc.) can be coupled to the system directly or through intervening wired or wireless I / O interfaces and / or controllers. I / O devices may take many different forms other than traditional keyboards, displays, pointing devices, and the like, such as, for example, communication devices coupled through wired or wireless connections, including but not limited to, smart phones, tablet computers, touch screen devices, voice recognition devices, and the like. Any known or later-developed I / O devices are intended to be within the scope of the exemplary embodiments.

[0154] Network adapters may also be coupled to the system to enable the data processing system to become coupled to other data processing systems or remote printers or storage devices through intervening private or public networks. Modems, cable modems, and Ethernet cards are just a few of the currently available types of network adapters for wired communications. Wireless communication-based network adapters may also be utilized, including, but not limited to, 802.11a / b / g / n wireless communication adapters, Bluetooth wireless adapters, and the like. Any known or later-developed network adapter is intended to be within the spirit and scope of the present invention.

[0155] The description of the present invention has been presented for purposes of illustration and description, but is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The embodiments were chosen and described to best explain the principles, practical application of the invention, and to enable others skilled in the art to understand the invention in various embodiments with various modifications as suited to the particular uses contemplated. The terminology used herein was chosen to best explain the principles, practical application, or technical improvements of the embodiments over those found in the marketplace, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. 1. A method for obfuscating a trained configuration of a trained machine learning model, the method being implemented in a data processing system comprising at least one processor and at least one memory, the at least one memory comprising instructions executed by the at least one processor to execute the trained machine learning model and a variation injection engine, the method comprising: processing input data with the trained machine learning model having a machine learning trained configuration to generate an initial output vector having classification values ​​for each of a plurality of predetermined classes; determining, by the variation insertion engine, a subset of classification values ​​in the initial output vector into which to insert variations, the subset of classification values ​​being less than all of the classification values ​​in the initial output vector; modifying, with the variation insertion engine, the classification values ​​in the subset of classification values ​​by inserting variations into a function associated with generating the initial output vector for the classification values ​​in the subset of classification values, thereby generating a modified output vector; outputting, by the trained machine learning model, the modified output vector, wherein the variation modifies the subset of classification values ​​to obfuscate the trained configuration of the trained machine learning model while preserving classification accuracy of the input data; and A method comprising:

2. determining, by a selective classification output variation engine, a variation magnitude to be inserted into said subset of classification values; The method of claim 1 further comprising:

3. 3. The method of claim 2, wherein at least one of determining a subset of the classification values ​​in the initial output vector into which to insert a variation or determining the magnitude of the variation to insert into the subset of classification values ​​comprises evaluating characteristics of at least one of a request to input input data, the input data itself, or an operator of the trained machine learning model to dynamically determine the subset of classification values ​​or the magnitude of the variation.

4. 2. The method of claim 1 , wherein determining the subset of classification values ​​in the initial output vector into which to insert variation comprises evaluating characteristics of at least one of a request to input input data, the input data itself, or an operator of the trained machine learning model to dynamically determine the subset of classification values.

5. 5. The method of claim 4, wherein evaluating the characteristics includes evaluating the characteristics to determine a probability that the request or input data is part of an attack against the trained machine learning model, and the subset of classification values ​​is determined based on a result of determining the probability that the request or input data is part of an attack against the trained machine learning model.

6. 6. The method of claim 5, wherein determining the probability that the request or input data is part of an attack includes at least one of determining whether a source of the request or input data is in a geographic region associated with an attacker, determining whether a pattern of activity associated with the source is indicative of an attack against the trained machine learning model, or determining whether the source is a previously enrolled user of the trained machine learning model.

7. 2. The method of claim 1 , wherein determining a subset of the classification values ​​in the initial output vector into which to insert a variation comprises performing an analysis of a top K number of the classification values ​​in the initial output vector, where K is one of a fixed, predetermined integer value or a dynamically determined integer value.

8. 8. The method of claim 7, wherein K is a dynamically determined integer value, the value K being determined based on at least one of one or more characteristics of a request submitting the input data, characteristics of the input data, or characteristics of an operator of the trained machine learning model.

9. 2. The method of claim 1 , wherein inserting the variation into the function associated with generating the initial output vector comprises inserting a variation that changes a sign or magnitude of a gradient of the initial output vector.

10. 2. The method of claim 1 , wherein modifying classification values ​​in the subset of classification values ​​by inserting a variation into the function associated with generating the initial output vector of classification values ​​in the subset of classification values ​​comprises adding noise to the output of the function up to a maximum positive or negative value that does not modify the classification of the input data.

11. Receiving input data for classification by a trained machine learning model into one or more classes among a plurality of predetermined classes as part of a cognitive operation of a cognitive system; processing the input data with the trained machine learning model to generate an initial output vector having classification values ​​for each of the plurality of predetermined classes; determining, by a selective classification output variation engine, a subset of classification values ​​in the initial output vector into which to insert variations, the subset of classification values ​​being less than all of the classification values ​​in the initial output vector; modifying, with a variation insertion engine, the classification values ​​in the subset of classification values ​​by inserting variations into a function associated with generating the initial output vector for the classification values ​​in the subset of classification values, thereby generating a modified output vector; outputting, by the trained machine learning model, the modified output vector, wherein the variation modifies the subset of classification values ​​to obfuscate the trained configuration of the trained machine learning model while preserving classification accuracy of the input data; and A computer program that causes a data processing system to execute the following.

12. determining, by said selective classification output variation engine, a magnitude of variation to be inserted into said subset of classification values; 12. The computer program product of claim 11, further causing the data processing system to:

13. 13. The computer program product of claim 12, wherein at least one of determining a subset of the classification values ​​in the initial output vector into which to insert a variation or determining the magnitude of the variation to insert into the subset of classification values ​​comprises evaluating characteristics of at least one of a request to input input data, the input data itself, or an operator of the trained machine learning model to dynamically determine the subset of classification values ​​or the magnitude of the variation.

14. 12. The computer program product of claim 11, further causing the data processing system to determine the subset of classification values ​​in the initial output vector into which to insert variations by evaluating characteristics of at least one of a request to input the input data, the input data itself, or an operator of the trained machine learning model to dynamically determine the subset of classification values.

15. 15. The computer program product of claim 14, further causing the data processing system to evaluate the characteristics by evaluating the characteristics to determine a probability that the request or input data is part of an attack against the trained machine learning model, and wherein the subset of classification values ​​is determined based on a result of determining the probability that the request or input data is part of an attack against the trained machine learning model.

16. 16. The computer program product of claim 15, further causing the data processing system to determine the probability that the request or input data is part of an attack by at least one of determining whether a source of the request or input data is in a geographic region associated with an attacker, determining whether a pattern of activity associated with the source is indicative of an attack against the trained machine learning model, or determining whether the source is a previously enrolled user of the trained machine learning model.

17. 12. The computer program product of claim 11, further causing the data processing system to determine a subset of the classification values ​​in the initial output vector into which to insert a variation by performing an analysis of a top K number of the classification values ​​in the initial output vector, wherein K is one of a fixed, predetermined integer value or a dynamically determined integer value.

18. 20. The computer program product of claim 17, wherein K is a dynamically determined integer value, the value K being determined based on at least one of one or more characteristics of a request submitting the input data, characteristics of the input data, or characteristics of an operator of the trained machine learning model.

19. 12. The computer program product of claim 11, further causing the data processing system to insert a variation into the function associated with generating the initial output vector by inserting the variation that changes the sign or magnitude of a gradient of the initial output vector.

20. 1. An apparatus comprising: a processor; a memory coupled to the processor, the memory configured to, when executed by the processor, receiving input data for classification by the trained machine learning model into one or more classes among a plurality of predetermined classes as part of a cognitive operation of the cognitive system; processing the input data with the trained machine learning model to generate an initial output vector having classification values ​​for each of the plurality of predetermined classes; determining, by a selective classification output variation engine, a subset of classification values ​​in the initial output vector into which to insert variations, the subset of classification values ​​being less than all of the classification values ​​in the initial output vector; modifying, with a variation insertion engine, the classification values ​​in the subset of classification values ​​by inserting variations into a function associated with generating the initial output vector for the classification values ​​in the subset of classification values, thereby generating a modified output vector; and outputting, by the trained machine learning model, the modified output vector, wherein the variation modifies the subset of classification values ​​to obfuscate a trained configuration of the trained machine learning model while preserving classification accuracy of the input data. and instructions that cause the processor to execute the trained machine learning model and the variation insertion engine to operate to:

Citation Information

Patent Citations

  • Protecting Cognitive Systems from Model Stealing Attacks

    US20190095629A1

  • Information processing device and information processing method

    WO2019181099A1