Variable Optimization System

The variable optimization system stabilizes model training in edge computing by using dual variable updates and permutation matrices to address data bias and asynchronous communication, enhancing learning efficiency.

JP7533788B2Active Publication Date: 2024-08-14NIPPON TELEGRAPH & TELEPHONE CORP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2023529211
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-06-21
Publication Date
2024-08-14
Estimated Expiration
2041-06-21

AI Technical Summary

Technical Problem

Existing edge computing methods struggle to stabilize model training when there is statistical bias in training data sets across nodes or asynchronous and sparse communication between nodes, leading to instability in learning.

Method used

A variable optimization system that uses a dual variable update mechanism, including a model variable update and dual variable updates, to stabilize model training across nodes with biased data and asynchronous communication, utilizing a permutation matrix and monotone operator decomposition to derive optimal model variables.

Benefits of technology

The system enables stable optimization of model variables even with statistical bias and asynchronous communication, reducing learning time and communication overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007533788000082
    Figure 0007533788000082
  • Figure 0007533788000083
    Figure 0007533788000083
  • Figure 0007533788000075
    Figure 0007533788000075
Patent Text Reader

Abstract

Provided is a technology for stably optimizing a variable of a model so that the variable is compatible with a training data set that is dispersed and accumulated in a plurality of nodes, even when the training data set is statistically biased and / or when communication between the nodes is asynchronous and sparse. An i-th node includes: a model variable updating unit that updates the value of a model variable wi with a predetermined formula; a first dual variable updating unit that, for a predetermined index j, updates the value of a dual variable yi|j with a predetermined formula; and a second dual variable updating unit that, for the predetermined index j, receives the value of a model variable wj and the value of a dual variable yj|i from a j-th node and updates the value of a dual variable zi|j with a predetermined formula.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a technique for optimizing model variables that are the subject of machine learning. [Background technology]

[0002] In recent years, machine learning frameworks such as deep learning have become increasingly popular for extracting meaningful information from data. Machine learning frameworks typically aggregate the data obtained in one place and then train a model.

[0003] However, there are cases where data used for learning cannot be aggregated in one place. (1) For example, in the case of medical data, when the data used for learning is highly private or confidential and cannot be released, the data cannot be aggregated in one place. Also, (2) when there are too many devices storing data used for learning, such as data contained in cars or smartphones, the data transfer may overwhelm the network, and in this case, the data cannot be aggregated in one place either. Furthermore, (3) there are cases where strict regulations are imposed on the handling of data, such as the General Data Protection Regulation (GDPR) in the EU, and in some cases, the data cannot be aggregated in one place. In other words, from the perspectives of privacy protection, the increase in data volume, and legal regulations, learning will become more decentralized in the future.

[0004] Therefore, currently, concepts such as edge computing that enables learning even when data cannot be collected in one place are being considered (see Non-Patent Document 1). In edge computing, models are learned in a state where data to be used for learning is accumulated in each of the computers (also called nodes) distributed on the network. The basic requirements for edge computing are as follows: (1) Obtain a model equivalent to the model trained by aggregating all data in one place (hereafter referred to as the global model).

[0005] In this regard, edge computing must also meet the following three requirements: (2) Any network structure can be used so that the scale of data processing can be expanded to any scale. Examples of the network structure include a distributed network with servers and a P2P communication network. (3) Even if each node accumulates statistically biased data (called non-uniform data), learning can be performed stably. (4) Learning is stable without all nodes in the network communicating synchronously. In this case, the communication is not of the data stored in each node, but of auxiliary information such as model update differences.

[0006] Learning in edge computing is explained below. Consider a network in which n nodes (n is an integer equal to or greater than 2) are connected. Since the network structure can be any structure, it will be described using a graph, and the network on which edge computing is performed will be represented as a graph G(N, ε). Here, N={1, 2, …, n} is a set of indexes representing the nodes that make up the network, and ε={1, 2, …, E} (E is an integer equal to or greater than 1) is a set of indexes representing the edges that make up the network. Note that each node is connected to one or more nodes. In other words, there are no isolated nodes. Also, ε i ={j∈N|(i, j)∈ε(j≠i)}, then ε i represents the set of indexes of nodes to which the i-th node is connected.

[0007] Figure 1 shows a network with four connected nodes. In Figure 1, the i-th node is represented as Node #i. For example, ε4={1, 3} indicates that the fourth node is connected to the first and third nodes.

[0008] Below, the model variables to be trained at the i-th node are i Let x be the set of training data stored in the i-th node. i Let us assume that.

[0009] The model to be optimized has the same structure and dimensions at all nodes, according to requirement (1). That is, for any i, j (i ≠ j), w i =w j The model variable w i (i=1, 2, …, n) is trained. Also, from requirement (3), the training data set x i and the training data set x j (i ≠ j) generally differs in terms of the number of data and the statistical properties of the data.

[0010] Note that each node may have a different computing capability. However, in the following, for the sake of simplicity, it is assumed that in learning, while a specific node performs K variable updates, auxiliary information such as the variable update difference is exchanged once on each edge including that node. Hereinafter, this series of update and exchange processes will be referred to as a round. However, the timing of the exchange can be random. It is assumed that R rounds are executed.

