Hardware accelerator and method of operating hardware accelerator

CN118643486APending Publication Date: 2024-09-13NXP BV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410242570.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-03-13
Filing Date
2024-03-04
Publication Date
2024-09-13

Smart Images

  • Figure CN118643486A
    Figure CN118643486A
Patent Text Reader

Abstract

According to a first aspect of the present disclosure, there is provided a hardware accelerator comprising: an execution unit configured to execute at least one artificial intelligence (AI) model using one or more resources of the hardware accelerator; a watermark verification unit configured to verify whether a predefined watermark exists in the AI model and output a verification result indicating whether the watermark exists; and the resource management unit is configured to enable the resource under the condition that the verification result indicates that the watermark exists. Further aspects of the present disclosure relate to a corresponding method of operating a hardware accelerator, and a computer program for performing the method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to a hardware accelerator. In addition, the present disclosure relates to a corresponding method for operating a hardware accelerator and a computer program for implementing the method. Background Art

[0002] Hardware accelerators used in artificial intelligence (AI) applications are often independent of the AI ​​models they execute. This can lead to security risks because hardware accelerators are unable to distinguish between real AI models and copied or cloned AI models. More specifically, it can be difficult to ensure that AI models undergo a specific development process or tool chain (e.g., security or safety applications, permission to use special hardware features, etc.) to benefit from certain resources (e.g., hardware features). Summary of the invention

[0003] According to a first aspect of the present disclosure, a hardware accelerator is provided, comprising: an execution unit configured to execute at least one artificial intelligence (AI) model using one or more resources of the hardware accelerator; a watermark verification unit configured to verify whether a predefined watermark exists in the AI ​​model and output a verification result indicating whether the watermark exists; and a resource management unit configured to enable the resource if the verification result indicates that the watermark exists.

[0004] In one or more embodiments, the resource management unit is configured to deactivate the resource if the verification result indicates that the watermark is not present.

[0005] In one or more embodiments, the resource management unit is additionally configured to prevent the execution unit from executing the AI ​​model if the verification result indicates that the watermark is not present.

[0006] In one or more embodiments, the watermark includes predefined pairs of inputs and expected outputs of the AI ​​model.

[0007] In one or more embodiments, the expected outputs form part of a single output class.

[0008] In one or more embodiments, the watermark verification unit is configured to verify whether the watermark is present during hardware accelerator startup, periodically during hardware accelerator operation, or upon request of a host processor.

[0009] In one or more embodiments, the resource management unit is additionally configured to adjust the execution speed and / or power profile of the execution unit according to the verification result.

[0010] In one or more embodiments, the resource management unit is further configured to issue a warning if the verification result indicates that the watermark is not present.

[0011] In one or more embodiments, the watermark verification unit is configured to verify whether the predefined watermark exists in the AI ​​model using the protected data.

[0012] In one or more embodiments, the protected data includes data protected by a cryptographic signature.

[0013] According to a second aspect of the present disclosure, a method for operating a hardware accelerator is contemplated, the method comprising: a watermark verification unit included in the hardware accelerator verifies whether a predefined watermark exists in an artificial intelligence (AI) model and outputs a verification result indicating whether the watermark exists; a resource management unit included in the hardware accelerator enables one or more resources of the hardware accelerator when the verification result indicates that the watermark exists; and an execution unit included in the hardware accelerator executes the AI ​​model using the resources.

[0014] In one or more embodiments, the resource management unit deactivates the resource if the verification result indicates that the watermark does not exist.

[0015] In one or more embodiments, the resource management unit prevents the execution unit from executing the AI ​​model if the verification result indicates that the watermark does not exist.

[0016] In one or more embodiments, the watermark includes predefined pairs of inputs and expected outputs of the AI ​​model.

[0017] According to a third aspect of the present disclosure, there is provided a computer program comprising executable instructions which, when executed by a hardware accelerator, implement a method of the kind set forth. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The embodiments will be described in more detail with reference to the accompanying drawings.

[0019] Figure 1 An illustrative embodiment of a hardware accelerator is shown.

[0020] Figure 2 An illustrative embodiment of a method of operating a hardware accelerator is shown. DETAILED DESCRIPTION

