PROCESSING COMPLEX PACKED TENSORS USING INTEGRATED CIRCUIT OF REAL AND COMPLEX PACKED TENSORS IN COMPLEX DOMAIN

An example system includes a processor that can receive a number of complex packed tensors, wherein each of the complex packed tensors include real numbers encoded as imaginary parts of complex numbers. The processor can execute a single instruction, multiple data (SIMD) operation on the complex packed tensors using an integrated circuit of real and complex packed tensors in a complex domain to generate a result.

BACKGROUND

The present techniques relate to encoding ciphertexts. More specifically, the techniques relate to processing real numbers.

SUMMARY

According to an embodiment described herein, a system can include processor to receive a number of complex packed tensors, wherein each of the complex packed tensors includes real numbers encoded as imaginary parts of complex numbers. The processor can also further execute a single instruction, multiple data (SIMD) operation on the complex packed tensors using an integrated circuit of real and complex packed tensors in a complex domain to generate a result.

According to another embodiment described herein, a method can include receiving, via a processor, a number of complex packed tensors, wherein each of the complex packed tensors include real numbers encoded as imaginary parts of complex numbers. The method can further include executing, via the processor, a single instruction, multiple data (SIMD) operation on the complex packed tensors using an integrated circuit of real and complex packed tensors in a complex domain to generate a result.

According to another embodiment described herein, a computer program product for packing real numbers can include computer-readable storage medium having program code embodied therewith. The program code executable by a processor to cause the processor to receive a number of complex packed tensors, wherein each of the complex packed tensors include real numbers encoded as imaginary parts of complex numbers. The program code can also cause the processor to execute a single instruction, multiple data (SIMD) operation on the encrypted complex packed tensors using an integrated circuit of real and complex packed tensors in a complex domain to generate a result.

DETAILED DESCRIPTION

Using homomorphic encryption (HE), two ciphertexts can be multiplied and added without being decrypted first. In addition, using the simple primitives of additional and multiplication, any algorithm can then be approximated. While many algorithms operate with real numbers, the fully homomorphic Cheon-Kim-Kim-Song (CKKS) encryption (FHE) scheme, first released in 2016, also works over complex numbers. One solution for handling real numbers when using real numbers with the CKKS encryption scheme is to set the imaginary part to zero everywhere and thus ignore the imaginary parts. However, this solution may lead to a doubling of the computation time of algorithms, a doubling of communication volume, and a doubling of random-access memory (RAM) requirements. Some other solutions pack real values in the imaginary parts of complex numbers as well. However, these solutions pack real values into the imaginary parts at the cost of severely limiting the allowed set of operators. For example, none of these solutions may allow for a general pair-wise product or dot product.

According to embodiments of the present disclosure, a system can include a processor to receive a number of complex packed tensors. Each of the complex packed tensors includes real numbers encoded as imaginary parts of complex numbers. The processor can execute a single instruction, multiple data (SIMD) operation on the complex packed tensors using an integrated circuit of real and complex packed tensors in a complex domain to generate a result. Thus, embodiments of the present disclosure enable improved central processing unit (CPU) or graphics processing unit (GPU) usage, communication, and RAM usage by using the imaginary parts of complex numbers. In particular, a 68% performance boost with respect to speed improvement for computing neural network inference over encrypted data was detected from use of the techniques described herein was noted when applied to the AlexNet deep convolutional neural network (CNN) architecture, first released in 2012. In addition, a 1.96× speedup was noted in with respect to computing logistic regression. Moreover, the embodiments may be used in various applications, such as logistic regression, linear regression, and to implement convolution layers, fully-connected layers, and activation layers, among other layers of neural networks.

