Method for encoding the digital signature of a neural network, device and corresponding computer program

The digital signature coding technique for neural networks addresses the issue of watermark robustness by creating a resistant, invisible signature that can detect unauthorized modifications, ensuring easy identification of network origin.

FR3147395A1Active Publication Date: 2024-10-04THALES SA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
FR2023003043
Authority / Receiving Office
FR · FR
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-29
Publication Date
2024-10-04
Estimated Expiration
2043-03-29

AI Technical Summary

Technical Problem

Existing digital watermarking techniques for neural networks are insufficient in robustness and fail to preserve the watermark when the network undergoes significant modifications, such as deletion of layers, retraining, or pruning, making it difficult to identify the origin of a stolen neural network.

Method used

A digital signature coding technique for neural networks that involves extracting a binary signature image from parameter blocks using predetermined factors, combining it with a reference binary image through an exclusive or operation, and iteratively applying this process across multiple blocks to create a coded binary image that remains invisible yet resistant to modifications.

Benefits of technology

The method effectively identifies unauthorized modifications or appropriations of neural networks by visually comparing the induced reference binary image with the original, providing robust protection and easy identification of network origin.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

Method for encoding the digital signature of a neural network, device and corresponding computer program. The invention relates to a method for encoding the digital signature of a neural network, implemented by an electronic device, said neural network being stored within a data structure comprising parameter blocks. Such a method comprises, for a current parameter block (PB) comprising at least M parameters representing real numbers: a step of obtaining (A10) a binary signature image (BSIg) from the digital signature comprising a set of bits extracted from the parameters of the current parameter block; a step of combining (A20) the binary signature image (BSIg) with a reference binary image (RBI) yielding a coded binary image (BCI). Figure for the abstract: Fig. 2
Need to check novelty before this filing date? Find Prior Art

Description

Title of the invention: Method for encoding a digital signature of a neural network, device and corresponding computer program

[0001] The present invention relates to the field of protection of neural networks. More particularly, the invention relates to the protection of the resulting training data, called parameters, which are used for the inference of a neural network.

[0002] Neural networks are increasingly deployed and commercialized in a wide variety of real-world scenarios due to the performances they achieve, notably in classification or prediction tasks. Training a deep neural network is a very expensive process that requires (i) the availability of massive amounts of data, often proprietary, capturing different scenarios within a target application; (ii) significant computing resources; (iii) the assistance of deep learning experts to carefully tune the network topology (e.g., the type and number of hidden layers), and properly set the training hyper-parameters, such as the learning rate, batch size, etc. Therefore, high-performance neural networks require significant investments and must be protected accordingly.This is particularly important when the neural network is implemented within embedded devices: these can be used to recover the neural network and use it in other contexts or other devices.

[0003] To protect neural networks, digital watermarking techniques are known. With these techniques, the trained neural network is marked. A reading process is then used to discover the watermark(s) inserted within the data structure. There are mainly two types of techniques known for watermarking neural networks: so-called "black box" techniques and so-called "white box" techniques.

[0004] In the case of white box watermarking, the watermark decoder extracts the digital watermark(s) from the parameters of the neural network. This may involve extracting a message inserted into the network or detecting a watermark.

[0005] Black box techniques essentially consist of inserting one or more digital tattoos, which are revealed when a specific question is asked to the neural network. During the entire decoding or detection process, the architecture and internal parameters of the neural network are entirely blind to the decoder or detector. In other words, the only elements that can be controlled are the inputs used to query the network and the outputs corresponding to the queries correlating to the requests.

[0006] These two types of techniques can be used for the same neural network. However, it happens that digital tattoos are erased or deleted by attackers. Such a situation occurs when, for example, the initially hacked neural network undergoes too many modifications (deletion of several layers, retraining, pruning, quantization). In such a situation, the watermarking processes (which generally attempt to disrupt the execution of the network as little as possible) may prove insufficient and incapable of allowing the preservation of the watermark. It is therefore necessary to propose a technique that makes it possible to perceive the origin of all or part of a neural network, even if it has undergone significant modifications after it has been stolen.