[0011] FIG. 2 shows edge computing in the network of FIG. 1. In FIG. 2, a specific node is designated as Node #1, and learning is shown for K=8 and R=2. "U" in FIG. 2 represents variable update processing within a node, and "X" represents data exchange processing between nodes. Generally, there is no need for special constraints on variable update processing within a node (e.g., constraints on the calculation speed of the node) or special constraints on data exchange processing between nodes (e.g., constraints on the communication method), and the number of variable update processing within a node or the number of data exchange processing between nodes does not need to be uniform.

[0012] In the following, the set representing the number of rounds is represented as {1, 2, …, R}, and the set representing the number of update processes is represented as {1, 2, …, K}. i r,k Let (r∈{1, 2, …, R}, k∈{1, 2, …, K}) denote the set of indexes of nodes with which the i-th node will communicate in the k-th update process in the r-th round.

[0013] In edge computing learning, for any i, j (i ≠ j), w i =w j In other words, we search for a model that minimizes the cost function f under the condition that the model variables of all nodes are consistent.

[0014] The cost function is explained below. The structure of the neural network and the definition of the cost function are common to all nodes. i Let f be the cost function at the i-th node. For any i, j (i ≠ j), i =f j In addition, the cost function f i The parameters of the model variables w i The cost function f i is designed appropriately for each application field, such as image classification, noise removal, image generation, voice recognition, and anomaly detection. In general, the cost function f i can be any differentiable function. That is, the cost function f i As long as it is a differentiable function, it may be a convex function or a non-convex function.

[0015] Here, as a concrete example, a cost function using deep learning will be explained. Designing a cost function using deep learning has become popular in recent years, and the cost function using deep learning is a differentiable non-convex function. Image classification will be used as an example. An image classification model is a method for classifying an input image x i The output value y is obtained by passing it through a neural network (i.e., a combination of multiple linear and nonlinear transformations).i This is a model (i.e., a function) that obtains the output value y i is a C-dimensional one-hot vector that represents the probability of existence for each class when there are C classes to be classified. Note that the closer the element value of the vector is to 0, the less the class is the relevant class, and the closer it is to 1, the more the relevant class is. Usually, the class with the maximum value is the classification result. A function that outputs a scalar evaluation value is defined as an evaluation function, and a function obtained by combining the evaluation function with the function of the image classification model is defined as a cost function f i In classification problems, including image classification, the cross-entropy function is often used as an evaluation function.

[0016] w=[w1 T , …, w n T ] T The cost function f is defined as follows:

[0017]

number

[0018] Also, g i =∇f i (w i ), then g i is the cost function f i The function represents the gradient of the training data set x i For a mini-batch selected as part of i When we calculate the gradient of , the gradient becomes a random variable. i Let f be the cost function i In deep learning, mini-batches are often chosen to generalize non-convex functions, and learning is often done with small step sizes while fluctuating the gradient.

[0019] A method for solving the optimization problem that minimizes the cost of the following equation will now be described.

[0020]

number

[0021] Methods for solving this optimization problem include, for example, (1) averaging consensus and (2) Stochastic Variance Reduction (SVR). Examples of averaging consensus include DSGD, Gossip SGD, and FedAvg. Examples of stochastic variance reduction gradient methods include SCAFFOLD and GT-SVR.

[0022] First, we will explain DSGD as an example of averaging consensus formation. Figure 3 shows the algorithm of DSGD (see Non-Patent Document 2). Here, μ is the step size, E i is the set ε i represents the number of elements in. As shown in Figure 3, while updating the model variables at each node, they are occasionally averaged so that the connected nodes have similar model variables (i.e., a consensus is reached). Averaging consensus formation requires little computational effort and memory consumption, so it is often used as a basic algorithm in edge computing.

[0023] Next, we will explain SCAFFOLD as an example of the stochastic variance-reducing gradient method. Figure 4 shows the algorithm of SCAFFOLD (see Non-Patent Document 3). SCAFFOLD is an algorithm that applies SVR to FedAvg, which is an averaging consensus formation in a centralized distributed network. In the stochastic variance-reducing gradient method, the stochastic gradient g i In the following formula (1), - g i By replacing it with, it is possible to reduce the variance of the stochastic gradient and prevent instability of learning due to the selection of mini-batches.

[0024]

number

[0025] Where: - c iis a global control variable that is the expected value of the stochastic gradient of the i-th node and the nodes connected to it, c i are local control variables that are the expected values ​​of the stochastic gradients of the i-th node, and are defined as follows:

[0026]

number

[0027]

number

[0028] In other words, equation (1) is the stochastic gradient g i Global control variables - c i and the local control variable c i By adding the difference with, the formula corrects the direction of learning to move toward the global model.

[0029] As can be seen in Figure 4, the global control variable - c i and the local control variable c i is also updated according to a predetermined update rule. [Prior art documents] [Non-patent literature]

[0030] [Non-Patent Document 1] NTT DATA Corporation, “Edge computing attracts attention in the IoT era,” [online], [Retrieved May 10, 2021], Internet<URL: https: / / www.nttdata.com / jp / ja / data-insight / 2018 / 1122 / > [Non-Patent Document 2] J. Chen, AH Sayed, “Diffusion adaptation strategies for distributed optimization and learning over networks,” IEEE Transactions on Signal Processing, 60(8), pp.4289-4305, 2012. [Non-Patent Document 3] SP Karimireddy, S. Kale, M. Mohri, S. Reddi, S. Stich, AT Suresh, “SCAFFOLD: Stochastic Controlled Averaging for Federated Learning,” Proceedings of the 37th International Conference on Machine Learning, PMLR 119:5132-5143, 2020. Summary of the Invention [Problem to be solved by the invention]