With reference now toFIG.1, a block diagram shows an example system for packing real numbers of ciphertexts using imaginary parts of complex numbers. The example system100ofFIG.1includes a framework102for packing and encoding tiled based elements. For example, the framework102may be a homomorphic encryption (HE) framework that processes homomorphically encrypted ciphertexts. In some examples, the framework102may be any suitable platform that supports SIMD operations, such as those SIMD operations found in hardware processing units, such as CPUs or GPUs. For example, the framework102can process CPU or GPU SIMD based registers. The framework102includes a packing method104. For example, the packing method104may be any suitable general packing method. As one example, the packing method104may be a tile tensor packing method. As used herein, a tile tensor is a data structure that packs tensors in fixed size chunks, referred to herein as tiles. For example, the tensors to be packed may be vectors or matrices of real numbers. In the context of an HE framework, tiles may be the plaintexts behind HE ciphertexts. The framework102includes complex packing methods106. For example, the complex packing method106may be a homomorphic complex packing method. As one example, the homomorphic complex packing method may support complex packed tile tensors, as described herein. The system100also include a framework108that provides SIMD operations over real numbers. For example, the framework108may be the Real HE for Arithmetic of Approximate Numbers (HEAAN) framework, first released May 2016. The system100includes a framework110that provides SIMD operations over the complex plane. The system100also further includes an abstraction layer112. For example, the abstraction layer112may be a layer that hides homomorphic encryption scheme details from the packing method104and complex packing method106. For example, the abstraction layer112may provide application programming interfaces (APIs) to the packing methods104and106. These APIs are translated by the abstraction layer112to HE scheme operations. In various examples, the APIs can be unified per the different schemes and thus hide the scheme implementation from the user. In some examples, the abstraction layer112can be smart. For example, the abstraction layer112can automatically identify which underlying scheme is best to use, or that the processing may involve manual knobs that the packing layers (the API caller) can use. In various examples, when several schemes or platforms are supported by framework102, the abstraction layer112may allow switching between the schemes or platforms in an easy way without using different APIs.

In the example ofFIG.1, the system100may reduce the size of real valued tensors by converting them to complex valued tensors. In particular, the system100may use a function CT=cpack(T,i) which takes a real-valued tensor T[n1,n2, . . . ,nk], and converts the real-valued tensor to a complex tensor with the i'th dimension reduced by half CT1[n1,n2, . . . ,ni/2, . . . ,nk]. For example, element (j1,j2, . . . ,jk) of this tensor is a complex number whose real part is T(j1, . . . ,ji*2, . . . ,jk) and imaginary part is T(j1, . . . ,ji*2+1, . . . ,jk). In various examples, a function cunpack(CT,i) may be used to separate the real and imaginary parts, returning the original tensor T.

Still referring toFIG.1, in various examples, complex packed tensors can be manipulated in a way that is homomorphic to the original tensors. Generally, given two regular tensors T1and T2with shapes [n1,n2, . . . ,nk], and [m1,m2, . . . ,mk], then tensors T1and T2have compatible shapes if they have the same dimension, and for each j, at least one of these conditions holds: (1) nj=mj, or (2) nj=1, (3) or mj=1. A tensor with shape [n1, . . . ,nj−1,1, . . . ,nk] can be broadcasted along dimension j by duplicating the data in all dimensions that are not j along dimension j. Tensors with compatible shapes can be broadcasted to have the same shape, then manipulated using elementwise operators. Using broadcasting, elementwise operators, and summation, a wide variety of operators can be implemented. For example, these operators may include matrix multiplication and convolution.

The complex packed (cpacked) tensors generated using the techniques described herein can be similarly manipulated. For example, two real-value tensors T1and T2may have compatible shapes [n1,n2, . . . ,nk], and [m1,m2, . . . ,mk]. The following mathematical properties may hold. For example, if mj=1, then:

where rotate(T1,k,x) means rotating T1along dimension k with an offset of x. If j==k, then:

Using Eqs. 1-6, the system100can thus apply the following various operators without any additional pre-processing or post-processing. For example, if CT is a complex packed tensor along dimension j, then the system100can add or multiply with any non-cpacked compatible tensor having dimension size mj=1 along this dimension. The result is complex packed. In some examples, if CT1and CT2are complex packed tensors along dimension i, then the system100can add the complex packed tensors together if the complex packed tensors have compatible shapes. The resulting sum is complex packed. In some examples, if CT1is a complex packed tensor along dimension j, then the system100can sum over dimension k for any j<>k. The resulting sum is complex packed. In some examples, if CT1is a complex packed tensor along dimension j, then the system100can rotate over dimension k for any j<>k. The result is complex packed. In various examples, if CT1is a complex packed tensor along dimension j, then the system100can rotate by an even number over dimension j. The result is complex packed.

Similarly, in various examples, the system100can also perform the following two operators with some additional pre-processing and post-processing. In some examples, a multiplication and summation operation mul−sum( ) may be performed using the equation:

For example, if CT1=cpack(T1,j) and CT2=cpack(T2,j) have compatible shapes, then the system100can perform the following:

where the result R3 is no longer complex packed and:

In some examples, the system100can similarly calculate a packing summation operation using the equation:

For example, if CT1=cpack(T1,j) then the system100can compute:

where the result is no longer complex packed, and:

In some examples, the system100can further also calculate a rotation operation:

