IP Library › Granted Patent US 12,242,968
Granted Patent B2
US 12,242,968 · App. 17/023,496 · Granted Mar 4, 2025

Parallel processing method and apparatus for neural network model

Inventor: Jaeyeon Kim (Suwon-si, KR)
Assignee: Samsung Electronics Co., Ltd.
G06N3/082G06F9/5066G06F18/213G06F18/22G06F18/285G06N3/08G06F9/4881G06F2209/501
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 12,242,968
App. No.
17/023,496
Granted
Mar 4, 2025
Kind
B2
Abstract

A parallel processing method and apparatus for a neural network model. The parallel processing method includes extracting metadata of a target layer included in a target model, measuring a similarity between the target layer and each of reference layers by comparing the metadata of the target layer to reference metadata of each of the reference layers, selecting a corresponding layer among the reference layers based on the similarities, and generating a parallelization strategy for the target layer based on a reference parallelization strategy matching the corresponding layer.

Claims (86)

1. A parallel processing method, the parallel processing method comprising:

Extracting metadata of a target layer included in a target model based on a neural network;

measuring a similarity between the target layer and each of reference layers by comparing the metadata of the target layer to reference metadata of each of the reference layers;

selecting a corresponding layer among the reference layers based on the similarities, wherein, in response to an absence of a layer, from among the reference layers, having a same reference metadata as metadata of the target layer, selecting, from among the reference layers, a layer having most similar reference metadata to the metadata of the target layer as the corresponding layer;

adding, in response to the layer having most similar reference metadata to the metadata of the target layer being selected as the corresponding layer, reference layer information corresponding to the metadata of the target layer to a reference database (DB) in which reference metadata of each of the reference layers is stored;

generating a parallelization strategy for the target layer based on a reference parallelization strategy matching the corresponding layer; and

performing, by the neural network, parallel processing based on the generated parallelization strategy.

2. The parallel processing method of claim 1 , wherein selecting the corresponding layer comprises:

in response to a presence of a layer, from among the reference layers, having a same reference metadata as metadata of the target layer, selecting the layer having a same reference metadata as metadata of the target layer as the corresponding layer.

3. The parallel processing method of claim 1 , wherein the reference layer information comprises link information, and

in response to the layer having most similar reference metadata to the metadata of the target layer being selected as the corresponding layer, identification information of the layer having most similar reference metadata to the metadata of the target layer is recorded as the link information in the reference layer information.

4. The parallel processing method of claim 1 , further comprising:

in response to the reference layer information corresponding to the metadata of the target layer being added to the reference DB, generating a new parallelization strategy corresponding to the metadata of the target layer.

5. The parallel processing method of claim 4 , wherein the generating of the new parallelization strategy is performed independently of performing of the parallelization strategy for the target layer.

6. The parallel processing method of claim 4 , wherein the generating of the new parallelization strategy is performed in response to an amount of new reference layer information that comprises the reference layer information corresponding to the metadata of the target layer that is added to the reference DB exceeding a threshold.

7. The parallel processing method of claim 4 , wherein

the similarities are measured using a similarity measurement model that is based on the neural network, and

in response to the new parallelization strategy being generated, the similarity measurement model is retrained based on the new parallelization strategy.

8. The parallel processing method of claim 4 , wherein in response to the new parallelization strategy being generated, link information of the reference layer information is changed to an empty state.

9. The parallel processing method of claim 1 , further wherein the performing of parallel operations further comprises:

performing parallel processing of operations related to the target layer based on the generated parallelization strategy to perform image recognition based on input data.

10. A non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to perform the parallel processing method of claim 1 .

11. A parallel processing apparatus, the parallel processing apparatus comprising:

a processor

a memory comprising instructions executable by the processor

wherein in response to the instructions being executed by the processor, the processor is configured to:

extract metadata of a target layer included in a target model based on a neural network;

measure a similarity between the target layer and each of reference layers by comparing the metadata of the target layer to reference metadata of each of the reference layers;

select a corresponding layer among the reference layers based on the similarities;

in response to an absence of a layer, from among the reference layers, having a same reference metadata as metadata of the target layer, select a layer from among the reference layers, having most similar reference metadata to metadata of the target layer as the corresponding layer;

add, in response to the layer having most similar reference metadata to the metadata of the target layer being selected as the corresponding layer, reference layer information corresponding to the metadata of the target layer to a reference database (DB) in which reference metadata of each of the reference layers is stored; and

generate a parallelization strategy for the target layer based on a reference parallelization strategy matching the corresponding layer,

wherein the neural network performs parallel processing based on the generated parallelization strategy.

