Information processing program, information processing method, and information processing apparatus

By using backward and forward analysis, machine learning software code is effectively segmented into functional phases, addressing the challenge of modularization and reducing the workload for engineers.

JP2024147888AInactive Publication Date: 2024-10-17FUJITSU LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2023060601
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-04-04
Publication Date
2024-10-17
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing technologies face difficulties in separating machine learning software code into distinct functional components such as pre-processing, learning processing, and post-processing phases, making it challenging to modularize the code for different engineering roles at the commercialization stage.

Method used

A method involving backward and forward analysis processing is employed to identify and separate machine learning software code into distinct phases, including preprocessing, learning processing, and post-processing phases, using profiling and program dependency graphs to isolate codes with high processing loads and common functionalities.

Benefits of technology

This approach allows for effective separation of machine learning software code into modular components, reducing the workload and enabling engineers to manage and maintain different phases efficiently, even without prior knowledge of the code structure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024147888000001_ABST
    Figure 2024147888000001_ABST
Patent Text Reader

Abstract

To appropriately divide codes of machine learning software.SOLUTION: An information processing apparatus 100 performs backward analysis processing on a code 110 of machine learning software to identify a code 111 representing a learning phase. The information processing apparatus 100 identifies a first code 121 representing learning processing including processing content determined to have a high processing load among the code 111 representing the learning phase. The information processing apparatus 100 performs forward analysis processing on the code 110 of the machine learning software to identify a code 112 representing an inference phase. The information processing apparatus 100 identifies a fourth code 124 representing inference processing that has at least part of the processing content in common with the first code 121 among the code 112 representing the inference phase.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to an information processing program, an information processing method, and an information processing device. [Background technology]

[0002] Traditionally, in the Proof of Concept (PoC) stage before commercialization, the code of machine learning software that learns and uses a machine learning model is sometimes developed in a monolithic structure. Specifically, the code of the machine learning software is sometimes developed without separating the code representing the learning phase that learns the machine learning model from the code representing the inference phase that uses the machine learning model. In contrast, in the commercialization stage, it may be desirable to separate the code of the machine learning software into partial codes that each represent a different function.

[0003] The prior art includes, for example, a technique for searching a set of existing machine learning projects based on a search query. Also, for example, a technique for identifying program elements to be divided based on a Long Method Score calculated based on code metrics. Also, for example, a technique for generating code that is resistant to syntax changes based on an original code and a new code. Also, for example, a technique for profiling software. Also, for example, a technique for decomposing software code. Also, for example, a technique called program slicing. Also, for example, a technique for generating a program dependency graph. [Prior art documents] [Patent documents]

[0004] [Patent Document 1] Patent Publication No. 2022-042497 [Patent Document 2] JP 2019-219848 A [Patent Document 3] US Patent No. 011042369 [Patent Document 4] US Patent Application Publication No. 2021 / 0200519 [Non-patent literature]

[0005] [Non-Patent Document 1] Krause, Alexander, et al. “Microservice decomposition via static and dynamic analysis of the monolith.” 2020 IEEE International Conference on Software Architecture Companion (ICSA-C). IEEE, 2020. [Non-Patent Document 2] Agrawal, Hiralal, and Joseph R. Horgan. “Dynamic program slicing.” ACM SIGPlan Notices 25.6 (1990): 246-256. [Non-Patent Document 3] TIP F. “A survey of program slicing techniques.”Journal Programming Languages ​​3:121-3:189, 1995. [Non-Patent Document 4] Ferrante, Jeanne, Karl J. Ottenstein, and Joe D. Warren. “The program dependence graph and its use in optimization.” ACM Transactions on Programming Languages ​​and Systems (TOPLAS) 9.3 (1987): 319-349. Summary of the Invention [Problem to be solved by the invention]

[0006] However, in the conventional technology, it is difficult to separate the code of the machine learning software into partial codes each representing a different function. For example, the code of the machine learning software cannot be separated into partial codes representing pre-processing of the learning process, partial codes representing the learning process, and partial codes representing post-processing of the learning process during the learning phase.

[0007] In one aspect, the present invention aims to properly segment the code of machine learning software. [Means for solving the problem]

[0008] According to one embodiment, a code of machine learning software is obtained, the code defining a learning phase for learning a machine learning model and an inference phase for utilizing the machine learning model, and a backward analysis process is performed on the code of the obtained machine learning software based on an output sample for the learning phase, thereby identifying a code representing the learning phase from among the acquired code of the machine learning software, identifying a first code representing a learning process within the learning phase including processing content determined to have a high processing load from among the identified codes representing the learning phase, identifying a second code representing a pre-processing within the learning phase that exists before the identified first code from among the codes representing the identified learning phase, identifying a third code representing a post-processing within the learning phase that exists after the identified first code from among the codes representing the identified learning phase, and An information processing program, an information processing method, and an information processing device are proposed that perform a forward analysis process on the code to identify a code representing the inference phase from among the acquired code of the machine learning software, identify a fourth code representing an inference processing within the inference phase from among the identified codes representing the inference phase and which has at least some processing content in common with the identified first code, identify a fifth code representing a pre-processing within the inference phase that exists before the identified fourth code from among the codes representing the identified inference phase, and identify a sixth code representing a post-processing within the inference phase that exists after the identified fourth code from among the codes representing the identified inference phase, and output information that makes it possible to distinguish the identified first code, the identified second code, the identified third code, the identified fourth code, the identified fifth code, and the identified sixth code in the acquired code of the machine learning software. Effect of the Invention

[0009] According to one aspect, it becomes possible to properly separate the code of the machine learning software. [Brief description of the drawings]

[0010] [Figure 1] FIG. 1 is a diagram illustrating an example of an information processing method according to an embodiment. [Diagram 2] FIG. 2 is an explanatory diagram illustrating an example of an information processing system 200. As shown in FIG. [Diagram 3] FIG. 3 is a block diagram showing an example of a hardware configuration of the information processing device 100. As shown in FIG. [Figure 4] FIG. 4 is a block diagram showing an example of a functional configuration of the information processing device 100. As shown in FIG. [Diagram 5] FIG. 5 is a block diagram showing a specific example of the functional configuration of the information processing device 100. As shown in FIG. [Figure 6] FIG. 6 is an explanatory diagram (part 1) showing an example of the operation of the information processing device 100. [Figure 7] FIG. 7 is an explanatory diagram (part 2) showing an example of the operation of the information processing device 100. [Figure 8] FIG. 8 is an explanatory diagram (part 3) showing an example of the operation of the information processing device 100. [Figure 9] FIG. 9 is an explanatory diagram (part 4) showing an example of the operation of the information processing device 100. [Figure 10] FIG. 10 is an explanatory diagram (part 5) showing an example of the operation of the information processing device 100. [Figure 11] FIG. 11 is an explanatory diagram (part 1) showing a specific example of the operation of the information processing device 100. [Figure 12] FIG. 12 is an explanatory diagram (part 2) showing a specific example of the operation of the information processing device 100. [Figure 13] FIG. 13 is an explanatory diagram (part 3) showing a specific example of the operation of the information processing device 100. [Figure 14] FIG. 14 is an explanatory diagram (part 4) showing a specific example of the operation of the information processing device 100. [Figure 15] FIG. 15 is an explanatory diagram (part 5) showing a specific example of the operation of the information processing device 100. [Figure 16]FIG. 16 is an explanatory diagram (part 6) showing a specific example of the operation of the information processing device 100. [Figure 17] FIG. 17 is an explanatory diagram (part 7) showing a specific example of the operation of the information processing device 100. [Figure 18] FIG. 18 is an explanatory diagram (part 8) showing a specific example of the operation of the information processing device 100. [Figure 19] FIG. 19 is a flowchart illustrating an example of an overall processing procedure. [Figure 20] FIG. 20 is a flowchart illustrating an example of a procedure of the first identification process. [Figure 21] FIG. 21 is a flowchart illustrating an example of a procedure of the second identification process. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0011] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, an embodiment of an information processing program, an information processing method, and an information processing device according to the present invention will be described in detail with reference to the drawings.

[0012] (An example of an information processing method according to an embodiment) 1 is an explanatory diagram showing an example of an information processing method according to an embodiment. The information processing device 100 is a computer for analyzing the code of machine learning software that learns and uses a machine learning model. The information processing device 100 is, for example, a server or a PC (Personal Computer).

[0013] Machine learning software is an AI (artificial intelligence) system. Machine learning software code may be developed on a trial basis, for example, to verify the feasibility or usefulness of machine learning software before commercialization. The stage of developing machine learning software code on a trial basis is called the PoC stage.

[0014] Here, in the PoC stage, the machine learning software code tends to be developed in a monolithic structure. A monolithic structure means, for example, a single module. In the PoC stage, the team developing the machine learning software code tends to be relatively small in size in order to carry out the above-mentioned verification. Small size means, for example, that the number of people in the team is equal to or smaller than a certain number. In addition, the deadline for developing the machine learning software code may be relatively short.

[0015] For this reason, during the PoC phase, there is a tendency for machine learning software code to be developed in a monolithic structure, without separating the code representing the learning phase, which trains the machine learning model, from the code representing the inference phase, which uses the machine learning model.

