Method for determining the uncertainty level of a deep reinforcement learning network and a device implementing such a method.
The method employs a deep reinforcement learning network with uncertainty certificates to improve insulin recommendation accuracy in diabetes treatment systems, addressing imprecision in existing systems by distinguishing certain from uncertain outputs and adjusting algorithms accordingly, thereby enhancing safety and precision.
Patent Information
- Application Number
- FR2022012200
- Authority / Receiving Office
- FR · FR
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-11-23
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2042-11-23
AI Technical Summary
Existing closed-loop diabetes treatment systems fail to accurately predict blood glucose levels due to insufficient consideration of influencing parameters, leading to imprecise insulin recommendations and potential hypoglycemic or hyperglycemic episodes.
A method using a deep reinforcement learning network with uncertainty certificates to determine insulin infusion recommendations, incorporating user data and physiological values, and employing a threshold to differentiate certain from uncertain outputs, switching to alternative algorithms when uncertainty exceeds the threshold.
Enhances the safety and precision of insulin delivery by ensuring accurate recommendations, reducing the risk of hypoglycemia and hyperglycemia through robust uncertainty management.
Smart Images

Figure 00000027_0000 
Figure 00000027_0001
Abstract
Description
Title of the invention: Method for determining a level of uncertainty of a deep reinforcement learning network and device implementing such a method. FIELD OF THE INVENTION
[0001] The present invention relates to a method for determining an uncertainty level of a deep reinforcement learning network and a device implementing this method. More particularly, the present invention relates to a method for determining an uncertainty level of a deep reinforcement learning network used to determine a recommendation value of a regulation parameter of a fluid infusion device and a device implementing this method. BACKGROUND OF THE INVENTION
[0002] In the field of health, and more specifically in the field of diabetes treatment, it is well known to determine a recommendation value corresponding to a quantity of insulin in order to maintain blood glucose, also called glycemia, in a safe range, between hypoglycemia and hyperglycemia, called eu-glycemia.
[0003] Recently, so-called "closed-loop" systems have been developed, in which a processor is programmed to evaluate a volume rate of insulin to be injected, based on user data and / or time data, such as past and / or present blood glucose measurements, and regulate the insulin injection according to this evaluation. The processor can also be programmed to evaluate a volume of insulin to be injected in certain particular circumstances, in particular during meals and / or physical activity. The quantity can be injected to the user, subject to the user's approval. Such systems are also called "semi-closed" systems because the patient must declare some of these particular circumstances.
[0004] Time data is often used to predict future blood sugar levels. This prediction is then used to calculate the amount of insulin to inject in order to maintain blood sugar levels within an acceptable range.
[0005] Incorrect prediction of the future blood glucose level may lead to an inappropriately calculated amount of insulin to be injected, resulting in blood glucose concentration at unacceptable intervals, during which the patient may be hypoglycemic and / or hyperglycemic.
[0006] A major drawback of this method is that it cannot take into account accurately all parameters influencing the general behavior of blood sugar. This leads to an inaccurate determination of a recommendation value.
[0007] The invention therefore aims to at least partially remedy the technical problems presented above and furthermore to address the potential security problems that a solution using reinforcement learning could cause. BRIEF SUMMARY OF THE INVENTION
[0008] The subject of the invention is therefore a method for determining a recommendation value of a regulation parameter of a fluid infusion device, the method being implemented by a regulation device and comprising the following steps:
[0009] retrieving user data, each data item of the user data being time-stamped and the user data relating to a unique user, the user data comprising at least:
[0010] a plurality of quantities of a drug infused to the single user;
[0011] a plurality of physiological values of the single user;
[0012] a plurality of estimated values; and
[0013] wherein a plurality of amounts of a drug infused to the single user, a physiological value of the single user of the plurality of physiological values of the single user and an estimated value of the plurality of estimated values represent a state of the single user,
[0014] training a deep reinforcement learning network, the step of training a deep reinforcement learning network comprising providing a single user state as input to the deep reinforcement learning network, said deep reinforcement learning network comprising at least two layers;
[0015] outputting a deep reinforcement learning network result, the step of outputting the deep reinforcement learning network result comprising outputting a deep reinforcement learning network result for at least one penultimate layer of the at least two layers;
[0016] providing uncertainty certificates, the step of providing uncertainty certificates comprising providing a result of the penultimate layer of the at least two layers as input to said uncertainty certificates;
[0017] outputting an uncertainty certificate result, the step of outputting the uncertainty certificate result consisting of outputting an uncertainty certificate result;
[0018] comparing the uncertainty certificate result, the step of comparing the uncertainty result consisting of comparing the uncertainty result with a threshold value of uncertainty, the uncertainty threshold value representing a value below which the output of the deep reinforcement learning network is considered certain, otherwise, the output of the deep reinforcement learning network is considered uncertain; and if the deep reinforcement learning network is considered certain,
[0019] determining the recommendation value of a control parameter of the fluid infusion device based on a single user state using the deep reinforcement learning network; or
[0020] determining the recommendation value of a control parameter of the fluid infusion device based on a single user state using another control algorithm.
[0021] Such a configuration makes it possible to estimate whether an output of the deep reinforcement learning network is certain and precise or, on the contrary, whether said output is uncertain and inaccurate and therefore increases the security of the method.
[0022] According to the present invention, a state of the single user includes a physiological value of the single user of the plurality of physiological values of the single user having a timestamp t, an estimated value of the plurality of estimated values having a timestamp substantially equal to the timestamp t and a plurality of quantities of a medicament infused to the single user of the plurality of quantities of medicament infused to the single user having a timestamp substantially equal to or less than the timestamp t. According to the present invention, 'substantially equal' means equal to plus or minus sixty seconds.
[0023] According to one embodiment, another regulation algorithm can be of any type such as a PID (proportional, integral, derivative) regulator, or another deep reinforcement learning network algorithm for example.
[0024] According to one embodiment, the deep reinforcement learning network may be of any type such as a policy network, a deep neural network parameterization of Q values (e.g., deep Q-leaming, actor-critic, etc.), or a policy network trained to reproduce the behaviors induced by a Q-leaming algorithm, for example. In the case where the deep reinforcement learning network is a policy network, the output of this policy network corresponds to the recommendation value. In the case where the deep reinforcement learning network is a deep neural network parameterization of Q values, the recommendation value is a value maximizing the Q value estimated by said deep neural network parameterization of Q values.
[0025] According to one embodiment, the medicament infused to the single user corresponds to insulin infused to the single user.
[0026] According to one embodiment, the recommendation value corresponds to a value insulin recommendation.
[0027] According to one embodiment, the plurality of physiological values of the single user consists of blood glucose values.
[0028] According to one embodiment, the plurality of estimated values consist of active carbohydrate (COB) values. A COB may be estimated based on blood glucose values and carbohydrate intakes such as meal size for example. A COB represents carbohydrates ingested by the single user whose impact cannot yet be measured in blood glucose.
[0029] According to a specific embodiment compatible with the embodiments presented above, the user data also includes at least one meal announcement. A state could then include a meal announcement.
[0030] According to the present invention, a meal advertisement represents an advertisement of a future meal containing a certain amount of carbohydrates at a future time.
[0031] According to one embodiment, the policy network can be trained using any type of reinforcement learning algorithm such as a policy gradient training algorithm, a deterministic proximal policy gradient algorithm, an actor-critic algorithm, or an augmented random search algorithm for example.
[0032] According to one embodiment, the deep neural network parameterization of Q values can be trained using deep Q-learning, or the actor-critic algorithm for example.
[0033] According to one embodiment, the uncertainty certificates are optimized according to a loss function:
[0034] L(C) = 1 / n E i=l • • .b Ej=l • • .n lC(Cj( 0(xi))) + P(C)
[0035] where:
[0036] lc is any loss function applied to the outputs of each certificate;
[0037] P(C) is any penalty function on certificates;
[0038] ^x) is the output of the penultimate layer of the learning network by ren necessarily deep, of dimension d; and
[0039] (xi,...,xn) represents a set of training states.
[0040] According to the present invention, the uncertainty certificates represent any set of functions Ci,...,Cn that are constructed to map any input close to the training set to 0 and map any input far from the training set to large values.
[0041] According to one embodiment, the uncertainty certificates comprise a set of state functions and the state functions of the uncertainty certificates are functions which, for a state, associate its scalar product with a vector.
[0042] Such a configuration allows easy training because the functions which, for a state, map its scalar product to a vector, do not have many parameters and can be computed efficiently. Such a setup also allows for good accuracy because functions that map its scalar product to a vector for a state are not prone to overfitting and accurately generalize invisible states. It is also easier to implement an orthonormality constraint that ensures broad parameterization by certificates.
[0043] Such a configuration makes it possible to obtain a precise result of the uncertainty certificate and therefore to improve the safety of the process without requiring a significant computational load.
[0044] According to one embodiment, the state functions are trained so as to minimize a loss function:
[0045] UCb...,^) = 1 / n Ei=1...n II CT 0(xi)ll2 + XIICTC - Ikll
[0046] Where:
[0047] 0(x) is the output of the penultimate layer of the learning network by ren necessarily deep, of dimension d;
[0048] (xi,...,xn) represents a set of training states;
[0049] (Ci,...,Ck) represents the set of state functions, each having a dimension d+1 ;
[0050] CT represents a transpose of a matrix C=(Ci,...,Ck)'
[0051] (CT ¢) (¾)) j is defined as (CT 4>(xi))j= Ei=i..,dCij 0(xi)i + Ci,d+i;
[0052] Ik represents an identity matrix of size k;
[0053] X represents a parameter governing the compromise between proximity of certificates to data and orthogonality of certificates.
[0054] CT 0(xi)ll2 is used to motivate certificates to map 0(x) to 0, such that the certificates parameterize the training state set.
[0055] XIICTC - Ikll allows certificates to be motivated to be orthogonal (producing a rich and identifiable parameterization of all state functions).
[0056] Such a configuration makes it possible to avoid determining the recommendation value of a regulation parameter of the fluid infusion device based on a single user state using the deep reinforcement learning network when the state is not suitable for said deep reinforcement learning network because it has been found that the uncertainty increases as a blood glucose noise and / or a meal announcement noise and / or an infused insulin noise increases.
[0057] According to one embodiment, (Ci,...,Ck) are initialized randomly.
[0058] According to one embodiment, the uncertainty certificates comprise a set state functions and uncertainty certificate state functions are neural networks.
[0059] Such a configuration makes it possible to obtain a very reliable uncertainty certificate result. precise and therefore improve process safety.
[0060] According to one embodiment, the state functions are trained through simulations and the set of training states comprises specifically selected states, the specifically selected states being selected according to the quality of the recommendation values determined by the deep reinforcement learning network based on said state.
[0061] Such a configuration makes it possible to obtain a set of training states comprising specifically selected states such that the functions of the state are trained using states selected according to the quality of the recommendation values determined by the deep reinforcement learning network based on said state and therefore makes it possible to obtain accurate uncertainty certificates.
[0062] According to one embodiment, the specifically selected states may be either simulated states or real states. A simulated state is a state obtained in a simulation environment while a real state is a state obtained by measuring and / or estimating values of a single user. The use of simulated states makes it possible to increase the security of the method because it offers a simple way to identify the states on which the deep reinforcement learning network would have worked well - simply by evaluating the performance of the deep reinforcement learning network on the corresponding simulations.
[0063] According to one embodiment, the deep reinforcement learning network is a deep neural network. A deep neural network makes it possible to obtain, most of the time, outputs of high precision. Combined with a regulation algorithm used in the case where said outputs are uncertain, it makes it possible to obtain a method which is generally precise and safe.
[0064] According to one embodiment, the uncertainty threshold value is adjusted after training state functions based on the simulation results.
[0065] According to the present invention, the simulation results are results of the method implemented in a simulation.
[0066] Such a configuration makes it possible to increase the security of the process because the uncertainty threshold is used to determine whether the recommendation value will be determined by the deep reinforcement learning network or by the regulation algorithm.
[0067] According to one embodiment, the uncertainty threshold is adjusted so as to eliminate all states leading to a blood glucose level below 54 mg / dL and / or above 250 mg / dL within the following hour. Such a configuration makes it possible to considerably increase the safety of the method while maintaining its good efficiency.
[0068] According to one embodiment, the uncertainty threshold is adjusted so as to maintain safety indicators such as time in range (TIR) above a certain percentage X and / or a hypoglycemia time less than a certain percentage Y and / or a hyperglycemia time less than a certain percentage Z. The certain percentages X, Y and Z are reference process performances and can be modified depending on the performance of the control algorithm in order to at least improve said performance of the control algorithm or to significantly improve the safety of the process.
[0069] According to one embodiment, the uncertainty threshold value is obtained by carrying out several simulations, each simulation having a different uncertainty threshold value and maintaining the highest uncertainty threshold in accordance with the safety indicators.
[0070] The invention also relates to a method for determining an uncertainty of an output of the deep reinforcement learning network of an already trained deep reinforcement learning network comprising at least two layers, the method being implemented by a regulation device and comprising the following steps:
[0071] retrieving input data, the input data comprising at least one state,
[0072] training the deep reinforcement learning network, the step of training the deep reinforcement learning network comprising providing the state as an input to the deep reinforcement learning network;
[0073] outputting a deep reinforcement learning network result, the step of outputting the deep reinforcement learning network result comprising outputting a deep reinforcement learning network result for at least one penultimate layer of the at least two layers;
[0074] providing uncertainty certificates, the step of providing uncertainty certificates comprising providing a result of the penultimate layer of the at least two layers as input to said uncertainty certificates;
[0075] outputting an uncertainty certificate result, the step of outputting the uncertainty certificate result consisting of outputting an uncertainty certificate result;
[0076] comparing the uncertainty certificate result, the step of comparing the uncertainty result comprising comparing the uncertainty result to an uncertainty threshold value, the uncertainty threshold value representing a value below which the output of the deep reinforcement learning network is considered certain;
[0077] wherein the uncertainty certificates comprise a set of state functions, said state functions being trained as follows:
[0078] L(Ci,...,Cn) = 1 / n Il CT 0(xi)ll2 + XIICTC - Ikll
[0079] where:
[0080] (xi,...,xn) represents a set of training states;
[0081] (Cb...,Ck) represents the set of state functions, each having a dimension d+1 ;
[0082] CT represents a transpose of a matrix C=(Ci,...,Ck);
[0083] CT 0(xi))k is defined as (CT 0(xi))k= Ek=i...dCki 0(xi)k + Cd+i>k;
[0084] Ik represents an identity matrix of size k;
[0085] X represents a parameter controlling the trade-off between proximity of a plurality of certificates to the data and orthogonality of the certificates.
[0086] According to the present invention, the plurality of certificates represents a set of functions of 0(x).
[0087] Such a configuration makes it possible to determine whether an output of the deep reinforcement learning network is certain and precise or, on the contrary, whether this output is uncertain and inaccurate.
[0088] CT 0(xi)ll2 is used to motivate certificates to map 0(x) to 0, such that the certificates parameterize the training state set.
[0089] X II CTC - Ikll allows certificates to be motivated to be orthogonal (thus producing a rich and identifiable parameterization of all state functions).
[0090] According to the present invention, the output of the deep reinforcement learning network is the final output of the deep reinforcement learning network, the output of the last layer of the deep reinforcement learning network. In fact, except for the first layer, each layer of the at least two layers of the deep reinforcement learning network uses as input the deep reinforcement learning network result of the previous layer. In other words, according to an embodiment having more than two layers, the result of a first layer corresponds to the input of a second layer, and the result of the second layer corresponds to the result of the third layer, etc.
[0091] According to the present invention, the training state set represents a set of states that are selected as relevant for training purposes.
[0092] According to one embodiment, the states comprise meal announcements.
[0093] According to one embodiment, the training of the uncertainty certificates can be done as follows:
[0094] Inputs: a deep reinforcement learning network ji, $: all layers of ir except the last one. (xi,...,xn) a set of states, d: the number of neurons in the last layer of jt. Learning rate e (typically between le-3 and le-5 for example). Batch size b (typically between 1 and 32 for example).
[0095] Initialize certificates C=(Ci,...,Cn) randomly, each having a size / dimension (d+1).
[0096] For s in N
[0097] For each batch (yi,...,yb) of size b sampled from (xb...,xn), using stochastic gradient descent: iterate over the data in batches
[0098] Calculate L = 1 / n E i=l.. .b II CT 4>(yi)IP + XIICTC - Ikll as described previously
[0099] Calculate the gradient of L with respect to C: VCL
[0100] Refresh C = C - eVcL
[0101] Outputs: The trained certificates (Cb...,Cn).
[0102] According to one embodiment, the minimization can be of any type such as stochastic gradient descent.
[0103] According to one embodiment, the learning rate e may be decreased exponentially from an initial value e0 to a final value eb. This stimulates larger updates of the certificates during the early stages of training and more precise steps towards the end. In other words, e may be decreased exponentially in order to "motivate" larger changes in initial iterations and smaller changes in later iterations. Such a configuration makes it possible to avoid exceeding an optimum at each stage.
[0104] The invention also relates to a computer program product comprising instructions which, upon execution of the program by a computer, cause the computer to undertake the steps of the method as described above.
[0105] The invention also relates to a regulation device for determining a recommendation value of a regulation parameter of a fluid infusion device, the regulation device comprising:
[0106] a recovery unit, the recovery unit being configured to recover user data, each data item of the user data being time-stamped and the user data relating to a unique user, the user data comprising at least:
[0107] a plurality of quantities of a drug infused to the single user;
[0108] a plurality of physiological values of the single user;
[0109] a plurality of estimated values;
[0110] wherein a plurality of amounts of a drug infused to the single user, a physiological value of the single user of the plurality of physiological values of the single user and an estimated value of the plurality of estimated values represent a state of the single user,
[0111] a recommendation unit, the recommendation unit being configured to terminating the recommendation value based on at least one unique user state, the recommendation unit being configured to determine the recommendation value by:
[0112] training a deep reinforcement learning network, training a deep reinforcement learning network comprising providing a single user state as an input to a deep reinforcement learning network, said deep reinforcement learning network comprising at least two layers;
[0113] outputting a deep reinforcement learning network result, wherein outputting the deep reinforcement learning network result comprises outputting a deep reinforcement learning network result for at least one penultimate layer of the at least two layers;
[0114] providing uncertainty certificates, the providing of the uncertainty certificates consisting of providing a result of the penultimate layer of the at least two layers as input into said uncertainty certificates;
[0115] outputting an uncertainty certificate result, wherein outputting the uncertainty certificate result comprises outputting an uncertainty certificate result;
[0116] comparing the uncertainty certificate result, the comparison of the uncertainty result comprising comparing the uncertainty result to an uncertainty threshold value, the uncertainty threshold value representing a value below which the output of the deep reinforcement learning network is considered certain, otherwise, the output of the deep reinforcement learning network is considered uncertain; and if the deep reinforcement learning network is considered certain,
[0117] determining the recommendation value of a control parameter of the fluid infusion device based on the state of the single user using the deep reinforcement learning network; or
[0118] determining the recommendation value of a control parameter of the fluid infusion device based on the state of the single user using a control algorithm.
[0119] According to one embodiment, the regulation device is configured to implement any one of the embodiments of the methods described above such as the training of uncertainty certificates for example.
[0120] The various non-incompatible aspects defined above can be combined. Brief description of the drawings
[0121] The embodiments of the invention will be described below with reference to the drawings, briefly described below:
[0122] [Fig.l] shows a schematic view of a regulation device according to one embodiment of the invention;
[0123] [Fig.2] presents the steps of a method for determining an uncertainty of an output of the deep reinforcement learning network of a deep reinforcement learning network already trained according to an embodiment of the invention; and
[0124] [Fig.3] presents the steps of a method for determining the recommendation value of a regulation parameter of the fluid infusion device according to an embodiment of the invention. DETAILED DESCRIPTION OF THE INVENTION
[0125] As shown in [Fig.l], the present invention relates to a regulation device 30 making it possible to determine a recommendation value of a regulation parameter of a fluid infusion device 20, the regulation device 30 comprising:
[0126] a recovery unit 32, the recovery unit 32 being configured to recover user data, each data item of the user data being time-stamped and the user data relating to a unique user, the user data comprising at least:
[0127] a plurality of quantities of a drug infused to the single user;
[0128] a plurality of physiological values of the unique user;
[0129] a plurality of estimated values;
[0130] wherein a plurality of amounts of a drug infused to the single user, a physiological value of the single user of the plurality of physiological values of the single user and an estimated value of the plurality of estimated values represent a state of the single user,
[0131] a recommendation unit 34, the recommendation unit 34 being configured to determine the recommendation value based on at least one state of the unique user, the recommendation unit 34 being configured to determine the recommendation value by:
[0132] training a deep reinforcement learning network, training a deep reinforcement learning network comprising providing a single user state as an input to a deep reinforcement learning network, said deep reinforcement learning network comprising at least two layers;
[0133] outputting a deep reinforcement learning network result, wherein outputting the deep reinforcement learning network result comprises outputting a reinforcement learning network result deep for at least one penultimate layer of the at least two layers;
[0134] providing uncertainty certificates, the providing of uncertainty certificates consisting of providing a result of the penultimate layer of the at least two layers as input into said uncertainty certificates;
[0135] outputting an uncertainty certificate result, wherein outputting the uncertainty certificate result comprises outputting an uncertainty certificate result;
[0136] comparing the uncertainty certificate result, the comparison of the uncertainty result comprising comparing the uncertainty result to an uncertainty threshold value, the uncertainty threshold value representing a value below which the output of the deep reinforcement learning network is considered certain, otherwise, the output of the deep reinforcement learning network is considered uncertain; and if the deep reinforcement learning network is considered certain,
[0137] determining the recommendation value of a control parameter of the fluid infusion device 20 based on the state of the single user using the deep reinforcement learning network; or
[0138] determining the recommendation value of a control parameter of the fluid infusion device 20 based on the state of the single user using a control algorithm.
[0139] According to one embodiment, the regulation device 30 is configured to implement any one of the embodiments of the methods described below.
[0140] As shown in [Fig.2], the present invention also relates to a method for determining an uncertainty of an output of the deep reinforcement learning network of an already trained deep reinforcement learning network comprising at least two layers, the method being implemented by a regulation device 30 and comprising the following steps:
[0141] retrieving input data 60, the input data comprising at least one state,
[0142] training the deep reinforcement learning network 42, the step of training the deep reinforcement learning network 42 comprising providing the state as an input to the deep reinforcement learning network;
[0143] outputting a deep reinforcement learning network result 44, the step of outputting the deep reinforcement learning network result 44 comprising outputting a deep reinforcement learning network result for at least one penultimate layer of the at least two layers;
[0144] uncertainty certificate information 46, the certificate information step uncertainty 46 consisting of providing a result from the penultimate layer of the at least two layers as input into said uncertainty certificates;
[0145] outputting an uncertainty certificate result 48, the step of outputting the uncertainty certificate result 48 consisting of outputting an uncertainty certificate result;
[0146] comparing the uncertainty certificate result 50, the step of comparing the uncertainty result 50 comprising comparing the uncertainty result to an uncertainty threshold value, the uncertainty threshold value representing a value below which the output of the deep reinforcement learning network is considered certain;
[0147] wherein the uncertainty certificates comprise a set of state functions, said state functions being trained as follows:
[0148] LCCP...A) = IH CT ^(xûir + À H cTc - m
[0149] where:
[0150] (xi,...,xn) represents a set of training states;
[0151] (Ci,...,Ck) represents the set of state functions, each having a dimension d+1 ;
[0152] CT represents a transpose of a matrix C=(Ci,..., ck);
[0153] (CT ¢) (Xj)) jest defined as (CT 12i=i...dCy ¢(^)1 + Ci>d+i
[0154] Ik represents an identity matrix of size k;
[0155] X represents a parameter controlling the trade-off between proximity of a plurality of certificates to the data and orthogonality of the certificates; and
[0156] the plurality of certificates represents a set of functions of 0(x) *
[0157] Such a configuration makes it possible to determine whether an output of the deep reinforcement learning network is certain and accurate or, on the contrary, whether this output is uncertain and inaccurate. It CT0 (x;)ll2 makes it possible to motivate the certificates to map the ¢) (x) to 0, such that the certificates parameterize the training set of states. X II CT C - Ikll makes it possible to motivate the certificates to be orthogonal (thus producing a rich and identifiable parameterization of the set of functions of the state).
[0158] According to the present invention, the output of the deep reinforcement learning network is the final output of the deep reinforcement learning network, the output of the last layer of the deep reinforcement learning network. In fact, except for the first layer, each layer of the at least two layers of the deep reinforcement learning network uses as input the deep reinforcement learning network result of the previous layer. In other words, according to an embodiment having more than two layers, the result of a first layer corresponds to the input of a second layer, and the result of the second layer corresponds to the result of the third layer, etc.
[0159] The training state set represents a set of states selected to be relevant for training purposes. Such a feature allows for efficient training of the state's function set.
[0160] According to one embodiment, the training of the uncertainty certificates can be done as follows:
[0161] Inputs: a deep reinforcement learning network ji, ¢): all layers of ir except the last one. (xb...,xn) a set of states, d: the number of neurons in the last layer of jt. Learning rate e (typically between le-3 and le-5 for example). Batch size b (typically between 1 and 32 for example).
[0162] Initialize certificates C=(Ci,...,Cn) randomly, each having a size / dimension (d+1).
[0163] For s in N
[0164] For each batch (yi,...,yb) of size b sampled from (xi,...,xn), using stochastic gradient descent: iterate over the data in batches
[0165] Calculate L = 1 / n Ei=i...b II CT 0(yi)ll2 + XIICTC - Ikll as described previously
[0166] Calculate the gradient of L with respect to C: VCL
[0167] Update C = C - eVcL
[0168] Outputs: The trained certificates (Ci,...,Cn).
[0169] According to one embodiment, the minimization can be of any type such as stochastic gradient descent.
[0170] According to one embodiment, the learning rate e may be decreased exponentially from an initial value e0 to a final value Eb. This stimulates larger updates of the certificates during the early stages of training and more precise steps towards the end. In other words, e may be decreased exponentially in order to "motivate" larger changes in initial iterations and smaller changes in later iterations. Such a configuration makes it possible to avoid exceeding an optimum at each stage.
[0171] As shown in [Fig. 3], the present invention also relates to a method for determining a recommendation value of a regulation parameter of a fluid infusion device 20. The method is implemented by the regulation device 30 described above and comprises a step of retrieving user data 40. Each data item of the user data is time-stamped and the user data relates to a single user. The user data comprises a plurality of quantities of a drug infused to the single user, a plurality of physiological values of the single user and a plurality of estimated values. A plurality of quantities of a drug infused to the user unique, a physiological value of the unique user from the plurality of physiological values of the unique user and an estimated value from the plurality of estimated values represent a state of the unique user. The medication infused to the unique user corresponds to insulin infused to the unique user and the plurality of physiological values of the unique user consists of blood glucose values. The plurality of estimated values consists of active carbohydrate (COB) values. A COB can be estimated based on the blood glucose values and carbohydrate intakes such as a meal size for example. A COB represents carbohydrates ingested by the unique user whose impact cannot yet be measured in blood glucose. Therefore, the user data also includes at least one meal announcement.A state then includes a meal ad representing an ad of a future meal containing a certain amount of carbohydrates at a future time.
[0172] According to the present invention, a state of the single user includes a physiological value of the single user of the plurality of physiological values of the single user having a timestamp t, an estimated value of the plurality of estimated values having a timestamp substantially equal to the timestamp t and a plurality of quantities of a medicament infused to the single user of the plurality of quantities of medicament infused to the single user having a timestamp substantially equal to or less than the timestamp t. According to the present invention, 'substantially equal' means equal to plus or minus sixty seconds.
[0173] The method comprises a step of training a deep reinforcement learning network 42. The step of training a deep reinforcement learning network 42 comprises providing a single user state as an input to a deep reinforcement learning network, said deep reinforcement learning network comprising at least two layers.
[0174] The method also comprises a step of outputting a deep reinforcement learning network result 44. The step of outputting the deep reinforcement learning network result 44 consists of outputting a deep reinforcement learning network result for at least one penultimate layer of the at least two layers.
[0175] The method also comprises a step of providing uncertainty certificates 46. The step of providing uncertainty certificates 46 consists of providing a result of the penultimate layer of the at least two layers as an input into said uncertainty certificates.
[0176] The method also comprises a step of outputting an uncertainty certificate result 48. The step of outputting the uncertainty certificate result 48 consists of outputting an uncertainty certificate result.
[0177] The method also comprises a step of comparing the uncertainty certificate result 50. The step of comparing the uncertainty result 50 consists of comparing the uncertainty result with an uncertainty threshold value. The uncertainty threshold value represents a value below which the output of the deep reinforcement learning network is considered certain, otherwise, the output of the deep reinforcement learning network is considered uncertain.
[0178] If the deep reinforcement learning network is considered certain, the method comprises a step of determining the recommendation value 52 of a regulation parameter of the fluid infusion device 20 as a function of the state of the single user using the deep reinforcement learning network. The deep reinforcement learning network may be of any type such as a policy network, a deep neural network parameterization of Q values (e.g., deep Q-learning, actor-critic, etc.) or a policy network trained to reproduce the behaviors induced by a Q-learning algorithm, for example. In the case where the deep reinforcement learning network is a policy network, the output of said policy network corresponds to the recommendation value.In the case where the deep reinforcement learning network is a deep neural network parameterization of Q values, the recommendation value is a value maximizing the Q value estimated by said deep neural network parameterization of Q values. The policy network can be trained using any type of reinforcement learning algorithm, such as a policy gradient training algorithm, a proximal deterministic policy gradient algorithm, an actor-critic algorithm, or an augmented random search algorithm for example. The Q-leaming algorithm can be trained using a deep Q-leaming algorithm, or an actor-critic algorithm for example.
[0179] If the deep reinforcement learning network is considered uncertain, the method comprises a step of determining the recommendation value 52 of a regulation parameter of the fluid infusion device 20 based on a single user state using another regulation algorithm. Another regulation algorithm can be of any type, such as a PID (proportional, integral, derivative) regulator, or another deep reinforcement learning network algorithm for example.
[0180] Such characteristics make it possible to estimate whether an output of the deep reinforcement learning network is certain and accurate or, on the contrary, whether this output is uncertain and inaccurate and therefore increases the security of the method. The output corresponding to the result of the last layer of the deep reinforcement learning network.
[0181] The uncertainty certificates are optimized by training a loss function:
[0182] L(C) = 1 / n Ej=i...n lc(Cj(0(xi))) + P(C) where:
[0183] lc is any loss function applied to the outputs of each certificate;
[0184] P(C) is any penalty function on the certificates;
[0185] 0(x) is the output of the penultimate layer of the learning network by ren necessarily deep, of dimension d; and
[0186] (xi,...,xn) represents a set of training states.
[0187] Uncertainty certificates represent any set of functions Ci,...,Cn that are constructed to map any input close to the training set to 0 and map any input far from the training set to large values.
[0188] According to a specific embodiment, the uncertainty certificates comprise a set of state functions and wherein the state functions of the uncertainty certificates are functions that, for a state, map its scalar product to a vector. Such a configuration allows easy training because the functions that, for a state, map its scalar product to a vector, do not have many parameters and can be calculated efficiently. Such a configuration also allows good accuracy because the functions that, for a state, map its scalar product to a vector are not prone to overfitting and precisely generalize invisible states. It is also easier to implement an orthonormality constraint that guarantees broad parameterization by certificates.Such a configuration also allows to obtain an accurate uncertainty certificate result and thus to improve the safety of the process without requiring a significant computational load. In this specific embodiment, the state functions are trained in such a way as to minimize a loss function: .
[0189] L(Ci,...,Ck) = 1 / n Ei=i...n H CT 4>(xi)IP + XIICTC - Ikll
[0190] where:
[0191] (xi,...,xn) represents a set of training states;
[0192] (Ci,...,Ck) represents the set of state functions, each having a dimension d+1 ;
[0193] CT represents a transpose of a matrix C=(Ci,.. .,Ck) '
[0194] CT¢) (x;))j is defined as (CT ¢(^))^ Ei=i...dCij ¢(^)1 + Ckd+i;
[0195] Ik represents an identity matrix of size k;
[0196] X represents a parameter governing the trade-off between proximity of a plurality of certificates to the data and orthogonality of the certificates; and
[0197] the plurality of certificates represents a set of functions of 0(x):*
[0198] (Ci,...,Ck) represents the set of functions of the state initialized as random, each having a dimension d+1;
[0199] IICT ¢) (Xi)ll2 motivates the certificates to map the ¢) (x) to 0, such that the certificates parameterize the training state set. XIICTC - Ikll motivates the certificates to be orthogonal (thus producing a rich and identifiable parameterization of the state function set). Such a configuration also avoids determining the recommendation value of a regulation parameter of the fluid infusion device 20 based on a single user state using the deep reinforcement learning network when the state is not suitable for said deep reinforcement learning network because it has been found that the uncertainty increases as a blood glucose noise and / or a meal announcement noise and / or an infused insulin noise increases.
[0200] According to one embodiment, the functions of the state of the uncertainty certificates are neural networks. Such a configuration makes it possible to obtain a very precise uncertainty certificate result and therefore to improve the security of the process.
[0201] The state functions are trained through simulations and the set of training states comprises specifically selected states, the specifically selected states being selected according to the quality of the recommendation values determined by the deep reinforcement learning network based on said state. Such a configuration makes it possible to obtain a set of training states comprising specifically selected states such that the state functions are trained using states selected according to the quality of the recommendation values determined by the deep reinforcement learning network based on said state and thus makes it possible to obtain accurate uncertainty certificates. The specifically selected states are simulated states.A simulated state is a state obtained in a simulation environment while a real state is a state obtained by measuring and / or estimating values from a single user. Using simulated states increases process safety because it provides a simple way to identify states on which the deep reinforcement learning network would perform well - simply by evaluating the performance of the deep reinforcement learning network on the corresponding simulations.
[0202] According to one embodiment, the deep reinforcement learning network is a deep neural network. A deep neural network makes it possible to obtain, most of the time, outputs of high precision. Combined with a regulation algorithm used in the case where said outputs are uncertain, it makes it possible to obtain a method which is generally precise and safe.
[0203] The uncertainty threshold value is adjusted after training the state functions contrained to the simulation results. According to the present invention, the simulation results are the results of the method implemented in a simulation. Such a configuration makes it possible to increase the safety of the method because the uncertainty threshold is used to determine whether the recommendation value will be determined by the deep reinforcement learning network or by the regulation algorithm. The uncertainty threshold is adjusted to eliminate all states that lead to a blood glucose level below 54 mg / dL and / or above 250 mg / dL within the following hour. Such a configuration significantly increases the safety of the process while maintaining its good efficiency. Indeed, 54 mg / dL and 250 mg / dL provide a good balance between safety and efficiency since 54 mg / dL and 250 mg / dL, although being extreme blood glucose values and to be avoided, remain relatively acceptable for a short period of time, according to the single user.The uncertainty threshold is adjusted to maintain safety indicators such as a time in range (TIR) above a certain percentage X and / or a hypoglycemic time below a certain percentage Y and / or a hyperglycemic time below a certain percentage Z. The certain percentages X, Y and Z are performances of the reference process and can be modified according to the performance of the control algorithm in order to at least improve said performance of the control algorithm or to significantly improve the safety of the process. The uncertainty threshold value is obtained by performing several simulations, each simulation having a different uncertainty threshold value and keeping the highest threshold consistent with the safety indicators.
[0204] The invention also relates to a computer program product comprising instructions which, upon execution of the program by a computer, cause the computer to implement the steps of the method described above.
[0205] Although exemplary embodiments of the invention have been described, those skilled in the art will understand that various modifications, deletions, and / or additions may be made, and equivalents may be substituted for elements of the invention without departing from the spirit and scope thereof. Furthermore, numerous modifications may be made to adapt a particular situation or information to the teachings of the invention without departing from the scope thereof. Accordingly, the invention should not be understood as being limited to the particular embodiments disclosed for carrying it out, but as including all embodiments covered by the scope of the appended claims. Furthermore, unless otherwise indicated, any use of the terms first, second, etc. does not denote any order or importance, but rather the terms first, second, etc. are used to distinguish one element from another.
[0206] Although an exemplary embodiment of the invention has been described with reference to two principal embodiments, those skilled in the art will understand that various modifications, omissions and / or additions may be made, and that equivalents may be substituted for elements of the invention without departing from the spirit and the scope thereof. Furthermore, numerous modifications may be made to adapt a particular situation or information to the teachings of the invention without departing from the scope thereof. Therefore, the invention should not be understood as being limited to the particular embodiment disclosed as the best mode contemplated for carrying it out, but as including all embodiments covered by the scope of the appended claims. Furthermore, unless otherwise indicated, any use of the terms first, second, etc. does not denote any order or importance, but rather the terms first, second, etc. are used to distinguish one element from another.
Claims
1. Claims A method for determining a recommendation value of a regulation parameter of a fluid infusion device (20), the method being implemented by a regulation device (30) and comprising the following steps: retrieving user data (40), each data item of the user data being time-stamped and the user data relating to a unique user, the user data comprising at least: a plurality of amounts of a medication infused to the unique user; a plurality of physiological values of the unique user; a plurality of estimated values; and wherein a plurality of amounts of a medication infused to the single user, a physiological value of the single user of the plurality of physiological values of the single user and an estimated value of the plurality of estimated values represent a state of the single user, training a deep reinforcement learning network (42), the step of training a deep reinforcement learning network (42) comprising providing a state of the single user as an input to a deep reinforcement learning network, said deep reinforcement learning network comprising at least two layers; outputting a deep reinforcement learning network result (44), the step of outputting the deep reinforcement learning network result (44) comprising outputting a deep reinforcement learning network result for a penultimate layer of the at least two layers; populating uncertainty certificates (46), the step of populating the uncertainty certificates (46) comprising providing a result of the penultimate layer of the at least two layers as an input to said uncertainty certificates; outputting an uncertainty certificate result (48), the step of outputting the uncertainty certificate result (48) consisting of outputting an uncertainty certificate result; comparing the uncertainty certificate result (50), the step of comparing the uncertainty certificate result (50) consisting of comparing the uncertainty certificate result with an uncertainty threshold value, the uncertainty threshold value representing a value below which the output of the deep reinforcement learning network is considered certain, otherwise, the output of the deep reinforcement learning network is considered uncertain; and if the deep reinforcement learning network is considered certain, determining the recommendation value (52) of a regulation parameter of the fluid infusion device (20) based on a state of the single user using the deep reinforcement learning network; otherwise determining the recommendation value (52) of a regulation parameter of the fluid infusion device (20) based on a state of the single user using another regulation algorithm.
2. A method for determining a recommendation value of a control parameter of a fluid infusion device (20) according to claim 1, wherein the uncertainty certificates are optimized according to a loss function: L(C) = 1 / n E i=1...b E>i...n lc(Cj( 0(xi))) + P(C) where: lc is any loss function applied to the outputs of each certificate; P(C) is any penalty function on the uncertainty certificates; 0(x) is the output of the penultimate layer of the deep reinforcement learning network, of dimension d; and (xb...,xn) represents a set of training states.
3. A method for determining a recommendation value of a control parameter of a fluid infusion device (20) according to any one of claims 1 or 2, wherein the uncertainty certificates comprise a set of drive state functions and wherein the drive state functions of the uncertainty certificates are functions which, for a state, associate its scalar product with a vector.
4. A method for determining a recommendation value of a control parameter of a fluid infusion device (20) according to claim 3, wherein the state functions are trained to minimize a loss function: L(Ci,...,Cn) = 1 / n Ei=i...n H CT 4>(xi)IP + XIICTC - Ikll Where: 0(x) is the output of the penultimate layer of the deep reinforcement learning network, of dimension d; (xb...,xn) represents a set of training states; (Ci,...,Ck) represents the set of functions of the training state, each having dimension d+1; CT represents a transpose of a matrix C=(Ci,...,Ck) ' (CT0 (Xj))j is defined as (CT Ei=i...dCij ¢(^)1 + Cw+i; Ik represents an identity matrix of size k; / . represents a parameter controlling the trade-off between proximity of the uncertainty certificates to the data and orthogonality of the uncertainty certificates.
5. A method for determining a recommendation value of a control parameter of a fluid infusion device (20) according to any one of claims 1 or 2, wherein the uncertainty certificates comprise a set of training state functions and wherein the training state functions of the uncertainty certificates are neural networks.
6. A method for determining a recommendation value of a control parameter of a fluid infusion device (20) according to any one of claims 3 to 5, wherein the functions of the training state are trained through simulations and the set of training states comprises specifically selected states, the specifically selected states being selected according to the quality of the recommendation values determined by the deep reinforcement learning network based on said state.
7. A method for determining a recommendation value of a control parameter of a fluid infusion device (20) according to claim 6, wherein the uncertainty threshold value is adjusted after training functions of the training state based on the simulation results.
8. A computer program product comprising instructions which, upon execution of the program by a computer, cause the computer to implement the steps of the method according to any one of claims 1 to 7.
9. A method for determining an uncertainty of a deep reinforcement learning network of an already trained deep reinforcement learning network comprising at least two layers, the method being implemented by a regulating device (30) and comprising the next steps: retrieving input data (60), the input data comprising at least one state, training the deep reinforcement learning network (42), the step of training the deep reinforcement learning network (42) comprising providing the state as an input to the deep reinforcement learning network; outputting a deep reinforcement learning network result (44), the step of outputting the deep reinforcement learning network result (44) comprising outputting a deep reinforcement learning network result for a penultimate layer of the at least two layers; populating uncertainty certificates (46), the step of populating uncertainty certificates (46) comprising providing a result of the penultimate layer of the at least two layers as an input to said uncertainty certificates; outputting an uncertainty certificate result (48), the step of outputting the uncertainty certificate result (48) comprising outputting an uncertainty certificate result; comparing the uncertainty certificate result (50), the step of comparing the uncertainty certificate result (50) comprising comparing the uncertainty certificate result to an uncertainty threshold value, the uncertainty threshold value representing a value below which the output of the deep reinforcement learning network is considered certain; wherein the uncertainty certificates comprise a set of drive state functions, said drive state functions being driven as follows: L(Ci,...,Cn) = 1 / n Ei=i...n H CT 4>(Xi)IP + XIICTC - Ikll where: (xb...,xn) represents a set of training states; (Ci,...,Ck) represents the set of functions of the training state, each having a dimension d+1; CT represents a transpose of a matrix C=(Ci,...,Ck) ' CT0 (Xi))k is defined as (CT 0(xi))k= Ek=i...dCki 0(xi)k + Cd+ijk;; Ik represents an identity matrix of size k; / . represents a parameter controlling the compromise between proximity of a plurality of uncertainty certificates to the data and orthogonality of the uncertainty certificates.
10. A control device (30) for determining a recommendation value of a control parameter of a fluid infusion device (20), the control device (30) comprising: a retrieval unit (32), the retrieval unit (32) being configured to retrieve user data, each data item of the user data being time-stamped and the user data relating to a unique user, the user data comprising at least: a plurality of quantities of a drug infused to the single user; a plurality of physiological values of the single user; a plurality of estimated values; wherein a plurality of amounts of a drug infused to the single user, a physiological value of the single user of the plurality of physiological values of the single user, and an estimated value of the plurality of estimated values represent a state of the single user, a recommendation unit (34), the recommendation unit (34) being configured to determine the recommendation value based on at least one state of the unique user, the recommendation unit (34) being configured to determine the recommendation value by: informing a deep reinforcement learning network, wherein informing a deep reinforcement learning network comprises providing a state of the unique user as an input to a deep reinforcement learning network, said deep reinforcement learning network comprising at least two layers; outputting a deep reinforcement learning network result, wherein outputting the deep reinforcement learning network result comprises outputting a deep reinforcement learning network result for a penultimate layer of the at least two layers; providing uncertainty certificates, the providing of uncertainty certificates consisting of providing a result from the penultimate layer of the at least two layers as an input to said uncertainty certificates; outputting an uncertainty certificate result, the outputting of the uncertainty certificate result consisting of outputting an uncertainty certificate result; comparing the uncertainty certificate result, the comparing the uncertainty certificate result comprising comparing the uncertainty certificate result to an uncertainty threshold value, the uncertainty threshold value representing a value below which the output of the deep reinforcement learning network is considered certain, otherwise, the output of the deep reinforcement learning network is considered uncertain; and if the deep reinforcement learning network is considered certain, determining the recommendation value of a control parameter of the fluid infusion device (20) based on the state of the single user using the deep reinforcement learning network; otherwise determining the recommendation value of a control parameter of the fluid infusion device (20) based on the state of the single user using a control algorithm.