[0007] One objective of the invention is to propose a white-box neural network digital signature coding technique that solves the problems posed by prior techniques, particularly the problem of robustness. Another objective of the invention is also to provide a technique that makes the comparison between an original network and a stolen network more easily visualizable.

[0008] For this purpose, the invention relates to a method for encoding a digital signature of a neural network, a method implemented by an electronic device, said neural network being recorded within a data structure comprising parameter blocks. Such a method comprises, for a current parameter block comprising at least M parameters representing real numbers: - a step of obtaining a binary signature image from the digital signature comprising a set of bits extracted from the parameters of the current parameter block; - a step of combining the signature binary image with a reference binary image delivering a coded binary image.

[0009] Thus, the claimed method makes it possible to identify the origin of a neural network, for example when it is used in unauthorized devices or during cyberattack analysis operations.

[0010] According to a particular characteristic, the step of obtaining the binary signature image from a set of bits of the parameters of the current parameter block comprises: - a step of determining, from a first predetermined factor, a set of N parameters to be processed, N being less than or equal to M; - a step of obtaining, from at least a second predetermined factor, a set of K bits to be processed, for each of the parameters of said set of N parameters to be processed, delivering a set of P bits; - a step of creating, from the P bits of the set of bits, the binary signature image;

[0011] According to a particular characteristic, characterized in that the step of combining the signature binary image with the reference binary image comprises, for each bit of the reference binary image, the calculation of a combined bit using a corresponding bit of the signature binary image.

[0012] According to a particular characteristic, the calculation of the combined bit preferably consists of an “exclusive or” operation.

[0013] According to a particular characteristic, the method is iteratively implemented on a plurality of parameter blocks of the neural network, delivering a plurality of characteristic binary images, each associated with a parameter block.

[0014] According to another aspect, the disclosure relates to a method for decoding a digital signature of a neural network, method implemented by an electronic device, said neural network being recorded within a data structure comprising parameter blocks. Such a method comprises, for a current parameter block comprising at least M parameters representing real numbers: - a step of obtaining a binary signature image from a signature comprising a set of bits extracted from the parameters of the current parameter block; - a step of combining the signature binary image with a coded binary image associated with the current parameter block, delivering an induced reference binary image.

[0015] According to a particular characteristic, the step of obtaining the binary signature image comprises the following steps: - obtaining a first predetermined factor relating to the determination of N parameters to be selected, at least a second predetermined factor relating to the obtaining of the K bits to be processed and a coded binary image of the current parameter block; - obtaining, from said at least one predetermined factor, a set of K bits to be processed, for each of the parameters of said set of N parameters to be processed, delivering a set of P bits; - creation, from the P bits of the set of bits, of a binary signature image;

[0016] According to a particular characteristic, the method further comprises a step of comparison of the induced reference binary image with a reference binary image.

[0017] Therefore, it is visually easy for an observer to determine whether a neural network block has been subject to unauthorized modifications or unauthorized appropriation.

[0018] According to another aspect, the disclosure also relates to an electronic device for encoding a digital signature of a neural network, said neural network being recorded within a data structure comprising parameter blocks. Such a device comprises, for a current parameter block comprising at least M parameters representing real numbers: - means for obtaining a binary signature image from the digital signature comprising a set of bits extracted from the parameters of the current parameter block; - means for combining the signature binary image with a reference binary image delivering a coded binary image.

[0019] According to another aspect, the disclosure also relates to an electronic device for decoding a digital signature of a neural network, said neural network being recorded within a data structure comprising parameter blocks. Such a device comprises, for a current parameter block comprising at least M parameters representing real numbers: - means for obtaining a binary signature image from a set of bits of the parameters of the current parameter block; - means for combining the signature binary image with a coded binary image associated with the current parameter block, delivering an induced reference binary image.