[0016] In contrast, in the productization stage, it may be desirable to divide the code of the machine learning software into multiple partial codes each representing a different function and modularize each partial code. The functions are, for example, pre-processing in the learning phase, learning processing in the learning phase, post-processing in the learning phase, pre-processing in the inference phase, the main part of the inference processing in the inference phase, and post-processing in the inference phase.

[0017] Pre-processing in the learning phase includes, for example, processing input data for the learning phase so that it can be easily used in the learning process. Post-processing in the learning phase includes, for example, processing the learned machine learning model. Pre-processing in the inference phase includes, for example, processing input data for the inference phase so that it can be easily used in the inference process. Post-processing in the inference phase includes, for example, processing output data of the inference process so that it can be easily referenced by users.

[0018] For example, in the productization stage, multiple engineers, such as an engineer specializing in machine learning and an engineer specializing in data utilization, may be involved in the task of developing or maintaining the code of machine learning software. Therefore, it is desirable for different engineers to be in charge of the task of developing or maintaining multiple partial codes representing different functions. Specifically, it is preferable for the engineer specializing in machine learning to be in charge of the partial code representing the learning process in the learning phase. Specifically, it is preferable for the engineer specializing in data utilization to be in charge of the partial code representing the preprocessing in the learning phase.

[0019] However, if the code of the machine learning software has a monolithic structure, it is difficult to separate the code of the machine learning software into a plurality of partial codes each representing a different function. For example, it is difficult to separate the code of the machine learning software into a partial code representing a pre-processing in a learning phase, a partial code representing a learning process in the learning phase, and a partial code representing a post-processing in the learning phase. Also, for example, it is difficult to separate the code of the machine inference software into a partial code representing a pre-processing in an inference phase, a partial code representing a main body of an inference process in the inference phase, and a partial code representing a post-processing in the inference phase.

[0020] Specifically, there may be a case where an operator needs to separate multiple code fragments representing different functions from the code of the machine learning software. In this case, there is a problem that the operator's workload increases when separating the multiple code fragments.

[0021] Specifically, one possible method is to perform static analysis on the machine learning software's code, and have a specialist known as a domain expert attempt to isolate multiple code fragments that each represent a different function from within the machine learning software's code.

[0022] Method 1 has a problem in that, without an expert, it is not possible to separate multiple partial codes representing different functions from the code of the machine learning software. For details of Method 1, see Non-Patent Document 1 mentioned above.

[0023] Specifically, a second method is considered in which forward and backward analysis is performed on the code of the machine learning software based on input samples and output samples for the learning phase and input samples and output samples for the inference phase. The second method is called, for example, program slicing.

[0024] Method 2 has a problem that it is not possible to properly separate multiple partial codes representing different functions from the code of the machine learning software. Specifically, Method 2 cannot separate partial codes representing pre-processing in the learning phase and partial codes representing learning processing in the learning phase. Specifically, Method 2 cannot separate partial codes representing the main body of inference processing in the inference phase and partial codes representing post-processing in the inference phase. For details of Method 2, see Non-Patent Document 2, Non-Patent Document 3, and Non-Patent Document 4.

[0025] In addition, method 3 can be considered as an improvement over method 2, using the learning functions and inference functions defined in the library as clues.

[0026] For example, in the code of the machine learning software, the portion that calls a learning function defined in a library is identified as a partial code representing a learning process in a learning phase. For example, in the method 3, based on the result of identifying the partial code representing the learning process in the learning phase, the partial code representing the preprocessing in the learning phase and the partial code representing the learning process in the learning phase are separated.

[0027] Furthermore, for example, method 3 identifies a portion of the machine learning software code that calls an inference function defined in a library as partial code that represents the main body of the inference process in the inference phase. For example, method 3 separates the partial code that represents the main body of the inference process in the inference phase from the partial code that represents post-processing in the inference phase based on the result of identifying the partial code that represents the main body of the inference process in the inference phase.

[0028] Method 3 has the problem that it is not possible to properly separate multiple partial codes representing different functions from within the machine learning software code.

[0029] For example, in the code of the machine learning software, when a partial code representing a learning process in a learning phase is written as a function defined by the user, the method 3 cannot appropriately identify the partial code representing the learning process in the learning phase. Also, in the code of the machine learning software, when a partial code representing a main part of an inference process in an inference phase is written as a function defined by the user, the method 3 cannot identify the partial code representing the main part of an inference process in an inference phase.

[0030] Furthermore, for example, in the code of the machine learning software, when a partial code representing a learning process in a learning phase is written arithmetically instead of as a function, method 3 is unable to appropriately identify the partial code representing the learning process in the learning phase. Furthermore, for example, in the code of the machine learning software, when a partial code representing a main body of an inference process in an inference phase is written arithmetically instead of as a function, method 3 is unable to identify the partial code representing the main body of an inference process in an inference phase.

[0031] Also, for example, in the code of the machine learning software, a learning function defined in the library may be written in addition to the partial code representing the learning process in the learning phase. In this case, method 3 cannot properly identify the partial code representing the learning process in the learning phase. Also, for example, in the code of the machine inference software, a learning function defined in the library may be written in addition to the partial code representing the main body of the inference process in the inference phase. In this case, method 3 cannot properly identify the partial code representing the main body of the inference process in the inference phase.

[0032] For this reason, for example, Method 3 may not be able to separate partial code representing pre-processing in the learning phase from partial code representing learning processing in the learning phase. Also, for example, Method 3 may not be able to separate partial code representing the main body of inference processing in the inference phase from partial code representing post-processing in the inference phase.

[0033] Therefore, in this embodiment, an information processing method that can appropriately divide the code of machine learning software will be described.

[0034] 1, the information processing device 100 acquires the machine learning software code 110. The machine learning software code 110 defines a learning phase for learning a machine learning model and an inference phase for utilizing the machine learning model. The machine learning software code 110 may have a monolithic structure. The information processing device 100 acquires the machine learning software code 110 by accepting an input of the machine learning software code 110 based on, for example, an operational input by a user.

[0035] (1-1) The information processing device 100 performs a backward analysis process on the acquired machine learning software code 110 based on the output sample for the learning phase. By performing the backward analysis process, the information processing device 100 identifies the code 111 that represents the learning phase from the acquired machine learning software code 110. This enables the information processing device 100 to isolate the code 111 that represents the learning phase from the machine learning software code 110.

[0036] (1-2) The information processing device 100 identifies a first code 121 representing a learning process in a learning phase, including a process content determined to have a high processing load, from among the codes 111 representing the identified learning phase. The information processing device 100, for example, uses a profiler to identify a command statement with the highest processing load from among the codes 111 representing the identified learning phase. The information processing device 100 identifies a loop location or a function including the identified command statement as the first code 121 from among the codes 111 representing the identified learning phase. This allows the information processing device 100 to use the processing load as a criterion for identifying the first code 121 representing the learning process in the learning phase. Therefore, the information processing device 100 can appropriately isolate the first code 121 representing the learning process in the learning phase from the codes 110 of the machine learning software.

[0037] (1-3) The information processing device 100 identifies, from among the codes 111 representing the identified learning phases, a second code 122 representing a pre-processing within the learning phase that exists before the identified first code 121. This enables the information processing device 100 to appropriately isolate the second code 122 representing a pre-processing within the learning phase from the code 110 of the machine learning software.

[0038] (1-4) The information processing device 100 identifies, from among the codes 111 representing the identified learning phases, a third code 123 representing post-processing within the learning phase that exists after the identified first code 121. This enables the information processing device 100 to appropriately isolate the third code 123 representing post-processing within the learning phase from the code 110 of the machine learning software.

[0039] (1-5) The information processing device 100 performs a forward analysis process on the acquired machine learning software code 110 based on the input sample for the inference phase. By performing the forward analysis process, the information processing device 100 identifies the code 112 that represents the inference phase from the acquired machine learning software code 110. This enables the information processing device 100 to isolate the code 112 that represents the inference phase from the machine learning software code 110.

[0040] (1-6) The information processing device 100 identifies a fourth code 124 representing an inference process within an inference phase, which has at least a portion of the process content in common with the identified first code 121, among the codes 112 representing the identified inference phase. This allows the information processing device 100 to use the commonality of the process content with the first code 121 representing the learning process in the learning phase as a criterion for identifying the fourth code 124 representing the inference process within the inference phase. This allows the information processing device 100 to appropriately isolate the fourth code 124 representing the inference process within the inference phase from the codes 110 of the machine learning software.

[0041] (1-7) The information processing device 100 identifies, from among the codes 112 representing the identified inference phases, a fifth code 125 representing pre-processing within the inference phase that exists before the identified fourth code 124. This enables the information processing device 100 to appropriately isolate the fifth code 125 representing pre-processing within the inference phase from the code 110 of the machine learning software.

[0042] (1-8) The information processing device 100 identifies, from among the codes 112 representing the identified inference phases, a sixth code 126 representing post-processing within the inference phase that exists after the identified fourth code 124. This enables the information processing device 100 to appropriately separate the sixth code 126 representing post-processing within the inference phase from the code 110 of the machine learning software.