[0031] Averaging consensus methods such as DSGD work stably when the training data sets accumulated in each node are roughly statistically homogeneous. On the other hand, there is a problem that it often does not work well when (1) there is a statistical bias in the training data sets accumulated between nodes, or (2) communication between nodes is asynchronous and sparse. This problem occurs because the stochastic gradient takes values ​​that are quite different for each node, so the learning direction is not corrected to approach the global model.

[0032] In addition, since stochastic variance-reduced gradient methods such as SCAFFOLD update variables so as to reduce the variance of the stochastic gradient, they are more tolerant than average consensus methods to (1) cases where there is a statistical bias in the learning data set accumulated between nodes, and (2) cases where communication between nodes is asynchronous and sparse. On the other hand, due to the update rules for the two control variables, the expected value of the stochastic gradient may not be estimated accurately, and in such cases, there is a problem that learning cannot proceed stably and a global model cannot be learned.

[0033] Therefore, the present invention aims to provide a technology that can stably optimize model variables to fit a training data set, even when there is a statistical bias in the training data set that is distributed and stored across multiple nodes, or when communication between nodes is asynchronous and sparse. [Means for solving the problem]

[0034] One aspect of the present invention is a variable optimization system that is configured with n nodes (n is an integer equal to or greater than 2) and optimizes model variables using a learning data set that is a set of learning data stored in each node, where N={1, ..., n} is a set of node indexes, i∈N, and w i Let x be the model variable at the i-th node. i Let f be the training data set at the i-th node. i (w i ) is the cost function at the i-th node, ε i Let be the set of indices of nodes that the i-th node connects to, and y i|j , z i|j (j∈ε i ) are the dual variables at the i-th node corresponding to the j-th node, and A i|j (j∈ε i ) is a parameter matrix defined as

[0035]

number

[0036] Let R and K be integers greater than or equal to 1, {1, 2, …, R} be a set representing the number of rounds, {1, 2, …, K} be a set representing the number of update operations, and ε i r,k Let (r∈{1, 2, …, R}, k∈{1, 2, …, K}) be the set of indexes of nodes that the i-th node will communicate with in the k-th update process in the r-th round, μ be a given constant, and E i Set ε i The number of elements of the i-th node is the model variable w i A model variable update unit that updates the value of

[0037]

number