For example, the system100can calculate the rotate-one operation described in Eq. 16 using the equations:

where the result of R4is packed and:

In some examples, the system100may also be able to perform two operators that help cpack and cunpack intermediate results. For example, the system100can perform an interleaved complex packing operation int-cpack(T1, T2). In particular, if T1and T2are real valued tensors, then the system100can compute:

where R1=cpack(T3,j), and where T3is the result of concatenating T1and T2along dimension j, and permuting the elements along this dimension in an interleaved manner. As another example, the system100can perform the operation int-cunpack(CT1). For example, if CT1=cpack(T1,j), then the system100can compute:

where R1and R2are two slices of real valued tensor T1, combined covering all of T1, and executing int-cpack(R1, R2) returns CT1back.

and when mj=nj, then:

where rotation of every tile in a tile tensor T along dimension k with an offset of x is denoted by rotx(T, k). The cpack( ) operator is homomorphic over addition, multiplication, summation, and rotation under the criteria described in Eqs. 25-30. In particular, as a result of Eqs. 25-30, for the complex packed tile tensors CT=cpackj(T), CT′=cpackj(T′), and where l≠j, the following tile tensors A, B, C, D may also be complex packed along the j-th dimension: A=CT+CT′, B=sumi(CT), C=rotx(CT, l), and D=rot2x(T, j). This property enables the application of the various operations described above to tile tensors without the need for additional pre-processing or post-processing steps. In particular, example operations include mul−Sumj(CT,CT′), pack−Sumj(CT) and rotate−Onej(CT), which operate on complex packed tile tensors. The results of these operations are equivalent to sumj(T*T′), sumj(T), and rot1(T, j), respectively, which operate on real valued tensors. In addition to the equations 7-11, 12-15, and 16-21 above, these operators may be also defined via the equations:

where Re( ) and Im( ) denote operators that return the real and imaginary parts of a tile's elements in a tile tensor.

In various examples, the system100may use any of the above operations as part of applications in artificial intelligence (AI) among other algebraic computations. In some examples, the system100can implement algebraic computations of type needed for AI using cpacked tensors. For example, these computations may be useful in an environment that natively supports complex numbers, but where the computations to be performed are over real numbers. As one example, the system100can execute a tensor contraction of the type sum(T1*T2, j), where T1and T2are two compatible tensors. This tensor contraction may cover a wide range of algebraic operators. For example, the system100can thereby perform matrix-vector multiplication, matrix-matrix multiplication, and inner product between vectors. In various examples, if T1and T2are cpacked along the j'th dimension to CT1and CT2, then this may be achieved via the operator mul−sum(CT1, CT2, j), which produces a non-complex packed result. The non-complex packed result may then be input into an activation function. For example, the system100can thereby perform vector dot-product computations of linear regression or logistic regression, followed by an activation function. In this manner, the system100can provide more efficient support for linear and logistic regression models.

In some examples, for a neural network with a sequence of fully connected layers and activation functions, the system100can use the operator int-cpack after each activation function to return the packing to a complex packed form. Since the operator int-cpack interleaves the data, the system100may permute the next layer accordingly. A convolution layer is also supported since there exists efficient convolution implementations that include only tensor multiplication and rotations. In various examples, many AI computations may be performed in batch over a set of samples. The input and all intermediate results may have a batch dimension of j. The model weight tensors all have size 1 in dimension j, for compatibility. This dimension may be never summed. Thus, if the system100executes complex packing on the input's dimension j, the system100can seamlessly multiply and add input and intermediate results with the model tensors. In various examples, this implementation may support all types of neural networks, including convolutional neural networks.

In some examples, for activation functions that may need to multiply two complex packed intermediate results, the system100can use int-cunpack before the activation function, and int-cpack after the activation function. Since the functions int-cunpack and int-cpack are elementwise, the interleaving may make no difference. For example, no extra permutation on the data may be required.

In addition, the system100may implement any of the above operations as part of applications in artificial intelligence (AI) among other algebraic computations under encryption. In particular, the CKKS scheme natively handles complex numbers, hence the above described methods are applicable and useful for use with CKKS. In CKKS and other HE schemes, the ciphertexts are flat vectors with some fixed size, depending on a specific configuration. For example, one size used may be 8192. These schemes may support elementwise add, multiply, and rotate. Some methods exist for performing tensor manipulation over this API. In various examples, some methods may support only a subset of the operators. For example, the methods may only support matrix-vector multiplication, and some are more general. The methods described herein can therefore be combined with any method to perform tensor manipulation over HE.