[0021] As mentioned above, hardware accelerators used in AI applications are typically unrelated to the AI ​​models they execute. This can lead to security risks because hardware accelerators are unable to distinguish between real AI models and copied or cloned AI models. More specifically, it may be difficult to ensure that the AI ​​model undergoes a specific development process or tool chain (e.g., security or security applications, permission to use special hardware functions, etc.) to benefit from certain resources (e.g., hardware features). In addition, signature-based authentication methods that can be used to identify and authenticate models and then enable or disable certain resources may be difficult to implement in decentralized machine learning operations (MLOp). In such operations, local training or tuning of the model may be required, which may negatively affect the robustness of the authentication method.

[0022] A hardware accelerator and a corresponding method of operating a hardware accelerator are now discussed, the method facilitating authenticating an AI model executed on the hardware accelerator, and selectively enabling resources based on the authentication results.

[0023] Figure 1 An illustrative embodiment of a hardware accelerator 100 is shown. The hardware accelerator 100 includes an execution unit 102, one or more resources 104, a watermark verification unit 106, and a resource management unit 108. The execution unit 102 is configured to execute at least one AI model 110 using the one or more resources 104. In addition, the watermark verification unit 106 is configured to verify whether a predefined watermark 112 exists in the AI ​​model 110, and output a verification result indicating whether the watermark 112 exists. In addition, the resource management unit 108 is configured to enable the resource 104 if the verification result indicates that the watermark 112 exists. In this way, the AI ​​model 110 can be authenticated in a robust manner. It should be noted that although the execution unit 102, the watermark verification unit 106, and the resource management unit 108 have been shown as separate functional units, some or all of these units may be integrated into a single hardware instance. The resource 104 may be a hardware resource (i.e., a hardware feature) of the hardware accelerator 100. Non-limiting examples of such resources are: one or more processing elements (PEs) optimized to perform multiply-accumulate operations, look-up tables (LUTs) storing values ​​of activation functions, systolic dataflow architectures, convolutional PEs, in-memory computing architectures, and other specialized hardware structures.

[0024] In one or more embodiments, the resource management unit is configured to disable the resource if the verification result indicates that the watermark is not present. In this way, the copied or cloned AI model can be easily prevented from being correctly executed. In one or more embodiments, the resource management unit is additionally configured to prevent the execution unit from executing the AI ​​model if the verification result indicates that the watermark is not present. This can be achieved by, for example, discarding input data and setting a signal (e.g., a register value) to indicate an error to the software application running on the main processing core. In this way, the copied or cloned AI model can be easily prevented from being executed entirely.

[0025] In one or more embodiments, the watermark comprises predefined pairs of inputs and expected outputs of the AI ​​model. For example, if the visual input is classified, a preselected image (e.g., a specific image of a cup) can be used to produce a specific classification output (e.g., the cup is classified as an "airplane"). In this way, the robustness of the authentication can be further increased. In a feasible embodiment, the expected output forms part of a single output class. Furthermore, in a feasible embodiment, the watermark verification unit is configured to verify whether the watermark exists during hardware accelerator startup, periodically during hardware accelerator operation, or upon request of the host processor.

[0026] In one or more embodiments, the resource management unit is further configured to adjust the execution speed and / or power distribution of the execution unit according to the verification result. In this way, the execution speed and / or power distribution can be optimized for the execution of the successfully verified AI model. This helps to ensure that, for example, customers who only use advanced versions of development tools benefit from the full speed and / or low power potential of the hardware: advanced versions of tools can automatically embed watermarks, thereby unlocking full speed and / or low power potential. In one or more embodiments, the resource management unit is further configured to issue a warning if the verification result indicates that the watermark does not exist. In this way, appropriate actions can be triggered in the case of copied or cloned AI models. In addition, in one or more embodiments, the watermark verification unit is configured to use protected data to verify whether a predefined watermark exists in the AI ​​model. In this way, it is unlikely that the authentication of the AI ​​model can be circumvented. In one or more embodiments, the protected data includes data protected by a cryptographic signature. Specifically, the cryptographic signature provides a high level of protection for the data used to verify the watermark.

[0027] Figure 2An illustrative embodiment of a method 200 for operating a hardware accelerator is shown. The method 200 includes the following steps. At 202, a watermark verification unit included in the hardware accelerator verifies whether a predefined watermark exists in the AI ​​model and outputs a verification result indicating whether the watermark exists. At 204, a resource management unit included in the hardware accelerator enables one or more resources if the verification result indicates that the watermark exists. In addition, at 206, an execution unit included in the hardware accelerator executes the AI ​​model using the resources. Similar to Figure 1 According to the corresponding embodiment of the hardware accelerator shown in , method 200 helps to authenticate the AI ​​model in a robust and convenient manner.

