Synthesis device, synthesis method, and synthesis program
The synthesis device addresses the challenge of generating a model for both Dataset A and Dataset B by combining model weights through permutation symmetry, enabling effective operation across both datasets and improving accuracy in AI applications.
Patent Information
- Application Number
- PCT/JP2023/007681
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-01
- Publication Date
- 2024-09-06
AI Technical Summary
Conventional methods face difficulties in generating a model that can be used across both Dataset A and Dataset B, as learning using data set A and dataset B are typically performed independently, resulting in operational constraints.
A synthesis device that combines models trained on Dataset A and Dataset B by specifying the weights of a composite model using the weights of the input data from both models, employing permutation symmetry to rearrange weights without changing the output, and averaging them to generate a synthetic model usable on both datasets.
Enables the creation of a model that can effectively operate on both Dataset A and Dataset B, with improved accuracy when using permutation and data condensation methods, relaxing operational conditions and enhancing compatibility with AI applications like image recognition and facial recognition systems.
Smart Images

Figure JP2023007681_06092024_PF_FP
Abstract
Description
Synthesis apparatus, synthesis method, and synthesis program
[0001] The present invention relates to a synthesis device, a synthesis method, and a synthesis program.
[0002] Conventionally, when dataset A and dataset B are acquired independently, methods for generating a model that performs well with dataset A and dataset B are known. For example, continuous learning (see Non-Patent Document 1) for expanding the scope of application of data, federated learning (see Non-Patent Document 2) for collecting data in one place and learning without considering privacy, and a method for synthesizing the same data (see Non-Patent Document 3) are known.
[0003] “Introduction to Continual Learning”, [online], ∞ WIki, [Retrieved February 6, 2023], Internet <URL: https: / / wiki.continualai.org / the-continualai-wiki / introduction-to-continual-learning> “Federated learning”, [online], WIKIPEDIA, [Retrieved February 6, 2023], Internet <URL: https: / / en.wikipedia.org / wiki / Federated_learning> Samuel K. Ainsworth, Jonathan Hayase, Siddhartha Srinivasa, “GIT RE-BASIN: MERGING MODELS MODULO PERMUTATION SYMMETRIES”, December 2022
[0004] However, with conventional technology, it may be difficult to generate a model that can be used with both dataset A and dataset B from model A trained with dataset A and model B trained with dataset B. For example, with conventional technology, it is not possible to independently perform training using dataset A and training using dataset B, which creates a problem of operational constraints.
[0005] The present invention has been made in consideration of the above, and aims to generate a model that can be used with both dataset A and dataset B from model A trained with dataset A and model B trained with dataset B.
[0006] In order to solve the above-mentioned problems and achieve the object, the synthesis device of the present invention is characterized by having an acquisition unit that acquires first training data, a first model trained using the first training data, second training data, and a second model trained using the second training data, and an identification unit that identifies the weight of a synthesized model obtained by synthesizing the first model and the second model using the first training data and the second training data, the weight of the first model for input data, and the weight of the second model.
[0007] According to the present invention, it is possible to generate a model that can be used with both dataset A and dataset B from model A trained with dataset A and model B trained with dataset B.
[0008] Fig. 1 is a schematic diagram illustrating the general configuration of a synthesis device. Fig. 2 is a flowchart showing a synthesis processing procedure. Fig. 3 is a diagram for explaining an embodiment. Fig. 4 is a diagram for explaining an embodiment. Fig. 5 is a diagram illustrating a computer that executes a synthesis program.
[0009] Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings. Note that the present invention is not limited to this embodiment. In addition, in the description of the drawings, the same parts are designated by the same reference numerals.
[0010] [Outline of the Synthesis Device] The synthesis device of this embodiment generates a synthesis model that can be used with both dataset A and dataset B, using model A trained with dataset A and model B trained with dataset B.
[0011] First, a composite data set D of data set A and data set B is defined as in the following equation (1).
[0012]
[0013] In supervised learning, let l be the loss function and θ be the weight of the model input data. A , weight θ of model B B , weightθ of the synthetic model trained on the synthetic dataset A+B are expressed by the following equations (2), (3), and (4), respectively.
[0014]
[0015] Then, if we can identify the operation ★ that satisfies the following equation (5), it will be possible to learn dataset A and dataset B separately, and combine the learned weights to generate a composite model that can be used for datasets A + B.
[0016]
[0017] In Deep Learning, there is symmetry in the operation of the network structure. Therefore, the synthesis device utilizes the symmetry in the rearrangement of weights to perform permutation, which rearranges the weights so as not to change the output of the model.
[0018] In this case, the following equation (6) holds true.
[0019]
[0020] By replacing the above formula (6) with the rule shown in the following formula (7), the following formula (8) is realized.
[0021]
[0022]
[0023] Then, as will be described below, the synthesis device generates a synthesis model by specifying the average of the weight of model A and the rearranged weight of model B as the weight of the synthesis model.
[0024] [Configuration of the Synthesis Device] Fig. 1 is a schematic diagram illustrating the general configuration of a synthesis device. As illustrated in Fig. 1, the synthesis device 10 is realized by a general-purpose computer such as a personal computer, and includes an input unit 11, an output unit 12, a communication control unit 13, a storage unit 14, and a control unit 15.
[0025] The input unit 11 is realized by input devices such as a keyboard and a mouse, and inputs various instruction information such as a command to start processing to the control unit 15 in response to input operations by an operator. The output unit 12 is realized by a display device such as a liquid crystal display, a printing device such as a printer, or the like.
[0026] The communication control unit 13 is realized by a NIC (Network Interface Card) or the like, and controls communication between an external device such as a server via a network and the control unit 15. For example, the communication control unit 13 controls communication between the control unit 15 and a management device or the like that manages various information such as datasets to be subjected to synthesis processing, which will be described later, and trained models.
[0027] The storage unit 14 is realized by a semiconductor memory element such as a RAM (Random Access Memory) or a flash memory, or a storage device such as a hard disk or an optical disk. The storage unit 14 stores in advance the processing program that operates the synthesis device 10 and data used during execution of the processing program, or temporarily stores the data each time processing is performed. The storage unit 14 may be configured to communicate with the control unit 15 via the communication control unit 13.
[0028] The control unit 15 is realized using a CPU (Central Processing Unit), an NP (Network Processor), an FPGA (Field Programmable Gate Array), or the like, and executes a processing program stored in memory. As a result, the control unit 15 functions as an acquisition unit 15a and an identification unit 15b, as exemplified in FIG. 1, and executes the synthesis determination process. Note that these functional units may be implemented in different hardware. The control unit 15 may also include other functional units.
[0029] The acquiring unit 15a acquires first training data, a first model trained using the first training data, second training data, and a second model trained using the second training data. For example, the acquiring unit 15a acquires a dataset A used in a synthesis process described later, a model A trained using the dataset A and currently in operation, a dataset B collected thereafter, and a model B trained using the dataset B.
[0030] The acquiring unit 15a acquires these pieces of data via the input unit 11 or from a management device that manages various pieces of information via the communication control unit 13. The acquiring unit 15a may store the acquired communication data in the storage unit 14. The acquiring unit 15a may transfer the information to the identifying unit 15b described below without storing it in the storage unit 14.
[0031] The identification unit 15b identifies the weight of a combined model obtained by combining the first model and the second model, using the first learning data and the second learning data, the weight of the first model for the input data, and the weight of the second model.
[0032] Specifically, the specification unit 15b specifies the weight of the combined model by rearranging the weights without changing the output of the second model and averaging the rearranged weights and the weights of the first model.
[0033] For example, the specifying unit 15b specifies the weight when the following formula (9) holds as the weight of the combined model of model A and model B. In this way, the combined model of model A and model B is generated.
[0034]
[0035] In this case, the specifying unit 15b assumes that the architectures of the models are the same.
[0036] Furthermore, in the above formula (9), data set A+B is used to calculate the loss function. Therefore, the identification unit 15b replaces it with proxy data to relax the operation conditions. Specifically, when calculating the loss function, the identification unit 15b uses proxy data generated by data condensation instead of data set A (first learning data) and data set B (second learning data). For example, the identification unit 15b generates proxy data using a data condensation technique called gradient matching. This makes it easier to identify the composite model.
[0037] The synthesis process of this embodiment can be applied to, for example, general AI. In particular, it has high affinity with image recognition, natural language processing, voice recognition, etc., which are areas in which Deep Learning excels, and can be used in facial recognition systems, etc. For example, if company A merges with company B after generating facial recognition model A for employees of company A, it is possible to generate a synthetic model that can be used by both companies A and B so that employees of company B can also use the facial recognition system.
[0038] [Combining Process] Next, the combining process performed by the combining device 10 according to this embodiment will be described with reference to Fig. 2. The combining process according to this embodiment includes a detection process and a search process. The flowchart in Fig. 2 starts, for example, when an operation input instructing the start of the combining process is made.
[0039] First, the acquiring unit 15a acquires a dataset A, a model A trained on the dataset A, and a dataset B, a model B trained on the dataset B (step S1). For example, the acquiring unit 15a acquires the dataset A and a model A trained on the dataset A and currently in operation. The acquiring unit 15a also acquires the dataset B acquired thereafter and the model B trained on the dataset B.
[0040] Next, the specifying unit 15b specifies the weight of a combined model obtained by combining the model A and the model B, using the data set A, the data set B, and the weight of the model A and the weight of the model B (step S2).
[0041] Specifically, the specification unit 15b specifies the weight of the composite model by rearranging the weights without changing the output of model B and averaging the rearranged weights and the weight of model A. In this way, the composite model is generated.
[0042] At this time, the specifying unit 15b generates proxy data using a data compaction technique such as gradient matching, and calculates a loss function using the proxy data instead of the data set A and the data set B.
[0043] Furthermore, the specifying unit 15b outputs the generated composite model to the operation device via, for example, the output unit 12. This completes the series of composite processing.
[0044] [Effect] As described above, the acquiring unit 15a acquires first training data, a first model trained using the first training data, second training data, and a second model trained using the second training data. The identifying unit 15b identifies the weight of a combined model obtained by combining the first model and the second model, using the first training data, the second training data, the weight of the first model for input data, and the weight of the second model.
[0045] Specifically, the specification unit 15b specifies the weight of the combined model by rearranging the weights without changing the output of the second model and averaging the rearranged weights and the weights of the first model.
[0046] This makes it possible to generate a model that can be used with both dataset A and dataset B from model A trained with dataset A and model B trained with dataset B.
[0047] Furthermore, when the identification unit 15 d calculates the loss function, it uses the proxy data generated by data condensation. By calculating the loss function using the proxy data instead of the first training data and the second training data in this way, the operation conditions are relaxed and it becomes easier to identify the composite model.
[0048] 3 and 4 are diagrams for explaining an example. In this example, a composite model was generated by the synthesis process of the above embodiment using model A trained with MNIST and model B trained with FashionMNIST. The model was MLP, and the datasets used were MNIST and FashionMNIST. Source code created with reference to "https: / / github.com / samuela / git-re-basin" was also used. The accuracy and loss of the composite model using a synthetic dataset combining both MNIST and FashionMNIST were evaluated.
[0049] The vertical axis in FIGS. 3 and 4 indicates the ratio λ of the combination of model A trained by MNIST and model B trained by the Fashion model MNIST, and the vertical axis indicates the accuracy of the combined model.
[0050] Here, Model A exhibits an accuracy of nearly 100% for MNIST, but an accuracy of nearly 0% for FashionMNIST. Therefore, in Figures 3 and 4, Model A has an accuracy of approximately 50% for the synthetic data set. Furthermore, Model B exhibits an accuracy of nearly 100% for FashionMNIST, but an accuracy of nearly 0% for MNIST. Therefore, in Figures 3 and 4, Model B also exhibits an accuracy of approximately 50% for the synthetic data set.
[0051] First, Figure 3 illustrates three cases where no surrogate data is used: no permutation (shown by the dashed line), permutation (shown by the solid line), and the ensemble results obtained by combining the outputs of Model A and Model B (shown by the dashed-dotted line). Each case is also illustrated during training (Train, thick line) and operation (Test).
[0052] As shown by the solid line in Figure 3, it was confirmed that when permutation was performed, the accuracy of the composite model was about 85%. On the other hand, as shown by the dashed line, it was confirmed that the accuracy of the composite model decreased when permutation was not performed. Furthermore, it was confirmed that the accuracy of the composite model improved when permutation was performed, even compared to the ensemble shown by the dashed-dotted line. Note that while ensemble is a simple and powerful technique, it doubles the cost because it uses the outputs of two models.
[0053] 4 illustrates three cases similar to those in FIG. 3 where surrogate data generated by data condensation is used. For the evaluation in these cases, the entire synthetic data set was used instead of the surrogate data. Also, as shown by the dotted lines in FIG. 4, a synthetic model was generated by training using condensed data from MNIST and condensed data from Fishion MNIST as the synthetic data set.
[0054] As shown by the solid line in FIG. 4, it was confirmed that even when data condensation was performed, the accuracy of the synthesized model was highest when permutation was performed.
[0055] [Program] A program describing the processing executed by the synthesis device 10 according to the above embodiment in a computer-executable language can also be created. In one embodiment, the synthesis device 10 can be implemented by installing a synthesis program that executes the above synthesis processing as package software or online software on a desired computer. For example, by executing the synthesis program on an information processing device, the information processing device can function as the synthesis device 10. Other examples of information processing devices include mobile communication terminals such as smartphones, mobile phones, and PHS (Personal Handyphone Systems), as well as slate terminals such as PDAs (Personal Digital Assistants). The functions of the synthesis device 10 may also be implemented on a cloud server.
[0056] 5 is a diagram showing an example of a computer that executes a synthesis program. The computer 1000 includes, for example, a memory 1010, a CPU 1020, a hard disk drive interface 1030, a disk drive interface 1040, a serial port interface 1050, a video adapter 1060, and a network interface 1070. These components are connected by a bus 1080.
[0057] The memory 1010 includes a ROM (Read Only Memory) 1011 and a RAM 1012. The ROM 1011 stores a boot program such as a BIOS (Basic Input Output System). The hard disk drive interface 1030 is connected to a hard disk drive 1031. The disk drive interface 1040 is connected to a disk drive 1041. A removable storage medium such as a magnetic disk or optical disk is inserted into the disk drive 1041. The serial port interface 1050 is connected to a mouse 1051 and a keyboard 1052, for example. The video adapter 1060 is connected to a display 1061, for example.
[0058] Here, the hard disk drive 1031 stores, for example, an OS 1091, an application program 1092, a program module 1093, and program data 1094. The various pieces of information described in the above embodiments are stored in the hard disk drive 1031 or memory 1010, for example.
[0059] The merging program is stored in the hard disk drive 1031 as a program module 1093 in which instructions to be executed by the computer 1000 are written. Specifically, the program module 1093 in which each process executed by the merging device 10 described in the above embodiment is written is stored in the hard disk drive 1031.
[0060] Data used for information processing by the synthesis program is stored as program data 1094, for example, in the hard disk drive 1031. Then, the CPU 1020 reads the program module 1093 and the program data 1094 stored in the hard disk drive 1031 into the RAM 1012 as necessary, and executes each of the above-described procedures.
[0061] Note that the program module 1093 and program data 1094 related to the merging program are not limited to being stored in the hard disk drive 1031, and may be stored in, for example, a removable storage medium and read by the CPU 1020 via the disk drive 1041. Alternatively, the program module 1093 and program data 1094 related to the merging program may be stored in another computer connected via a network such as a LAN (Local Area Network) or a WAN (Wide Area Network), and read by the CPU 1020 via the network interface 1070.
[0062] Although the present invention has been described above as an embodiment, the present invention is not limited to the description and drawings that form part of the disclosure of the present invention. In other words, other embodiments, examples, and operational techniques that can be made by those skilled in the art based on the present invention are all included in the scope of the present invention.
[0063] REFERENCE SIGNS LIST 10 Synthesis device 11 Input unit 12 Output unit 13 Communication control unit 14 Storage unit 15 Control unit 15a Acquisition unit 15b Identification unit
Claims
1. A synthesis device comprising: an acquisition unit that acquires first learning data, a first model trained using the first learning data, second learning data, and a second model trained using the second learning data; and an identification unit that identifies the weight of a synthesized model obtained by synthesizing the first model and the second model using the first learning data and the second learning data, the weight of the first model for input data, and the weight of the second model.
2. The synthesis device described in claim 1, characterized in that the identification unit identifies the weight of the synthesized model by rearranging the weights without changing the output of the second model and averaging the rearranged weights and the weight of the first model.
3. The synthesis device according to claim 1, wherein the determination unit uses proxy data generated by data condensation when calculating the loss function.
4. A synthesis method executed by a synthesis device, comprising: an acquisition step of acquiring first training data, a first model trained using the first training data, second training data, and a second model trained using the second training data; and an identification step of identifying the weight of a synthesized model obtained by synthesizing the first model and the second model, using the first training data and the second training data, the weight of the first model for input data, and the weight of the second model.
5. A synthesis program for causing a computer to execute the steps of: acquiring first training data, a first model trained using the first training data, second training data, and a second model trained using the second training data; and specifying the weight of a synthesized model obtained by synthesizing the first model and the second model using the first training data and the second training data, the weight of the first model for input data, and the weight of the second model.
Citation Information
Patent Citations
Integration device, learning device, and integration method
JP2022191762A
Model integration device, method, and program, and inference, inspection, and control system
WO2020148998A1