A simple example of the use of the techniques described herein under encryption is matrix-vector multiplication. For example, each matrix row can be stored complex packed in a ciphertext, and the vector stored complex packed in a ciphertext too. The complex packing allows the system100to fit twice amount of data in a single ciphertext. The system100can then perform a matrix-vector multiplication using sum−mul between the vector's ciphertext and each row.

A more general example of the use of the techniques described herein under encryption is using tile tensors. For example, the system100can add which dimension was c-packed to the tile tensor shape information, and the additional operators described herein to the set of operators that the tile tensor supports. This will allow implementing all the above-mentioned computations, while using the meta data to validate correctness.

Another particular example is performing an int-cpack operation. For example, the system100can perform an int-cpack operation when the data takes more than one ciphertext. If the data already fits within a ciphertext, shrinking the data further may not reduce computation time. For example, when performing an HE operation on a ciphertext with 8192 slots, it does not matter if the system100encrypts a vector of 1000, 2000, 4000, or 8192 elements. In this example, the system100may still perform the exact same operation on that ciphertext. If the data uses up an even number of ciphertexts, then the system100can int-cpack pairs of ciphertexts. For an odd number of ciphertexts, the system100can leave the last ciphertext non-cpacked. For example, leaving the last ciphertext non-cpacked is equivalent to cpacking the ciphertext with zeroes.

Another example of the use of the techniques described herein is in the context of the HE technique for matrix-vector multiplication of diagonalization. For example, each diagonal of a matrix may be kept as a separate ciphertext Ci, and the input vector in a ciphertext V. The system100can use the operation sum(Cj*rot(V,j)) to compute a result. In various examples, this sum operation can be implemented on a cpacked V, with a non-cpacked matrix, using the rotate-one operator described with respect to Eqs. 16-20.

It is to be understood that the block diagram ofFIG.1is not intended to indicate that the system100is to include all of the components shown inFIG.1. Rather, the system100can include fewer or additional components not illustrated inFIG.1(e.g., additional frameworks, packing methods, or additional layers, etc.).

FIG.2is a block diagram of an example complex packing of a real-valued tile tensor into a half-the-size complex packed tile tensor using imaginary parts of complex numbers. The example complex packing200ofFIG.2includes an initial set of real-valued tile tensors T1202shown being converted into a complex packed set of tile tensors cpack2(T1)204. For example, the real-valued tile tensors202include items206depicted as blocks representing real parts holding the real numbered values. The real-valued tile tensors202also include a set of items208depicted as block representing empty imaginary parts that do not any values in the case of real numbers. The items206and208are arranged into tiles, which are represented as groups of 2×4×2 blocks. In the example of the real-valued tile tensors202, a set of a total of 12 tiles is shown. The complex packed tile tensors204include real numbers packed using six tiles including items represented by blocks including segments representing imaginary parts210of complex numbers in addition to segments representing real parts212of complex numbers.

In the example ofFIG.2, the complex packing200can pack a real-valued tile tensor T1represented by 12 tiles into a half-the-size complex packed tile tensor represented by only six tiles across the jth dimension using CT=cpackj(T1). In some examples, an inverse operation T1=cUnpack(CT) can then be used to unpack the complex packed tile tensor of 12 tiles. For example, the inverse operation may be used to separate the real and imaginary parts, and return the original tile tensor T1.

As shown inFIG.2, the sets of real numbered items206and empty imaginary items208are converted into a reduced set of complex tile tensors with items that each contain a real part212and imaginary part210, in which both imaginary parts210and real parts212are used to encode real numbers. In various examples, the complex packed tile tensors204may be used to execute SIMD operations, which may include operations based on or approximated by dot product calculations. For example, such operations may be performed under fully homomorphic encryption and thus be secure.

It is to be understood that the block diagram ofFIG.2is not intended to indicate that the complex packing200is to include all of the components shown inFIG.2. Rather, the complex packing200can include fewer or additional components not illustrated inFIG.2(e.g., additional tiles, tile shapes, tile sizes, or additional packings, etc.).

FIG.3is a block diagram of an example complex packing of two real-valued tile tensors into a single complex tile tensor using imaginary parts of complex numbers. The example complex packing300ofFIG.3shows an unpacked set302of tile tensors including a first tile tensor304and a second tile tensor306being packed into a complex packed tile tensor307. For example, each of the tile tensors304and306may include real numbers encoded using only real parts of complex numbers. The complex packed tile tensor307includes real numbers encoded using both real parts308and imaginary parts310of complex numbers.