[0043] (1-9) The information processing device 100 outputs information that enables distinction between the first code 121, the second code 122, the third code 123, the fourth code 124, the fifth code 125, and the sixth code 126 in the code 110 of the machine learning software. The information processing device 100 outputs, for example, the first code 121, the second code 122, the third code 123, the fourth code 124, the fifth code 125, and the sixth code 126 so that the user can refer to them.

[0044] As a result, the information processing device 100 can appropriately divide the machine learning software code 110 even if the machine learning software code 110 has a monolithic structure. The information processing device 100 can make the user refer to the results of appropriately dividing the machine learning software code 110. At the productization stage, the information processing device 100 can divide the machine learning software code 110 into a plurality of partial codes each representing a different function, making it easy to modularize each partial code.

[0045] The information processing device 100 can reduce the workload imposed on a user when dividing the machine learning software code 110. The information processing device 100 can appropriately divide the machine learning software code 110 even if the user is not familiar with the contents of the machine learning software code 110.

[0046] The information processing device 100 can appropriately separate a first code 121 representing a learning process in a learning phase and a second code 122 representing a pre-processing in the learning phase from the machine learning software code 110. The information processing device 100 can appropriately separate a fourth code 124 representing an inference process in an inference phase and a sixth code 126 representing a post-processing in the inference phase from the machine learning software code 110.

[0047] The information processing device 100 can appropriately divide the machine learning software code 110 even if the machine learning software code 110 does not include a learning function or an inference function defined in a library.

[0048] Even if multiple learning functions defined in a library are written in the machine learning software code 110, the information processing device 100 can appropriately divide the machine learning software code 110. Even if multiple inference functions defined in a library are written in the machine learning software code 110, the information processing device 100 can appropriately divide the machine learning software code 110.

[0049] Here, the case where the information processing device 100 operates independently has been described, but the present invention is not limited to this. For example, the information processing device 100 may cooperate with another computer. Specifically, the information processing device 100 may acquire the code 110 of the machine learning software by receiving it from another computer. This case will be described later with reference to FIG. 2, for example. For example, a plurality of computers may cooperate to realize the function of the information processing device 100. Specifically, the function of the information processing device 100 may be realized on the cloud.

[0050] (An example of the information processing system 200) Next, an example of an information processing system 200 to which the information processing device 100 shown in FIG. 1 is applied will be described with reference to FIG.

[0051] 2 is an explanatory diagram showing an example of an information processing system 200. In FIG. 2, the information processing system 200 includes an information processing device 100 and a client device 201.

[0052] In the information processing system 200, the information processing device 100 and the client device 201 are connected via a wired or wireless network 210. The network 210 is, for example, a local area network (LAN), a wide area network (WAN), or the Internet.

[0053] The information processing device 100 is a computer that divides the code of the machine learning software into a plurality of partial codes each representing a different function. The information processing device 100 receives the code of the machine learning software from the client device 201.

[0054] The information processing device 100 divides the received machine learning software code into a plurality of partial codes each representing a different function. As in FIG. 1, the information processing device 100 identifies, from the machine learning software code, a partial code for pre-processing in the learning phase, a partial code for learning processing in the learning phase, and a partial code for post-processing in the learning phase. As in FIG. 1, the information processing device 100 identifies, from the machine learning software code, a partial code for pre-processing in the inference phase, a partial code for the main body of inference processing in the inference phase, and a partial code for post-processing in the inference phase.

[0055] The information processing device 100 transmits information enabling identification of the identified partial codes to the client device 201. For example, the information processing device 100 transmits the identified partial codes to the client device 201. The information processing device 100 may transmit each of the multiple partial codes to the client device 201 corresponding to the worker in charge of the partial code.

[0056] For example, the information processing device 100 transmits partial code for pre-processing in the learning phase to the client device 201 corresponding to the worker in charge of the partial code for pre-processing in the learning phase. For example, the information processing device 100 transmits partial code for learning processing in the learning phase to the client device 201 corresponding to the worker in charge of the partial code for learning processing in the learning phase. For example, the information processing device 100 transmits partial code for post-processing in the learning phase to the client device 201 corresponding to the worker in charge of the partial code for post-processing in the learning phase.

[0057] The information processing device 100 transmits, for example, partial code for pre-processing in an inference phase to a client device 201 corresponding to a worker in charge of the partial code for pre-processing in the inference phase. The information processing device 100 transmits, for example, partial code for the main body of the inference processing in the inference phase to a client device 201 corresponding to a worker in charge of the partial code for the main body of the inference processing in the inference phase. The information processing device 100 transmits, for example, partial code for post-processing in an inference phase to a client device 201 corresponding to a worker in charge of the partial code for post-processing in the inference phase. The information processing device 100 is, for example, a server or a PC.

[0058] The client device 201 is a computer used by an operator who is to analyze the code of the machine learning software. The client device 201 acquires the code of the machine learning software by accepting input of the code of the machine learning software based on an operation input by the operator. The client device 201 transmits the code of the machine learning software to the information processing device 100.

[0059] The client device 201 receives information that enables a plurality of partial codes to be distinguished from the information processing device 100. The client device 201 receives, for example, a plurality of partial codes from the information processing device 100. The client device 201 outputs the information that enables a plurality of partial codes to be distinguished so that an operator can refer to it. The client device 201 outputs, for example, a plurality of partial codes so that an operator can refer to it.

[0060] For example, when a worker using the client device 201 is in charge of partial code for pre-processing in the learning phase, the client device 201 may receive the partial code for pre-processing in the learning phase and output it so that the worker can refer to it.

[0061] For example, when a worker using the client device 201 is in charge of a partial code of a learning process in a learning phase, the client device 201 may receive the partial code of the learning process in the learning phase and output it so that the worker can refer to it.

[0062] For example, when a worker using the client device 201 is in charge of partial code for post-processing in the learning phase, the client device 201 may receive the partial code for post-processing in the learning phase and output it so that the worker can refer to it.

[0063] For example, when a worker using the client device 201 is in charge of partial code for pre-processing in the inference phase, the client device 201 may receive the partial code for pre-processing in the inference phase and output it so that the worker can refer to it.

[0064] For example, when a worker using the client device 201 is responsible for the partial code of the main body of the inference processing in the inference phase, the client device 201 may receive the partial code of the main body of the inference processing in the inference phase and output it so that the worker can refer to it.

[0065] For example, when a worker using the client device 201 is in charge of a partial code for post-processing in an inference phase, the client device 201 may receive the partial code for post-processing in the inference phase and output it so that the worker can refer to it. The client device 201 is, for example, a PC, a tablet terminal, or a smartphone.

[0066] Here, the case where the information processing device 100 is a device different from the client device 201 has been described, but this is not limited thereto. For example, the information processing device 100 may have a function as the client device 201 and may also operate as the client device 201.

[0067] (Example of hardware configuration of information processing device 100) Next, an example of the hardware configuration of the information processing device 100 will be described with reference to FIG.

[0068] Fig. 3 is a block diagram showing an example of a hardware configuration of the information processing device 100. In Fig. 3, the information processing device 100 has a CPU (Central Processing Unit) 301, a memory 302, a network I / F (Interface) 303, a recording medium I / F 304, and a recording medium 305. In addition, each component is connected to each other via a bus 300.

[0069] Here, the CPU 301 is responsible for the overall control of the information processing device 100. The memory 302 has, for example, a read only memory (ROM), a random access memory (RAM), and a flash ROM. Specifically, for example, the flash ROM and the ROM store various programs, and the RAM is used as a work area for the CPU 301. The programs stored in the memory 302 are loaded into the CPU 301, causing the CPU 301 to execute the coded processes.

[0070] The network I / F 303 is connected to the network 210 through a communication line, and is connected to other computers via the network 210. The network I / F 303 manages an internal interface with the network 210, and controls input and output of data from other computers. The network I / F 303 is, for example, a modem or a LAN adapter.

[0071] The recording medium I / F 304 controls reading / writing data from / to the recording medium 305 under the control of the CPU 301. The recording medium I / F 304 is, for example, a disk drive, a solid state drive (SSD), a universal serial bus (USB) port, etc. The recording medium 305 is a non-volatile memory that stores data written under the control of the recording medium I / F 304. The recording medium 305 is, for example, a disk, a semiconductor memory, a USB memory, etc. The recording medium 305 may be detachable from the information processing device 100.

[0072] In addition to the above-mentioned components, the information processing device 100 may have, for example, a keyboard, a mouse, a display, a printer, a scanner, a microphone, a speaker, etc. Furthermore, the information processing device 100 may have a plurality of recording medium I / Fs 304 and recording media 305. Furthermore, the information processing device 100 may not have the recording medium I / Fs 304 and the recording media 305.

[0073] (Example of Hardware Configuration of Client Device 201) Specifically, an example of the hardware configuration of the client device 201 is similar to the example of the hardware configuration of the information processing device 100 shown in FIG. 3, and therefore a description thereof will be omitted.

[0074] (An example of a functional configuration of the information processing device 100) Next, an example of a functional configuration of the information processing device 100 will be described with reference to FIG.