[0020] According to a preferred implementation, the various steps of the disclosed methods are implemented by one or more software or computer programs, comprising software instructions intended to be executed by a data processor of a relay module according to the disclosure and being designed to control the execution of the various steps of the methods. Consequently, the disclosure also relates to a program, capable of being executed by a computer or by a data processor, this program comprising instructions for controlling the execution of the steps of the methods as mentioned herein, when they are executed by a terminal and / or by an integrated circuit. This program can use any programming language, and be in the form of source code, object code, or intermediate code between source code and object code, such as in a partially compiled form, or in any other desirable form.The disclosure also relates to an information medium readable by a data processor, and . comprising instructions of a program as mentioned above. The information carrier may be any entity or device capable of storing the program. For example, the carrier may comprise a storage means, such as a ROM, for example a CD ROM or a microelectronic circuit ROM, or a magnetic recording means, for example a hard disk, a flash memory or a memory of a storage of another type. On the other hand, the information carrier may be a transmissible medium such as an electrical or optical signal, which may be conveyed via an electrical or optical cable, by radio or by other means. The program according to the disclosure may in particular be downloaded from a network such as the Internet. Alternatively, the information carrier may be an integrated circuit in which the program is incorporated, the circuit being adapted to execute or to be used in the execution of the method in question.According to one embodiment, the disclosure is implemented by means of software and / or hardware components. In this regard, the term "module" may correspond in this document to a software component, a hardware component or a set of hardware and software components. A software component corresponds to one or more computer programs, one or more sub-programs of a program, or more generally to any element of a program or software capable of implementing a function or a set of functions, according to what is described below for the module concerned. Such a software component is executed by a data processor of a physical entity (terminal, server, gateway, router, etc.) and is likely to access the hardware resources of this physical entity (memories, recording media, communication buses, electronic input / output cards, user interfaces, etc.).In the same way, a hardware component corresponds to any element of a hardware assembly capable of implementing a function or a set of functions, according to what is described below for the module concerned. It may be a programmable hardware component or one with an integrated processor for executing software, for example an integrated circuit, a smart card, a memory card, an electronic card for executing firmware, etc. Each component of the assembly previously described of course implements its own software modules. The different examples of embodiment and characteristics mentioned can be combined with each other for the implementation of the disclosure.

[0021] Other characteristics and advantages of the invention will emerge from the description given below, for information purposes only and in no way limiting, with reference to the appended figures, among which: - [Fig.l] illustrates a digital signature coding device implementing the invention according to an exemplary embodiment; - [Fig.2] illustrates a method of encoding a digital signature of a network of neurons; - [Fig.3] illustrates an example of implementation of the coding method of digital signature of a neural network; - [Fig.4] illustrates a method of encoding a digital signature of a network of neurons; - [Fig.5] illustrates an example of implementation of the decoding method of digital signature of a neural network. Reminders of the principle

[0022] As explained above, an object of the invention is to have a technique for encoding a digital signature of a neural network, a technique implemented in a white box, which offers increased resistance to attacks that a neural network may be subject to, particularly in an embedded implementation context. Another object of the present invention is thus to make it possible to more effectively identify a neural network that has been extracted from an embedded device, then modified and reinserted into another embedded device, by an attacker who wishes to divert the use of a neural network that does not belong to him, modify a neural network to distort its results (for example to carry out a cyberattack) or even make savings by appropriating the research and development work carried out by a competitor.

[0023] The general principle of the invention consists of extracting, from at least one block of parameters of the neural network (previously trained), a signature (taking the form of an image), from selected bits of the parameters (digital values) recorded in the parameter blocks. The invention thus relates to a method for encoding a digital signature of a neural network (previously trained) comprising a set of parameter blocks, the parameter blocks comprising parameters of the neural network. These parameters are for example parameters which have been the subject of training, such as the weights of the layers, the biases, the tensor values, the normalization values, the convolution values, etc. Thus, at least some of the parameter blocks each comprise a set of parameters, the number of which varies depending on the block in question.In an exemplary embodiment, the parameter blocks comprise floating point values ​​of a predetermined number of bits (e.g. 16, 32 or 64 bits). In other words, each of these floating point values ​​is for example stored on two, four or eight bytes (within a given block, all the values ​​are encoded on the same number of bits or bytes). The digital signature encoding method of the invention is executed on these parameter blocks to extract, from them, a secret signature. The method is for example implemented on a network of . neurons saved in onnx format, which has the advantage of having numerous APIs for access and modification, regardless of the programming languages ​​used.