In the example ofFIG.3, the complex packing300can pack two tile tensors T2, T3of the same shape into a third tile tensor CT of the same shape across the jth dimension using a function intCpackj(T2, T3)=T2+i*T3=cpackj(T4), where T4is the result of concatenating T2and T3along dimension j, and permuting the elements along this dimension in an interleaved way. In various examples, the inverse operator for complex packing300is intCUnpack(CT1).

It is to be understood that the block diagram ofFIG.3is not intended to indicate that the complex packing300is to include all of the components shown inFIG.3. Rather, the complex packing300can include fewer or additional components not illustrated inFIG.3(e.g., additional tiles, tile shapes, tile sizes, or additional packings, etc.).

FIG.4is a block diagram of an example system for processing encrypted samples using encrypted bias and complex packed and encrypted weights. The example system400includes a client device402communicatively coupled to a server device404. The client device402includes a model trainer406, a complex packer408, an encrypter410, and a decrypter412. The server device404includes a dot product-based secure operation executer414.

In the example system400ofFIG.4, the client device402sends packed and encrypted weights and encrypted bias416to the service device404along with packed and encrypted samples418and receives encrypted results420from the server device404. For example, the packed and encrypted samples418may be data samples from one or more databases. In some examples, the encrypted results420may indicate a subset of intersection in the samples418. For example, the subset in the encrypted results420may be also ordered as originally received from the client device402. The client device402may then decrypt the encrypted results420to obtain a list of ordered samples indicating an intersection between one or more datasets.

In some examples, the model trainer406of the client device402can train a machine learning model to generate a set of weights and biases. For example, the machine learning model may be a linear regression model. In some examples, the training may result in the client device402obtaining a weights vector w and a bias vector b. In various examples, the complex packer408can then pack the weights using any of the complex packing methods described herein. For example, the weights may be packed using imaginary parts of complex numbers to reduce the number of packings. In some examples, the encrypter410can encrypt the set of complex packed weights and the biases. For example, the complex packed weights and biases may be encrypted using FHE or any other suitable encryption. As one example, the client device402can pack weights vector w into complex numbers w′, reducing its size by half, and encrypts the complex packed vector w′ and bias b to obtain encrypted packed weights E(w′) and encrypted bias E(b). The packed and encrypted weights and encrypted biases416may then be sent to the server device404.

In various examples, the complex packer408client device402can then also complex pack samples of data from one or more databases. In some examples, the samples may be data entries from two databases to be compared for intersection. The encrypter410can then encrypt the complex packed samples and send the packed and encrypted samples418to the server device404. For example, for each input sample that needs to be classified x, the client device102can pack the sample into complex numbers x′, encrypt the complex numbers x′ to obtain encrypted packed sample E(x′) and sends the encrypted packed sample to the server device404for classification.

In various examples, the dot product-based secure operation executer414of the server device404can then compute an encrypted result E(<x,w>) according to techniques described herein, and then adds b and returns the encrypted result E(r)=E(<x,w>+b) to the client device402. The decrypter412of the client device402can then decrypt E(r) to obtain <x,w>+b. Thus, the system400may enable reduced computation time and reduced communication overhead by using encrypted complex packed samples that are processed efficiently and converted into encrypted results that are unencrypted by the client device402. As one example, the unencrypted results may be a classification of one or more samples.

It is to be understood that the block diagram ofFIG.4is not intended to indicate that the system400is to include all of the components shown inFIG.4. Rather, the system400can include fewer or additional components not illustrated inFIG.4(e.g., additional devices, weights, biases, results, or additional layers, etc.).

FIG.5is a process flow diagram of an example method that can execute SIMD operations over complex planes using homomorphic complex packings. The method500can be implemented with any suitable computing device, such as the computer901ofFIG.9, and the system100ofFIG.1. In various examples, the methods described below can be implemented by the processor set910or processor1002ofFIGS.9and10. In some examples, the method500may be executed by the server device404ofFIG.4.

At block502, a processor receives a number of complex packed tensors, where each of the complex packed tensors include real numbers encoded as imaginary parts of complex numbers. In some examples, the processor may have generated the complex packed tensors from a number of encrypted complex packed tensors using an intermediate complex packing operation on pairs of ciphertexts. For example, the processor can execute the intermediate complex packing operation using Eq. 22. In some examples, the processor may have received a non-complex-packed tensor and transform the non-complex packed tensor into a complex-packed tensor of the number of complex packed tensors using a complex packing method. For example, the non-complex-packed tensor may be a real vector. In some examples, in response to detecting an odd number of ciphertexts, the processor may leave a last ciphertext non-complex-packed. In various examples, the complex packed tensors may be complex packed tile tensors. In some examples, the complex packed tensors may correspond to ciphertexts. In some examples, the complex packed tensors may correspond to single instruction, multiple data (SIMD)-based registers of a hardware processing unit. In some examples, the complex packed tensors correspond to a single data set packed using imaginary parts of complex numbers to represent half of the single data set. In some examples, the complex packed tensors correspond to two data sets with similar dimensions, and the first data set is represented by real parts of complex numbers and the second data set is represented by imaginary parts of the complex numbers.