[0075] Fig. 4 is a block diagram showing an example of a functional configuration of the information processing device 100. In Fig. 4, the information processing device 100 includes a storage unit 400, an acquisition unit 401, a first identification unit 402, a second identification unit 403, a third identification unit 404, a fourth identification unit 405, and an output unit 406.

[0076] The storage unit 400 is realized by, for example, a storage area such as the memory 302 or the recording medium 305 shown in Fig. 3. In the following, a case where the storage unit 400 is included in the information processing device 100 will be described, but this is not limiting. For example, the storage unit 400 may be included in a device different from the information processing device 100, and the stored contents of the storage unit 400 may be accessible from the information processing device 100.

[0077] The acquiring unit 401 to the output unit 406 function as an example of a control unit. Specifically, the acquiring unit 401 to the output unit 406 realize their functions by, for example, causing the CPU 301 to execute a program stored in a storage area such as the memory 302 or the recording medium 305 shown in Fig. 3, or by the network I / F 303. The processing results of each functional unit are stored in, for example, a storage area such as the memory 302 or the recording medium 305 shown in Fig. 3.

[0078] The storage unit 400 stores various information that is referred to or updated in the processing of each functional unit. The storage unit 400 stores, for example, a machine learning software code. The machine learning software code is acquired, for example, by the acquisition unit 401. The machine learning software code is a code that specifies a learning phase in which a machine learning model is learned and an inference phase in which the machine learning model is used. In the machine learning software code, the code representing the learning phase and the code representing the inference phase may not be explicitly distinguished.

[0079] The learning phase is formed by, for example, pre-processing performed before the learning process, the main body of the learning process, and post-processing performed after the learning process. The pre-processing in the learning phase includes, for example, processing input data for the learning phase so that it can be easily used in the learning process. The learning process in the learning phase includes, for example, a process of learning a machine learning model. The post-processing in the learning phase includes, for example, a process of evaluating the learned machine learning model.

[0080] The inference phase is formed by, for example, pre-processing performed before the inference process, the main body of the inference process, and post-processing performed after the inference process. The pre-processing in the inference phase includes, for example, processing input data for the inference phase so that it can be easily used in the inference process. The inference process in the inference phase includes, for example, processing using a machine learning model. Specifically, the inference process in the inference phase includes processing to obtain an inference result output by a machine learning model in response to the processed input data. The post-processing in the inference phase includes, for example, processing output data of the inference process so that it can be easily referenced by a user.

[0081] The storage unit 400 stores, for example, output samples for the learning phase. The output samples are acquired, for example, by the acquisition unit 401. The output samples are, for example, an example of data output by post-processing in the learning phase.

[0082] The storage unit 400 stores, for example, an input sample for the inference phase. Specifically, the storage unit 400 stores two input samples for the inference phase. The input samples are acquired, for example, by the acquisition unit 401. The input samples are, for example, an example of data to be input to pre-processing in the inference phase.

[0083] The acquisition unit 401 acquires various information used for processing by each functional unit. The acquisition unit 401 stores the acquired various information in the storage unit 400 or outputs it to each functional unit. The acquisition unit 401 may also output the various information stored in the storage unit 400 to each functional unit. The acquisition unit 401 acquires various information based on, for example, an operation input by a user. The acquisition unit 401 may receive various information from, for example, a device different from the information processing device 100.

[0084] The acquisition unit 401 acquires the code of the machine learning software. For example, the acquisition unit 401 acquires the code of the machine learning software by accepting input of the code of the machine learning software based on an operational input by a user. For example, the acquisition unit 401 acquires the code of the machine learning software by receiving it from another computer. The other computer is, for example, the client device 201.

[0085] The acquiring unit 401 acquires an output sample for the learning phase. The acquiring unit 401 acquires the output sample for the learning phase by, for example, accepting an input of the output sample for the learning phase based on an operational input by a user. The acquiring unit 401 acquires the output sample for the learning phase by, for example, receiving the output sample for the learning phase from another computer. The other computer is, for example, the client device 201.

[0086] The acquiring unit 401 acquires an input sample for the inference phase. The acquiring unit 401 acquires the input sample for the inference phase by, for example, accepting an input of the input sample for the inference phase based on an operational input by a user. The acquiring unit 401 acquires the input sample for the inference phase by, for example, receiving the input sample for the inference phase from another computer. The other computer is, for example, the client device 201.

[0087] The acquisition unit 401 may receive a start trigger for starting processing of any of the functional units. The start trigger may be, for example, a predetermined operation input by a user. The start trigger may be, for example, reception of predetermined information from another computer. The start trigger may be, for example, output of predetermined information by any of the functional units.

[0088] The acquisition unit 401, for example, accepts the acquisition of machine learning software code as a start trigger to initiate processing by the first identification unit 402, the second identification unit 403, the third identification unit 404, the fourth identification unit 405, and the output unit 406.

[0089] The first identification unit 402 identifies a code representing a learning phase from among the acquired machine learning software codes by performing a backward analysis process on the acquired machine learning software codes based on the output sample for the learning phase.

[0090] The first identification unit 402 generates a program dependency graph based on, for example, the code of the machine learning software. The first identification unit 402, for example, refers to the generated program dependency graph and performs a backward analysis process on the acquired code of the machine learning software to identify a set of variables that depend on the output sample for the learning phase.

[0091] For example, the first identification unit 402 identifies a code that references the identified variable set as a code that indicates a learning phase based on the identified variable set. This allows the first identification unit 402 to appropriately isolate the code that indicates a learning phase from the code of the machine learning software.

[0092] The second identification unit 403 identifies a first code representing a learning process in a learning phase that includes a process content determined to have a high processing load, from among the codes representing the identified learning phases.

[0093] The second identification unit 403, for example, uses a profiler to identify a command statement that will have the highest processing load among the codes representing the identified learning phase. The profiler is, for example, a line profiler. The processing load is expressed, for example, by a processing time. The processing load may also be expressed, for example, by the number of executions. Specifically, the second identification unit 403, for example, uses a profiler to identify a command statement that will have the highest number of executions among the codes representing the identified learning phase.

[0094] The second identification unit 403, for example, identifies a loop location or a function including the identified command statement from among the code representing the identified learning phase as the first code. The function is, for example, a function other than the function of the entire learning phase. The function is, for example, a function other than the function of the entire machine learning software. This allows the second identification unit 403 to appropriately identify the first code. The second identification unit 403 can appropriately isolate the first code from the code of the machine learning software.

[0095] The second identification unit 403 identifies a second code that exists before the identified first code and represents a pre-processing in the learning phase, among the codes that represent the identified learning phase. This allows the second identification unit 403 to appropriately identify the second code. The second identification unit 403 can appropriately isolate the second code from the code of the machine learning software.

[0096] When no command statement exists before the identified first code among the codes representing the identified learning phase, the second identification unit 403 may determine that no second code representing pre-processing in the learning phase exists.

[0097] The second identification unit 403 identifies a third code that exists after the identified first code and indicates a post-processing within the learning phase, among the codes that indicate the identified learning phase. This allows the second identification unit 403 to appropriately identify the third code. The second identification unit 403 can appropriately isolate the third code from the code of the machine learning software.

[0098] When no command statement is present after the identified first code among the codes representing the identified learning phase, the second identification unit 403 may determine that no third code representing post-processing within the learning phase is present.

[0099] The third identification unit 404 identifies a code representing an inference phase from among the acquired machine learning software code by performing a forward analysis process on the acquired machine learning software code based on the input sample for the inference phase.

[0100] The third identification unit 404, for example, performs a forward analysis process on the acquired machine learning software code to identify a set of variables that depend on a change from one of the two input samples to the other input sample.

[0101] For example, the third identification unit 404 identifies a code that references the identified variable set as a code that represents an inference phase based on the identified variable set. This allows the third identification unit 404 to appropriately separate the code that represents the inference phase from the code of the machine learning software.

[0102] The fourth identification unit 405 identifies a fourth code, which represents an inference process within an inference phase and has at least a part of the process content in common with the identified first code, from among the codes representing the identified inference phases.

[0103] The fourth identification unit 405, for example, identifies a command statement that has a relatively high processing load from the identified first code. Specifically, the fourth identification unit 405 identifies a command statement that is executed the most frequently from the identified first code. The fourth identification unit 405 searches for a command statement that is the same as or similar to the identified command statement from the code representing the identified inference phase, for example.

[0104] Another command statement that is the same as or similar to a certain command statement is, for example, a command statement that calls the same inference model as the certain command statement. Specifically, the other command statement may be a command statement that calls the same inference model as the certain command statement with arguments different from those of the certain command statement.

[0105] For example, when the fourth identification unit 405 finds a command statement that is the same as or similar to the identified command statement among the codes representing the identified inference phase as a result of the search, the fourth identification unit 405 identifies the found command statement as a fourth code. This allows the fourth identification unit 405 to appropriately identify the fourth code. The fourth identification unit 405 can appropriately isolate the fourth code from the code of the machine learning software.

[0106] The fourth identification unit 405 identifies a fifth code that represents a preprocessing in the inference phase and exists before the identified fourth code among the codes that represent the identified inference phase. This allows the fourth identification unit 405 to appropriately identify the fifth code. The fourth identification unit 405 can appropriately isolate the fifth code from the code of the machine learning software.