[0024] [Fig.l] schematically illustrates an electronic digital signature coding device. The electronic digital signature coding device 2 comprises a module (20) for obtaining bits to be processed (Sbts); a module (40) for processing the bits to be processed (Sbts) according to at least one secret data (which are also called factors) as shown in [Fig.l].

[0025] In the example of [Fig.l], the digital signature coding device 2 comprises an electronic memory unit 16, at least one calculation processor 18 and an interface 60 for communication with remote devices, by a chosen communication protocol, for example a wired protocol and / or a radio communication protocol. The elements of the device 2 are adapted to communicate via a communication bus 15.

[0026] In the example of [Fig.l], the module (20) for obtaining bits to be processed (Sbts), the module (40) for processing the bits to be processed (Sbts) as a function of at least one secret data item are each produced in the form of software, or a software brick, executable by the processor. The memory of the electronic digital signature coding device 2 is then capable of storing software (20) for obtaining bits to be processed (Sbts) and software (40) for processing the bits to be processed (Sbts) as a function of at least one secret data item. The processor is then capable of executing each of the software items among the software for obtaining a message to be watermarked (Msg) and the software for modifying parameters from the parameter blocks constituting the neural network.

[0027] In a variant not shown, the module (20) for obtaining bits to be processed (Sbts), the module (40) for processing the bits to be processed (Sbts) as a function of at least one secret data item, are each produced in the form of a programmable logic component, such as an FPGA (Field Programmable Gate Array), or an integrated circuit, such as an ASIC (Application Specific Integrated Circuit).

[0028] When the electronic digital signature coding device 2 is produced in the form of one or more software programs, that is to say in the form of a computer program, also called a computer program product, it is furthermore capable of being recorded on a medium, not shown, readable by a computer. The computer-readable medium is for example a medium capable of storing electronic instructions and of being coupled to a bus of a computer system. By way of example, the readable medium is an optical disk, a magneto-optical disk, a ROM memory, a RAM memory, any type of non-volatile memory (for example FLASH or NVRAM) or a magnetic card. On the readable medium is then stored a computer program comprising software instructions.

[0029] In relation to [Fig.2], the method of encoding a digital signature of a neural network is implemented by an electronic device as presented previously. The neural network is recorded within a data structure comprising parameter blocks. The method comprises, for a current parameter block comprising at least M parameters representing real numbers: - a step of obtaining (A10) a binary signature image (IBSig) from a signature comprising a set of bits extracted from the parameters of the current parameter block; - A step of combining (A20) the signature binary image (IBSig) with a reference binary image (IBR) delivering the coded binary image (IBC).

[0030] When the number of parameters recorded in the block is large compared to the reference binary image, a selection of a smaller number of parameters is made within the block, using a first predetermined factor. For the purposes of the present document, it is recalled that a binary image (whether reference, characteristic, signature, etc.) is a two-color matrix image (for example black and white). It is for example coded in a binary form (in base 2), or coded in a more complex form with at least two possible colors (black and white or even in RGB by making a combination of several signatures or portions of a single signature). Generally, a single signature is extracted for a current block of parameters.When the block includes many parameters, it is also possible to construct more than one signature for this block. In this case, for a given block, the step of extracting and encoding the signature is repeated to produce as many complete signatures as necessary. This results in a redundancy of encoded signatures for a given neural network block, as explained in detail later.

[0031] The signature extracted from the parameter bits (real values) of a block can be processed to take several forms. In a first example, the signature can be processed to take the form of an encrypted character string (or the repetition of an encrypted character string). In a second example, the signature can be processed to take the form of an image. In a third example, the signature can be processed to take the form of a transformed image (for example, noisy).