At block504, the processor executes a single instruction, multiple data (SIMD) operation on the complex packed tensors using an integrated circuit of real and complex packed tensors in a complex domain to generate a result. For example, the SIMD operation may be a fully homomorphic SIMD operation that is executed securely using a fully homomorphic encryption scheme and the generated result may be an encrypted result. In various examples, the processor may perform a dot product operation on the number of encrypted complex packed tensors. For example, the dot product operation may be performed using the method800ofFIG.8. In some examples, the processor may perform a matrix-vector multiplication using an operation between a ciphertext corresponding to a vector and each set of values of an encrypted matrix corresponding to an underlying plaintext matrix, where each row of the encrypted matrix is complex packed in an additional ciphertext. For example, the processor can execute the matrix-vector multiplication using the multiplication and summation operation of Eqs. 7-11. In some examples, the processor can perform an operation on a set of complex packed tile tensors. For example, the processor may add complex packed dimensions to a tile tensor shape information, and additional operators a set of operators supported by a tile tensor. In some examples, the processor can perform a diagonalization operation including a sum operation implemented on a complex packed vector with a non-complex-packed matrix using a rotate-one operator. For example, the processor can implement the rotate-one operator using Eqs. 16-21. In various examples, the SIMD operation approximates a function of a layer of a neural network. For example, the layer of the neural network includes a convolutional layer. In some examples, the layer of the neural network includes a fully-connected layer.

The process flow diagram ofFIG.5is not intended to indicate that the operations of the method500are to be executed in any particular order, or that all of the operations of the method500are to be included in every case. Additionally, the method500can include any suitable number of additional operations.

FIG.6is a process flow diagram of an example method that can generate encrypted complex packings to be processed using a dot-product based operation. The method600can be implemented with any suitable computing device, such as the computer901ofFIG.9and is described with reference to the system400ofFIG.4. In various examples, the methods described below can be implemented by the processor set910or processor1002ofFIGS.9and10. For example, the method600may be performed by the client device402of the system400ofFIG.4.

At block602, a processor trains a machine learning model to generate a set of weights and bias. For example, the machine learning model may be a linear regression model, a logistic regression model, or any other suitable machine learning model.

At block604, the processor complex packs the weights and encrypts the complex packed weights and the bias to generate encrypted complex packed weights and encrypted bias. For example, the processor may complex pack the weights using the interleaved complex packing described above. In various examples, the complex packed weights and bias may be encrypted using any suitable encryption algorithm, such as a fully homomorphic encryption algorithm.

At block606, the processor complex packs and encrypts samples of data to be processed. For example, the processing may be a classification of the samples. In various example, the samples of data may be complex packed and encrypted similarly to the weights.

At block608, the processor transmits the encrypted complex packed weights, the encrypted bias, and the encrypted complex packed samples to a server device. For example, the processor may transmit the encrypted complex packed weights, the encrypted bias, and the encrypted complex packed samples over any suitable network.

At block610, the processor receives encrypted results from the server device. For example, the encrypted results may be encrypted classifications.

At block612, the processor decrypts the encrypted results to obtain unencrypted results. For example, the unencrypted results may be a classification of any number of the samples.

The process flow diagram ofFIG.6is not intended to indicate that the operations of the method600are to be executed in any particular order, or that all of the operations of the method600are to be included in every case. Additionally, the method600can include any suitable number of additional operations.

FIG.7is a process flow diagram of an example method that can homomorphically manipulate complex packings using a SIMD operation. The method700can be implemented with any suitable computing device, such as the computer901ofFIG.9and is described with reference to the system400ofFIG.4. For example, the methods described below can be implemented by the processor set910or processor1002ofFIGS.9and10. In some examples, the method600may be performed by the server device404of the system400ofFIG.4.

At block702, a processor receives a number of encrypted complex packed tensors, where each of the encrypted complex packed tensors includes real numbers encoded as imaginary parts of complex numbers. For example, the encrypted complex packed tensors may include encrypted complex packed weights and encrypted complex packed samples of data to be classified.

