IP Library Granted Patent US 11,636,379
Granted Patent B2
US 11,636,379 · App. 16/141,886 · Granted Apr 25, 2023

Distributed cluster training method and apparatus

Inventor: Jun Zhou (Hangzhou, CN)
Assignee: Alibaba Group Holding Limited
G06N20/00G06F9/3828G06F9/5027G06F2209/505
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,636,379
App. No.
16/141,886
Granted
Apr 25, 2023
Kind
B2
Abstract

A distributed cluster training method and an apparatus thereof are provided. The method includes reading a sample set, the sample set including at least one piece of sample data; using the sample data and current weights to substitute into a target model training function for iterative training to obtain a first gradient before receiving a collection instruction, the collection instruction being issued by a scheduling server when a cluster system environment meets a threshold condition; sending the first gradient to an aggregation server if a collection instruction is received, wherein the aggregation server collects each first gradient and calculates second weights; and receiving the second weights sent by the aggregation server to update current weights. The present disclosure reduces an amount of network communications and an impact on switches, and avoids the use of an entire cluster from being affected.

Claims (56)

1. A method implemented by one or more computing devices, the method comprising:

reading, by a training server of a plurality of training servers in a distributed cluster training system, a sample set, the sample set including at least one piece of sample data

using, by the training server, the sample data and current weights to substitute into a target model training function for iterative training to obtain a first gradient before receiving a collection instruction, the collection instruction being issued by a scheduling server when a cluster system environment meets a threshold condition, wherein first weights are generated by the training server based on the first gradient obtained in a previous training and are used as the current weights of a subsequent iteration of the iterative training, in response to determining that multiple iterations of the training exist before the training server receives the collection instruction;

sending, by the training server, the first gradient to an aggregation server in response to determining that a collection instruction is received from the scheduling server, wherein the aggregation server collects a plurality of first gradients from the plurality of training servers and calculates second weights; and

receiving, by the training server, the second weights sent by the aggregation server to update the current weights.

2. The method according to claim 1 , wherein the collection instruction being issued by the scheduling server when the cluster system environment meets the threshold condition comprises the collection instruction being issued by the scheduling server when a cluster network utilization rate of an entire cluster meets the first threshold condition, and/or being issued by the scheduling server when a cluster failure rate of the entire cluster meets a second threshold condition.

3. The method according to claim 2 , wherein:

the first threshold condition comprises the cluster network utilization rate being lower than the first threshold; and

the second threshold condition comprises the cluster failure rate being lower than the second threshold.

4. The method according to claim 1 , wherein the sample data includes time information, and after reading the sample set, the method further comprises:

calculating third weights of the sample data using time information of each piece of sample data; and

discarding a corresponding piece of sample data is discarded when an associated third weight is less than a third threshold.

5. The method according to claim 4 , wherein calculating, by the training server, the third weights of the sample data using the time information of each piece of sample data comprises substituting the time information of each piece of sample data into a negative exponential parameter of an exponential function to calculate the third weights.

6. The method according to claim 4 , wherein before calculating, by the training server, the third weights of the sample data using the time information of each piece of sample data, the method further comprises:

combining various pieces of sample data in the sample set; and

recording respective numbers of combinations of the sample data for the combined sample data.

7. The method according to claim 6 , wherein calculating, by the training server, the third weights of the sample data using the time information of each piece of sample data comprises:

using the time information of each piece of sample data to calculate a weight reduction coefficient; and

calculating a product of the weight reduction coefficient and the respective numbers of combinations to obtain the third weights.

8. The method according to claim 4 , wherein: in response to determining that the collection instruction is received, the method further comprises sending a first coefficient obtained by aggregating the third weights of each piece of sample data to the aggregation server, and wherein the aggregation server aggregating each first gradient and calculating the second weights comprises:

performing a weighting calculation to obtain a second gradient based on each first gradient and a first coefficient corresponding to each first gradient; and

calculating the second weights from the second gradient.

9. The method according to claim 1 , wherein after the aggregation server aggregates the plurality of first gradients and calculates the second weights, the method further comprises backing up, by the aggregation server, the second weights that are newly obtained.

10. The method according to claim 9 , wherein backing up, by the aggregation server, the second weights that are newly obtained comprises:

the aggregation server determining, by the aggregation server, whether an amount of change between the second weights that are newly obtained and second weights of a previous backup exceeds a change threshold; and

backing up the second weights that are newly obtained in response to determining that the amount of change exceeds the change threshold.

11. The method according to claim 9 , wherein after the aggregation server backs up the second weights that are newly obtained, the method further comprises substituting the second weights into a target model for outputting to a service server.

12. An apparatus comprising:

one or more processors;

memory;

a sample reading module stored in the memory and executable by the one or more processors to read a sample set, the sample set including at least one piece of sample data;

an iterative training module stored in the memory and executable by the one or more processors to use the sample data and current weights to substitute into a target model training function for iterative training to obtain a first gradient before receiving a collection instruction, the collection instruction being issued by a scheduling server when a cluster system environment meets a threshold condition, wherein first weights are generated based on the first gradient obtained in a previous training and are used as current weights of a subsequent iteration of the iterative training, in response to determining that multiple iterations of the training exist before receiving the collection instruction;

a result sending module stored in the memory and executable by the one or more processors to send the first gradient to an aggregation server in response to determining that a collection instruction is received, wherein the aggregation server collects a plurality of first gradients and calculates second weights; and

an updating module stored in the memory and executable by the one or more processors to receive the second weights sent by the aggregation server to update the current weights.

13. The apparatus according to claim 12 , wherein the collection instruction being issued by the scheduling server when the cluster system environment meets the threshold condition comprises the collection instruction being issued by the scheduling server when a cluster network utilization rate of an entire cluster meets the first threshold condition, and/or being issued by the scheduling server when a cluster failure rate of the entire cluster meets a second threshold condition.

14. The apparatus according to claim 13 , wherein:

the first threshold condition comprises the cluster network utilization rate being lower than the first threshold; and

the second threshold condition comprises the cluster failure rate being lower than the second threshold.

15. The apparatus according to claim 12 , further comprising:

a third weight calculation module used for calculating third weights of the sample data using time information of each piece of sample data; and

a sample discarding module used for discarding a corresponding piece of sample data is discarded when an associated third weight is less than a third threshold.

16. The apparatus according to claim 15 , wherein the third weight calculation module comprises an index calculation module used for substituting the time information of each piece of sample data being into a negative exponential parameter of an exponential function to calculate the third weights.

17. The apparatus according to claim 15 , further comprising:

a combination module used for combining various pieces of sample data in the sample set; and

a combination recording module used for recording respective numbers of combinations of the sample data for the combined sample data.

18. The apparatus according to claim 17 , wherein the third weight calculation module comprises:

a reduction coefficient calculation module used for using the time information of each piece of sample data to calculate a weight reduction coefficient; and

a first calculation module used for calculating a product of the weight reduction coefficient and the respective numbers of combinations to obtain the third weights.

19. The apparatus according to claim 15 , wherein the result sending module is further used for sending a first coefficient obtained by aggregating the third weights of each piece of sample data to the aggregation server in response to determining that the collection instruction is received, and the aggregation server comprises:

a first weight aggregation module used for performing a weighting calculation to obtain a second gradient based on each first gradient and a first coefficient corresponding to each first gradient; and

a second weight calculation module used for calculating the second weights from the second gradient.

20. One or more computer readable media storing executable instructions that, when executed by one or more processors, cause the one or more processors to perform acts comprising:

reading, by a training server of a plurality of training servers in a distributed cluster training system, a sample set, the sample set including at least one piece of sample data;

using, by the training server, the sample data and current weights to substitute into a target model training function for iterative training to obtain a first gradient before receiving a collection instruction, the collection instruction being issued by a scheduling server when a cluster system environment meets a threshold condition;

sending, by the training server, the first gradient to an aggregation server in response to determining that a collection instruction is received, wherein the aggregation server collects a plurality of first gradients from the plurality of training servers and calculates second weights; and

receiving, by the training server, the second weights sent by the aggregation server to update the current weights.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 29, 2021
From: ZHOU, JUN
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 055187/0114 →
Priority Claims (1)
CN 201610180393.8 · Mar 26, 2016 · national
Continuity (2)
Continuation PCTCN2017077246 · Mar 20, 2017
Related Publication 20190026657A1 · Jan 24, 2019
Cited By (1)
US 12,262,400