[0107] When no command statement exists before the identified fourth code among the codes representing the identified inference phase, the fourth identification unit 405 may determine that no fifth code representing pre-processing within the inference phase exists.

[0108] The fourth identification unit 405 identifies a sixth code that exists after the identified fourth code and indicates a post-processing within the inference phase, among the codes that indicate the identified inference phase. This allows the fourth identification unit 405 to appropriately identify the sixth code. The fourth identification unit 405 can appropriately isolate the sixth code from the code of the machine learning software.

[0109] When no command statement is present after the identified fourth code among the codes representing the identified inference phase, the fourth identification unit 405 may determine that no sixth code representing post-processing within the inference phase is present.

[0110] The output unit 406 outputs the processing result of at least one of the functional units. The output format is, for example, display on a display, printout on a printer, transmission to an external device via the network I / F 303, or storage in a storage area such as the memory 302 or the recording medium 305. In this way, the output unit 406 can notify the user of the processing result of at least one of the functional units, and can support the management and operation of the information processing device 100, for example, updating of setting values ​​of the information processing device 100, thereby improving the convenience of the information processing device 100.

[0111] The output unit 406 outputs information that enables distinguishing between the identified first code, the identified second code, the identified third code, the identified fourth code, the identified fifth code, and the identified sixth code in the code of the acquired machine learning software.

[0112] The output unit 406 outputs, for example, the identified first code, the identified second code, the identified third code, the identified fourth code, the identified fifth code, and the identified sixth code in association with the acquired code of the machine learning software. This allows the output unit 406 to make it easier for the user to analyze the contents of the code of the machine learning software.

[0113] (Specific example of functional configuration of information processing device 100) Next, a specific example of the functional configuration of the information processing device 100 will be described with reference to FIG.

[0114] Fig. 5 is a block diagram showing a specific example of a functional configuration of the information processing device 100. In Fig. 5, the information processing device 100 accepts input of, for example, machine learning software code 500 having a monolithic structure. The information processing device 100 accepts input of, for example, two system inputs 501, each of which becomes an input sample for an inference phase.

[0115] The information processing device 100 performs program slicing 510. For example, in the program slicing 510, the information processing device 100 performs a backward analysis process on the machine learning software code 500 based on an output sample for the learning phase. The information processing device 100 identifies a slice 511 representing the learning phase in the machine learning software code 500 by the backward analysis process. Specifically, the slice is a part of the machine learning software code 500, and is a partial code. In the following description, the slice representing the learning phase may be referred to as a "learning-related slice 511".

[0116] For example, in program slicing 510, the information processing device 100 performs forward parsing processing on the machine learning software code 500 based on two input samples for the inference phase. Through the forward parsing processing, the information processing device 100 identifies a slice 512 representing an inference phase in the machine learning software code 500. In the following description, a slice representing an inference phase may be referred to as an "inference-related slice 512."

[0117] The information processing device 100 performs a learning identification process 520 on the learning-related slice 511. The information processing device 100 identifies, by the learning identification process 520, a partial code in the learning-related slice 511 that includes processing content determined to have a high processing load, as a learning processing slice 521. The information processing device 100 identifies, in the learning-related slice 511, a partial code that exists before the identified learning processing slice 521, as a pre-learning processing slice 522. The information processing device 100 identifies, in the learning-related slice 511, a partial code that exists after the identified learning processing slice 521, as a post-learning processing slice 523.

[0118] The information processing device 100 performs an inference identification process 530 on the inference related slice 512. The information processing device 100, by the inference identification process 530, identifies a partial code in the inference related slice 512 that has at least a part of the processing content in common with the identified learning processing slice 521 as an inference processing slice 531. The information processing device 100 identifies a partial code in the inference related slice 512 that exists before the identified inference processing slice 531 as an inference pre-processing slice 532. The information processing device 100 identifies a partial code in the inference related slice 512 that exists after the identified inference processing slice 531 as an inference post-processing slice 533.

[0119] The information processing device 100 outputs the learning processing slice 521, the pre-learning processing slice 522, the post-learning processing slice 523, the inference processing slice 531, the pre-inference processing slice 532, and the post-inference processing slice 533 so that the user can refer to them.

[0120] This enables the information processing device 100 to easily modularize the learning processing slice 521, the pre-learning processing slice 522, the post-learning processing slice 523, the inference processing slice 531, the pre-inference processing slice 532, and the post-inference processing slice 533 individually. The information processing device 100 enables the user to easily manage the learning processing slice 521, the pre-learning processing slice 522, the post-learning processing slice 523, the inference processing slice 531, the pre-inference processing slice 532, and the post-inference processing slice 533.

[0121] (An example of the operation of the information processing device 100) Next, an example of the operation of the information processing device 100 will be described with reference to FIGS.

[0122] 6 to 10 are explanatory diagrams showing an example of the operation of the information processing device 100. In Fig. 6, the information processing device 100 acquires a code 600 of machine learning software. The code 600 specifies, for example, a pre-learning process 601, a learning process 602, a post-learning process 603, a pre-inference process 604, an inference process 605, and a post-inference process 606 without explicitly dividing them.

[0123] Pre-learning processing 601 is an element forming the learning phase, and has a function of processing learning data, which is input data for the learning phase, and generating pre-processing data. Learning processing 602 is an element forming the learning phase, and has a function of learning an inference model based on the pre-processing data and generating evaluation data for the learned inference model. Post-learning processing 603 is an element forming the learning phase, and has a function of generating a report showing the results of evaluating the inference model based on the evaluation data.

[0124] Pre-inference processing 604 is an element forming the inference phase, and has a function of processing the system input, which is input data for the inference phase, and generating pre-processing data. Inference processing 605 is an element forming the inference phase, and has a function of generating inference data based on the pre-processing data, with reference to an inference model. Post-inference processing 606 is an element forming the inference phase, and has a function of processing the inference data and generating system output. Next, we move on to the explanation of FIG. 7.

[0125] 7, the information processing device 100 acquires an example of a report generated by the post-learning process 603. The information processing device 100 performs a backward analysis process on the code 600 of the machine learning software based on the acquired example of the report, thereby identifying a learning-related slice 700 that represents a learning phase.

[0126] The information processing device 100 generates a program dependency graph based on, for example, the code 600 of the machine learning software. For example, the information processing device 100 refers to the generated program dependency graph and performs a backward analysis process on the acquired code 600 of the machine learning software to identify a variable group that depends on an example of the acquired report. For example, the information processing device 100 identifies a partial code that references the variable group as a learning-related slice 700 based on the identified variable group. This allows the information processing device 100 to appropriately separate the learning-related slice 700 from the code 600 of the machine learning software. Next, the description of FIG. 8 will be moved to FIG. 8.

[0127] 8, the information processing device 100 identifies a learning process slice 801 representing a learning process 602 from among the learning-related slices 700. Here, in the machine learning software code 600, the processing load of the learning process 602 for learning an inference model tends to be the largest. Specifically, when learning an inference model, a process for updating parameters of the inference model based on learning data is repeatedly performed by a loop function, and therefore the processing load of the learning process 602 tends to be large.

[0128] Therefore, the information processing device 100 uses, for example, a profiler to identify the command statement that imposes the largest processing load among the identified learning-related slices 700. The profiler is, for example, a line profiler.

[0129] Specifically, the information processing device 100 inputs an example of the learning data and the identified learning-related slice 700 into a line profiler to identify the number of executions for each line of the learning-related slice 700. Specifically, the information processing device 100 identifies the line of the identified learning-related slice 700 that has the largest number of executions based on the identified number of executions.

[0130] Specifically, the information processing device 100 determines whether or not a loop point or a user-defined function including the identified line is present in the identified learning-related slice 700. Specifically, when a loop point or a user-defined function including the identified line is present, the information processing device 100 identifies the loop point or the user-defined function including the identified line as the learning processing slice 801. Specifically, when a loop point or a user-defined function including the identified line is not present, the information processing device 100 identifies the identified line as the learning processing slice 801. This allows the information processing device 100 to appropriately separate the learning processing slice 801 from the code 600 of the machine learning software.

[0131] The information processing device 100 identifies a partial code existing before the identified learning processing slice 801, among the identified learning-related slices 700, as a learning pre-processing slice 802 representing the learning pre-processing 601. This enables the information processing device 100 to appropriately separate the learning pre-processing slice 802 from the code 600 of the machine learning software.

[0132] The information processing device 100 identifies a partial code existing after the identified learning processing slice 801, among the identified learning-related slices 700, as a post-learning processing slice 803 representing the post-learning processing 603. This allows the information processing device 100 to appropriately separate the post-learning processing slice 803 from the machine learning software code 600. Next, we move on to the description of FIG. 9.

[0133] 9, the information processing device 100 acquires two system inputs, which are an example of input data for the inference phase. The information processing device 100 performs a forward analysis process on the acquired machine learning software code 600 based on the two acquired system inputs, thereby identifying an inference-related slice 900 that represents the inference phase from the machine learning software code 600.