At block704, the processor executes a single instruction, multiple data (SIMD) operation on the complex packed tensors using an integrated circuit of real and complex packed tensors in a complex domain to generate an encrypted result. For example, the encrypted result may be an encrypted classification of one or more samples of data corresponding to the encrypted complex packed samples.

At block706, the processor transmits the encrypted results to a client device. For example, the encrypted results may be decrypted by the client device to obtain decrypted results, such as a classification of one or samples of data.

The process flow diagram ofFIG.7is not intended to indicate that the operations of the method700are to be executed in any particular order, or that all of the operations of the method700are to be included in every case. Additionally, the method700can include any suitable number of additional operations.

FIG.8is a process flow diagram of an example method that can pack real numbers of ciphertexts using imaginary parts of complex numbers. The method800can be implemented with any suitable computing device, such as the computer901ofFIG.9and is described with reference to the system400ofFIG.4. For example, the methods described below can be implemented by the processor set910or processor1002ofFIGS.9and10. As another example, the method800may be implemented by the client device402ofFIG.4.

At block802, a processor receives a real vector V of n elements and a real vector U of n elements. For example, the real vector V and the real vector U may be samples from a dataset. In various examples, the real vector V and the real vector U may be samples from a database. In some examples, the real vector V and the real vector U may be a user provided image for a machine learning classification task, etc. In various examples, real vector V and the real vector U may be intermediate dot-product computations.

At block804, the processor encodes the real vector V as a vector of n/2 complex elements with odd indexed elements as real parts and a negation of even indexed elements as imaginary parts. For example, the real vector V may be encoded as: V′=(v1−iv2, . . . , vn−1−ivn)∈n/2.

At block806, the processor encodes the real vector U as a vector of n/2 complex elements with odd indexed elements as real parts and even indexed elements as imaginary parts. For example, the real vector U may be encoded as: U′=(u1+iu2, . . . , un−1+iun)∈n/2.

At block808, the processor computes a dot productV′, U′of the encoded vector V′ and the encoded vector U′. For example, each of the elements of encoded vector V′ may be multiplied by a corresponding element in encoded vector U′ and the products summed together. In various examples, the resulting dot product t may be a complex number. Then the dot productV, Umay be calculated using the equation:

At block810, the processor outputs a real part of the dot product t. For example, the complex part of the dot product t may be disregarded.

The process flow diagram ofFIG.8is not intended to indicate that the operations of the method800are to be executed in any particular order, or that all of the operations of the method800are to be included in every case. Additionally, the method800can include any suitable number of additional operations.

Computing environment900contains an example of an environment for the execution of at least some of the computer code involved in performing the inventive methods, such as complex SIMD processing module1001. In addition to block1001, computing environment900includes, for example, computer901, wide area network (WAN)902, end user device (EUD)903, remote server904, public cloud905, and private cloud906. In this embodiment, computer901includes processor set910(including processing circuitry920and cache921), communication fabric911, volatile memory912, persistent storage913(including operating system922and block1001, as identified above), peripheral device set914(including user interface (UI), device set923, storage924, and Internet of Things (IoT) sensor set925), and network module915. Remote server904includes remote database930. Public cloud905includes gateway940, cloud orchestration module941, host physical machine set942, virtual machine set943, and container set944.

PROCESSOR SET910includes one, or more, computer processors of any type now known or to be developed in the future. Processing circuitry920may be distributed over multiple packages, for example, multiple, coordinated integrated circuit chips. Processing circuitry920may implement multiple processor threads and/or multiple processor cores. Cache921is memory that is located in the processor chip package(s) and is typically used for data or code that should be available for rapid access by the threads or cores running on processor set910. Cache memories are typically organized into multiple levels depending upon relative proximity to the processing circuitry. Alternatively, some, or all, of the cache for the processor set may be located “off chip.” In some computing environments, processor set910may be designed for working with qubits and performing quantum computing.

Computer readable program instructions are typically loaded onto computer901to cause a series of operational steps to be performed by processor set910of computer901and thereby effect a computer-implemented method, such that the instructions thus executed will instantiate the methods specified in flowcharts and/or narrative descriptions of computer-implemented methods included in this document (collectively referred to as “the inventive methods”). These computer readable program instructions are stored in various types of computer readable storage media, such as cache921and the other storage media discussed below. The program instructions, and associated data, are accessed by processor set910to control and direct performance of the inventive methods. In computing environment900, at least some of the instructions for performing the inventive methods may be stored in block1001in persistent storage913.

