EP4713800A1 - Adapting neural networks for reduced power consumption on multiplier circuits - Google Patents
Adapting neural networks for reduced power consumption on multiplier circuitsInfo
- Publication number
- EP4713800A1 EP4713800A1 EP23744602.6A EP23744602A EP4713800A1 EP 4713800 A1 EP4713800 A1 EP 4713800A1 EP 23744602 A EP23744602 A EP 23744602A EP 4713800 A1 EP4713800 A1 EP 4713800A1
- Authority
- EP
- European Patent Office
- Prior art keywords
- neural network
- parameter
- value
- multiplier
- multiplication
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/907—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/903—Querying
- G06F16/90335—Query processing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/06—Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
- G06N3/063—Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Biophysics (AREA)
- Biomedical Technology (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Computational Linguistics (AREA)
- Software Systems (AREA)
- Computing Systems (AREA)
- Molecular Biology (AREA)
- Mathematical Physics (AREA)
- General Health & Medical Sciences (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Neurology (AREA)
- Library & Information Science (AREA)
- Power Sources (AREA)
Abstract
There is described a computer-implemented method for adapting a neural network for reduced power consumption when implemented on one or more processing units comprising one or more multiplier circuits. The method comprises obtaining a parameter of the neural network and modifying a value of the parameter to reduce a number of state changes in one or more circuit lines of at least one multiplier circuit of the one or more multiplier circuits as multiplication operations are performed by the at least one multiplier circuit, wherein the multiplication operations have the parameter as a constant operand.
Description
ADAPTING NEURAL NETWORKS FOR REDUCED POWER CONSUMPTION ON MULTIPLIER CIRCUITS
Technical Field
This specification relates to systems and methods for adapting neural networks for reduced power consumption when implemented on one or more processing units comprising one or more multiplier circuits.
Background
Neural networks comprise a plurality of parameters organized into a set of hierarchical layers. A neural network processes an input data item through its layers to generate an output for the performance of a particular task. The number of parameters in a neural network can in some cases be in the order of billions. With the increasing size of neural networks, power consumption for performing neural network operations increases. It is desirable to reduce the power consumption of neural network operations.
Summary
According to a first aspect, there is provided a computer-implemented method for adapting a neural network for reduced power consumption when implemented on one or more processing units comprising one or more multiplier circuits. The method comprises obtaining a parameter of the neural network and modifying a value of the parameter to reduce a number of state changes in one or more circuit lines of at least one multiplier circuit of the one or more multiplier circuits as multiplication operations are performed by the at least one multiplier circuit.
In some implementations, the multiplication operations may have the parameter as a constant operand.
According to another aspect, there is provided a computer-implemented method for training a neural network having reduced power consumption when implemented on one or more processing units comprising one or more multiplier circuits. The method comprises obtaining a training input and processing the training input using current
parameter values of the neural network to generate a neural network output. The method further comprises determining a value for a loss function, wherein the loss function is based upon the neural network output and a target output, and wherein the loss function encourages a reduction in a number of state changes in one or more circuit lines of the one or more multiplier circuits as multiplication operations are performed by the one or more multiplier circuits. The method also comprises adjusting the current parameter values of the neural network based upon the determined value for the loss function. In some implementations, the multiplication operations may have the current parameter values of the neural network as constant operands.
According to a further aspect, there is provided a system comprising one or more processors and one or more computer readable storage media comprising processor readable instructions to cause the one or more processors to cariy out an above method aspect.
According to another aspect, there is provided one or more non-transitoiy computer readable storage medium comprising instructions which, when executed by a computer, cause the computer to carry out an above method aspect. It will be appreciated that features disclosed in the context one aspect may be combined with features disclosed in the context of one or more other aspects.
Neural network operations typically consist of many multiplication operations, for example, when a parameter of the neural network is multiplied with a layer input. One potential strategy for reducing power consumption when performing multiplication operations is to group together multiplications that involve the same value. For neural network operations, multiplications may, for example, be grouped by parameter such that the parameter is loaded once and treated as a constant operand for a set of multiplication operations w ith a different second operand. This means only one operand is being fetched each cycle thereby reducing power consumption.
There is a natural assumption that all constant values wall consume the same amount of power in carrying out these multiplication operations. However, when considering the underlying implementation of multiplier circuits, the inventors have realised that this assumption does not hold true. For example, a bit-wise multiplier circuit typically uses an AND gate to multiply the corresponding bits of two operands. When one operand is
held constant and set to 1, the output of the AND gate depends on the second operand. This has the potential for a large number of state changes across the AND gate as multiplication operations proceed depending on how the second (variable) operand changes. This phenomenon is sometimes referred to as “toggling”. By reducing the amount of toggling in the multiplier circuit, the power consumption can be reduced.
For example, if the constant operand is set to 0 for some of the AND gates within the multiplier circuit, the output of these AND gates will always be set to zero and will therefore be independent of changes in the value of the second (variable) operand. Toggling, and thus power consumption, can therefore be reduced. For a large scale neural network which may potentially have billions of parameters, the power savings obtained by reducing toggling may be significant. For example, in some cases, the difference in power consumption between the most and least consumptive parameter values can be as large as 10%. Thus, motivated by the underlying implementation of multiplier circuits at the logic gate level, the techniques disclosed herein provides for adapting a neural network for implementation on a multiplier circuit for reduced power consumption. In particular, the method selects for parameter values that will reduce the number of state changes in the circuit lines of the multiplier circuit (whilst maintaining an acceptable trade-off in neural network task performance). In some implementations, the adaptation may be carried out during training of the neural network itself. For example, the training may use a loss function comprising an additional term to encourage a reduction in toggling. Alternatively, or in addition, the adaptation may be carried out subsequent to the training of the neural network. That is, a parameter of a trained neural network may have its value modified in a post-processing step. For example, the value may be modified on the basis of a codebook of pre-determined operand values that have a reduced level of toggling or an acceptable level of toggling according to a power consumption target. The disclosed method is suitable for adaptation of the neural network for implementation on multiplier circuits of a variety of processing devices including neural network hardware acceleration units such as Tensor Processing Units (TPUs), Graphics Processing Units, Application Specific Integrated Circuits (ASICs), and Field Programmable Gate Arrays (FPGAs) amongst others, for achieving significant power savings when carrying out multiplication operations using the adapted neural network.
Brief Description of the Drawings
Figure 1 is a schematic illustration of an exemplary system for adapting parameters of a neural network. Figure 2A is a schematic illustration of an exemplary multiplier circuit.
Figure 2B is a schematic illustration of circuit lines having changeable states in the exemplary multiplier circuit.
Figure 2C is a schematic illustration of a reduction in the number of circuit lines having changeable states in the exemplary multiplier circuit. Figure 2D is a schematic illustration of a further example of reducing the number of circuit lines having changeable states in the exemplary multiplier circuit.
Figure 3 is a schematic illustration of a system for training a neural network.
Figure 4 is a schematic illustration of generating a codebook.
Figure 5 is a schematic illustration of part of a neural network layer. Figure 6 is a flowchart showing exemplary' processing for adapting parameters of a neural network.
Figure 7 is a flowchart showing exemplary processing for training a neural network.
Figure 8 is a schematic illustration of an exemplary computing system.
Figure 9 is a schematic illustration of an exemplary neural network hardware acceleration unit.
Figure to is a schematic illustration of a loss function term.
Like reference numbers and designations in the various drawings indicate like elements.
Detailed Description
Figure 1 shows an example system too for adapting a neural network for reduced power consumption when implemented on one or more processing units comprising one or more multiplier circuits. The system too comprises a computing system 101. The computing system 101 may comprise one or more processors located in one or more locations. The computing system 101 may comprise a server, desktop computer, a mobile device such as a laptop, smartphone or tablet, or any other suitable computing apparatus. The computing system 101 may be a distributed system.
The computing system tot is configured to obtain a parameter 102 of the neural network that is to be adapted. The parameter 102 may be obtained from a local memory or storage device associated with the computing system 101 or maybe received over a network connection.
The computing system 101 is configured to modify the value of the parameter to reduce the number of state changes in one or more circuit lines of at least one multiplier circuit of the one or more multiplier circuits as multiplication operations are performed by the at least one multiplier circuit, wherein the multiplication operations have the parameter as a constant operand. As explained above, it is possible to reduce power consumption when the neural network is implemented on one or more processors comprising one or more multiplier circuits by choosing parameter values that reduce the number of state changes in the circuit lines of the multiplier circuit (“toggling”) as a set of multiplication operations (e.g. two or more successive multiplication operations) are performed when the parameter is a constant operand for the set of multiplication operations. This is further illustrated in Figures 2A to 2D and explained below. It will be understood that the term “constant operand”, as used herein in connection with multiplication operations, refers to an operand which is kept the same when a set of two or more multiplication operations are performed, but which may be different when other multiplication operations are performed.
It will be appreciated that whilst the above describes modification of a parameter, the computing system 101 may be configured to modify a plurality of parameters of the neural network. In some implementations, a subset of the parameters of the neural network are modified whilst in other implementations, all of the parameters of the neural network are modified. The computing system 101 may be configured to carry out the modification of the parameters serially or in parallel or in some combination of serial and parallel processing. The computing system 101 may therefore be a distributed system. The parameters that are modified by the computing system 101 may be any type of neural network parameter and may be part of any type of neural network layer such as a convolutional neural network layer, a recurrent neural network layer, an attention layer, or a Transformer block amongst others.
Figure 2A is a schematic illustration of a 3 x 3 bit-wise multiplier circuit 200, particularly for integer multiplication. The multiplier circuit 200 comprises a plurality of AND logic gates, 20ia-20ii, for performing bit-wise multiplication and an ADDER
circuit, 202, for accumulating values following bit-wise multiplication. In Figure 2A, one operand, the bit-string b bibo is to be held constant across a set of multiplication operations. The other operand, the bit-string a2aia0 is variable across the set of multiplication operations.
In the example of Figure 2B, the constant operand of the multiplier circuit 200 is set to a value of 111. In this case, all of the circuit lines 2O3a-2O3i of every AND gate output are susceptible to toggling as the output value of each AND gate is dependent on the value of the variable operand given that the constant operand is set to one for each AND gate. This is represented by the lines with increased thickness in Figure 2B.
In the second example in Figure 2C, the constant operand is set to a value of 110. In this case, circuit lines 203a, 203d and 203g are no longer susceptible to toggling given that bit b0 of the constant operand is set to zero. The output of the AND gates, 201a, 20id and 201g, having b0 as an input will always be zero irrespective of the value of the variable operand. Thus, going from an integer value of 7 (binary 111) to an integer value of 6 (binary no) can result in a potential one-third reduction in toggling. As such, modification of parameter values in a neural network to at least avoid worst-case constant operand values can result in significant power savings.
In the example of Figure 2D, the constant operand is set to a value of 010. In this case, only circuit lines 201b, 20ie and 20th are susceptible to toggling. As such, modifying some of the parameter values in a neural network towards values that have lower toggling can achieve further power savings.
It will also be appreciated that due to timing issues, toggling can occur within a cycle as it possible that not all circuit lines are set precisely at the same time. Thus, modification of parameter values to reduce toggling across a set of multiplication operations also reduces this type of within-operation toggling.
The examples featured in Figures 2A - 2D depict 33 x 3 bit-wise multiplier circuit for ease of explanation. It will be appreciated that limitation to a 3 x 3 bit-wise multiplier circuit is not intended and that the above principles apply to other sizes and types of multiplier circuit.
Where the logical layout of the multiplier circuit is known, the modification of the value of the parameter may be carried out based upon such knowledge to reduce to the potential for toggling. For example, a static analysis may be carried out or a circuit simulation or test-bed may be used to estimate toggling effects. The computing system 101 may include the one or more processing units comprising the one or more multiplier circuits that the neural network is to be implemented on. In such cases, it may be possible to directly measure toggling effects and power consumption.
In other cases, the modification may be based upon a metric that is representative of the potential for a parameter value to cause toggling. As such, the metric may act as a proxy for the number of state changes in the circuit lines of the multiplier circuit. An example proxy metric is the Hamming weight of a multiplicative portion a binary representation of the parameter value (that is, the part of a binary representation that undergoes multiplication). The Hamming weight is a measure of the number of bits that are set to one in a binary value (not to be confused with the Hamming distance between two values). As can be seen from the examples of Figures 2B to 2D, the lower the Hamming weight of a constant operand, i.e. the fewer bits that are set to one, the less susceptible the multiplier circuit is to toggling. This observation should be applicable to the vast majority of multiplier circuit implementations. As such, modifying the parameter value to one having a lower Hamming weight should reduce the number of state changes in the circuit lines of almost any multiplier circuit without having to have specific knowledge of the underlying implementation of the multiplier circuit that the neural network is to be deployed on. It will be appreciated that metrics other than the Hamming weight may be used as deemed appropriate by the person skilled in the art. For example, an operand may be “Booth Encoded” which transforms overlapping windows of one operand into higher radix multiplications. In these alternative encoding schemes and multiplier circuit implementations, there will still exist operands that induce different amounts of toggling and other proxy metric equivalents to the Hamming weight will be apparent for these different implementations of multiplier circuit and encoding schemes. In addition, a further example is described in more detail below with respect to floatingpoint numbers.
The computing system 101 may be configured to carry? out the modification of the value of the parameter 102 during training of the neural network. For example, modifying the
value of the parameter 102 may be based upon a loss function comprising a state change reduction term that encourages a reduction in the number of state changes in the circuit lines of the (at least one) multiplier circuit as multiplication operations are performed by the (at least one) multiplier circuit. The multiplication operations may have the parameter as a constant operand.
For example, Figure 3 shows a schematic illustration of an exemplary system 300 for training a neural network having reduced power consumption when implemented on one or more processing units comprising one or more multiplier circuits. The system 300 may be implemented using any type of computing system such as the computing system 101 of Figure 1. The computing system may comprise one or more processors located in one or more locations. The computing system may comprise a server, desktop computer, a mobile device such as a laptop, smartphone or tablet, or any other suitable computing apparatus. The computing system may be a distributed system. The computing system may also include the one or more processing units comprising the one or more multiplier circuits that the trained neural network is to be implemented on. Alternatively, the computing system for carrying out training may be separate to the system that the trained neural network is to be adapted for and deployed on.
The system 300 is configured to obtain a training input 301. The training input 301 may be part of a training dataset as appropriate for the particular task the neural network 302 is being trained to perform. Example tasks are described in more detail below. The training input 301 may be obtained from a local memory or storage device, or may be obtained via a network connection. The system 300 is configured to process the training input 301 using current parameter values of the neural network 302 to generate a neural network output 303 as appropriate for the particular task. Should the computing system include the one or more processing units comprising the one or more multiplier circuits that the neural network is to be implemented on, the processing to generate a neural network output 303 may be carried out on such hardware.
The system 300 is configured to determine a value for a loss function. The loss function is based upon the neural network output 303 and a target output 304. The target output 304 may be an output that the neural network 302 is expected to produce for the corresponding training input 301. The target output 304 may be provided as part of
the training dataset, for example, in the case of supervised learning or the target output 304 may be derived from the training input 301, for example, in the case of unsupervised learning. The determination of the value for the loss function may be carried out by a model trainer 305.
The loss function is further configured to encourage a reduction in the number of state changes in one or more circuit lines of the one or more multiplier circuits as multiplication operations are performed by the one or more multiplier circuits when the multiplication operations have the current parameter values of the neural network as constant operands. For example, the loss function may be based upon a proxy metric representing the number of state changes in the circuit lines of the one or more multiplier circuits. As discussed above, the proxy metric may be based upon a Hamming weight. A further example of a loss function relating to floating-point numbers is described in more detail below.
The loss function may comprise a plurality of terms, such as an error term that reflects the performance of the neural network on the particular task and a state change reduction term that encourages selection of parameters that have reduced toggling. An example loss function is shown below. = l|o - till + #(w)
The example loss function comprises an error term that measures the mean squared error between the neural network output 0 and the target output t. The example loss function further comprises a state change reduction term H(u’) that is the Hamming weight of one or more parameters, w, of the neural network (or more specifically the multiplicative portion of the binary representation of the parameter). The state change reduction term may be applied to a subset of the parameters of the neural network, for example, to the parameters belonging to particular layers of the neural network and/or to parameters that are less likely to have an impact on the performance of the neural network on the particular task. Alternatively, the state change reduction term may be applied to all of the parameters of the neural network. Where the Hamming weight is applied to a plurality of parameters, the value of the state change reduction term may be an aggregated value of the Hamming weight of the individual parameters. For example, a summation or an average may be determined. The example loss function
further comprises a hyperparameter a that controls the contribution of the state change reduction term to the overall loss function and the importance of reducing toggling against improving task performance. The system 300 is configured to adjust the current parameter values of the neural network based upon the determined value for the loss function. The adjustment of the parameter values may be carried out according to any suitable neural network optimization technique. For example, where the loss function is differentiable or can be approximated using a differentiable form, stochastic gradient descent may be used. Where the loss function is not differentiable, techniques such as simulated annealing, genetic algorithms or other appropriate non-differentiable optimization methods may be used.
The value for the loss function may be determined on the basis of a plurality of training inputs, for example, the individual loss function values corresponding to each training input of a batch of training inputs may be aggregated. The adjustment of the current parameter values may be based upon the aggregated loss function value.
The system 300 may be configured to repeat the above process for other training inputs and/ or over multiple passes of a training dataset until a stopping criterion is reached.
For example, a threshold number of training iterations have been performed or the improvement in the loss function value is at a threshold level.
Reducing the power consumption of floating-point multiplier circuits will now be described. Floating-point numbers comprise a mantissa and an exponent. The exponent may have a positive or negative value. However, the exponent is conventionally stored in biased form, that is, a fixed bias value is added to the exponent such that the biased form is unsigned. For example, for a 16-bit floating-point number with an 8-bit exponent, a fixed bias of 127 may be added. This means that an exponent with a value of zero in biased binary form is 01111111 and an exponent value of one in biased binary form is 10000000.
When two floating-point numbers are multiplied together, the exponents are added and the mantissas are multiplied. For the mantissas, the techniques described herein for integer multiplication are also applicable for reducing the power consumption when multiplying the mantissas. Regarding the exponents, transitioning between a value of
zero and one (in both directions) results in a large degree of toggling in floating-point multiplier circuits and as such, results in a large amount of power consumption. That is, transitioning from oiiinii (representing zero) to 1OOOOOOO (representing one) means that all eight bits in that portion of the circuit have to change such that the dynamic power associated with this change is high. Furthermore, the results from the addition of the exponents may be fed into a number of other circuits in a floating-point adder. For example, the added values may be fed into a further adder circuit that subtracts a bias value, e.g. 01111111 (127). If its input changes significantly, this circuit consumes more power. There may also be a “normalization” circuit that determines if the exponent needs to be re-adjusted given the new mantissa value from the multiplication of the mantissas. A large change to the bits in the new exponent causes substantially more toggling and power consumption within that circuit.
As an example, 3/2 (1.5 in decimal) may be represented by a binary mantissa of 1.1 and a binary exponent of 01111111. Squaring 3/2 results in 9/4 (2.25) which may be represented by a binary mantissa of 1.001 and a binary exponent 10000000. Here, numerous bits change in the exponent and thus this is an operation that consumes a lot of power. By comparison, 3 in decimal as a floating-point number may be represented by a binary mantissa of 1.1 and a binary exponent of 10000000. Squaring 3 results in 9 which may be represented by a binary mantissa of 1.001 and a binary exponent of 10000011. In this second operation, fewer bits in the exponent have transitioned and as such, there is lower power consumption.
In relation to neural network parameters, exponent values of zero and one occur quite frequently; thus neural network parameters often have exponent values that are capable of causing large amounts of toggling when used in a floating-point multiplier circuit for the reasons described above.
As such, adjusting the values of the parameters of a neural network to have exponent values that induces less toggling would reduce power consumption in a floating-point multiplier circuit. In this regard, where the neural network parameter is a floatingpoint number, modifying the value of the parameter may comprise modifying the exponent of the floating-point number. As described above, modifying the value of the parameter may be based upon a loss function comprising a state change reduction term. In one example, the state change
reduction term penalizes parameters having exponent values that have the potential to induce a large degree of toggling. An example loss function is shown in Figure to. As shown, the loss function has higher loss values for exponent values of zero and one compared to other values (such as -4, -2 and 4).
Referring back to Figure 1, in some implementations, the computing system 101 is configured to modify the value of the parameter based upon a codebook of predetermined operand values for reducing the number of state changes. For example, the codebook of pre-determined operand values may be generated based upon a proxy metric such as the Hamming weight. This is illustrated in Figure 4.
Figure 4 shows a list 401 of all 4-bit binary integers. It is determined that binary values having a Hamming weight of two or lower can be included the codebook 402. As such, the binary values, 0111, toil, 1101, 1110 and till, all having a Hamming weight of three or higher are rejected from inclusion in the codebook. The acceptable Hamming weight threshold may be set based upon a power consumption budget or any other suitable criterion. In addition, any other suitable criterion may be used for determining the entries of the codebook and any other suitable bit-size may be used for the values of each entry.
The computing system 101 may be configured to select the nearest value in the codebook as a replacement value for the parameter. The modification of the parameter value based upon a codebook may be carried out after the neural network has undergone training, i.e. in a post-processing step to adapt a trained neural network for implementation on a multiplier circuit. Alternatively, or in addition, modification of the parameter value based upon a codebook may be carried out during training of the neural network, for example, the parameters of the neural netw ork may be trained and adjusted using a task-specific loss function and then modified using the codebook in a separate modification step. Modification of the parameter value for adapting the neural network for implementation on a multiplier circuit may be performed during training of the neural network and/or subsequent to training of the neural network.
The computing system 101 may be configured to measure the performance of a neural network having the modified parameter value on a machine learning task. The machine learning task may be the same task that the neural network has been trained on or may be a different task. The computing system 101 may be configured to maintain the
modified parameter value in the neural network when the performance is above a threshold value or reject the modified parameter value when the performance is below the threshold value. Thus, the computing system 101 may be configured to determine whether or not the modification results in an acceptable trade-off between potential reduced power consumption and a reduction in task performance. (Though in some cases, it is possible the modification could result in an increase in task performance.) If the modification is rejected, the computing system 101 may be configured to select a different value on the basis of more relaxed constraints, for example, the contribution of the state change reduction term in a loss function may be lowered or the Hamming weight threshold lowered to provide additional values for a codebook. Alternatively, the parameter may be left unchanged and a different parameter is selected for modification. In one example, a parameter may be selected for modification based upon the magnitude of the gradient of the loss function with respect to the parameter. A parameter having a small gradient may be less likely to have an impact on task performance and hence may be more suited for modification. In some cases, it may be desirable to trigger a large change in the parameter value, for example, during training of the neural network, a large change may cause training to move out of a local optima. The training may use checkpointing in order to monitor training and select the best values for parameters.
The computing system 101 may be configured to provide the modified parameter 103 as an output. A neural network 104 including the modified parameter value may then be deployed on appropriate hardware. For example, the neural network may be deployed a neural network hardware acceleration unit 105 such as Tensor Processing Units (TPUs), Graphics Processing Units, Application Specific Integrated Circuits (ASICs), and Field Programmable Gate Arrays (FPGAs) amongst others. An exemplary neural network hardware acceleration unit is shown in Figure 8 and described in more detail below. The computing system 101 may be configured to deploy the neural network 104 including the modified parameter value. For example, the computing system 101 may interface with the neural network hardware acceleration unit 105 to provide the unit 105 with the parameters of the neural network, appropriate task data and instructions for carrying out required neural network operations. The neural network hardware acceleration unit 105 may comprise one or more multiplier circuits 106 for carrying out
multiplication operations using the modified parameter 103 as a constant operand for a set of multiplication operations.
The modified parameter value may be set as an operand of the multiplier circuit 106. The other operand input of the neural network multiplication operation may be obtained as appropriate. This may for example be an input to the layer of the neural network that includes the modified parameter value 103, i.e. the output of a previous layer of the neural network 104 resulting from processing of a first data item. The multiplier circuit 106 is configured to perform the multiplication of the operand inputs and to output the multiplication result.
The multiplier circuit 106 may be configured to carry out a second neural network multiplication operation with the modified parameter value 103 remaining unchanged as one operand input. A different second operand input may be obtained. This may for example be a result of processing a second data item different from the first data item.
The multiplier circuit 106 is configured to perform the multiplication of the modified parameter value 103 and the different second operand input and to output the multiplication result. In other words, the multiplication operations may comprise consecutive multiplication operations with the parameter having the modified value 103 as a constant operand.
In more detail, Figure 5 is schematic illustration of part of a neural network layer 500. The neural network layer 500 comprises a plurality of inputs Xi...xn. These may be the output of a previous neural network layer or may be an input data item.
For ease of explanation, Figure 5 depicts one output y. It will be appreciated that a neural network layer typically comprises many more output units. The neural network layer 500 further comprises a set of parameters or weights Wi...wn that are used for the calculation of the output y. For example, y may be calculated as the weighted sum of the inputs followed by a non-linearity f(.) as shown below:
The above multiplications between an input, x, and a weight, w, maybe implemented on a multiplier circuit. In one example, there may be a plurality of different input data items that are to be processed by a neural network and the neural network layer 500.
The processing of the different input data items may be grouped by operations
involving the same weight. For example, all multiplication operations involving weight Wi may be carried out consecutively. That is, the multiplication between Wi and each corresponding x, value of plurality of different input data items. Weight w, may be loaded as one operand input to the multiplier circuit and remains unchanged for the given group of multiplication operations. The other operand input is loaded with the first x, value to carry out the first multiplication operation of the set of multiplication operations. Once completed, the first x, value is replaced with the next x, value of the next multiplication operation and so on. Weight w, is a constant operand of the set of multiplication operations given that this operand input is set once and does not change for the set of multiplication operations.
Once the set of multiplication operations involving weight w, have been completed, a set of multiplication operations involving weight w2 may be executed on the multiplier circuit with weight u replaced with weight w2 on the corresponding operand input of the multiplier circuit. As with the multiplication operations involving weight Wi, weight w2 is held constant whilst the corresponding x2 values of each data item are cycled through for carrying out the set of multiplication operations. It will be appreciated that a processing unit may comprise a plurality of multiplier circuits. As such, each set of multiplication operations for each weight may be carried in parallel using the plurality of multiplier circuits.
In another example, the parameters correspond to the weights of a 2D convolution kernel. For a 2D input, convolution involves passing the convolution kernel over different locations of the input and computing a weighted sum of the kernel and the corresponding values at that location. Similar to the previous example, the multiplication operations maybe grouped by operations involving the same weight and set as a constant operand for the given set of multiplication operations. In this case, the plurality of input data items may be the different locations of one 2D input data item.
Referring now to Figure 6, processing for adapting a neural network for reduced power consumption when implemented on one or more processing units comprising one or more multiplier circuits will now be described. It will be appreciated that the processing may be performed using the systems too, 300 of Figures 1 and 3 respectively. As such,
features described above in the context of these systems may combined as appropriate with features described in the context of the below processing.
The one or more processing units may comprise at least one type of neural network hardware acceleration unit. For example, Tensor Processing Units (TPUs), Graphics Processing Units, Application Specific Integrated Circuits (ASICs), and Field Programmable Gate Arrays (FPGAs) amongst others.
At block 601, a parameter of the neural network is obtained. As discussed above, the parameter may be obtained from a local memory or storage device associated with a computing system carrying out the processing or may be received over a network connection. The parameter may be any type of neural network parameter and may be part of any type of neural network layer such as a convolutional neural network layer, a recurrent neural network layer, an attention layer, or a Transformer block amongst others.
At block 602, the value of the parameter is modified to reduce the number of state changes in one or more circuit lines of at least one multiplier circuit of the one or more multiplier circuits as multiplication operations are performed by the at least one multiplier circuit, wherein the multiplication operations have the parameter as a constant operand. As described above, the number of state changes in the circuit lines of the at least one multiplier circuit may be represented by a proxy metric. The proxy metric may be based upon a Hamming weight of a binaiy representation of the value of the parameter.
As discussed above, modifying the value of the parameter may be carried out during training of the neural network and/ or subsequent to the training of the neural network. Modifying the value of the parameter may be based upon a loss function comprising a state change reduction term that encourages a reduction in the number of state changes in the circuit lines of the at least one multiplier circuit as multiplication operations are performed by the at least one multiplier circuit, wherein the multiplication operations have the parameter as a constant operand. The state change reduction term may be based upon the proxy metric. Alternatively, modifying the value of the parameter may be based upon a codebook of pre-determined operand values for reducing the number of state changes. The codebook of pre-determined operand values may be generated based upon the proxy metric.
As described above, the processing may further comprise measuring the performance of a neural network having the modified parameter value on a machine learning task. The modified parameter value in the neural network may be maintained when the performance is above a threshold value or rejected when the performance is below the threshold value.
The modified parameter may be provided as an output. A neural network including the modified parameter value may be deployed on appropriate hardware. For example, the neural network may be deployed on a neural network hardware acceleration unit.
The processing may further comprise setting the modified parameter value as a first operand input of the at least one multiplier circuit and obtaining a second operand input of the at least one multiplier circuit for carrying out a first neural network multiplication operation. The at least one multiplier circuit may perform a multiplication of the first and second operand inputs and output the multiplication result. A different second operand input of the at least one multiplier circuit may be obtained for carrying out a second neural network multiplication operation. The at least one multiplier circuit may perform a multiplication of the first operand input and the different second operand input and output the multiplication result. Thus, the multiplication operations may comprise consecutive multiplication operations with the parameter as a constant operand. It will be appreciated that here the terms “first” and “second” operand are not intended to imply any ordering of the operands and are used merely to reference and differentiate between the two operands of a multiplication operation.
The above described processing may be repeated for modifying a plurality of parameters of the neural network. In some implementations, a subset of the parameters of the neural network are modified whilst in other implementations, all of the parameters of the neural network are modified. The processing for the modification of the parameters may be carried out serially or in parallel or using some combination of serial and parallel processing.
Referring now to Figure 7, processing for training a neural network having reduced power consumption when implemented on one or more processing units comprising one or more multiplier circuits will now be described. It will be appreciated that the
processing may be performed using the systems too, 300 of Figures 1 and 3 respectively. As such, features described above in the context of these systems may combined as appropriate with features described in the context of the below processing. The one or more processing units may comprise at least one type of neural network hardware acceleration unit. For example, Tensor Processing Units (TPUs), Graphics Processing Units, Application Specific Integrated Circuits (ASICs), and Field Programmable Gate Arrays (FPGAs) amongst others. The computing system carrying out the processing of Figure 7 may also include the one or more processing units comprising the one or more multiplier circuits that the trained neural network is to be implemented on. Alternatively, the computing system for carrying out the processing of Figure 7 may be separate to the system that the trained neural network is to be adapted for and deployed on. At block 701, a training input is obtained. The training input may be part of a training dataset as appropriate for the particular task the neural network is being trained to perform. Example tasks are described in more detail below. The training input may be obtained from a local memory or storage device, or may be obtained via a network connection.
At block 702, the training input is processed using current parameter values of the neural network to generate a neural network output. Should the computing system carrying out the processing include the one or more processing units comprising the one or more multiplier circuits that the neural network is to be implemented on, the processing to generate a neural network output may be carried out on such hardware.
At block 703, a value for a loss function is determined. The loss function is based upon the neural network output and a target output, and the loss function encourages a reduction in a number of state changes in one or more circuit lines of the one or more multiplier circuits as multiplication operations are performed by the one or more multiplier circuits when the multiplication operations have the current parameter values of the neural netw ork as constant operands.
As described above, the loss function may be based upon a proxy metric representing the number of state changes in the circuit lines of the one or more multiplier circuits.
The proxy metric may be based upon a Hamming weight.
At block 704, the current parameter values of the neural network are adjusted based upon the determined value for the loss function. As described above, the adjustment of the parameter values may be carried out according any suitable neural network optimization technique such as stochastic gradient descent.
The above described processing may be repeated for other training inputs and/or over multiple passes of a training dataset until a stopping criterion is reached. For example, a threshold number of training iterations have been performed or the improvement in the loss function value is at a threshold level.
Example tasks that a neural network may be trained to perform will now be described.
It will be appreciated that the neural networks described above may be trained to perform any appropriate task and the below examples are illustrative and not intended to be limiting. The neural network may be configured to receive and process any type of digital input and to provide any type of digital output including a score, classification, or regression output. The input to and/or the output of the neural network may be sequential in nature as appropriate for the task. In one example, a neural network may be configured to perform an image processing task. The neural network may be configured to receive and process image data as an input. The image data may comprise one or more values for each of a plurality of pixels, such as intensity values. Alternatively, the image data may comprise a low-level feature encoding of an image. The image data may comprise colour or monochrome data. The image data may captured by an image sensor of a digital camera, LIDAR, infra-red camera or any other camera type.
The image processing task may be an image classification task. The neural network may be configured to process input image data to provide an output indicating the presence of one or more object categories in the input image data. The indication may be a probability, a score or a binary indicator for a particular object category.
The image processing task may be an object detection task. The neural network may be configured to process input image data to provide an output indicating a location of one or more objects that have been detected in the input image data. The indication may be
a bounding box, set of co-ordinates or other location indicator and the output may further comprise a label indicating the corresponding detected object.
The image processing task may be image segmentation. The neural network may be configured to process input image data to provide an output indicating an object category that a pixel (or each pixel) in the input image data belongs to.
The image processing task may be an image encoding task. The neural network may be configured to process input image data to provide a representation of the input image data. The representation may be a compressed encoding of the image data.
The image processing task may be a depth estimation task. The neural network may be configured to process input image data to provide an output indicating an estimated depth of objects depicted in the image data. The output may be a depth map comprising an estimated depth value for each pixel of the input image data.
The image processing task may be a captioning task. The neural network may be configured to process input image data to provide an output comprising a sequence of text in natural language describing the objects depicted within the image.
The image processing task may be a de-noising or in-filling task. The neural network may be configured to process input image data to provide as output a version of the input image data that has reduced noise or artefacts or has missing data imputed. In another example, the neural network may be configured to receive and process audio data as an input. The audio data may comprise any type of digital audio signal and may comprise raw digital samples of a waveform (e.g. amplitude values) or may be an encoding derived from an audio signal such as a spectrogram, mel-frequency cepstral co-efficients or other acoustic features/time-frequency domain representation. The audio data may be obtained from an audio transducer such as a microphone.
The audio data may comprise a speech signal. The audio processing task may be a speech processing task such as speech recognition. The neural network may be configured to process an input speech signal to provide output data comprising one or more probabilities or scores indicating that one or more words or sub-word units
comprise a correct transcription of the speech contained within. Alternatively, the output data may comprise a transcription itself.
The audio processing task may be a keyword (“hotword”) spotting task. The neural network may be configured to process input audio data to provide an indication of whether a particular word or phrase is spoken in the input audio data.
The audio processing task may be a speaker recognition or verification task. The neural network may be configured to process input audio data to provide an indication of the identity of a speaker or to provide an indication of whether a particular speaker is present in the audio data.
The audio processing task may be a language recognition task. The neural network may be configured to process input audio data to provide an indication or delineation of one or more languages present in the input audio data.
The audio processing task may be control task. The neural network may be configured to process input audio data comprising a spoken command for controlling a device to generate output data that causes the device to carry out actions corresponding to the spoken command.
In a further example, the neural network may be configured to receive and process text data. The neural network may be configured to perform a text-to-speech task. The neural network may be configured to process input text data to generate audio data comprising a spoken utterance corresponding to the input text data. This output audio data maybe in a similar format to the input audio data for audio processing tasks described above.
The neural network maybe configured to perform an image generation task. The neural network may be configured to process input text data to generate image data comprising objects corresponding to the input text data. The output image data maybe in a similar format to the input image data for image processing tasks described above.
The neural network may be configured to perform a neural machine translation task. The neural network may be configured to process input text data comprising text in one language to provide output data comprising one or more probabilities or scores
indicating that one or more words or sub-word units in a second language is comprised in a proper translation of the input text data into the second language. Alternatively, the output data may comprise the translation itself. The neural network may be configured to process input text data comprising instructions for controlling a device to generate output data that causes the device to carry out actions corresponding to the instructions.
The neural network may be part of a dialogue system. The neural network may be configured to perform a conditional text generation task. The neural network may be configured to process input text data comprising a user prompt to provide output text data that is a response to the user prompt. The user prompt may be a question and the response may be an answer to the question. The user prompt may be a text description of the function of computer code and the response may be computer code in a programming language that is configured to perform the function. The user prompt may be an initial sequence of computer code in a programming language and the response may be a further sequence of computer code that completes the initial sequence to perform a particular function. The neural network may be configured to perform a natural language processing or understanding task. For example, the task may be an entailment task, a paraphrase task, a textual similarity task, a sentiment task, a sentence completion task, a grammar task or other similar task. In another example, the neural network may be configured to receive and process video data. The video data may comprise a plurality of frames, e.g. image data, and audio data. The above described image and audio processing tasks may therefore also be applicable to video data. In addition, the neural network may be configured to perform an action recognition or detection task. The neural network may be configured to process input video data to provide an output indicating the detection of one or more actions being performed in the video data and/or the spatial and temporal locations of the detected actions within the video data. The indications may be a probability or score indicating a particular action has been detected, the spatial location may be a bounding box or co-ordinates in
the frames of the video, the temporal location may be a set of timestamps or frame numbers of the video.
In another example, the neural network may be configured to receive and process digital documents. The digital document may be an Internet resource or one or more portions or features extracted from an Internet resource. The neural network may be configured to classify the document. The neural network may be configured to process the digital document to provide an output indicating a classification of the digital document. The indication may be a probability, a score or a binary indicator for a particular category. The classification may be a topic of the document.
The neural network may be configured to receive and process features of a personalized recommendation for a user. For example, features characterizing the context for the recommendation such as features characterizing previous actions taken by the user. The neural network may generate an output comprising a probability or score for a particular content item representing the estimated likelihood that the user will respond favourably to being recommended the particular content item.
In another example, the neural network may be configured to perform a health prediction task. The neural network may be configured to receive and process electronic health record data. The neural network may be configured to generate an output comprising an indication of a diagnosis of a particular disease or health condition, or a prediction of the occurrence of an adverse health event, or a predicted treatment for the patient. The indication may be a probability or score.
In a further example, the neural network may be part of a data compression system. The neural network maybe configured to process input data to provide a compressed version of the input data as output. The compressed data may be stored at an appropriate storage or memory device or transmitted to another device.
In another example, the neural network may be configured to perform a drug discovery task. The neural network may be configured to process a graph representing a molecule, a SMILES (Simplified Molecular Input Line Entry System) representation of a molecule, a DNA or RNA sequence, or text data describing one or more characteristics or properties of a molecule for synthesis to provide an output sequence representing a
molecule for synthesis corresponding to the input data. A molecule may be synthesized according to the output sequence.
In another example, the neural network may be part of a reinforcement learning system. In general, in a reinforcement learning system an agent interacts with an environment in order to cariy out a particular task. Observations characterizing the state of an environment may be received. The reinforcement learning system may select an action for an agent to perform based upon the received observations. The action performed by the agent may cause the environment to transition to a new state and the environment may provide a reward signal in response to agent’s action. Further observations of the environment may be received and a new action may be selected based upon the further observations and the received reward if applicable. Actions for the agent to carry out may be selected based upon a history of observations of the environment and actions performed by the agent.
The reinforcement learning system maybe configured to select an action for an agent to perform based upon the output of the neural network. For example, the neural network may be a policy network and may be configured to process the observation characterizing the state of the environment to provide a probability distribution (or set of scores) over a set of possible actions. An action may be selected by sampling an action from the probability distribution or the action with the highest probability/score may be selected. The reinforcement learning system may cause the agent to perform the selected action. Neural networks in reinforcement learning systems may perform other functions such as provide an estimate of the value of a being in a given state of the environment, provide an estimate of the value of cariying out a particular action, provide a model of the environment to predict state transitions and observations, or provide an estimate of the reward function of an environment amongst others. It will be appreciated that in all these cases, whilst a neural network may not directly select an agent action, the output of the neural network feeds into the process for the selection of an action.
The environment may be a real-world environment. The agent may be a mechanical or electronic agent interacting with the real-world environment to carry out a particular task. For example, the agent may be a robot or (semi-)autonomous vehicle operating on land, sea and/ or air. The agent may be tasked with navigating to a specified destination in the environment. The agent may be tasked with locating an object of interest in the
environment. The agent may be tasked with moving an object of interest in the environment to a specified destination.
The observations of the environment may include image data, positional/location data of objects in the environment, including the agent, and/or sensor data. The sensor data may include data from cameras, distance sensors, position sensors, temperature sensors, sensors monitoring the state of components on the agent or in the environment amongst others. The observations may include data characterizing the state of the agent such as, position, linear or angular velocity, force, torque, acceleration, a global or relative pose of the agent or parts of an agent or objects in relation to the agent where appropriate. The observations may be in any number of dimensions and may be absolute or relative observations.
The actions may be control signals to the control the agent such as data indicating a position, velocity, force, torque, acceleration, angles, voltage or current for the agent or components of the agent such as joints, motors, steering, brakes. Alternatively, the actions may be higher-level commands that an agent can interpret and convert to low- level control signals to execute the higher-level command. In another example, the environment may be a real-world manufacturing environment for the manufacture of a product. The product may be any type of product such as a mechanical, chemical, biological or food product. Manufacturing may include any kind of process applied to a product such as treating a product to apply a coating, cleaning the product, deconstructing a product or any transformation of a product or materials. Manufacturing may also include the manufacture of intermediate elements. A manufacturing plant may comprise a plurality of manufacturing units including apparatus for chemical or biological processes and machines, including robots, for processing materials. The manufacturing plant may be configured to move intermediate elements between manufacturing units, such as using an assembly line or other methods of conveyance. Manufacture of a product may include the manufacture of a food product by a kitchen robot, e.g. cooking.
An agent be a mechanical agent as described above, such as, a robot used in the manufacturing process. Alternatively, the agent may comprise an electronic agent configured to control one or more manufacturing units and/ or parameters of a manufacturing process. The agent may comprise a control system configured to control
the manufacturing process. The agent may be tasked with the manufacture of a product whilst minimizing resource usage such as electricity or water consumption and the consumption of materials and other consumables used in the manufacturing process. The reward may be based upon a metric measuring task performance. For example, the metric may measure the quality of the manufactured product, the manufacturing speed, the consumption of resources, or other physical costs.
The observations may include sensor data for monitoring the manufacturing process such as monitoring the state or configuration of materials, machines, processes and working environments. The sensors may be configured to sense mechanical movement or force, pressure, temperature; electrical conditions such as current, voltage, frequency, impedance; quantity, level, flow/movement rate or flow/ movement path of one or more materials; physical or chemical conditions e.g. a physical state, shape or configuration or a chemical state such as pH; configurations of the units or machines such as the mechanical configuration of a unit or machine, or valve configurations; image or video sensors to capture image or video observations of the manufacturing units or of the machines or movement; or any other appropriate type of sensor. In the case of a machine such as a robot the observations from the sensors may include observations of position, linear or angular velocity, force, torque or acceleration, or pose of one or more parts of the machine, e.g. data characterizing the current state of the machine or robot or of an item held or processed by the machine or robot. The agent actions may manipulate the manufacturing process to alter such states. These may include actions to adjust the physical or chemical conditions of a manufacturing unit, or actions to control the movement of mechanical parts of a machine or joints of a robot. The actions may include actions imposing operating conditions on a manufacturing unit or machine, or actions that result in changes to settings to adjust, control, or switch on or off the operation of a manufacturing unit or machine.
In a further example, the environment may be a real-world environment comprising a service facility comprising a plurality of items of electronic equipment, such as a server farm or data centre, for example, a telecommunications data centre, or a computer data centre for storing or processing data, or any service facility. The service facility may also include ancillary control equipment that controls an operating environment of the items of equipment, for example, environmental control equipment such as temperature control e.g. cooling equipment, or air flow control or air conditioning equipment. The agent may be tasked with the operation of the service facility whilst
minimizing resource usage such as electricity or water consumption. The reward may be based upon a metric measuring task performance. For example, the metric may measure the load or throughput of the facility, or the consumption of resources such as electricity, water or other materials such as consumables. The agent may comprise an electronic agent configured to control operation of the items of equipment, or to control operation of the ancillary, e.g. environmental, control equipment.
The observations may comprise any electronic signals representing the functioning of the facility or of equipment in the facility. For example, the observations may be obtained from sensors sensing a state of a physical environment of the facility or sensing a state of one or more of items of equipment or one or more items of ancillary control equipment. These include sensors configured to sense electrical conditions such as current, voltage, power or energy; a temperature of the facility; fluid flow, temperature or pressure within the facility or within a cooling system of the facility; or a physical facility configuration such as whether or not a vent is open.
The actions may be any actions that have an effect on the observed state of the environment, e.g. actions configured to adjust any of the sensed parameters. These may include actions to control, or to impose operating conditions on, the items of equipment or the ancillary control equipment, e.g. actions that result in changes to settings to adjust, control, or switch on or off the operation of an item of equipment or an item of ancillaiy control equipment.
In another example, the environment may be a real-world environment comprising a power generation facility, for example, a renewable power generation facility such as a solar farm or wind farm. The agent may be tasked to control the power generation facility, for example to optimize the times at which certain generation units are switched on or off to meet demand, and/or to control deliveiy of electricity to a power distribution grid. The reward may be based upon a metric measuring task performance. For example, in the case of a task to control the delivery of electrical power to the power distribution grid the metric may relate to a measure of power transferred, or to a measure of an electrical mismatch between the power generation facility and the grid such as a voltage, current, frequency or phase mismatch, or to a measure of electrical power or energy loss in the power generation facility. In the case of a task to maximize the delivery of electrical power to the power distribution grid the metric may relate to a
measure of electrical power or energy transferred to the grid, or to a measure of electrical power or energy loss in the power generation facility.
The actions may comprise actions to control an electrical or mechanical configuration of an electrical power generator such as the electrical or mechanical configuration of one or more renewable power generating elements e.g. to control a configuration of a wind turbine or of a solar panel or panels or mirror, or the electrical or mechanical configuration of a rotating electrical power generation machine. Mechanical control actions may, for example, comprise actions that control the conversion of an energy input to an electrical energy output, e.g. an efficiency of the conversion or a degree of coupling of the energy input to the electrical energy output. Electrical control actions may, for example, comprise actions that control one or more of a voltage, current, frequency or phase of electrical power generated. The observations may comprise any electronic signals representing the electrical or mechanical functioning of power generation equipment in the power generation facility. For example, the observations may be obtained from any sensors sensing a physical or electrical state of equipment in the power generation facility that is generating electrical power, or the physical environment of such equipment, or a condition of ancillary equipment supporting power generation equipment. Such sensors may include sensors configured to sense electrical conditions of the equipment such as current, voltage, power or energy; temperature or cooling of the physical environment; fluid flow; or a physical configuration of the equipment; and observations of an electrical condition of the grid e.g. from local or remote sensors. Observations may also comprise one or more predictions regarding future conditions of operation of the power generation equipment such as predictions of future wind levels or solar irradiance or predictions of a future electrical condition of the grid.
In a further example, the environment may be a chemical synthesis or protein folding environment such that each state is a respective state of a protein chain or of one or more intermediates or precursor chemicals. The agent maybe a computer system for determining how to fold the protein chain or synthesize the chemical. The actions may be possible folding actions for folding the protein chain or actions for assembling precursor chemicals/intermediates and the result to be achieved may include, e.g., folding the protein so that the protein is stable and so that it achieves a particular biological function or providing a valid synthetic route for the chemical. As another
example, the agent may be a mechanical agent that performs or controls the protein folding actions or chemical synthesis steps selected by the system automatically without human interaction. The observations may comprise direct or indirect observations of a state of the protein or chemical/ intermediates/ precursors and/or may be derived from simulation. In a similar way, the environment may be a drug design environment such that each state is a respective state of a potential pharmachemical drug. The agent may be a computer system for determining elements of the pharmachemical drug and/ or a synthetic pathway for the pharmachemical drug. The drug/synthesis may be designed based on a reward derived from a target for the drug, for example in simulation. As another example, the agent may be a mechanical agent that performs or controls synthesis of the drug.
In another example, an agent may manage distribution of tasks across computing resources e.g. on a mobile device and/or in a data centre. The actions may include assigning tasks to particular computing resources. The reward may be based upon a load, latency, or throughput of the device or data centre and/or resource consumption such as power. In another example, the observations may include textual or spoken instructions provided to the agent by a third-party (e.g., an operator of the agent). For example, the agent may be an autonomous vehicle, and a user of the autonomous vehicle may provide textual or spoken instructions to the agent (e.g., to navigate to a particular location).
In some implementations, the environment may be a simulation of the above described real-world environments. The simulation may be used to train the reinforcement learning system for example. This can avoid unnecessaiy wear and tear and damage to the real-world environment or real- world agent and can allow the system to be trained and evaluated on situations that occur rarely or are difficult or unsafe to re-create in the real-world environment. For example, the system may be partly trained using a simulation of the agent in a particular real-world environment, and afterwards deployed to control the real agent in the particular real-world environment. Thus, in such cases the observations of the simulated environment relate to the real-world environment, and the selected actions in the simulated environment relate to actions to be performed by the mechanical agent in the real-world environment.
In a further example, the environment may be an electrical, mechanical or electromechanical design environment, e.g. an environment in which the design of an electrical, mechanical or electro-mechanical entity is simulated. The simulated environment may be a simulation of a real-world environment in which the entity is intended to work. The task may be to design the entity. The observations may comprise observations that characterize the entity, i.e. observations of a mechanical shape or of an electrical, mechanical, or electro-mechanical configuration of the entity, or observations of parameters or properties of the entity. The actions may comprise actions that modify the entity e.g. that modify one or more of the observations. The reward may comprise one or more metrics of performance of the design of the entity. For example, the reward may relate to one or more physical characteristics of the entity such as weight or strength or to one or more electrical characteristics of the entity such as a measure of efficiency at performing a particular function for which the entity is designed. The design process may include outputting the design for manufacture, e.g. in the form of computer executable instructions for manufacturing the entity. The process may include making the entity according to the design. Thus, a design process of an entity may be optimized, e.g. by reinforcement learning, and then the optimized design output for manufacturing the entity, e.g. as computer executable instructions; an entity with the optimized design may then be manufactured.
Figure 8 shows a schematic illustration of an exemplary computer apparatus 800. The computer apparatus 800 comprises a central processing unit (CPU) 801. The computer apparatus 800 may comprise a plurality of CPUs and/or the CPU may comprise a plurality of processing units. The CPU 801 is configured to execute processable readable instructions to carry out operations such as those of a corresponding computer program.
The computer apparatus 800 further comprises a memory 802. The memory 802 may be a volatile memory such as RAM and may comprise a plurality of memoiy devices.
Alternatively, or in addition, the memory 802 may comprise non-volatile memoiy such as ROM. The memory 802 may be configured to store instructions of a computer program for the CPU 801 to execute. The memory 802 may be configured to store data that the CPU 801 is configured perform operations on.
The computer apparatus 800 also comprises one or more storage devices 803. The one or more storage devices 803 may be non-volatile and may be configured to store user data for example. The one or more storage devices 803 may comprise a hard disk drive (HDD), solid state drive (SSD) and/or any other storage devices including portable storage devices such as removeable USB drives and SD cards or devices for reading from removeable media such as CD-ROM, DVD-ROM, Blu-ray and other disks.
The computer apparatus 800 further comprises a graphics processing unit (GPU) 804.
In some implementations, a GPU 804 is integrated with the CPU 801 rather than being a separate component. The GPU 804 is configured to provide output for a (graphical) user interface of the computer apparatus 800. In some implementations, the GPU 804 may be configured to operate as a neural network hardware acceleration unit for carrying out neural network operations. The computer apparatus 800 also comprises one or more network interfaces 805. The one or more network interfaces 805 may comprise a w ired interface such as Ethernet, and/or a wireless interface such as Wi-Fi or Bluetooth for connecting to any type of network including a local area network (LAN) such as an intranet, a wide area network (WAN) such as the Internet or a cellular network. The computer apparatus 800 maybe configured to receive data from a network and/ or transmit data to the network via the network interface 805.
The computer apparatus 800 further comprises an input/output (I/O) interface 806.
The I/O interface 806 may be configured to provide communication with one or more devices for receiving user input such as a keyboard, mouse, trackball, touchscreen, gesture-based interfaces or other appropriate input device. The I/O interface 806 may be configured to provide output to a connected output device such as a monitor.
The computer apparatus 800 comprises one or more buses 807 to provide communication between the various elements of the computer apparatus 800.
The computer apparatus 800 may be an exemplary implementation of the computing systems too, 300 of Figures 1 and 3. Figure 9 shows a schematic illustration of an exemplary7 neural network hardware acceleration unit 900. The unit 900 comprises a controller 901 that is configured to
control operation of the unit 900. The unit 900 further comprises a host interface 902 that is configured to communicate with an external device such as a user device. The unit 900 may be provided with data and instructions via the host interface 902 to carry out operations requested by the external device. The controller 901 may further comprise a data memory 903 configured to store the data to be operated on. The data memory 903 may also be configured to store the parameters of a neural network. The controller 901 may also comprise an instruction memory 904 configured to store instructions for carrying out requested operations. The controller got maybe configured to interpret and execute the instructions stored in the instruction memory 904 using one or more processing units 905a...n of the unit 900. The controller 901 may be configured to determine an appropriate distribution of (sub-)operations/data to the one or more processing units 905a... n for carrying out the requested operations.
The output of executed instructions may be transmitted to the external device via host interface 901.
The unit 900 comprises a plurality of processing units 905a... n. Each processing unit comprises a plurality of multiplier circuits 906a...n and one or more memories 907. For example, separate memories may be used to store the parameters of a neural network and the data to be processed by the neural network. The multiplier circuits 906a... n may be configured to carry out appropriate neural network operations such as the multiplication of an activation input and a neural network parameter. In particular, the multiplier circuits may carry out multiplication operations where parameters of the neural network are held as constant operands for a set of multiplication operations as described above.
Though not shown, it will be appreciated that each processing unit may comprise further components for performing other arithmetic or non-arithmetic operations. In addition, the controller 901 maybe a processing unit that has been designated as the controller 901 and any processing unit may serve as the controller 901.
The unit 900 further comprises one or more data buses 908 configured to transmit data between each of the plurality of processing units 905a...n and the controller 901. For example, intermediate results such as partial products may be transmitted between processing units as necessary. The data buses 908 and the plurality of processing units 905a...n may be arranged according to any appropriate topology such as a ring or mesh configuration.
Specific embodiments of the subject-matter have been described. It will be appreciated that the described embodiments are to be considered exemplary and non-limiting and that other embodiments will fall within the scope of the appended claims. For example, actions described as being carried out in a particular order may be carried out in a different order. Actions shown as being sequential may be carried out in parallel or using a combination of parallel and serial processing. Where a specific arrangement is described for carrying out a particular function, other suitable arrangements for carrying out the particular function may also fall within the scope of the claims. For example, actions carried out by a plurality of modules may be carried out by a singular module and vice versa.
Claims
Claims
1. A computer-implemented method for adapting a neural network for reduced power consumption when implemented on one or more processing units comprising one or more multiplier circuits, the method comprising: obtaining a parameter of the neural network; and modifying a value of the parameter to reduce a number of state changes in one or more circuit lines of at least one multiplier circuit of the one or more multiplier circuits as multiplication operations are performed by the at least one multiplier circuit, wherein the multiplication operations have the parameter as a constant operand.
2. The method of claim 1, wherein the number of state changes in the circuit lines of the at least one multiplier circuit is represented by a proxy metric. 3- The method of claim 2, wherein the proxy metric is based upon a Hamming weight of at least a portion of a binary representation of the value of the parameter.
4. The method of any preceding claim, wherein the parameter is a floating-point number comprising an exponent and a mantissa, and wherein modifying the value of the parameter comprises modifying the exponent of the floating-point number.
5. The method of any preceding claim, wherein modifying the value of the parameter is carried out during training of the neural network. 6. The method of claim 5, wherein modifying the value of the parameter is based upon a loss function comprising a state change reduction term that encourages a reduction in the number of state changes in the circuit lines of the at least one multiplier circuit as the multiplication operations are performed by the at least one multiplier circuit.
7. The method of claim 6 when dependent on claims 2 or 3, wherein the state change reduction term is based upon the proxy metric.
8. The method of any one of claims 1 to 5, wherein modifying the value of the parameter is based upon a codebook of pre-determined values for reducing the number of state changes.
9. The method of any preceding claim, wherein modifying the value of the parameter is carried out subsequent to the training of the neural network. to. The method of any preceding claim, the method further comprising: measuring the performance of a neural network having the modified parameter value on a machine learning task; and maintaining the modified parameter value in the neural network when the performance is above a threshold value or rejecting the modified parameter value when the performance is below the threshold value.
11. The method of any preceding claim, wherein the one or more processing units comprise at least one type of neural network hardware acceleration unit.
12. The method of any preceding claim, wherein the multiplication operations comprise consecutive multiplication operations with the parameter as a constant operand. 13. The method of any preceding claim, the method further comprising: setting the modified parameter value as a first operand input of the at least one multiplier circuit; obtaining a second operand input of the at least one multiplier circuit for carrying out a first neural network multiplication operation; performing, by the at least one multiplier circuit, a multiplication of the first and second operand inputs; and outputting the multiplication result.
14. The method of claim 13, method further comprising: obtaining a different second operand input of the at least one multiplier circuit for carrying out a second neural network multiplication operation; performing, by the at least one multiplier circuit, a multiplication of the first operand input and the different second operand input; and outputting the multiplication result.
15- A computer-implemented method for training a neural network having reduced power consumption when implemented on one or more processing units comprising one or more multiplier circuits, the method comprising: obtaining a training input; processing the training input using current parameter values of the neural network to generate a neural network output; determining a value for a loss function, wherein the loss function is based upon the neural network output and a target output, and wherein the loss function encourages a reduction in a number of state changes in one or more circuit lines of the one or more multiplier circuits as multiplication operations are performed by the one or more multiplier circuits when the multiplication operations have the current parameter values of the neural network as constant operands; and adjusting the current parameter values of the neural network based upon the determined value for the loss function.
16. The method of claim 15, wherein the loss function is based upon a proxy metric representing the number of state changes in the circuit lines of the one or more multiplier circuits. 17. The method of claim 16, wherein the proxy metric is based upon a Hamming weight.
18. The method of any one of claims 15 to 17, wherein the one or more processing units comprise at least one type of neural network accelerator unit.
19. A system comprising: one or more processors; and one or more computer readable storage media comprising processor readable instructions to cause the one or more processors to carry out a method according to any preceding claim.
20. One or more non-transitory computer readable storage medium comprising instructions which, when executed by a computer, cause the computer to carry out the method of any one of claims 1 to 18.
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/US2023/026365 WO2025005909A1 (en) | 2023-06-27 | 2023-06-27 | Adapting neural networks for reduced power consumption on multiplier circuits |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| EP4713800A1 true EP4713800A1 (en) | 2026-03-25 |
Family
ID=87426637
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| EP23744602.6A Pending EP4713800A1 (en) | 2023-06-27 | 2023-06-27 | Adapting neural networks for reduced power consumption on multiplier circuits |
Country Status (2)
| Country | Link |
|---|---|
| EP (1) | EP4713800A1 (en) |
| WO (1) | WO2025005909A1 (en) |
-
2023
- 2023-06-27 WO PCT/US2023/026365 patent/WO2025005909A1/en not_active Ceased
- 2023-06-27 EP EP23744602.6A patent/EP4713800A1/en active Pending
Also Published As
| Publication number | Publication date |
|---|---|
| WO2025005909A1 (en) | 2025-01-02 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Gao et al. | Balanced semisupervised generative adversarial network for damage assessment from low‐data imbalanced‐class regime | |
| CN109410924B (en) | Identification methods and identification equipment | |
| CN102436811B (en) | Full-sequence training of deep structures for speech recognition | |
| CN110622178A (en) | Learning neural network structure | |
| JP7578821B2 (en) | Unsupervised Document Representation Learning Using Contrastive Expansion | |
| US20230315532A1 (en) | Allocating computing resources between model size and training data during training of a machine learning model | |
| CN110335584A (en) | Neural network generates modeling to convert sound pronunciation and enhancing training data | |
| CN113826125A (en) | Training machine learning models using unsupervised data enhancement | |
| JP2019517075A (en) | Categorizing Example Inputs Using Comparison Sets | |
| US12236192B2 (en) | Task-specific text generation based on multimodal inputs | |
| JP6955233B2 (en) | Predictive model creation device, predictive model creation method, and predictive model creation program | |
| US20230124177A1 (en) | System and method for training a sparse neural network whilst maintaining sparsity | |
| US20250284971A1 (en) | Training neural networks through reinforcement learning using multi-objective reward neural networks | |
| US20250252309A1 (en) | Hardware-friendly and parameter-efficient tuning of neural networks | |
| EP4713800A1 (en) | Adapting neural networks for reduced power consumption on multiplier circuits | |
| WO2025160541A1 (en) | Training neural networks using weight norm regularizations | |
| WO2025166364A1 (en) | Generating outputs using a trained model and a task-specific model | |
| CN120917454A (en) | Attention neural network with conditional computational attention layer | |
| WO2024237934A1 (en) | Scaling neural network architectures to computational resource constraints | |
| KR20240159587A (en) | Cognitive machine learning model | |
| US20260031092A1 (en) | Training audio encoder neural networks using denoising losses | |
| US20260111744A1 (en) | Fine-tuning generative neural networks for generating data items with a target property | |
| US20250363337A1 (en) | Training generative neural networks using soft preferences | |
| WO2025052386A1 (en) | System and method of recognizing keywords in an audio stream | |
| WO2025259680A1 (en) | Generating data items based on a multidimensional reward model |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: UNKNOWN |
|
| STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: THE INTERNATIONAL PUBLICATION HAS BEEN MADE |
|
| PUAI | Public reference made under article 153(3) epc to a published international application that has entered the european phase |
Free format text: ORIGINAL CODE: 0009012 |
|
| STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: REQUEST FOR EXAMINATION WAS MADE |
|
| 17P | Request for examination filed |
Effective date: 20251216 |
|
| AK | Designated contracting states |
Kind code of ref document: A1 Designated state(s): AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC ME MK MT NL NO PL PT RO RS SE SI SK SM TR |