This disclosure relates generally to information security and, in particular, to protecting machine learning models against wrongful reproduction, distribution and use.
Machine learning technologies, which are key components of state-of-the-art Artificial Intelligence (AI) services, have shown great success in providing human-level capabilities for a variety of tasks, such as image recognition, speech recognition, and natural language processing, and others. Most major technology companies are building their AI products and services with deep neural networks (DNNs) as the key components. Building a production-level deep learning model is a non-trivial task, which requires a large amount of training data, powerful computing resources, and human expertise. For example, Google's Inception v4 model is a cutting edge Convolutional Neural Network designed for image classification; creation of a model from this network takes from several days to several weeks on multiple GPUs with an image dataset having millions of images. In addition, designing a deep learning model requires significant machine learning expertise and numerous trial-and-error iterations for defining model architectures and selecting model hyper-parameters.
As deep learning models are more widely-deployed and become more valuable, they are increasingly targeted by adversaries, who can steal the models (e.g., via malware or insider attacks) and then seek to benefit from their wrongful use. In particular, once a model is stolen, it is easy for the attacker to setup a plagiarizing or plagiarized service with the stolen model. Such actions (theft, copyright infringement, misappropriation, etc.) jeopardize the intellectual property of the model owners, undermines the significant cost and efforts undertaken to develop the models, and may cause other serious economic consequences. While legal remedies often one possible approach to this problem, they are very costly and often produce unsatisfactory results.
The problem of protecting learning models is not limited to addressing theft. Recently, DNN model sharing platforms have been launched to promote reproducible research results, and it is anticipated that commercial DNN model markets will arise to enable monetization of AI products and services. Indeed, individuals and companies desire to purchase and sell such models in the same way as in the current mobile application market. These opportunities create additional incentives for unauthorized entities to obtain and implement DNN models.
Given the anticipated widespread adoption and use of machine learning models (including, without limitation, DNNs), there is a significant need to find a way to verify the ownership of a machine learning model to protect the intellectual property therein and to otherwise detect the leakage of deep learning models.
Digital watermarking has been widely adopted to protect the copyright of proprietary multimedia content. Watermarking typically involves two stages: embedding and detection. In an embedding stage, owners embed watermarks into the protected multimedia. If the multimedia data are stolen and used by others, in the detection stage owners can extract the watermarks from the protected multimedia as legal evidence to prove their ownership of the intellectual property.
Recently, it has been proposed to embed watermarks in deep neural networks for DNN model protection. In this approach, watermarks are embedded into the parameters of DNN models during the training process. As a consequence, this approach to protecting a DNN model has significant constraints, notably the requirement that the watermark can only be extracted by having access to all the model parameters. This white-box approach is not viable in practice, because a stolen model would be expected to be deployed only as a service, thus preventing access to the model parameters necessary to extract the watermark. Further, model watermarking cannot prevent attackers from obtaining correct predictions from stolen models and thus cannot fully prevent intellectual property theft.
A neural network is trained using a training data set, thereby resulting in a set of model weights, namely, a matrix X, corresponding to the trained network. According to this disclosure, the set of model weights is then modified or “locked” to produce a locked matrix X′, where the locked matrix X′ is generated by applying a key K, preferably as a Hadamard product KΘX. In one embodiment, the key K is a binary matrix {0, 1} that zeros (masks) out certain neurons in the network, thereby protecting the network. In another embodiment, the key comprises a matrix of sign values {−1, +1}. In still another embodiment, the key comprises a set of real values, e.g., a matrix R. In a preferred approach, the key is derived by applying a key derivation function to a secret value. The key K is symmetric, such that the same key used to protect the model weight matrix X (to generate the locked matrix X′) is also used to recover that matrix, e.g., by computing the Hadamard product, and thus enable access to and use of the model as it was trained.
According to a further aspect, different parts of the network (having different keys K associated therewith) are trained for different purposes, such as solving a same problem but with a first key K1 that minimizes a loss function, and a second key K2 that maximizes the loss function. In an alternative, the model with different keys are trained on two or more distinct data sets.
The foregoing has outlined some of the more pertinent features of the subject matter. These features should be construed to be merely illustrative. Many other beneficial results can be attained by applying the disclosed subject matter in a different manner or by modifying the subject matter as will be described.
For a more complete understanding of the subject matter and the advantages thereof, reference is now made to the following descriptions taken in conjunction with the accompanying drawings, in which:
With reference now to the drawings and in particular with reference to
With reference now to the drawings,
In the depicted example, server 104 and server 106 are connected to network 102 along with storage unit 108. In addition, clients 110, 112, and 114 are also connected to network 102. These clients 110, 112, and 114 may be, for example, personal computers, network computers, or the like. In the depicted example, server 104 provides data, such as boot files, operating system images, and applications to the clients 110, 112, and 114. Clients 110, 112, and 114 are clients to server 104 in the depicted example. Distributed data processing system 100 may include additional servers, clients, and other devices not shown.
In the depicted example, distributed data processing system 100 is the Internet with network 102 representing a worldwide collection of networks and gateways that use the Transmission Control Protocol/Internet Protocol (TCP/IP) suite of protocols to communicate with one another. At the heart of the Internet is a backbone of high-speed data communication lines between major nodes or host computers, consisting of thousands of commercial, governmental, educational and other computer systems that route data and messages. Of course, the distributed data processing system 100 may also be implemented to include a number of different types of networks, such as for example, an intranet, a local area network (LAN), a wide area network (WAN), or the like. As stated above,
With reference now to
With reference now to
Processor unit 204 serves to execute instructions for software that may be loaded into memory 206. Processor unit 204 may be a set of one or more processors or may be a multi-processor core, depending on the particular implementation. Further, processor unit 204 may be implemented using one or more heterogeneous processor systems in which a main processor is present with secondary processors on a single chip. As another illustrative example, processor unit 204 may be a symmetric multi-processor (SMP) system containing multiple processors of the same type.
Memory 206 and persistent storage 208 are examples of storage devices. A storage device is any piece of hardware that is capable of storing information either on a temporary basis and/or a permanent basis. Memory 206, in these examples, may be, for example, a random access memory or any other suitable volatile or non-volatile storage device. Persistent storage 208 may take various forms depending on the particular implementation. For example, persistent storage 208 may contain one or more components or devices. For example, persistent storage 208 may be a hard drive, a flash memory, a rewritable optical disk, a rewritable magnetic tape, or some combination of the above. The media used by persistent storage 208 also may be removable. For example, a removable hard drive may be used for persistent storage 208.
Communications unit 210, in these examples, provides for communications with other data processing systems or devices. In these examples, communications unit 210 is a network interface card. Communications unit 210 may provide communications through the use of either or both physical and wireless communications links.
Input/output unit 212 allows for input and output of data with other devices that may be connected to data processing system 200. For example, input/output unit 212 may provide a connection for user input through a keyboard and mouse. Further, input/output unit 212 may send output to a printer. Display 214 provides a mechanism to display information to a user.
Instructions for the operating system and applications or programs are located on persistent storage 208. These instructions may be loaded into memory 206 for execution by processor unit 204. The processes of the different embodiments may be performed by processor unit 204 using computer implemented instructions, which may be located in a memory, such as memory 206. These instructions are referred to as program code, computer-usable program code, or computer-readable program code that may be read and executed by a processor in processor unit 204. The program code in the different embodiments may be embodied on different physical or tangible computer-readable media, such as memory 206 or persistent storage 208.
Program code 216 is located in a functional form on computer-readable media 218 that is selectively removable and may be loaded onto or transferred to data processing system 200 for execution by processor unit 204. Program code 216 and computer-readable media 218 form computer program product 220 in these examples. In one example, computer-readable media 218 may be in a tangible form, such as, for example, an optical or magnetic disc that is inserted or placed into a drive or other device that is part of persistent storage 208 for transfer onto a storage device, such as a hard drive that is part of persistent storage 208. In a tangible form, computer-readable media 218 also may take the form of a persistent storage, such as a hard drive, a thumb drive, or a flash memory that is connected to data processing system 200. The tangible form of computer-readable media 218 is also referred to as computer-recordable storage media. In some instances, computer-recordable media 218 may not be removable.
Alternatively, program code 216 may be transferred to data processing system 200 from computer-readable media 218 through a communications link to communications unit 210 and/or through a connection to input/output unit 212. The communications link and/or the connection may be physical or wireless in the illustrative examples. The computer-readable media also may take the form of non-tangible media, such as communications links or wireless transmissions containing the program code. The different components illustrated for data processing system 200 are not meant to provide architectural limitations to the manner in which different embodiments may be implemented. The different illustrative embodiments may be implemented in a data processing system including components in addition to or in place of those illustrated for data processing system 200. Other components shown in
In another example, a bus system may be used to implement communications fabric 202 and may be comprised of one or more buses, such as a system bus or an input/output bus. Of course, the bus system may be implemented using any suitable type of architecture that provides for a transfer of data between different components or devices attached to the bus system. Additionally, a communications unit may include one or more devices used to transmit and receive data, such as a modem or a network adapter. Further, a memory may be, for example, memory 206 or a cache such as found in an interface and memory controller hub that may be present in communications fabric 202.
Computer program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object-oriented programming language such as Java™, Smalltalk, C++ or the like, and conventional procedural programming languages, such as the “C” programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. 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 made to an external computer (for example, through the Internet using an Internet Service Provider).
Those of ordinary skill in the art will appreciate that the hardware in
As will be seen, the techniques described herein may operate in conjunction within the standard client-server paradigm such as illustrated in
By way of additional background, deep learning is a type of machine learning framework that automatically learns hierarchical data representation from training data without the need to handcraft feature representation. Deep learning methods are based on learning architectures called deep neural networks (DNNs), which are composed of many basic neural network units such as linear perceptrons, convolutions and non-linear activation functions. Theses network units are organized as layers (from a few to more than a thousand), and they are trained directly from the raw data to recognize complicated concepts. Lower network layers often correspond with low-level features (e.g., in image recognition, such as corners and edges of images), while the higher layers typically correspond with high-level, semantically-meaningful features.
Specifically, a deep neural network (DNN) takes as input the raw training data representation and maps it to an output via a parametric function. The parametric function is defined by both the network architecture and the collective parameters of all the neural network units used in the network architecture. Each network unit receives an input vector from its connected neurons and outputs a value that will be passed to the following layers. For example, a linear unit outputs the dot product between its weight parameters and the output values of its connected neurons from the previous layers. To increase the capacity of DNNs in modeling the complex structure in training data, different types of network units have been developed and used in combination of linear activations, such as non-linear activation units (hyperbolic tangent, sigmoid, Rectified Linear Unit, etc.), max pooling and batch normalization. If the purpose of the neural network is to classify data into a finite set of classes, the activation function in the output layer typically is a softmax function, which can be viewed as the predicted class distribution of a set of classes.
Prior to training the network weights for a DNN, an initial step is to determine the architecture for the model, and this often requires non-trivial domain expertise and engineering efforts. Given the network architecture, the network behavior is determined by values of the network parameters, θ. More formally, let D={xi,i}Ti=1 be the training data, where i∈[0, n−1] is a ground truth label for xi, the network parameters are optimized to minimize a difference between the predicted class labels and the ground truth labels based on a loss function. Currently, the most widely-used approach for training DNNs is a back-propagation algorithm, where the network parameters are updated by propagating a gradient of prediction loss from the output layer through the entire network. Most commonly-used DNNs are feed-forward neural networks, wherein connections between the neurons do not form loops; other types of DNNs include recurrent neural networks, such as long short-term memory (LSTM), and these types of networks are effective in modeling sequential data.
Referring now to
The nomenclature used in the above-described threat model (or in this disclosure generally) is not intended to be limiting. A model owner may be any person or entity having a proprietary interest in the model, e.g., but without limitation, its creator, designer or developer. As used herein, ownership is not necessarily tantamount to a legal right, although this will be the usual scenario. Ownership may also equate to provenance, source of origin, a beneficial or equitable interest, or the like. More generally, the threat model involves first and second entities, wherein as between the two entities the first entity has the greater (legal, equitable or other permissible) interest in the model, and it is desired to determine whether the second entity has obtained access to the model in contravention of the first entity's greater interest. In a typical scenario, the second entity has copied the model without the first entity's consent.
The nature of the training data used to train the DNN of course depends on the model's purpose. As noted above, deep neural networks have been proven useful for a variety of tasks, such as image recognition, speech recognition, natural language processing, and others. For ease of explanation, the remainder of this disclosure describes a DNN used to facilitate image recognition. Thus, the training data is described as being a set of images, and typically the DNN model is a feed-forward network. Other deep learning tasks, training data sets, DNN modeling approaches, etc. can leverage the technique as well.
The DNN 400 is trained using a training data set, thereby resulting in generation of a set of weights corresponding to the trained DNN. As used herein, the neurons of the DNN that has been trained are sometimes referred to as “real” neurons. Real neurons may also correspond to all of the neurons of a pre-trained network.
As depicted in
With the above as background, the technique of this disclosure is now described. In this approach, a DNN such as depicted in
In one embodiment, the key K is a binary matrix {0, 1} that zeros (masks) out certain neurons in the network, thereby protecting the network. In another embodiment, the key comprises a matrix of sign values {−1, +1}. In still another embodiment, the key comprises a set of real values, e.g., a matrix R. While masking one or more neurons using a simple key K such as described secures the model (or at least some portion thereof), a preferred approach according to this disclosure is to utilize a key that itself is generated securely. Thus, the key K may be a secret key derived by applying a key derivation function (KDF) to a given password or other secret value (a passphrase, another key, etc.). In cryptography, a KDF derives the secret key typically using a pseudorandom function, such as a keyed cryptographic hash function. The password or other secret value applied to the KDF may itself comprise a set of parameters. Preferably, the key K is symmetric, such that the same key used to protect the model weight matrix X is also useful for recovery of that matrix, e.g., by computing the Hadamard product.
Generalizing, according to this disclosure a machine learning model is secured by applying a given function or transformation (K) over a matrix of model weights, and then re-applying that transformation to cover the original model. The transformation (K) itself may be derived from another password or secret. Because the key (K) has the same dimension as the set of model weights to which it is applied and is also used to recover the original weights, the transformation can be analogized to a one-time pad (OTP). In cryptography, a one-time pad is a system in which a private key generated randomly is used only once to encrypt a message that is then decrypted by the receiver using a matching one-time pad and key.
According to a further aspect, different parts of the network (having different keys K associated therewith) can be trained for different purposes, such as solving a same problem but with a first key K1 that minimizes a loss function, and a second key K2 that maximizes the loss function. This example (minimizing and maximizing the loss function is just exemplary). In the alternative, the model with different keys are trained on two or more distinct data sets. For example, if G (x, θ)=y is the neural network where θ are the model parameters (weights) and x is the input, then G (x, F (K1, θ)) represents the network being trained for one function, G (x, F (K2, θ)) is then network trained for a second function, G (x, θ) is the network trained from a third function, and so forth. As a more specific example, G (x, θ) is trained to maximize the loss for training labels Y, while G (x, F (K1, θ)) is trained to minimize the loss.
As a further variant, although not required (especially if the network has additional capacity, as most do), the model itself may be modified by including one or more neurons (or one or more layers of such neurons) that are other than the real neurons in the originally trained model. The result is a modified version of the original DNN, and this modified version is referred to herein as a modified DNN. The additional neurons are embedded (sometimes referred to as being placed, injected, positioned, etc.) into the DNN such that the topology of the original DNN remains intact, albeit in a manner that is not readily ascertainable from an examination of the modified DN itself. In other words, the modified DNN itself has a topology, but the topology of the modified DNN does not expose the topology of the underlying (original DNN). In this manner, the modified DNN is sometimes said to “contain” the original DNN. In this embodiment, the key (K) may be a binary matrix (as described above), but the binary values are not necessarily random. Rather, in this embodiment, preferably either the 0's or the 1's (as the case may be) are positioned in the key matrix to correspond to the locations in the modified DNN corresponding to the additional neurons. In other words, each of the added neurons is assigned, say, a “0” value, and the locations of the actual neurons are assigned the “1” value. Then, when the key (K) is later re-applied to recover the original matrix, the Hadamard product accounts for the “0” values (and masks them) out, leaving the original matrix.
Referring now to
As the example scenario in
According to this disclosure, and in order to ensure the security of the locked matrix, the key (K) itself must be secured. The model key K is maintained confidential in many different ways. In one embodiment, the key itself is encrypted using a symmetric key. Another approach applies a private key of an asymmetric key pair to the key K. Another approach is to maintain the key (K) in a protected enclave (e.g., Intel® SGX). The enclave may comprise part of a trusted computing environment that also generates and/or processes the model. Generalizing, the K used to create the locked matrix should be protected against disclosure using secure hardware, cryptographic, or other hardware and/or software protection mechanisms.
The technique herein leverages Kerckhoffs's principle, namely, that the cryptosystem described herein is still secure even if everything about the system, except the model key, is publicly known or ascertainable. In effect, the model key (however formulated) is used to deactivate certain neurons when bootstrapping the model for classification.
Generalizing, upon a determination that a query directed to the model is authorized, the key is applied to the locked matrix to recover the original matrix (and thus provide an assurance that intended behavior of the DNN has not been compromised, and input data associated with the query is applied against the DNN. If, however, the query directed to the model is not authorized (for whatever reason), the input data associated with the query is applied against a model corresponding to the locked matrix, with the result being a behavior that is different from that of the network. In the latter case, the suspect user does not obtain access to the original network, and an indication may also be provided that the intellectual property in the DNN has been compromised.
As noted above, the approach herein provides a general framework to protect the DNN even if the model and its weights are public. The technique works by using the key (K) in effect to mask the true topology of the DNN, and only one who possesses or can obtain the keying material has the ability to recover the original weights, thereby obtaining the true behavior of the DNN. A model implementing the locked matrix may provide what appears to be a useful output, but it is an output that differs from that which would be provided if the original weights of the DNN are used. In this approach, attackers running input data through a model based on the locked matrix can only obtain pre-defined, fake functions from the model because they cannot distinguish which neurons are masked (or are real ones, when the additional neurons are added in the variant embodiment). In effect, the approach herein serves to deceive attackers, and protects the original model from attack (either insider-based or otherwise). By using this approach, the true weights of the DNN are concealed from any entity that does not have authorized access to the key. In the event of model theft, an attacker is unable to recover the original DNN function (and its predictions) because the key needed to unlock the original DNN weights is not ascertainable or otherwise known.
The technique herein protects the intellectual property of deep neural networks once those models are leaked or copied and deployed as online services.
One or more aspects of this disclosure may be implemented as-a-service, e.g., by a third party that performs model verification testing on behalf of owners or other interested entities. The subject matter may be implemented within or in association with a data center that provides cloud-based computing, data storage or related services.
In a typical use case, a SIEM or other security system has associated therewith an interface that can be used to issue the API queries, and to receive responses to those queries. The client-server architecture as depicted in
The approach herein is designed to be implemented on-demand, or in an automated manner.
Access to the service for model generation, training, key generation, or query processing, may be carried out via any suitable request-response protocol or workflow, with or without an API.
The functionality described in this disclosure may be implemented in whole or in part as a standalone approach, e.g., a software-based function executed by a hardware processor, or it may be available as a managed service (including as a web service via a SOAP/XML interface). The particular hardware and software implementation details described herein are merely for illustrative purposes are not meant to limit the scope of the described subject matter.
More generally, computing devices within the context of the disclosed subject matter are each a data processing system (such as shown in
The scheme described herein may be implemented in or in conjunction with various server-side architectures including simple n-tier architectures, web portals, federated systems, and the like. The techniques herein may be practiced in a loosely-coupled server (including a “cloud”-based) environment.
Still more generally, the subject matter described herein can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment containing both hardware and software elements. In a preferred embodiment, the function is implemented in software, which includes but is not limited to firmware, resident software, microcode, and the like. Furthermore, as noted above, the identity context-based access control functionality can take the form of a computer program product accessible from a computer-usable or computer-readable medium providing program code for use by or in connection with a computer or any instruction execution system. For the purposes of this description, a computer-usable or computer readable medium can be any apparatus that can contain or store the program for use by or in connection with the instruction execution system, apparatus, or device. The medium can be an electronic, magnetic, optical, electromagnetic, infrared, or a semiconductor system (or apparatus or device). Examples of a computer-readable medium include a semiconductor or solid state memory, magnetic tape, a removable computer diskette, a random access memory (RAM), a read-only memory (ROM), a rigid magnetic disk and an optical disk. Current examples of optical disks include compact disk-read only memory (CD-ROM), compact disk-read/write (CD-R/W) and DVD. The computer-readable medium is a tangible item.
In a representative embodiment, the techniques described herein are implemented in a special purpose computer, preferably in software executed by one or more processors. The software is maintained in one or more data stores or memories associated with the one or more processors, and the software may be implemented as one or more computer programs. Collectively, this special-purpose hardware and software comprises the functionality described above.
While the above describes a particular order of operations performed by certain embodiments, it should be understood that such order is exemplary, as alternative embodiments may perform the operations in a different order, combine certain operations, overlap certain operations, or the like. References in the specification to a given embodiment indicate that the embodiment described may include a particular feature, structure, or characteristic, but every embodiment may not necessarily include the particular feature, structure, or characteristic.
Finally, while given components of the system have been described separately, one of ordinary skill will appreciate that some of the functions may be combined or shared in given instructions, program sequences, code portions, execution threads, and the like.
The techniques herein provide for improvements to another technology or technical field, e.g., deep learning systems, other security systems, as well as improvements to automation-based cybersecurity analytics.
The techniques described herein are not limited for use with a deep neural network (DNN) model. The approach may be extended to any machine learning model including, without limitation, a Support Vector Machine (SVM), a logistical regression (LR) model, and the like, that has weights, and the approach may also be extended to use with decision tree-based models.
Also, while the Hadamard product is a preferred way to generate and unlock the model weight matrix, other matrix-based computations may be used provided they respect the dimensionality requirement described.