[0134] The information processing device 100, for example, performs a forward analysis process on the acquired machine learning software code 600 to identify a set of variables that depend on a change from one of two system inputs to the other system input. For example, based on the identified set of variables, the information processing device 100 identifies a partial code that references the set of variables as an inference-related slice 900. This allows the information processing device 100 to appropriately separate the inference-related slice 900 from the machine learning software code 600. Next, we move on to the description of FIG. 10.

[0135] In FIG. 10, the information processing device 100 identifies an inference processing slice 1001 representing an inference processing 605 that has at least a portion of processing content in common with the identified learning processing slice 801, from among the identified inference relevant slices 900.

[0136] The information processing device 100, for example, identifies a command statement that has a relatively high processing load from among the identified learning process slices 801. Specifically, the information processing device 100 identifies a command statement that has the highest number of executions from among the identified learning process slices 801.

[0137] The information processing device 100 searches for, for example, a command statement that is the same as or similar to the specified command statement among the specified inference related slices 900. Another command statement that is the same as or similar to a certain command statement is, for example, a command statement that calls the same inference model as the certain command statement. Specifically, the other command statement may be a command statement that calls the same inference model as the certain command statement with an argument different from that of the certain command statement. Specifically, the information processing device 100 searches for a command statement that is the same as or similar to the specified command statement among the specified inference related slices 900 based on the consistency of nodes in a program dependency graph.

[0138] For example, when the information processing device 100 finds a command statement that is the same as or similar to the identified command statement among the identified inference related slices 900 as a result of the search, the information processing device 100 identifies the found command statement as an inference processing slice 1001. This enables the information processing device 100 to appropriately separate the inference processing slice 1001 from the code 600 of the machine learning software.

[0139] The information processing device 100 identifies a partial code existing before the identified inference processing slice 1001, among the identified inference related slices 900, as an inference preprocessing slice 1002 representing the inference preprocessing 604. This enables the information processing device 100 to appropriately separate the inference preprocessing slice 1002 from the code 600 of the machine learning software.

[0140] The information processing device 100 identifies a partial code existing after the identified inference processing slice 1001, among the identified inference related slices 900, as a post-inference processing slice 1003 representing the post-inference processing 606. This enables the information processing device 100 to appropriately separate the post-inference processing slice 1003 from the code 600 of the machine learning software.

[0141] The information processing device 100 outputs, so that a user can refer to, the learning processing slice 801, the pre-learning processing slice 802, the post-learning processing slice 803, the inference processing slice 1001, the pre-inference processing slice 1002, and the post-inference processing slice 1003. In this way, the information processing device 100 can enable a user to distinguish partial codes representing each of the pre-learning processing 601, the learning processing 602, the post-learning processing 603, the pre-inference processing 604, the inference processing 605, and the post-inference processing 606.

[0142] The information processing device 100 can make it easy for a user to modularize partial codes representing each of the processes of pre-learning processing 601, learning processing 602, post-learning processing 603, pre-inference processing 604, inference processing 605, and post-inference processing 606. The information processing device 100 can make it easy for a user to manage partial codes representing each of the processes of pre-learning processing 601, learning processing 602, post-learning processing 603, pre-inference processing 604, inference processing 605, and post-inference processing 606.

[0143] Here, a case has been described in which the learning processing slice 801, the pre-learning processing slice 802, the post-learning processing slice 803, the inference processing slice 1001, the pre-inference processing slice 1002, and the post-inference processing slice 1003 are present, but this is not limiting. For example, there may be cases in which at least any partial code of the pre-learning processing slice 802, the post-learning processing slice 803, the pre-inference processing slice 1002, and the post-inference processing slice 1003 does not exist.

[0144] (Specific example of operation of information processing device 100) Next, a specific example of the operation of the information processing device 100 will be described with reference to FIGS.

[0145] 11 to 18 are explanatory diagrams showing specific examples of the operation of the information processing device 100. In Fig. 11, the information processing device 100 acquires two vector values ​​shown in a table 1100, which are an example of a system input. Next, we move on to the description of Fig. 12.

[0146] In Fig. 12, the information processing device 100 acquires a code 1200 of machine learning software having a monolithic structure. The code 1200 specifies, for example, pre-learning processing, learning processing, post-learning processing, pre-inference processing, inference processing, and post-inference processing without explicitly dividing them. Next, we move on to the description of Fig. 13.

[0147] 13, a backward analysis process is performed on the code 1200 based on an example of a report that is an output for the learning phase, to identify a learning-related slice 1301 in the code 1200. A specific example of the learning-related slice 1301 will be described later with reference to FIG. 14. Next, the description of FIG. 14 will be moved on.

[0148] Fig. 14 shows an example of a learning-related slice 1301. As shown in Fig. 14, the information processing device 100 can extract a first half 1401 and a second half 1402 of the learning-related slice 1301, which are separated in the code 1200, as elements forming the learning-related slice 1301. The information processing device 100 can appropriately specify the learning-related slice 1301.

[0149] Returning to the description of Fig. 13, the information processing device 100 identifies an inference relevant slice 1302 in the code 1200 by performing a forward analysis process on the code 1200 based on the two vector values ​​shown in the table 1100. A specific example of the inference relevant slice 1302 will be described later with reference to Fig. 15. Next, the description of Fig. 15 will be shifted to the description.

[0150] Fig. 15 shows an example of the inference relevant slice 1302. As shown in Fig. 15, the information processing device 100 can extract a first half 1501 and a second half 1502 of the inference relevant slice 1302, which are divided in the code 1200, as elements forming the inference relevant slice 1302. The information processing device 100 can appropriately specify the inference relevant slice 1302. Next, the description will move to Fig. 16.

[0151] 16, the information processing device 100 uses a line profiler to acquire the number of executions of each line of the learning-related slice 1301. The information processing device 100 identifies a line 1600 that is executed the most frequently based on the acquired number of executions. The information processing device 100 identifies a while loop that includes the identified line 1600 as a learning processing slice 1601. An example of the learning processing slice 1601 will be described later with reference to FIG. 17.

[0152] The information processing device 100 identifies a partial code existing before the identified learning processing slice 1601 in the learning-related slice 1301 as a pre-learning processing slice 1701, which will be described later with reference to Fig. 17. The information processing device 100 identifies a partial code existing after the identified learning processing slice 1601 in the learning-related slice 1301 as a post-learning processing slice 1702, which will be described later with reference to Fig. 17. Next, the description of Fig. 17 will be shifted to.

[0153] 17 illustrates an example of a learning processing slice 1601, a pre-learning processing slice 1701, and a post-learning processing slice 1702. As illustrated in FIG. 17, the information processing device 100 can appropriately identify the learning processing slice 1601, the pre-learning processing slice 1701, and the post-learning processing slice 1702 from among the learning-related slices 1301.

[0154] Returning to the explanation of FIG. 16, the information processing device 100 identifies any command statement in the identified inference related slice 1302 that indicates processing content identical or similar to any command statement in the identified learning related slice 1301. The information processing device 100 identifies, for example, a line 1610 in the identified inference related slice 1302 that calls the same inference model as a line 1600 in the identified learning related slice 1301. The information processing device 100 identifies the identified line 1610 as the inference processing slice 1602. An example of the inference processing slice 1602 will be described later with reference to FIG. 18.

[0155] The information processing device 100 identifies a partial code existing before the identified inference processing slice 1602, among the inference related slices 1302, as an inference pre-processing slice 1801, which will be described later with reference to Figure 18. The information processing device 100 identifies a partial code existing after the identified inference processing slice 1602, among the inference related slices 1302, as an inference post-processing slice 1802, which will be described later with reference to Figure 18. Next, we will move on to the description of Figure 18.

[0156] 18 shows an example of an inference processing slice 1602, an inference pre-processing slice 1801, and a post-inference processing slice 1802. As shown in FIG. 18, the information processing device 100 can appropriately identify the inference processing slice 1602, the inference pre-processing slice 1801, and the post-inference processing slice 1802 from among the inference related slices 1302.

[0157] The information processing device 100 outputs the learning processing slice 1601, the pre-learning processing slice 1701, the post-learning processing slice 1702, the inference processing slice 1602, the pre-inference processing slice 1801, and the post-inference processing slice 1802 so that the user can refer to them.

[0158] This allows the information processing device 100 to make partial codes representing different functions distinguishable by a user, facilitating modularization. The partial codes are a learning processing slice 1601, a pre-learning processing slice 1701, a post-learning processing slice 1702, an inference processing slice 1602, a pre-inference processing slice 1801, and a post-inference processing slice 1802.

[0159] For example, at the productization stage, the information processing device 100 can divide the code 1200 into a plurality of partial codes each representing a different function, making it easy to modularize each partial code. Even if the learning process or inference process is defined by a user-defined function in the code 1200, the information processing device 100 can appropriately identify the partial codes each representing a different function.

[0160] (Overall processing procedure) Next, an example of an overall processing procedure executed by the information processing device 100 will be described with reference to Fig. 19. The overall processing is realized by, for example, the CPU 301, storage areas such as the memory 302 and the recording medium 305, and the network I / F 303 shown in Fig. 3.

[0161] Fig. 19 is a flowchart showing an example of an overall processing procedure. In Fig. 19, the information processing device 100 acquires a machine learning software code (step S1901). The information processing device 100 acquires an output sample for the learning phase and an input sample for the inference phase (step S1902).