VOLATILE MEMORY912is any type of volatile memory now known or to be developed in the future. Examples include dynamic type random access memory (RAM) or static type RAM. Typically, the volatile memory is characterized by random access, but this is not required unless affirmatively indicated. In computer901, the volatile memory912is located in a single package and is internal to computer901, but, alternatively or additionally, the volatile memory may be distributed over multiple packages and/or located externally with respect to computer901.

END USER DEVICE (EUD)903is any computer system that is used and controlled by an end user (for example, a customer of an enterprise that operates computer901), and may take any of the forms discussed above in connection with computer901. EUD903typically receives helpful and useful data from the operations of computer901. For example, in a hypothetical case where computer901is designed to provide a recommendation to an end user, this recommendation would typically be communicated from network module915of computer901through WAN902to EUD903. In this way, EUD903can display, or otherwise present, the recommendation to an end user. In some embodiments, EUD903may be a client device, such as thin client, heavy client, mainframe computer, desktop computer and so on.

REMOTE SERVER904is any computer system that serves at least some data and/or functionality to computer901. Remote server904may be controlled and used by the same entity that operates computer901. Remote server904represents the machine(s) that collect and store helpful and useful data for use by other computers, such as computer901. For example, in a hypothetical case where computer901is designed and programmed to provide a recommendation based on historical data, then this historical data may be provided to computer901from remote database930of remote server904.

PRIVATE CLOUD906is similar to public cloud905, except that the computing resources are only available for use by a single enterprise. While private cloud906is depicted as being in communication with WAN902, in other embodiments a private cloud may be disconnected from the internet entirely and only accessible through a local/private network. A hybrid cloud is a composition of multiple clouds of different types (for example, private, community or public cloud types), often respectively implemented by different vendors. Each of the multiple clouds remains a separate and discrete entity, but the larger hybrid cloud architecture is bound together by standardized or proprietary technology that enables orchestration, management, and/or data/application portability between the multiple constituent clouds. In this embodiment, public cloud905and private cloud906are both part of a larger hybrid cloud.

Referring now toFIG.10, a block diagram is depicted of an example tangible, non-transitory computer-readable medium1000that can pack real numbers of ciphertexts using imaginary parts of complex numbers. The tangible, non-transitory, computer-readable medium1000may be accessed by a processor1002over a computer interconnect1004. Furthermore, the tangible, non-transitory, computer-readable medium1000may include code to direct the processor1002to perform the operations of the methods500-800ofFIG.5-8.

The various software components discussed herein may be stored on the tangible, non-transitory, computer-readable medium1000, as indicated inFIG.10. For example, the tangible, non-transitory, computer-readable medium1000may include a complex SIMD processing module1001that includes a receiver module1006, a complex packing module1008, an artificial intelligence (AI) applications module1010, and an encrypted applications module1012. In various examples, the receiver module1006includes code to receive a number of complex packed tensors. In some examples, the complex packed tensors may be encrypted, using any suitable algorithm such as FHE. In various examples, each of the complex packed tensors include real numbers encoded as imaginary parts of complex numbers. The complex packing module1008includes code to generate the complex packed tensors. For example, the complex packing module1008can generate the complex packed tensors using an interleaving complex packing operation on pairs of ciphertexts. In some examples, in response to detecting an odd number of ciphertexts, the complex packing module1008may leave a last ciphertext non-complex-packed. In some examples, the complex packing module1008further includes code to adding complex packed dimensions to a tile tensor shape information, and additional operators a set of operators supported by a tile tensor. The AI applications module1010includes code to execute a single instruction, multiple data (SIMD) operation on the encrypted complex packed tensors using an integrated circuit of real and complex packed tensors in a complex domain to generate a result. In some examples, the AI applications module1010includes code to perform a dot product operation on the number of complex packed tensors. For example, the AI applications module1010may include code to perform a matrix-vector multiplication using an operation between a ciphertext corresponding to a vector and each row of an encrypted matrix, wherein each row of the encrypted matrix is complex packed in an additional ciphertext. In various examples, the result is encrypted and the AI applications module1010includes code to send the result to a client device to be decrypted. The encrypted applications module1012includes code to execute secure operations on the complex packed tensors. For example, the encrypted applications module1012includes code to execute various operations in a secure manner. For example, the operations may include a dot product, matrix multiplication, among other the operations as described herein. In some examples, the encrypted applications module1012includes code to execute various operations homomorphically on encrypted complex packed tensors to generate encrypted results.