12. The parallel processing apparatus of claim 11 , wherein the processor is configured to:

in response to a presence of a layer, from among the reference layers, having a same reference metadata as metadata of the target layer, select the layer having a same reference metadata as metadata of the target layer as the corresponding layer.

13. A parallel processing apparatus, the apparatus comprising:

a processor; and

a memory comprising instructions executable by the processor,

wherein in response to the instructions being executed by the processor, the processor is configured to:

extract metadata of a target layer included in a neural network-based target model;

measure a similarity between the target layer and each of reference layers by comparing the metadata of the target layer to reference metadata, stored in a reference data base (DB), of each of the reference layers;

select a corresponding layer among the reference layers based on the measured similarities, where metadata of the selected corresponding layer is same as the metadata of the target layer in a first circumstance that corresponds to the measured similarities indicating that the corresponding layer is the same as the target layer, and the selected corresponding layer is not same as the target layer in a second circumstance corresponding to the measured similarities indicating that the metadata of the corresponding layer is not same as the metadata of the target layer and most similar to the metadata of the target layer among the reference layers;

generate a parallelization strategy for the target layer based on a reference parallelization strategy matching the selected corresponding layer; and

in the second circumstance, update the reference DB through an adding of new reference layer information corresponding to the metadata of the target layer to the DBI,

wherein the parallel processing apparatus performs parallel processing based on the generated parallelization strategy.

14. The parallel processing apparatus of claim 13 , wherein, in the second circumstance, the new reference layer information comprises link information representing identification information of the selected corresponding layer.

15. The parallel processing apparatus of claim 13 , wherein the processor is further configured to, in response to the reference layer information being added to the DB generate a new parallelization strategy corresponding to the metadata of the target layer dependent on the updated DB.

16. The parallel processing apparatus of claim 15 , wherein

the similarities are measured using a neural network-based similarity measurement model, and

in response to the new parallelization strategy being generated, the similarity measurement model is retrained based on the new parallelization strategy.

17. The parallel processing apparatus of claim 15 , wherein in response to the new parallelization strategy being generated, link information of the reference layer information in the DB is changed to an empty state.

18. An electronic apparatus comprising:

a processor

a memory comprising instructions executable by the processor

wherein in response to the instructions being executed by the processor, the processor is configured to:

extract metadata of a target layer included in a target model based on a neural network;

measure a similarity between the target layer and each of reference layers by comparing the metadata of the target layer to reference metadata of each of the reference layers;

select a corresponding layer among the reference layers based on the similarities, wherein the selecting of the corresponding layer comprises:

in response to an absence of a layer being among the reference layers having a same reference metadata as metadata of the target layer, select, from among the reference layers, a layer having most similar reference metadata to the metadata of the target layer as the corresponding layer; and

in response to the layer having most similar reference metadata to the metadata of the target layer being selected as the corresponding layer, add reference layer information corresponding to the metadata of the target layer to a reference database (DB) in which the reference metadata of each of the reference layers is stored;

generate a parallelization strategy for the target layer based on a reference parallelization strategy matching the corresponding layer; and

performing, by the neural network, parallel processing according to the generated parallelization strategy.

19. The electronic apparatus of claim 18 , wherein the processor is configured to:

in response to a presence of a layer, from among the reference layers, having a same reference metadata as metadata of the target layer, select the layer having a same reference metadata as metadata of the target layer as the corresponding layer.

20. A processor-implemented method, comprising:

extracting metadata of a target layer included in a target model based on a neural network;

comparing the metadata of the target layer with metadata of each of a plurality of reference layers;

in a case in which the metadata of the target layer matches the metadata of a specific reference layer among the plurality of reference layers, execute the target layer based on a first parallelization strategy corresponding to the specific reference layer;

in a case in which the metadata of the target layer does not match the metadata of any of the plurality of reference layers, executing the target layer based on a second parallelization strategy corresponding to a reference layer, from among the plurality of reference layers, having a closest similarity to the target layer, generating a new parallelization strategy for the target layer, and subsequently executing the target layer based on the new parallelization strategy; and

performing, by the neural network, parallel processing based on the generated new parallelization strategy.

21. The method of claim 20 , wherein executing the target layer based on the second parallelization strategy is performed independently of generating the new parallelization strategy for the target layer.

22. The method of claim 20 , wherein generating the new parallelization strategy for the target layer comprises:

determining whether an update condition has been satisfied; and

after the update condition has been satisfied, generating the new parallelization strategy for the target layer based on new reference layer information that has been added to the plurality of reference layers prior to the update condition being satisfied.