[0162] The information processing device 100 performs a backward analysis process on the code of the machine learning software based on the output sample for the learning phase, thereby identifying a learning-related slice from the code of the machine learning software (step S1903). The information processing device 100 performs a first identification process, which will be described later in FIG. 20, on the learning-related slice (step S1904).

[0163] The information processing device 100 performs a forward analysis process on the code of the machine learning software based on the input sample for the inference phase, thereby identifying an inference-related slice from the code of the machine learning software (step S1905). The information processing device 100 performs a second identification process, which will be described later in FIG. 21, on the inference-related slice (step S1906).

[0164] The information processing device 100 outputs the pre-learning processing slice, the learning processing slice, the post-learning processing slice, the pre-inference processing slice, the inference processing slice, and the post-inference processing slice (step S1907). The information processing device 100 ends the overall processing.

[0165] (First specific processing procedure) Next, an example of a first identification process procedure executed by the information processing device 100 will be described with reference to Fig. 20. The first identification process is realized by, for example, the CPU 301, storage areas such as the memory 302 and the recording medium 305, and the network I / F 303 shown in Fig. 3.

[0166] Fig. 20 is a flowchart showing an example of a first identification process procedure. In Fig. 20, the information processing device 100 uses a profiler to identify a command statement that is evaluated to have the longest processing time among the identified learning related slices (step S2001).

[0167] The information processing device 100 determines whether the identified command statement is in a loop (step S2002). If the identified command statement is in a loop (step S2002: Yes), the information processing device 100 proceeds to step S2003. On the other hand, if the identified command statement is not in a loop (step S2002: No), the information processing device 100 proceeds to step S2004.

[0168] In step S2003, the information processing device 100 specifies the loop including the specified command statement as a learning process slice (step S2003). Then, the information processing device 100 proceeds to the process of step S2005.

[0169] In step S2004, the information processing device 100 specifies the identified command statement as a learning process slice (step S2004). Then, the information processing device 100 proceeds to the process of step S2005.

[0170] In step S2005, the information processing device 100 specifies a portion of the identified learning-related slices that exists before the learning processing slice as a pre-learning processing slice (step S2005).

[0171] The information processing device 100 specifies a portion of the identified learning-related slices that exists after the learning processing slice as a post-learning processing slice (step S2006). The information processing device 100 ends the first identification process.

[0172] (Second specific processing procedure) Next, an example of a procedure of the second identification process executed by the information processing device 100 will be described with reference to Fig. 21. The second identification process is realized by, for example, the CPU 301, storage areas such as the memory 302 and the recording medium 305, and the network I / F 303 shown in Fig. 3.

[0173] Fig. 21 is a flowchart showing an example of a procedure of the second identification process. In Fig. 21, the information processing device 100 selects a command statement that has not yet been selected from among the identified learning-related slices (step S2101).

[0174] The information processing device 100 determines whether or not a command statement whose processing content is the same as or similar to the selected command statement is present among the identified inference relevant slices (step S2102). If a command statement whose processing content is the same as or similar to the selected command statement is present among the inference relevant slices (step S2102: Yes), the information processing device 100 proceeds to the process of step S2103. On the other hand, if a command statement whose processing content is the same as or similar to the selected command statement is not present among the inference relevant slices (step S2102: No), the information processing device 100 returns to the process of step S2101.

[0175] In step S2103, the information processing apparatus 100 specifies, from among the specified inference relevant slices, a command statement whose processing content is the same as or similar to that of the selected command statement, as an inference processing slice (step S2103).

[0176] The information processing device 100 specifies a portion of the identified inference relevant slices that exists before the inference processing slice as an inference pre-processing slice (step S2104). The information processing device 100 specifies a portion of the identified inference relevant slices that exists after the inference processing slice as an inference post-processing slice (step S2105). The information processing device 100 ends the second identification process.

[0177] Here, the information processing device 100 may change the order of the processes of some steps in the flowcharts of Figures 19 to 21. For example, the order of the processes of steps S1904 and S1905 may be changed. Furthermore, the information processing device 100 may omit the processes of some steps in the flowcharts of Figures 19 to 21.

[0178] As described above, the information processing device 100 can obtain the code of the machine learning software that defines a learning phase for learning a machine learning model and an inference phase for using the machine learning model. The information processing device 100 can identify the code representing the learning phase from among the codes of the machine learning software by performing a backward analysis process on the code of the machine learning software based on an output sample for the learning phase. The information processing device 100 can identify a first code representing a learning process in the learning phase, including a process content that is determined to have a high processing load, from among the codes representing the identified learning phase. The information processing device 100 can identify a second code representing a pre-processing in the learning phase that exists before the identified first code from among the codes representing the identified learning phase. The information processing device 100 can identify a third code representing a post-processing in the learning phase that exists after the identified first code from among the codes representing the identified learning phase. The information processing device 100 can identify a code representing the inference phase from among the codes representing the identified learning phase by performing a forward analysis process on the code of the machine learning software based on an input sample for the inference phase. According to the information processing device 100, it is possible to identify a fourth code representing an inference process within an inference phase, which has at least a part of the process contents in common with the identified first code, among the codes representing the identified inference phase. According to the information processing device 100, it is possible to identify a fifth code representing a pre-process within an inference phase, which exists before the identified fourth code, among the codes representing the identified inference phase. According to the information processing device 100, it is possible to identify a sixth code representing a post-process within an inference phase, which exists after the identified fourth code, among the codes representing the identified inference phase. According to the information processing device 100, it is possible to output information that makes it possible to distinguish the identified first code, the identified second code, the identified third code, the identified fourth code, the identified fifth code, and the identified sixth code in the code of the machine learning software.This allows the information processing device 100 to enable the user to distinguish between the first code, the second code, the third code, the fourth code, the fifth code, and the sixth code, making it easier to modularize.

[0179] According to the information processing device 100, it is possible to identify the command statement with the highest processing load among the codes representing the identified learning phase by using a profiler. According to the information processing device 100, it is possible to identify a loop point or a function including the identified command statement among the codes representing the identified learning phase as the first code. This allows the information processing device 100 to accurately identify the first code.

[0180] According to the information processing device 100, any statement in the code representing the identified inference phase that calls the same machine learning model as any statement in the identified first code can be identified as the fourth code. This allows the information processing device 100 to accurately identify the fourth code.

[0181] According to the information processing device 100, it is possible to output the identified first code, the identified second code, the identified third code, the identified fourth code, the identified fifth code, and the identified sixth code in association with the code of the machine learning software. This allows the information processing device 100 to make it easy for the user to directly refer to the contents of the first code, the second code, the third code, the fourth code, the fifth code, and the sixth code, and to facilitate modularization.

[0182] The information processing method described in this embodiment can be realized by executing a prepared program on a computer such as a PC or a workstation. The information processing program described in this embodiment is recorded on a computer-readable recording medium, and is executed by being read from the recording medium by the computer. The recording medium may be a hard disk, a flexible disk, a CD (Compact Disc)-ROM, an MO (Magneto Optical disc), a DVD (Digital Versatile Disc), or the like. The information processing program described in this embodiment may also be distributed via a network such as the Internet.

[0183] The following supplementary notes are further disclosed regarding the above-described embodiment.

[0184] (Appendix 1) Obtaining machine learning software code that defines a learning phase for learning a machine learning model and an inference phase for utilizing the machine learning model; performing a backward analysis process on the code of the acquired machine learning software based on an output sample for the learning phase, thereby identifying a code representing the learning phase among the code of the acquired machine learning software; Identifying a first code representing a learning process in the learning phase, the first code including a process content determined to have a high processing load, from among the codes representing the identified learning phase; Identifying a second code representing a pre-processing within the learning phase that exists before the identified first code among the codes representing the identified learning phase; Identifying a third code representing a post-processing within the learning phase that exists after the identified first code among the codes representing the identified learning phase; performing a forward analysis process on the acquired code of the machine learning software based on an input sample for the inference phase, thereby identifying a code representing the inference phase from among the acquired code of the machine learning software; Identifying a fourth code representing an inference process within the inference phase, the fourth code having at least a part of the process content in common with the first code, among the codes representing the identified inference phase; Identifying a fifth code representing a pre-processing within the inference phase that exists before the identified fourth code among the codes representing the identified inference phase; Identifying a sixth code representing a post-processing within the inference phase that exists after the fourth code among the codes representing the identified inference phase; outputting information enabling discrimination between the identified first code, the identified second code, the identified third code, the identified fourth code, the identified fifth code, and the identified sixth code in the acquired code of the machine learning software; An information processing program that causes a computer to execute a process.

[0185] (Appendix 2) The process of identifying the first code includes: The information processing program described in Appendix 1, characterized in that a profiler is used to identify a command statement that imposes the highest processing load among the code representing the identified learning phase, and a loop location or function that contains the identified command statement among the code representing the identified learning phase is identified as the first code.

[0186] (Appendix 3) The process of identifying the fourth code is The information processing program according to claim 1 or 2, characterized in that the fourth code is identified as any one of the statements in the code representing the identified inference phase that calls the same machine learning model as any one of the statements in the identified first code.