[0032] In the case of the first example, the character string can be constructed in the following manner: a reference character string is determined (for example a string defining a copyright, of the type “TheCompanyl©”. This string can have a determined length (for example six, twelve, eighteen, twenty-four characters). From this reference character string, a detection code error is calculated (CRC, from English for "cyclic redundancy check"). This error detection code is concatenated with the reference character string to form a codeword. This codeword also has a predetermined size. Although not mandatory, the codeword can then be encoded, for example with a reversible pseudo-random transformation and the encoded codeword can constitute the base signature with which the signature extracted from the parameter blocks of the neural network is combined. The encoded codeword is also of predetermined size (for example sixty-four, one hundred twenty-eight or two hundred fifty-six bits).The size of the code word is chosen, initially, according to the circumstances and in particular according to the size of the blocks (for example according to the number of parameters contained in the parameter blocks), so as in particular to allow the complete extraction of at least one occurrence of the signature in the blocks of real values, and thus obtain at least one complete signature in a block.

[0033] In the case of the second example, the image to be extracted as a message can be selected so as to visually reproduce a marking of belonging to an entity (for example the image can be a company logo). The image is selected so that its size in bits is compatible with at least some of the parameter blocks (i.e. it can be combined from the bits extracted from a parameter block). As in the case of the character string, it is also possible to calculate an error-correcting code and / or to transform the image or the encoded code word as in the first example.

[0034] Example of implementation for the coding of signatures of a block of the reference neural network

[0035] In relation to Figures 2 and 3, in an exemplary embodiment, we present the manner in which the signature is extracted from a block of current parameters of the neural network, comprising M different parameters, recorded in the form of real numbers.

[0036] This method comprises: - A determination step Al 1, from a first predetermined factor (seedO) of a set of N parameters to be processed, N being less than or equal to M; - A step A12 of obtaining, from at least a second predetermined factor (seedl), a set of K bits to be processed, for each of the parameters of said set of N parameters to be processed, delivering a set of P bits; - A creation step A13, from the P bits of the set of bits, of a binary signature image (IBSig); - A step of combining A20, the signature binary image (IBSig) with a reference binary image (IBR), delivering the coded binary image (IBC);

[0037] The number of bits K extracted, per parameter, can be identical for all the parameters of a current block or be different for each parameter of the current block. This is determined according to the needs and / or an initial parameter setting (for example a different “seedl” factor for each parameter). In other words, and more concisely, the proposed method consists of combining selected bits (for example in one or more columns of all or part of the parameters of the current parameter block), with a reference image, belonging to the owner of the neural network. This combination delivers a coded binary image which is recorded in a database, with information relating to the current parameter block.This encoded binary image does not necessarily reproduce a visual element. Rather, it appears as indistinct global noise.

[0038] The procedure described above is applied to all or part of the blocks of the neural network for which such an operation is of interest. For example, the blocks in which the values ​​of the parameters are repeated (for example those which mainly comprise one or zero values) are not taken into account for the creation of the characteristic binary images. At the end of the processing of a neural network by the method of the invention, we therefore have a set of characteristic binary images, recorded in a database, each being associated with a particular block (and with a neural network from which these blocks originate).

[0039] In one example, the bits selected in the blocks are mainly high-order bits of the parameters. Thus, we take advantage of the fact that these bits have a lower probability of modification than the low-order bits (in particular during relearning).

[0040] The predetermined factors (“seedO” and “seedl”) are used to select the parameters and the bits of these parameters to be used. Depending on the operational implementation conditions, these factors can be common to all the blocks of the neural network or be individualized, by block. For example, since the size of the blocks can vary within the same neural network, these factors can also vary. In which case, they are saved, within the database with the coded binary image.

[0041] Thus, the digital signature coding of the parameter block is invisible. Indeed, since the creation of the coded binary image does not modify the content of the neural network, it is impossible for an attacker to modify this characteristic image.

[0042] According to the present invention, the step of combining the signature binary image (ISig) with the reference binary image (IBR) comprises an exclusive or (xor) operation between the corresponding bits of each image. In other words, the coordinate bit (0,0) of the signature binary image (ISig) is combined with the coordinate bit (0,0) of the reference binary image (IBR); the coordinate bit (0,1) of the signature binary image (ISig) is combined with the coordinate bit (0,1) of the reference binary image (IBR); etc. The images are of identical size and each bit of the signature binary image (ISig) can be combined with a corresponding bit of the reference binary image (IBR).

[0043] This “exclusive or” operation carried out on the reference binary image (IBR) with the signature binary image (ISig) makes it possible, within the coding, to noise it, randomly using the mask consisting of the signature binary image. This operation can be carried out using other means or other suitable operations. The purpose of this operation is, as indicated, to be able to find all or part of the reference binary image, even for blocks which have undergone transformations, and this in a visual manner. Thus, the method implemented is fast, not very resource-intensive and makes it possible to have signature data which are resistant to modifications made on the neural network.

[0044] Example of decoding the extracted signatures with a modified neural network

[0045] An example of implementation of the method for decoding extracted signatures with a modified neural network is described in relation to Figures 4 and 5. The decoding consists of carrying out a correlation of the bits extracted from a neural network block to be tested. Thus, for a current parameter block of a neural network, which is suspected to belong to a rights holder, the following steps are implemented: - obtaining B11 of the first predetermined factor (seedO) relating to the determination of the N parameters to be selected, of said at least one second predetermined factor (seedl) relating to the obtaining of the K bits to be processed and of the coded binary image (IBC) of the current parameter block (these elements are for example stored in a database); - obtaining B12, from said at least one second predetermined factor (seedl) of a set of K bits to be processed, for each of the parameters of said set of N parameters to be processed, delivering a set of P bits; - creation B13 from the P bits of the set of bits, of a binary signature image (IBSigL); this image represents the signature extracted from the disputed block; - B20 combination of the signature binary image (IBSigL) with the coded binary image (IBC), delivering an induced reference binary image (IBRi).

[0046] Depending on the modifications undergone by the original block of the neural network, The induced reference binary image corresponds, on a varied scale, to the reference binary image (IBR) used during the creation of the signature. The advantage, however, of this decoding is that it allows the extent of the modifications made to the parameter block to be immediately seen, by the appearance of the induced reference binary image (IBRi).

[0047] Let (bri) be a bit of the reference binary image (IBR) and (bs;) the corresponding bit of the signature binary image. - Coding consists of calculating the bit (bc;) of the coded binary image (CBI) by: b ci = bri ® bsi. bci is the coded bit of b'commc this was explained previously;

[0048] To decode bc; we again use the bit bsl; of the binary signature image (IBSigL) extracted from the disputed block and we calculate: brl; = bc; ® bsl; ; - If the bit bsli (of the disputed block) is identical to the bit bs; (of the original block), the result brl; of this decoding operation gives b1,, the bit of the reference binary image (IBR) and the reference binary image is not modified for this bit; - If the bit bsli (of the disputed block) is different from the bit bs; (of the original block), the result brl; of this decoding operation gives the inverse of the bit br;, the bit of the reference binary image (IBR) and the reference binary image is modified for this bit.

[0049] Thus, the decoding operation makes it possible, for a set of bits corresponding to those of the signature of the original block, to recover an induced reference binary image (IBRi) which presents more or less similarity with the coded binary image (IBC) saved for this block. The induced reference binary image (IBRi) can be directly displayed to see the extent of the modifications made to this block of the neural network.

[0050] In one example, each block of the disputed neural network is used to extract a signature binary image for that block. Let a disputed neural network comprise O blocks. Q signature binary images (IBSigL0, ..., IBSigLQ i) are therefore extracted. According to the invention, a correlation is performed between each signature binary image (IBSigL0, ..., IBSigLQ i) of the disputed network and each coded binary image (IBC0, ..., IBCM i) of the original network (which comprises M blocks for which a coded binary image has been coded). In this way, even if the disputed network has undergone transformations consisting, for example, of inverting blocks, of carrying out new training on certain blocks, or of reducing the size of certain blocks, the overall correlation of the network still makes it possible to obtain a visual representation of the similarities between these two networks.

[0051] An error correction based on the set of blocks, for example by majority, by combination or by automatic threshold can also be carried out on the set of affected blocks, in order to recover a more readable version of the image. It is thus possible to observe the presence of the reference binary image (RBI) for several blocks, even in the event of modifications to the parameters of the neural network.

[0052] Selection of optimal bit selection factors

[0053] In a complementary exemplary embodiment, the digital signature coding method described above can be implemented in an optimized manner by selecting, in the parameter blocks, the bit index(es) that best resist the various modifications that the neural network may undergo. More particularly, in this exemplary embodiment, the original neural network (i.e. before implementation of the digital signature coding) constitutes the reference. The method of the invention is implemented iteratively on degraded versions of the neural network to search for and identify an original signature. In other words, the reference neural network is subjected to several modifications (deletion of layers, “pruning”, relearning, etc.).We obtain several degraded versions of the reference neural network (these versions are assumed to be close to those that an attacker could subject the reference neural network to). Once these basic materials are available, we implement at least one iteration of the following procedure: . - Extraction of signatures from the reference neural network, according to the processing method previously presented, using common extraction factors; these extracted signatures are recorded in a database; - For each degraded version of the reference neural network, implementation of the signature correlation, as previously described. The correlation results are recorded for each degraded version of the reference neural network; - Modification of the current extraction factors, consisting for example of a modification of the parameters which are selected in the blocks (modification of seedO for example), modification of the indexes of the bits selected in the parameters (modification of seedl for example).

[0054] Once all the correlation results have been obtained, the extraction factors that best resist the modifications made to the reference neural network are retained and constitute those that are used in operational conditions. Additional marking of documentary fields

[0055] According to an additional feature, the reference neural network can also undergo watermarking including a step of marking documentary fields. Depending on the format used to save the neural network resulting from training, documentary fields are in fact present. For example, the onnx format, contains document fields that can be marked. The following fields can, for example, be modified with a secret character string:

[0056] model.producer_name

[0057] model.producer_version

[0058] model.doc_string

[0059] model.graph.doc_string

[0060] This secret character string can be in the form of an encrypted code word. The advantage of this additional marking is that it does not require modification of the values ​​entered in the neural network. It therefore has no impact on the performance of the neural network. This marking can include a predetermined number of characters, from which an error-correcting code is calculated, the resulting code word being encrypted and encoded in base64 for example.

[0061] Additional characteristics relating to the neural network

[0062] The neural network comprises an ordered succession of layers of neurons, each of which takes its inputs from the outputs of the previous layer.

[0063] More precisely, each layer comprises neurons taking their inputs from the outputs of the neurons of the previous layer, or from the input variables for the first layer.

[0064] Alternatively, more complex neural network structures can be envisaged with a layer that can be connected to a layer further away than the immediately preceding layer.

[0065] Each neuron is also associated with an operation, i.e. a type of processing, to be carried out by said neuron within the corresponding processing layer.

[0066] Each layer is connected to the other layers by a plurality of synapses. A synaptic weight is associated with each synapse, and each synapse forms a connection between two neurons. It is often a real number, which takes both positive and negative values. In some cases, the synaptic weight is a complex number.

[0067] Each neuron is capable of performing a weighted sum of the value(s) received from the neurons of the previous layer, each value then being multiplied by the respective synaptic weight of each synapse, or link, between said neuron and the neurons of the previous layer, then applying an activation function, typically a non-linear function, to said weighted sum, and delivering at the output of said neuron, in particular to the neurons of the following layer which are connected to it, the value resulting from the application of the activation function. The activation function makes it possible to introduce a non-linearity into the processing carried out by each neuron. The sigmoid function, the hyperbolic tangent function, the Heaviside function are examples of activation function.

[0068] As an optional addition, each neuron is also capable of applying, in addition, a multiplicative factor, also called bias, to the output of the activation function, and the value delivered at the output of said neuron is then the product of the bias value and the value from the activation function.

[0069] A convolutional neural network is also sometimes called a convolutional neural network or by the acronym CNN which refers to the English term “Convolutional Neural Networks”.

[0070] In a convolutional neural network, each neuron in the same layer has exactly the same connection pattern as its neighboring neurons, but at different input positions. The connection pattern is called a convolution kernel or, more often, "kernel" in reference to the corresponding English term.

[0071] A fully connected layer of neurons is a layer in which the neurons of said layer are each connected to all the neurons of the previous layer.

[0072] Such a type of layer is more often referred to as “fully connected” and sometimes referred to as “dense layer”.

[0073] These types of neural networks are encoded in generic formats such as for example onnx. The present disclosure applies to any type of current neural network topology supported by this generic format, for example “fully connected”, CNN, but also RNN, “Attention layer”, ... which is representable by one or more blocks of parameters comprising values ​​as previously explained.

Claims

Claims

1.

2.

3. Method of encoding a digital signature of a neural network, method implemented by an electronic device, said neural network being recorded within a data structure comprising parameter blocks, the method comprising, for a current parameter block (BPc) comprising at least M parameters representing real numbers: a step of obtaining (A 10) a binary signature image (IBSig) from the digital signature comprising a set of bits extracted from the parameters of the current parameter block; a step of combining (A20) the signature binary image (IBSig) with a reference binary image (IBR) delivering a coded binary image (IBC). Coding method according to claim 1, characterized in that the step obtaining (10) the binary signature image (IBSig) from a set of bits of the parameters of the current parameter block includes: a determination step (Al 1), from a first predetermined factor (seedO) of a set of N parameters to be processed, N being less than or equal to M; a step of obtaining (A 12), from at least a second predetermined factor (seedl) a set of K bits to be processed, for each of the parameters of said set of N parameters to be processed, delivering a set of P bits; a creation step (A13), from the P bits of the set of bits, of the binary signature image (IBSig); Coding method according to claim 1, characterized in that the step of combining (A20) the signature binary image (IBSig) with the reference binary image (IBR) comprises, for each bit of the reference binary image (IBR), the calculation of a combined bit using a corresponding bit of the signature binary image (IBSig); the calculation of the combined bit preferably consisting of an “exclusive or” operation.

4. Coding method according to claim 1, characterized in that it is iteratively implemented on a plurality of blocks (Bo, ... Br_i) of parameters of the neural network, delivering a plurality of characteristic binary images (IBC0, ... IBCR i), each associated with a block of parameters.

5. Method for decoding a digital signature of a neural network, method implemented by an electronic device, said neural network being recorded within a data structure comprising parameter blocks, the method comprising, for a current parameter block (BPcL) comprising at least M parameters representing real numbers: - a step of obtaining (B 10) a signature binary image (IBSigL) from a signature comprising a set of bits extracted from the parameters of the current parameter block; - a step of combining (B20), the signature binary image (IBSigL) with a coded binary image (IBC) associated with the current parameter block, delivering an induced reference binary image (IBRi).

6. Decoding method according to claim 5, characterized in that the step of obtaining (B 10) the signature binary image (IBSigL) comprises the following steps: - obtaining (B 11) a first predetermined factor (seedO) relating to the determination of N parameters to be selected, at least one second predetermined factor (seedl) relating to the obtaining of the K bits to be processed and a coded binary image (IBC) of the current parameter block; - obtaining (B 12), from said at least one predetermined factor (seedl) a set of K bits to be processed, for each of the parameters of said set of N parameters to be processed, delivering a set of P bits; - creating (B 13), from the P bits of the set of bits, a signature binary image (IBSigL);

7. Decoding method according to claim 5, characterized in that it comprises a step of comparing the reference binary image

8. induced (IBRi) with a reference binary image (IBR). Electronic device for encoding a digital signature of a neural network, said neural network being recorded within a data structure comprising parameter blocks, the device comprising, for a current parameter block comprising at least M parameters representing real numbers: means for obtaining a binary signature image (IBSig) from the digital signature comprising a set of bits extracted from the parameters of the current parameter block; means for combining the signature binary image (IBSig) with a reference binary image (IBR) delivering a coded binary image (IBC).

9. Electronic device for decoding a digital signature of a neural network, said neural network being recorded within a data structure comprising parameter blocks, the device comprising, for a current parameter block (BPcL) comprising at least M parameters representing real numbers: means for obtaining (B 10) a binary signature image (IBSigL) from a set of bits of the parameters of the current parameter block; means for combining (B20) the signature binary image (IBSigL) with a coded binary image (IBC) associated with the current parameter block, delivering an induced reference binary image (IBRi).

10. A computer program comprising software instructions which, when executed by a programmable electronic device, implement a digital signature encoding method according to claims 1 to 4 and / or a digital signature decoding method according to claims 5 to 7.

Citation Information

Patent Citations

  • Systems and methods for watermarking software and other media

    US8892893B2

  • Method of verification for machine learning models

    WO2023041212A1