23. The method of claim 22 , wherein the update condition corresponds to one or both of an amount of time that has passed and an amount of the new reference layer information that has been added.

24. The method of claim 1 , wherein some of the reference layers correspond to respective layers of different models.

25. The parallel processing apparatus of claim 12 , wherein the processor is further configured to perform an inference operation using, or a training operation of, the target model, including an implementation of the target layer according to the generated parallelization strategy.

26. The parallel processing apparatus of claim 25 , wherein in response to the second reference layer being selected as the corresponding layer, reference layer information corresponding to the metadata of the target layer is added to a reference database (DB) in which the reference metadata of each of the reference layers is stored.

27. The parallel processing apparatus of claim 26 , wherein

the reference layer information comprises link information, and

in response to the second reference layer being selected as the corresponding layer, identification information of the second reference layer is recorded as the link information in the reference layer information.

28. The parallel processing apparatus of claim 26 , wherein the processor is configured to, in response to the reference layer information corresponding to the metadata of the target layer being added to the reference DB, generate a new parallelization strategy corresponding to the metadata of the target layer.

29. The parallel processing apparatus of claim 28 , wherein

the similarities are measured using a neural network-based similarity measurement model, and

in response to the new parallelization strategy being generated, the similarity measurement model is retrained based on the new parallelization strategy.

30. The parallel processing apparatus of claim 28 , wherein in response to the new parallelization strategy being generated, link information of the reference layer information is changed to an empty state.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 17, 2020
From: KIM, JAEYEON
To: SAMSUNG ELECTRONICS CO., LTD.
Reel/Frame 053799/0529 →
Priority Claims (1)
KR 10-2020-0032233 · Mar 16, 2020 · national
Continuity (1)
Related Publication 20210287085A1 · Sep 16, 2021
References Cited (21)
US 9721204B2 · Campos et al. · 2017 [cited by applicant]
US 10228922B2 · Boehm et al. · 2019 [cited by applicant]
US 20100251223A1 · Gordy · 2010 [cited by examiner]
US 20170132514A1 · Krizhevsky et al. · 2017 [cited by applicant]
US 20190279087A1 · Uchida · 2019 [cited by examiner]
US 20200226493A1 · Hari Haran · 2020 [cited by examiner]
US 20220398431A1 · Tanaka · 2022 [cited by examiner]
CN 107527068A · 2017 [cited by applicant]
EP 3309719A1 · 2018 [cited by applicant]
KR 1020190036317A · 2019 [cited by applicant]
Jia, Z., Lin, S., Qi, C. R., & Aiken, A. (Jun. 9, 2018). Exploring hidden dimensions in parallelizing convolutional neural networks. arXiv.org. https://arxiv.org/abs/1802.04924 (Year: 2018). [cited by examiner]
Turner, Jack et al., “Characterising Across-Stack Optimisations for Deep Convolutional Neural Networks”, 2018 IEEE International Symposium on Workload Characterization (IISWC), 2018, pp. 101-110, doi: 10.1109/IISWC.2018… [cited by applicant]
Bai, Haoli et al., “Few Shot Network Compression via Cross Distillation”, Proceedings of the AAAI Conference on Artificial Intelligence, 34(04), 3203-3210. Nov. 19, 2019, (13 pages in English) https://doi.org/10.1609/aa… [cited by applicant]
Asif, Umar et al., “Ensemble Knowledge Distillation for Learning Improved and Efficient Networks”, Cornell University, Computer Science, [cited by applicant]
Extended European search Report issued on Sep. 6, 2021, in counterpart European Patent Application No. 21151178.7 (11 pages in English). [cited by applicant]
Jia, Zhihao, et al., “Exploring Hidden Dimensions in Parallelizing Convolutional Neural Networks”, arXiv preprint arXiv:1802.04924, Jun. 9, 2018 (11 pages in English). [cited by applicant]
Jia, Zhihao et al., “Beyond Data and Model Parallelism for Deep Neural Networks”, arXiv preprint arXiv:1807.05358, Jul. 14, 2018 (pp. 1-15). [cited by applicant]
Crankshaw, Daniel, et al., “Inferline: ML Inference Pipeline Composition Framework”, arXiv preprint arXiv:1812.01776, Dec. 5, 2018 (pp. 1-14). [cited by applicant]
Morcos, Ari, et al., “Insights on representational similarity in neural networks with canonical correlation”, [cited by applicant]
Kim, Soojeong, et al., “Parallax: Sparsity-aware Data Parallel Training of Deep Neural Networks”, [cited by applicant]
Bai, Yunsheng, et al., “SimGNN: A Neural Network Approach to Fast Graph Similarity Computation”, [cited by applicant]