[0187] (Appendix 4) The output process is 4. The information processing program according to any one of appendices 1 to 3, characterized in that the identified first code, the identified second code, the identified third code, the identified fourth code, the identified fifth code, and the identified sixth code are output in correspondence with the acquired code of the machine learning software.

[0188] (Appendix 5) Obtaining a machine learning software code that defines a learning phase for learning a machine learning model and an inference phase for utilizing the machine learning model; performing a backward analysis process on the code of the acquired machine learning software based on an output sample for the learning phase, thereby identifying a code representing the learning phase among the code of the acquired machine learning software; Identifying a first code representing a learning process in the learning phase, the first code including a process content determined to have a high processing load, from among the codes representing the identified learning phase; Identifying a second code representing a pre-processing within the learning phase that exists before the identified first code among the codes representing the identified learning phase; Identifying a third code representing a post-processing within the learning phase that exists after the identified first code among the codes representing the identified learning phase; performing a forward analysis process on the acquired code of the machine learning software based on an input sample for the inference phase, thereby identifying a code representing the inference phase from among the acquired code of the machine learning software; Identifying a fourth code representing an inference process within the inference phase, the fourth code having at least a part of the process content in common with the first code, among the codes representing the identified inference phase; Identifying a fifth code representing a pre-processing within the inference phase that exists before the identified fourth code among the codes representing the identified inference phase; Identifying a sixth code representing a post-processing within the inference phase that exists after the fourth code among the codes representing the identified inference phase; outputting information that enables discrimination between the identified first code, the identified second code, the identified third code, the identified fourth code, the identified fifth code, and the identified sixth code in the acquired code of the machine learning software; An information processing method characterized in that the processing is executed by a computer.

[0189] (Appendix 6) Obtaining a machine learning software code that defines a learning phase for learning a machine learning model and an inference phase for utilizing the machine learning model; performing a backward analysis process on the code of the acquired machine learning software based on an output sample for the learning phase, thereby identifying a code representing the learning phase among the code of the acquired machine learning software; Identifying a first code representing a learning process in the learning phase, the first code including a process content determined to have a high processing load, from among the codes representing the identified learning phase; Identifying a second code representing a pre-processing within the learning phase that exists before the identified first code among the codes representing the identified learning phase; Identifying a third code representing a post-processing within the learning phase that exists after the identified first code among the codes representing the identified learning phase; performing a forward analysis process on the acquired code of the machine learning software based on an input sample for the inference phase, thereby identifying a code representing the inference phase from among the acquired code of the machine learning software; Identifying a fourth code representing an inference process within the inference phase, the fourth code having at least a part of the process content in common with the first code, among the codes representing the identified inference phase; Identifying a fifth code representing a pre-processing within the inference phase that exists before the identified fourth code among the codes representing the identified inference phase; Identifying a sixth code representing a post-processing within the inference phase that exists after the fourth code among the codes representing the identified inference phase; outputting information enabling discrimination between the identified first code, the identified second code, the identified third code, the identified fourth code, the identified fifth code, and the identified sixth code in the acquired code of the machine learning software; An information processing device comprising a control unit. [Explanation of symbols]

[0190] 100 Information processing device 110,500,600,1200 Machine learning software code 111 Code representing the learning phase 112 Code representing the inference phase 121 1st Code 122 Second Code 123 3rd Code 124 4th Code 125 5th Code 126 6th Code 200 Information Processing Systems 201 Client device 210 Network 300 Bus 301 CPU 302 Memory 303 Network Interface 304 Recording media I / F 305 Recording media 400 Storage section 401 Acquisition Department 402 1st Specific Part 403 Second Specific Section 404 Third Specific Section 405 4th Specific Part 406 Output section 501 System Input 510 Program Slicing 511,700,1301 Learning related slices 512,900,1302 Inference related slices 520 Learning specific processing 521,801,1601 learning slices 522,802,1701 pre-training slices 523,803,1702 Post-training slices 530 Inference specific processing 531,1001,1602 inference processing slices 532,1002,1801 inference preprocessing slices 533,1003,1802 Post-inference processing slices 601 Pre-Learning Processing 602 Learning Processing 603 Post-Learning Processing 604 Inference Preprocessing 605 Inference Processing 606 Post-inference processing 1100 table 1401,1501 First half 1402,1502 second half 1600,1610 lines

Claims

1. Obtaining machine learning software code that defines a learning phase for learning a machine learning model and an inference phase for utilizing the machine learning model; performing a backward analysis process on the code of the acquired machine learning software based on an output sample for the learning phase, thereby identifying a code representing the learning phase among the code of the acquired machine learning software; Identifying a first code representing a learning process in the learning phase, the first code including a process content determined to have a high processing load, from among the codes representing the identified learning phase; Identifying a second code representing a pre-processing within the learning phase that exists before the identified first code among the codes representing the identified learning phase; Identifying a third code representing a post-processing within the learning phase that exists after the identified first code among the codes representing the identified learning phase; performing a forward analysis process on the acquired code of the machine learning software based on an input sample for the inference phase, thereby identifying a code representing the inference phase from among the acquired code of the machine learning software; Identifying a fourth code representing an inference process within the inference phase, the fourth code having at least a part of the process content in common with the first code, among the codes representing the identified inference phase; Identifying a fifth code representing a pre-processing within the inference phase that exists before the identified fourth code among the codes representing the identified inference phase; Identifying a sixth code representing a post-processing within the inference phase that exists after the identified fourth code among the codes representing the identified inference phase; outputting information that enables discrimination between the identified first code, the identified second code, the identified third code, the identified fourth code, the identified fifth code, and the identified sixth code in the acquired code of the machine learning software; An information processing program that causes a computer to execute a process.

2. The process of identifying the first code includes: The information processing program according to claim 1, characterized in that a profiler is used to identify a command statement that has the highest processing load among the code representing the identified learning phase, and a loop location or function that contains the identified command statement among the code representing the identified learning phase is identified as the first code.

3. The process of identifying the fourth code includes: The information processing program according to claim 1 or 2, characterized in that the fourth code is identified as any one of the statements in the code representing the identified inference phase that calls the same machine learning model as any one of the statements in the identified first code.

4. Obtaining machine learning software code that defines a learning phase for learning a machine learning model and an inference phase for utilizing the machine learning model; performing a backward analysis process on the code of the acquired machine learning software based on an output sample for the learning phase, thereby identifying a code representing the learning phase among the code of the acquired machine learning software; Identifying a first code representing a learning process in the learning phase, the first code including a process content determined to have a high processing load, from among the codes representing the identified learning phase; Identifying a second code representing a pre-processing within the learning phase that exists before the identified first code among the codes representing the identified learning phase; Identifying a third code representing a post-processing within the learning phase that exists after the identified first code among the codes representing the identified learning phase; performing a forward analysis process on the acquired code of the machine learning software based on an input sample for the inference phase, thereby identifying a code representing the inference phase from among the acquired code of the machine learning software; Identifying a fourth code representing an inference process within the inference phase, the fourth code having at least a part of the process content in common with the first code, among the codes representing the identified inference phase; Identifying a fifth code representing a pre-processing within the inference phase that exists before the identified fourth code among the codes representing the identified inference phase; Identifying a sixth code representing a post-processing within the inference phase that exists after the identified fourth code among the codes representing the identified inference phase; outputting information that enables discrimination between the identified first code, the identified second code, the identified third code, the identified fourth code, the identified fifth code, and the identified sixth code in the acquired code of the machine learning software; An information processing method characterized in that the processing is executed by a computer.

5. Obtaining machine learning software code that defines a learning phase for learning a machine learning model and an inference phase for utilizing the machine learning model; performing a backward analysis process on the code of the acquired machine learning software based on an output sample for the learning phase, thereby identifying a code representing the learning phase among the code of the acquired machine learning software; Identifying a first code representing a learning process in the learning phase, the first code including a process content determined to have a high processing load, from among the codes representing the identified learning phase; Identifying a second code representing a pre-processing within the learning phase that exists before the identified first code among the codes representing the identified learning phase; Identifying a third code representing a post-processing within the learning phase that exists after the identified first code among the codes representing the identified learning phase; performing a forward analysis process on the acquired code of the machine learning software based on an input sample for the inference phase, thereby identifying a code representing the inference phase from among the acquired code of the machine learning software; Identifying a fourth code representing an inference process within the inference phase, the fourth code having at least a part of the process content in common with the first code, among the codes representing the identified inference phase; Identifying a fifth code representing a pre-processing within the inference phase that exists before the identified fourth code among the codes representing the identified inference phase; Identifying a sixth code representing a post-processing within the inference phase that exists after the identified fourth code among the codes representing the identified inference phase; outputting information that enables discrimination between the identified first code, the identified second code, the identified third code, the identified fourth code, the identified fifth code, and the identified sixth code in the acquired code of the machine learning software; An information processing device comprising a control unit.

Citation Information

Patent Citations

  • Source code analysis method and source code analysis device

    JP2019219848A

  • Automatically generating pipeline of new machine learning project from pipeline of existing machine learning project stored in corpus

    JP2022042497A

  • US011042369

  • Syntactical change-resistant code generation

    US20210200519A1