[0028] According to the present disclosure, a predefined watermark can be embedded in a neural network. Subsequently, this embedded watermark can be used to authenticate the model. The watermark can be based on a typical watermarking scheme for neural networks, with the goal of providing a means for model developers to prove that a given model is a copy or clone of the model they developed. Some watermarks can be embedded directly in the model parameters. For example, an arbitrary bit string (i.e., a watermark) can be embedded in the weights of the model. Another type of watermarking scheme works by embedding hidden functionality in the model. This hidden functionality can be triggered by a specially crafted input (called a trigger input). An example of this watermarking scheme is described in the paper "Protecting Intellectual Property of Deep Neural Networks with Watermarking" edited by Jialong Zhang et al. and published in the Proceedings of the Asian Conference on Computer and Communications Security (2018) (pp. 159-172, https: / / doi.org / 10.1145 / 3196494.3196550). This type of watermarking scheme may provide high robustness against small changes to the model.

[0029] Thus, watermarking can be used to embed identifying information into the functional structure of the model. The accelerator itself can then verify the presence of the watermark to selectively enable or disable specific ones of its resources. The accelerator can also refuse to process models that show or are missing specific watermarks and issue an error or warning to the host processor. For use scenarios where a given model is locally retrained (e.g., to recognize the owner's voice), the local retraining should maintain the watermarks of the original base model. To this end, a trigger-based watermarking scheme can be used. More specifically, a watermarking scheme can be used that specifies a trigger set consisting of specially crafted inputs and a target functionality on this trigger set. In a practical implementation, this functionality requires mapping all inputs from the trigger set to a single selected output class.

[0030] Unlike signature-based model authentication methods, the currently disclosed method allows changes to be made to the model to adapt to local conditions. Specifically, a base model can be trained and a watermark can be injected during the training process. The device can then be deployed to an application, where the base model is stored in the memory of the device. Once the device begins operation, it can retrain, calibrate, or fine-tune its stored base model to adapt to local operating conditions (e.g., learning the face or voice of the owner of the residence). During normal device operation, the accelerator injects inputs that reveal watermarks into its operating pipeline and monitors the outputs to see the appearance of watermarks. This can be done at startup, periodically during operation, or when prompted by the host processor. Depending on the presence of detected watermarks, certain hardware capabilities of the accelerator can be activated (i.e., enabled) or disabled. The accelerator can also change its own execution speed and / or power profile. The accelerator can also send a signal to the host processor, a connected security coprocessor, or a security coprocessor, thereby signaling the presence or absence of a watermark. In addition, the data used to detect watermarks can be kept secure from modification, for example by performing signature checks on expected input-output pairs. To do this, existing methods for signing data can be used, as well as a secure infrastructure to distribute and provision cryptographic keys.

[0031] The systems and methods described herein may be embodied, at least in part, by a computer program or by multiple computer programs, which may exist in a single computer system or across multiple computer systems in various forms in both active and inactive states. For example, they may exist as a software program consisting of program instructions in source code, object code, executable code, or other formats for performing some of the steps described. Any of the above formats may be embodied in compressed or uncompressed form on a computer-readable medium, which may include storage devices and signals.

[0032] As used herein, the term "computer" refers to any electronic device that includes a processor, such as a general-purpose central processing unit (CPU), a special-purpose processor, or a microcontroller. A computer is capable of receiving data (input), performing a series of predetermined operations on the data, and producing results therefrom in the form of information or signals (output). Depending on the context, the term "computer" will mean (specifically) a processor or (more generally) a processor associated with a combination of related elements contained within a single chassis or housing.

[0033] The term "processor" or "processing unit" refers to a data processing circuit, which may be a microprocessor, a coprocessor, a microcontroller, a microcomputer, a central processing unit, a field programmable gate array (FPGA), a programmable logic circuit, and / or any circuit that manipulates signals (analog or digital) based on operating instructions stored in a memory. The term "memory" refers to a storage circuit or multiple storage circuits, such as a read-only memory, a random access memory, a volatile memory, a non-volatile memory, a static memory, a dynamic memory, a flash memory, a cache memory, and / or any circuit that stores digital information.

[0034] As used herein, "computer-readable medium" or "storage medium" may be any means that may contain, store, communicate, propagate, or transport a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer-readable medium may be, for example but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, device, or propagation medium.

[0035] It should be noted that the above embodiments have been described with reference to different subject matters. Specifically, some embodiments may have been described with reference to method claims, while other embodiments may have been described with reference to apparatus claims. However, those skilled in the art will appreciate from the above that, unless otherwise indicated, any combination of features relating to different subject matters, in addition to any combination of features belonging to one type of subject matter, in particular a combination of features of a method claim with features of an apparatus claim, is also deemed to be disclosed herein.

[0036] In addition, it should be noted that the drawings are schematic. In different drawings, similar or identical elements are represented by the same reference numerals. In addition, it should be noted that in order to provide a concise description of the illustrative embodiments, the implementation details that belong to the customary practices of technicians may not be described. It should be understood that in the development process of any such implementation, as in any engineering or design project, many implementation-specific decisions must be made to achieve the specific goals of the developer, such as subjecting system-related and business-related constraints, which can change from one implementation to another. In addition, it should be understood that this development work may be complex and time-consuming, but it will still be a common practice for general technicians to engage in design, production and manufacturing.

[0037] Finally, it should be noted that the skilled person will be able to design many alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps other than those listed in the claim. The words "a" or "an" preceding an element do not exclude the presence of a plurality of such elements. The measures recited in the claims may be implemented by means of hardware comprising several different elements and / or by means of a suitably programmed processor. In a device claim listing several components, several of these components may be embodied by the same piece of hardware. The fact that certain measures are recited in mutually different dependent claims does not in itself indicate that a combination of these measures cannot be used to advantage.

[0038] List of reference numerals

[0039] 100 Hardware Accelerator

[0040] 102 Execution Unit

[0041] 104 Resources

[0042] 106 Watermark Verification Unit

[0043] 108 Resource Management Unit

[0044] 110 AI Model

[0045] 112 Watermark

[0046] 200 Methods of operating hardware accelerators

[0047] 202 A watermark verification unit included in the hardware accelerator verifies whether a predefined watermark exists in the AI ​​model, and outputs a verification result indicating whether the watermark exists or not.

[0048] 204. The resource management unit included in the hardware accelerator enables one or more resources if the verification result indicates that the watermark exists.

[0049] 206 The AI ​​model is executed by an execution unit included in the hardware accelerator using the resources.

Claims

1. A hardware accelerator, It is characterized in that include: an execution unit configured to execute at least one artificial intelligence (AI) model using one or more resources of the hardware accelerator; a watermark verification unit configured to verify whether a predefined watermark exists in the AI ​​model and output a verification result indicating whether the watermark exists; A resource management unit is configured to enable the resource if the verification result indicates that the watermark exists.

2. The hardware accelerator according to claim 1, It is characterized in that The resource management unit is configured to deactivate the resource if the verification result indicates that the watermark is not present.

3. The hardware accelerator according to claim 1 or 2, It is characterized in that The resource management unit is further configured to prevent the execution unit from executing the AI ​​model if the verification result indicates that the watermark is not present.

4. A hardware accelerator according to any preceding claim, It is characterized in that The watermarks include predefined pairs of inputs and expected outputs of the AI ​​model.

5. The hardware accelerator according to claim 4, It is characterized in that The expected outputs form part of a single output class.

6. A hardware accelerator according to any preceding claim, It is characterized in that The watermark verification unit is configured to verify whether the watermark is present during startup of the hardware accelerator, periodically during operation of the hardware accelerator, or upon request of a host processor.

7. A hardware accelerator according to any preceding claim, It is characterized in that The resource management unit is further configured to adjust an execution speed and / or a power profile of the execution unit according to the verification result.

8. A hardware accelerator according to any preceding claim, It is characterized in that The resource management unit is further configured to issue a warning if the verification result indicates that the watermark is not present.

9. A method of operating a hardware accelerator, It is characterized in that include: Verifying, by a watermark verification unit included in the hardware accelerator, whether a predefined watermark exists in the artificial intelligence (AI) model, and outputting a verification result indicating whether the watermark exists or not; enabling, by a resource management unit included in the hardware accelerator, one or more resources of the hardware accelerator if the verification result indicates that the watermark exists; The AI ​​model is executed by an execution unit included in the hardware accelerator using the resources.

10. A computer program, It is characterized in that The method comprises executable instructions which, when executed by a hardware accelerator, carry out the method according to claim 9.