[0038] (However, ∇f i (w i ) is the training data set x i A mini-batch χ i (Calculated using

[0039]

number

[0040] j∈ε i For the index j that satisfies i|j A first dual variable update unit that updates the value of

[0041]

number

[0042] j∈ε i r,k For index j that satisfies j|i , from the jth node, and calculates the dual variable z i|jand a second dual variable update unit that updates the value of

[0043] One aspect of the present invention is a variable optimization system that is configured with n nodes (n is an integer equal to or greater than 2) and optimizes model variables using a learning data set that is a set of learning data stored in each node, where N={1, ..., n} is a set of node indexes, i∈N, and w i Let x be the model variable at the i-th node. i Let f be the training data set at the i-th node. i (w i ) is the cost function at the i-th node, ε i Let be the set of indices of nodes that the i-th node connects to, and y i|j , z i|j (j∈ε i ) are the dual variables at the i-th node corresponding to the j-th node, and A i|j (j∈ε i ) is a parameter matrix defined as

[0044]

number

[0045] Let R and K be integers greater than or equal to 1, {1, 2, …, R} be a set representing the number of rounds, {1, 2, …, K} be a set representing the number of update operations, and ε i r,k Let (r∈{1, 2, …, R}, k∈{1, 2, …, K}) be the set of indexes of nodes that the i-th node will communicate with in the k-th update process in the r-th round, μ be a given constant, and E i Set ε i The number of elements in η i is a constant calculated by the following formula:

[0046]

number

[0047] The i-th node is model variable w i A model variable update unit that updates the value of

[0048]

number

[0049] (However, ∇f i (w i ) is the training data set x i A mini-batch χ i (Calculated using

[0050]

number

[0051] j∈ε i For the index j that satisfies i|j A first dual variable update unit that updates the value of

[0052]

number

[0053] j∈ε i r,k For index j that satisfies j|i , from the jth node, and calculates the dual variable z i|j and a second dual variable update unit that updates the value of Effect of the Invention

[0054] According to the present invention, even if there is a statistical bias in the training data set stored in a distributed manner across multiple nodes or if communication between nodes is asynchronous and sparse, it is possible to stably optimize model variables to fit the training data set. [Brief description of the drawings]

[0055] [Figure 1] FIG. 1 is a diagram showing an example of a network in which n (n=4) nodes are connected. [Diagram 2] FIG. 2 is a diagram illustrating edge computing in the network of FIG. 1. [Diagram 3] A diagram illustrating the DSGD algorithm. [Figure 4] FIG. 1 illustrates the SCAFFOLD algorithm. [Diagram 5] FIG. 1 illustrates the ECL algorithm. [Figure 6] FIG. 2 illustrates the optimization algorithm of the present application. [Figure 7] FIG. 2 illustrates the optimization algorithm of the present application. [Figure 8] FIG. 1 is a block diagram showing a configuration of a variable optimization system 10. [Figure 9] 1 is a block diagram showing a configuration of a node 100. FIG. [Figure 10] 4 is a flowchart showing the operation of the node 100. [Figure 11] FIG. 2 is a block diagram showing a configuration of a variable optimization unit 120. [Figure 12] 13 is a flowchart showing the operation of the variable optimization unit 120. [Figure 13] FIG. 2 is a diagram illustrating an example of a functional configuration of a computer that realizes each device according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0056] Hereinafter, an embodiment of the present invention will be described in detail. Note that components having the same functions are given the same reference numbers and duplicated explanations will be omitted.

[0057] Before describing each embodiment, the notation used in this specification will be described.

[0058] ^ (caret) represents a superscript. For example, x y^z Yes z is a superscript to x, and xy^z Yes z is a subscript to x. Also, _ (underscore) represents a subscript. For example, x y_z Yes z is a superscript to x, and x y_z Yes z is a subscript on x.

[0059] In addition, the superscripts "^" and "~" such as ^x and ~x for a certain letter x should actually be written directly above the "x", but due to the constraints of the description in the specification, they are written as ^x and ~x. <Technical background> [1: ECL algorithm] As a method for solving an optimization problem, there is a method using a primal-dual update rule, in addition to the averaging consensus method and the stochastic variance-reduced gradient method. Examples of the method using the primal-dual update rule include PDMM and Edge-Consensus Learning (ECL). Here, ECL will be described based on Reference Non-Patent Document 1. (Reference non-patent document 1: K. Niwa, N. Harada, G. Zhang, and WB Kleijn, Edge-consensus learning: Deep learning on P2P networks with nonhomogeneous data. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pp. 668-678, 2020.) The optimized model variables are preferably as consistent as possible with the sum of the training data sets in all nodes, and a consensus on the model variables is reached among the nodes. In other words, the model variables are trained to reduce the cost function, and the model variables are trained to be approximately equal to each other. Therefore, the optimization problem to be solved for the model variables can be formulated as a linearly constrained cost minimization problem as follows:

[0060]

number

[0061]

number

[0062] In addition, the unit matrix A in equation (3) i|j The sign of A i|j ) is also sometimes expressed.

[0063] When the cost function f is a differentiable non-convex function, instead of solving the optimization problem of equation (2), the following optimization problem may be solved in which the cost function f of equation (2) is replaced by a quadratic upper bound function q.

[0064]

number

[0065]

number

[0066]

number

[0067] Here, μ is the step size, and in the case of deep learning, it is set to a sufficiently small value, for example, 0.001. i r,k is the model variable w in the kth update process in the rth round. i Represents the value of .

[0068] Instead of solving the optimization problem of equation (4), we consider solving its dual problem. Specifically, the dual variable λ=[λ1 T , …, λ n T ] T (where λi =[λ i|ε_i(1) T , …, λ i|ε_i(E_i) T ] T , for any i, j, λ i|j = λ j|i (satisfies the above) and solve the dual problem for the dual variable λ in the following equation.

[0069]

number

[0070] however,

[0071]

number

[0072]

number

[0073]

number

[0074]

number

[0075]

number

[0076]

number

[0077] and P is a matrix (hereinafter referred to as a permutation matrix) that permutes dual variables as follows:

[0078]

number

[0079] All elements of the permutation matrix P are either 0 or 1, and PP=I is satisfied.

[0080] In addition, q * Let q be a convex conjugate function of the function q, and ι be ker(I-P) is called the indicator function.

[0081] Let us consider deriving a variable update rule for solving the optimization problem of equation (5). The dual variable λ that satisfies equation (5) is the cost function q * (J T A T λ)+ι ker(I-P) This is obtained when the subdifferential of (λ) contains 0.

[0082]

number

[0083]

number

[0084]

number

[0085] By introducing dual variables y and z of the same dimension as the dual variable λ and transforming equation (6) using monotone operator decomposition, we obtain the following variable update rule.

[0086]

number

[0087]

number

[0088]

number

[0089] Here, β∈(0, 1) is the averaging coefficient. Note that β=1 / 2 is often used.

[0090] Equation (7) is the update rule for the model variable w, equation (8) is the update rule for the dual variable y, and equation (9) is the update rule for the dual variable z. In addition, the PDMM-SGD in equation (9) is a variable update rule obtained based on the Peaceman-Rachford (PR) type monotone operator decomposition (PRS: Peaceman-Rachford Splitting), and the ADMM-SGD is a variable update rule obtained based on the Douglas-Rachford (DR) type monotone operator decomposition (DRS: Douglas-Rachford Splitting).

[0091] By decomposing the variable update rules of equations (7), (8), and (9) into variable update rules for each node, we obtain the algorithm shown in Figure 5. This algorithm is the ECL algorithm. Here, η i is a constant representing the step size at the i-th node, ρ i is a constant that represents the strength of the regularization term at the i-th node. As with the algorithms in Figures 3 and 4, in the algorithm in Figure 5, learning progresses by repeating the variable update process within a node and the data exchange process between nodes. The variable update rule in equation (7) and the variable update rule in equation (8) are both update rules for the variable update process within a node. On the other hand, the variable update rule in equation (9) is an update rule for the data exchange process between nodes, and in PDMM-SGD, the model variable w j The value of the dual variable y j|i After receiving the value of from the jth node, the dual variable z i|j On the other hand, in ADMM-SGD, the model variable w j The value of the dual variable y j|i After receiving the value of from the jth node, the dual variable y j|i Using the value of i|j After averaging the values ​​of i|j Update the value of [2: Improvement of the ECL algorithm] Primal-dual update rules such as ECL minimize the cost function while imposing constraints to make the models of each node equivalent, and therefore, like the stochastic variance reduced gradient method, are highly resistant to (1) cases where the accumulated training data set has statistical bias, and (2) cases where communication between nodes is asynchronous and sparse. However, unless the step size η and the strength ρ of the regularization term are appropriately selected, learning may not converge well. In fact, with ECL, the values ​​of η and ρ are empirically determined, which posed the problem of not being able to proceed with learning stably.

[0092] In addition, when the strength ρ of the regularization term, which can take values ​​greater than 0, is set to a value greater than 0, ECL transmits model variables and dual variables (see Figure 5), which results in about twice the amount of communication and about twice the training time compared to DSGD and SCAFFOLD, which only transmit model variables.

[0093] Therefore, the following method is used to enable stable ECL learning while keeping learning time down. First, ρ = 0 is set so that ECL learning can proceed with reduced learning time. This also makes it possible to eliminate the instability of learning caused by empirically determining ρ. Next, in order to eliminate the instability of learning caused by empirically determining η, we consider whether η can be determined theoretically. To this end, we consider analyzing the physical meaning of the dual variable z based on equations (7), (8), and (9) used to derive the ECL algorithm. Here, matrix P is a permutation matrix, and therefore satisfies PP=I. Furthermore, from the definition of matrix A, matrices A and P are A T A=I, PAP=-A.

[0094] In the following, we consider ρ=0 in equation (7).

[0095] Since equation (9) represents the update rule for the dual variable z in the case of PRS and the update rule for the dual variable z in the case of DRS, we will consider them separately. In the following, we will refer to a with a subscript i and superscripts r and k attached to a certain letter a. i r,k Let denote the value of variable a at the i-th node in the k-th update process in the r-th round. [[For PRS]] Let r be an odd number, then term A T Calculating z gives us the following two equations:

[0096]

number

[0097]

number

[0098] Here, u = Jw. The first term on the right side of equation (10) and the first term on the right side of equation (11) both represent the update difference of the variables, and the second term on the right side of equation (11) represents the bias.

[0099] Also, let r be an odd number.

[0100]

number

[0101] Therefore, it can be seen that equation (12) coincides with some of the global control variables. [[For DRS]] As in the case of PRS, term A T Calculating z gives the following equation, where β=1 / 2.

[0102]

number

[0103] Here, u = Jw. The first term on the right side of equation (13) represents the update difference of the variable, and the second term on the right side of equation (13) represents the bias.

[0104] Also,

[0105]

number

[0106] Therefore, from equation (14), we can see that equation (14) is consistent with some of the global control variables.

[0107] Next, consider transforming equation (7) for the model variable w. Considering ρ=0, transforming equation (7) into an update equation for each node gives the following equation:

[0108]

number

[0109] From this formula,

[0110]

number

[0111] is obtained.

[0112] For ease of description, γ i =1 / (1+μη i E i ), the underlined part of equation (15) can be expressed as follows:

[0113]

number

[0114]

number

[0115]

number

[0116]

number

[0117] Here, T1 can be ignored because it approaches 0 as the number of updates increases. i Since is a number smaller than 1, the following equation holds:

[0118]

number

[0119] Therefore, as the number of updates increases, T2 and T3 can be approximated by the following equations.

[0120]

number

[0121]

number

[0122] In other words, T3 corresponds to a negative local control variable. Therefore, we consider making T2 correspond to a global control variable. In the process of analyzing the physical meaning of the dual variable z, we found that the term -1 / (μK)Az corresponds to the update difference, so we set η i It is preferable to satisfy the following formula:

[0123]

number

[0124] Therefore, the following equation is obtained:

[0125]

number

[0126] Using equation (16), the parameter η i It is no longer necessary to determine the value of based on experience. In addition, it is possible to remove uncertainty regarding the implementation of the two control variables in SVC, and learning proceeds stably.

[0127] In summary, for the stochastic variance reduction gradient method, the model variable w i The update formula is as follows:

[0128]

number

[0129] FIG. 6 shows the algorithm using these update equations.

[0130] For ECL, the model variable w i The update formula is as follows:

[0131]

number

[0132] FIG. 7 shows an algorithm using this update formula.

[0133] The algorithms in Figures 6 and 7 are the same as those in SVC and ECL, respectively, where ρ = 0 and η is appropriately selected. Therefore, both of the algorithms in Figures 6 and 7 can stably proceed with learning while keeping learning time down. In fact, numerical experiments have confirmed that when the learning data set stored in the nodes is statistically biased, a model close to the global model can be stably obtained while keeping learning time down, even if communication between nodes is asynchronous. First Embodiment The variable optimization system 10 will be described below with reference to Figs. 8 to 10. Fig. 8 is a block diagram showing the configuration of the variable optimization system 10. The variable optimization system 10 is composed of n nodes (n is an integer equal to or greater than 2). Each node is connected to a network 800. The network 800 may be, for example, the Internet. However, for each node, it is assumed that a node that connects to and communicates with the node is determined in advance. Also, each node accumulates a set of learning data (hereinafter referred to as a learning data set) used to optimize the model variables.

[0134] Fig. 9 is a block diagram showing the configuration of node 100. Fig. 10 is a flowchart showing the operation of node 100. As shown in Fig. 9, node 100 includes a variable optimization unit 120, a transmission / reception unit 180, and a recording unit 190. The transmission / reception unit 180 is a component that appropriately transmits and receives data that needs to be exchanged with other nodes. The recording unit 190 is a component that appropriately records information necessary for processing by node 100. For example, a learning data set is recorded in the recording unit 190.

[0135] Let N={1, …, n} be the set of node indices, i∈N. i Let x be the model variable at the i-th node. i Let f be the training data set at the i-th node. i (w i ) is the cost function at the i-th node, ε i Let y be the set of indices of nodes to which the i-th node is connected. i|j , z i|j (j∈ε i ) are the dual variables at the i-th node corresponding to the j-th node, and A i|j (j∈ε i ) is the parameter matrix defined by

[0136]

number

[0137] Let R and K be integers greater than or equal to 1, {1, 2, …, R} be a set representing the number of rounds, {1, 2, …, K} be a set representing the number of update operations, and ε i r,k Let (r∈{1, 2, …, R}, k∈{1, 2, …, K}) be the set of indexes of nodes with which the i-th node communicates in the k-th update process in the r-th round. r is called the round execution counter, and k is called the update process execution counter. Note that r and k are also simply called counters.

[0138] The operation of the i-th node 100 will be described with reference to FIG.

[0139] In S120, the variable optimization unit 120 optimizes the learning data set x i Using the above, the model variable w to be optimized is i In this case, the variable optimization unit 120 optimizes the j-th node (where j is j∈ε) using the transmission / reception unit 180. i ) and receives the model variable w i The data received by the i-th node from the j-th node will be explained later.

[0140] The variable optimization unit 120 will be described below with reference to Fig. 11 and Fig. 12. Fig. 11 is a block diagram showing the configuration of the variable optimization unit 120. Fig. 12 is a flowchart showing the operation of the variable optimization unit 120. As shown in Fig. 11, the variable optimization unit 120 includes an initialization unit 121, a model variable update unit 1221, a first dual variable update unit 1222, a second dual variable update unit 1223, a counter update unit 123, and a termination condition determination unit 124.

[0141] The operation of the variable optimization unit 120 of the i-th node will be described with reference to FIG.

[0142] Here, μ is a given constant, β is a constant satisfying 0<β<1, and E i Set ε i Let be the number of elements in .

[0143] In S121, the initialization unit 121 initializes the model variable w i The initialization process required for optimizing the model variable w is performed. The initialization process will be described below. The initialization unit 121 initializes counters r and k. The initialization unit 121 initializes counter r by setting r←1. Similarly, the initialization unit 121 initializes counter k by setting k←1. The initialization unit 121 also initializes model variable w i , dual variable z i|j (j∈ε i The initialization unit 121 initializes the model variable w i The initialization unit 121 sets the initial value of the dual variable z i|j Set the initial value of as 0.

[0144] In S1221, the model variable update unit 1221 updates the model variable w i Update the value of

[0145]

number

[0146] (However, ∇f i (w i ) is the training data set x i A mini-batch χ i (Calculated using

[0147]

number

[0148] The constant μ may be set by the initialization unit 121 in S121, for example.

[0149] In S1222, the first dual variable update unit 1222 updates j∈ε i For the index j that satisfies i|jUpdate the value of

[0150]

number

[0151] In S1223, the second dual variable update unit 1223 updates j∈ε i r,k For index j that satisfies j|i , from the jth node, and calculates the dual variable z i|j Update the value of

[0152] Here, the second dual variable update unit 1223 updates the dual variable z i|j The formula used to update the value of is:

[0153]

number

[0154] or

[0155]

number

[0156] It can be said that:

[0157] The constant β may be set by the initialization unit 121 in S121, for example.

[0158] In S123, if counter k satisfies k=K, counter update unit 123 initializes counter k (i.e., k←1) and increments counter r by 1 (i.e., r←r+1), whereas otherwise, counter k is incremented by 1 (i.e., k←k+1).

[0159] In S124, when the counter r reaches a predetermined number of updates R (that is, when the counter r satisfies r=R), the termination condition determination unit 124 determines the model variable w i In other words, if a predetermined termination condition is satisfied, the variable optimization unit 120 outputs the value of the variable w i If not, the process repeats steps S1221 to S124.

[0160] According to the embodiment of the present invention, even if there is a statistical bias in the training data set distributed and accumulated in a plurality of nodes or if communication between nodes is asynchronous and sparse, it is possible to stably optimize model variables so as to fit the training data set. In addition, it is possible to reduce the time required for training. <Second embodiment> In the first embodiment, the variable optimization unit 120 is based on the algorithm of Fig. 6, but it can also be based on the algorithm of Fig. 7. Such an embodiment will be described below. The first embodiment and the second embodiment differ only in the operation of the variable optimization unit 120.

[0161] The variable optimization unit 120 will be described below with reference to Fig. 11 and Fig. 12. Fig. 11 is a block diagram showing the configuration of the variable optimization unit 120. Fig. 12 is a flowchart showing the operation of the variable optimization unit 120. As shown in Fig. 11, the variable optimization unit 120 includes an initialization unit 121, a model variable update unit 1221, a first dual variable update unit 1222, a second dual variable update unit 1223, a counter update unit 123, and a termination condition determination unit 124.

[0162] The operation of the variable optimization unit 120 of the i-th node will be described with reference to FIG.

[0163] Here, μ is a given constant, β is a constant satisfying 0<β<1, and E i Set ε i The number of elements in η i is a constant calculated by the following formula:

[0164]

number

[0165] In S121, the initialization unit 121 initializes the model variable w i This performs the initialization process required for optimization.

[0166] In S1221, the model variable update unit 1221 updates the model variable w i Update the value of

[0167]

number

[0168] (However, ∇f i (w i ) is the training data set x i A mini-batch χ i (Calculated using

[0169]

number

[0170] The constant μ may be set by the initialization unit 121 in S121, for example.

[0171] In S1222, the first dual variable update unit 1222 updates j∈ε i For the index j that satisfies i|j Update the value of

[0172]

number

[0173] In S1223, the second dual variable update unit 1223 updates j∈ε i r,kFor index j that satisfies j|i , from the jth node, and calculates the dual variable z i|j Update the value of

[0174] Here, the second dual variable update unit 1223 updates the dual variable z i|j The formula used to update the value of is:

[0175]

number

[0176] or

[0177]

number

[0178] It can be said that:

[0179] The constant β may be set by the initialization unit 121 in S121, for example.

[0180] In S123, if counter k satisfies k=K, counter update unit 123 initializes counter k (i.e., k←1) and increments counter r by 1 (i.e., r←r+1), whereas otherwise, counter k is incremented by 1 (i.e., k←k+1).

[0181] In S124, when the counter r reaches a predetermined number of updates R (that is, when the counter r satisfies r=R), the termination condition determination unit 124 determines the model variable w i In other words, if a predetermined termination condition is satisfied, the variable optimization unit 120 outputs the value of the variable w i If not, the process repeats steps S1221 to S124.

[0182] According to the embodiment of the present invention, even if there is a statistical bias in the training data set distributed and accumulated in a plurality of nodes or if communication between nodes is asynchronous and sparse, it is possible to stably optimize model variables so as to fit the training data set. In addition, it is possible to reduce the time required for training. <Application Examples> Here, examples to which each embodiment of the present invention can be applied will be described. Example 1: V2X (Vehicle to everything) In an environment where automobiles, such as connected cars, and infrastructure are interconnected, each automobile and infrastructure is regarded as a node in each embodiment. Information from a wide variety of sensors mounted on the automobiles and infrastructure, such as images, acoustic signals, and acceleration, is accumulated in each node. The accumulated data may be used as learning data, and each embodiment of the present invention may be used when optimizing one cost function. The cost function can set an index according to the purpose, such as minimizing the arrival time, minimizing the total amount of energy used, or making the physical distance between nodes equal to or greater than a certain value, in the cost term. Example 2: Digital Twin In a situation where multiple digital twins influence each other, each digital twin is regarded as a node in each embodiment. Learning data is accumulated in a distributed manner in each digital twin. Each embodiment of the present invention may be used when optimizing a common cost function without sharing the accumulated learning data with other nodes. For example, when trying to solve food waste using digital twins, individual people and individual stores can be configured as digital twins, and a cost function having a cost term that minimizes the amount of ingredients in all stores can be configured to be minimized as a cost function. An index value expressing the happiness of each individual may be further used to design a cost function that minimizes the amount of ingredients in all stores while maximizing the sum of the index values. <Additional Notes> 13 is a diagram showing an example of the functional configuration of a computer that realizes each of the above-mentioned devices (i.e., each node). The processing in each of the above-mentioned devices can be implemented by having a recording unit 2020 load a program for causing a computer to function as each of the above-mentioned devices, and having the control unit 2010, input unit 2030, output unit 2040, etc. operate.

[0183] The device of the present invention has, as a single hardware entity, an input section to which a keyboard or the like can be connected, an output section to which a liquid crystal display or the like can be connected, a communication section to which a communication device (e.g., a communication cable) capable of communicating with the outside of the hardware entity can be connected, a CPU (which may also have a central processing unit, cache memory, registers, etc.), memories such as RAM and ROM, an external storage device such as a hard disk, and buses connecting the input section, output section, communication section, CPU, RAM, ROM, and external storage device so that data can be exchanged between them. If necessary, the hardware entity may also be provided with a device (drive) capable of reading and writing a recording medium such as a CD-ROM. A physical entity equipped with such hardware resources is, for example, a general-purpose computer.

[0184] The external storage device of the hardware entity stores the programs required to realize the above-mentioned functions and the data required in the processing of these programs (not limited to the external storage device, but for example the programs may be stored in a ROM, which is a read-only storage device). Data obtained by the processing of these programs is stored appropriately in the RAM, the external storage device, etc.

[0185] In the hardware entity, each program stored in an external storage device (or ROM, etc.) and the data required for processing each program are loaded into memory as necessary, and interpreted, executed, and processed by the CPU as appropriate, so that the CPU realizes a predetermined function (each component represented as the above, "unit," "means," etc.).

[0186] The present invention is not limited to the above-described embodiment, and can be modified as appropriate without departing from the spirit of the present invention. In addition, the processes described in the above-described embodiment are not limited to being executed in chronological order according to the order described, but may be executed in parallel or individually depending on the processing capacity of the device that executes the processes or as necessary.

[0187] As described above, when the processing functions of the hardware entities (the devices of the present invention) described in the above embodiments are realized by a computer, the processing contents of the functions that the hardware entities should have are described by a program. Then, by executing this program on a computer, the processing functions of the hardware entities are realized on the computer.

[0188] The program describing the processing contents can be recorded on a computer-readable recording medium. The computer-readable recording medium may be, for example, a magnetic recording device, an optical disk, a magneto-optical recording medium, a semiconductor memory, or any other suitable recording medium. Specifically, for example, a hard disk drive, a flexible disk, a magnetic tape, or the like can be used as the magnetic recording device, a DVD (Digital Versatile Disc), a DVD-RAM (Random Access Memory), a CD-ROM (Compact Disc Read Only Memory), a CD-R (Recordable) / RW (ReWritable), or the like can be used as the optical disk, an MO (Magneto-Optical disc), or the like can be used as the magneto-optical recording medium, and an EEP-ROM (Electronically Erasable and Programmable-Read Only Memory) or the like can be used as the semiconductor memory.

[0189] The program may be distributed, for example, by selling, transferring, lending, etc. portable recording media such as DVDs and CD-ROMs on which the program is recorded. Furthermore, the program may be distributed by storing the program in a storage device of a server computer and transferring the program from the server computer to other computers via a network.

[0190] A computer that executes such a program, for example, first stores the program recorded on a portable recording medium or the program transferred from a server computer in its own storage device. Then, when executing a process, the computer reads the program stored in its own storage device and executes a process according to the read program. As another execution form of the program, the computer may directly read the program from the portable recording medium and execute a process according to the program, or may execute a process according to the received program each time a program is transferred from the server computer to the computer. The server computer may not transfer the program to the computer, but may execute the above-mentioned process by a so-called ASP (Application Service Provider) type service that realizes the processing function only by issuing an execution instruction and obtaining the result. Note that the program in this embodiment includes information used for processing by an electronic computer that is equivalent to a program (data that is not a direct instruction to the computer but has a nature that specifies the processing of the computer, etc.).

[0191] In addition, in this embodiment, a hardware entity is configured by executing a specific program on a computer, but at least a part of the processing contents may be realized by hardware.

[0192] The foregoing description of the embodiments of the invention has been presented for purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise form disclosed. Modifications and variations are possible in light of the above teachings. The embodiments have been chosen and depicted to provide a best illustration of the principles of the invention and to enable those skilled in the art to utilize the invention in various embodiments and with various modifications as may be suitable for the practical use contemplated. All such modifications and variations are within the scope of the invention as defined by the appended claims interpreted in accordance with the breadth to which they are fairly, legally, and equitably entitled.

Claims

1. A variable optimization system that is configured with n nodes (n is an integer of 2 or more) and optimizes model variables using a learning data set that is a set of learning data stored in each node, Let N={1, …, n} be the set of node indices, i∈N, w i Let x be the model variable at the i-th node. i Let f be the training data set at the i-th node. i (w i ) is the cost function at the i-th node, ε i Let be the set of indices of nodes that the i-th node connects to, y i|j , z i|j (j∈ε i ) are the dual variables at the i-th node corresponding to the j-th node, and A i|j (j∈ε i ) is a parameter matrix defined as [0,64] Let R and K be integers greater than or equal to 1, {1, 2, …, R} be a set representing the number of rounds, {1, 2, …, K} be a set representing the number of update operations, and ε i r,k Let (r∈{1, 2, …, R}, k∈{1, 2, …, K}) be the set of indexes of nodes that the i-th node will communicate with in the k-th update process in the r-th round. μ is a given constant, E i Set ε i Let the number of elements of The i-th node is The model variable w i A model variable update unit that updates the value of [0.65] (However, ∇f i (w i ) is the training data set x i A mini-batch χ i (Calculated using [0.66] j∈ε i For the index j that satisfies i|j A first dual variable update unit that updates the value of [0.67] j∈ε i r,k For index j that satisfies j|i , from the jth node, and calculates the dual variable z i|j A second dual variable update unit that updates the value of A variable optimization system including:

2. A variable optimization system that is configured with n nodes (n is an integer of 2 or more) and optimizes model variables using a learning data set that is a set of learning data stored in each node, Let N={1, …, n} be the set of node indices, i∈N, w i Let x be the model variable at the i-th node. i Let f be the training data set at the i-th node. i (w i ) is the cost function at the i-th node, ε i Let be the set of indices of nodes that the i-th node connects to, y i|j , z i|j (j∈ε i ) are the dual variables at the i-th node corresponding to the j-th node, and A i|j (j∈ε i ) is a parameter matrix defined as [0068] Let R and K be integers greater than or equal to 1, {1, 2, …, R} be a set representing the number of rounds, {1, 2, …, K} be a set representing the number of update operations, and ε i r,k Let (r∈{1, 2, …, R}, k∈{1, 2, …, K}) be the set of indexes of nodes that the i-th node will communicate with in the k-th update process in the r-th round. μ is a given constant, E i Set ε i The number of elements in,η i is a constant calculated by the following formula: [0,69] The i-th node is The model variable w i A model variable update unit that updates the value of [Number 70] (However, ∇f i (w i ) is the training data set x i A mini-batch χ i (Calculated using [Equation 71] j∈ε i For the index j that satisfies i|j A first dual variable update unit that updates the value of [Equation 72] j∈ε i r,k For index j that satisfies j|i , from the jth node, and calculates the dual variable z i|j A second dual variable update unit that updates the value of A variable optimization system including:

3. The variable optimization system according to claim 1 or 2, The second dual variable update unit updates the dual variable z i|j The formula used to update the value of is: [Equation 73] or [74] (where β is a constant that satisfies 0<β<1) A variable optimization system.

Citation Information

Patent Citations

  • Variable optimization device, noise elimination device, variable optimization method, noise elimination method, and program

    JP2020123008A

  • Machine learning system, machine learning method, and program

    WO2019198815A1

  • Non-negative matrix decomposition optimization device, non-negative matrix decomposition optimization method, and program

    WO2020162189A1