Program, information processing device, and information processing method

By selectively updating blocks within a weight matrix, the method addresses memory efficiency and interpretability issues in domain model construction, enabling efficient and interpretable domain model adaptation.

JP2026119821APending Publication Date: 2026-07-21KK TOSHIBA

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
KK TOSHIBA
Filing Date
2025-01-08
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing techniques for constructing domain models using large language models face challenges in memory efficiency and model interpretation due to updating all parameters, which can hinder performance improvement and make it difficult to understand which parameters correspond to which domain.

Method used

A method involving the generation of a domain model by updating parameters of specific blocks within a weight matrix, using a sparse block weight matrix to selectively update only relevant blocks, thereby minimizing memory usage and facilitating easier model interpretation.

Benefits of technology

This approach allows for efficient acquisition of domain models with reduced memory requirements and improved model interpretability by focusing updates on specific blocks, enhancing the model's adaptability to specific domains.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026119821000001_ABST
    Figure 2026119821000001_ABST
Patent Text Reader

Abstract

Efficiently obtain a model that is easier to interpret by adjusting the base model. [Solution] This is a program that causes a computer to perform a generation step, a score calculation step, a selection step, a feature calculation step, and an update step. The generation step generates a second model whose parameters are a first weight matrix of the first model and a second weight matrix which includes a block weight matrix containing multiple blocks. The score calculation step calculates a score that represents the degree to which the input data and each of the multiple blocks are related. The selection step selects K blocks using the scores. The feature calculation step calculates features using parameters corresponding to the selected blocks. The update step updates the parameters corresponding to the selected blocks to minimize the value of the loss function based on the features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to a program, an information processing apparatus, and an information processing method.

Background Art

[0002] In the field of natural language processing (NLP), a large language model (LLM) learned using an enormous dataset may be used. Also, a technique for constructing a model (domain model) adapted to a specific domain based on a pre-trained model (base model) such as a large language model has been proposed.

[0003] For example, a technique for constructing a domain model by overwriting all parameters of a base model has been proposed. In such a technique, since all parameters are updated, the pre-learned knowledge may be overwritten, and the performance improvement of the model may be hindered.

[0004] When using an LLM or the like having a large number of parameters as a base model, the amount of memory required for updating all parameters can be excessive. Therefore, a technique for constructing a domain model by overwriting some parameters has been proposed. In such a technique, for example, since the parameters are not classified, it may be difficult to interpret the model such as which domain each parameter corresponds to.

Prior Art Documents

Patent Documents

[0005]

Patent Document 1

Non-Patent Documents

[0006] ]

Non-Patent Document 1

[0007] The present invention aims to provide a program, an information processing device, and an information processing method that can efficiently obtain a model that is an adjusted version of a base model, and in which model interpretation can be performed more easily. [Means for solving the problem]

[0008] The embodiment is a program that causes a computer to perform a generation step, a score calculation step, a selection step, a feature calculation step, and an update step. The generation step generates a second model with parameters consisting of a first weight matrix of the first model and a second weight matrix that includes a block weight matrix containing multiple blocks. The score calculation step calculates a score representing the degree to which the input data is related to each of the multiple blocks. The selection step selects K blocks using the scores. The feature calculation step calculates features using parameters corresponding to the selected blocks. The update step updates the parameters corresponding to the selected blocks to minimize the value of the loss function based on the features. [Brief explanation of the drawing]

[0009] [Figure 1] Block diagram of an information processing device according to an embodiment. [Figure 2] A diagram showing an example of the construction of a weight matrix for a domain model. [Figure 3] Flowchart of the learning process in the embodiment. [Figure 4] A diagram showing an example of a confirmation screen. [Figure 5] Hardware configuration diagram of the information processing device according to the embodiment. [Modes for carrying out the invention]

[0010] A preferred embodiment of the information processing device according to this invention will be described in detail below with reference to the attached drawings.

[0011] The information processing device of this embodiment performs additional training to find a domain model suitable for a specific domain, based on a pre-trained base model. In this embodiment, the concept of blocks, which are obtained by dividing the model's parameters (weight matrix), is used. That is, the information processing device of this embodiment performs additional training on the domain model by updating the parameters of some of the blocks that correspond to the domain among a plurality of blocks.

[0012] Because this involves updating the parameters of only a portion of the blocks, it helps to prevent excessive memory usage during training. In other words, it allows for efficient acquisition of domain models. Furthermore, since different blocks can be trained to correspond to each domain, model interpretation becomes easier.

[0013] The following primarily describes examples of additional training for neural network models used in the field of natural language processing. The applicable models (technical fields) are not limited to those used in natural language processing; any model from any technical field, including the models described below, may be used. • Models for image processing, including image recognition. • Models for speech processing, including speech recognition. • Model for character recognition

[0014] Figure 1 is a block diagram showing an example of the configuration of an information processing device 100 according to an embodiment. As shown in Figure 1, the information processing device 100 includes an acquisition unit 101, a generation unit 102, a score calculation unit 103, a selection unit 104, a feature calculation unit 105, a loss calculation unit 106, an update unit 107, an inference unit 108, an output control unit 109, and a storage unit 121.

[0015] The acquisition unit 101 acquires various types of information used by the information processing device 100. For example, the acquisition unit 101 acquires the weight matrix W, which is a parameter of the base model (first model). base The first weight matrix is ​​obtained. The acquisition unit 101 also obtains the input data to be used for training the domain model (second model).

[0016] The base model is, for example, a model built using training data that is independent of a specific domain. The domain model is a model that is adjusted to adapt to a specific domain. The input data is data from a specific domain. The input data may be a dataset containing multiple data points from a specific domain, or it may be a single data point from a specific domain.

[0017] Furthermore, the weight matrix is ​​a parameter defined for each of one or more layers of a neural network model. The weight matrix adjusted in this embodiment may be a part of or all of the one or more weight matrices corresponding to one or more layers that make up the neural network model.

[0018] The method by which the acquisition unit 101 acquires information can be any method, but for example, it can be a method of receiving information from an external device via a network, or a method of reading information from a storage medium.

[0019] The generation unit 102 generates the weight matrix W base Using this, we generate (construct) a domain model (second model). Below, the weight matrix W baseThe case where it is represented by a d-row d-column (d is an integer of 2 or more) matrix will be described as an example. That is, W base ∈R d×d is. For example, the generation unit 102 first generates a sparse block weight matrix ΔW (∈R base ), which has the same size as the weight matrix W d×d ) and includes a plurality of blocks.

[0020] The plurality of blocks are obtained, for example, by dividing the sparse block weight matrix ΔW into n in the row direction and m in the column direction (n is an integer of 1 or more, m is an integer of 1 or more, and at least one of n and m is 2 or more). That is, the number of blocks is n×m. Each of the plurality of blocks has a size of d / n in the row direction and a size of d / m in the column direction. Note that the method of dividing the sparse block weight matrix ΔW is not limited to the method of dividing in the row direction and the column direction, and any method may be used as long as it is a method of dividing into a plurality of blocks of the same size.

[0021] The generation unit 102 generates a domain model with the weight matrix W base and the sparse block weight matrix ΔW as parameters. For example, the generation unit 102 generates the weight matrix W domain of the domain model (the second weight matrix) by adding the sparse block weight matrix ΔW to the weight matrix W base as shown in the following formula (1). domain W W domain =W base +ΔW ···(1)

[0022] Note that the “+” in formula (1) does not mean adding the values of the weight matrices, but means generating the weight matrix of the domain model to include two weight matrices. As will be described later, among the weight matrices of the domain model, the value of the weight matrix W base is kept as it is without being updated, and the value of the sparse block weight matrix ΔW is updated.

[0023] Furthermore, as will be described later, when calculating features for the input data, a weight matrix is ​​used in which the values ​​of blocks other than the selected K blocks (where K is an integer between 2 and n × m) are set to a specific value (e.g., 0) to indicate that they are excluded. This weight matrix is ​​a sparse matrix in which only the selected blocks have values. This adjusts the model so that only the selected blocks from the entire set of blocks are suitable for the domain. Since it is possible to check which blocks (parameters) correspond to the domain, model interpretation becomes easier.

[0024] Figure 2 shows the weight matrix W of the domain model. domain This figure shows an example of the configuration. The weight matrix 200 is the weight matrix W of the base model. base This corresponds to the weight matrix 300, which corresponds to the sparse block weight matrix ΔW. The weight matrix containing weight matrix 200 and weight matrix 300 is the weight matrix W. domain It corresponds to this.

[0025] In the example in Figure 2, the sparse block weight matrix ΔW is divided into 4 × 4 blocks (n=4, m=4). Figure 2 also shows an example where 4 blocks (K=4) are selected by the selection unit 104, which will be described later. The weight matrix of the selected blocks with values ​​is W v k This can be expressed as (where k is an integer satisfying 1 ≤ k ≤ K). As will be described later, W v k The score v is calculated for the corresponding block. k The weights are assigned by the following: A weight matrix W containing the weight matrices of the selected K blocks. v The magnitude is K × (d / n) × (d / m) (W v ∈R K×(d / n)×(d / m) Blocks 301-304 are the weight matrix W of the four selected blocks. v 1~W v This is an example of a block corresponding to 4.

[0026] The score calculation unit 103 calculates multiple scores v that represent the degree of association between the input data used for training the domain model and each of the multiple blocks. The scores v are calculated such that, for example, the greater the degree of association with the input data, the higher the value. The scores v may be calculated by any method. For example, the scores v may be calculated by introducing a new weight matrix, or they may be the "Sensitivity-based Importance Score" described in Non-Patent Literature 2.

[0027] The selection unit 104 selects K blocks from multiple blocks using multiple scores v. For example, the selection unit 104 selects K blocks whose top K scores v are calculated in order of their degree of relevance to the input data.

[0028] The feature calculation unit 105 inputs the input data into the domain model and calculates the feature quantity h, which is the output of the domain model for the input data. At this time, the feature calculation unit 105 calculates the weight matrix W of the domain model. domain Of these, the weight matrix W base Then, using the parameters corresponding to the K selected blocks, the feature vectors, which are the output of the domain model, are calculated.

[0029] Using parameters corresponding to the selected K blocks is equivalent to using a block weight matrix ΔW in which the values ​​of blocks other than the selected K blocks are set to a specific value (e.g., 0) indicating that they are not included in the feature calculation. In the following, a weight matrix with a specific value set will also be referred to as a sparse block weight matrix ΔW.

[0030] If the input data is represented as x, the feature calculation unit 105 calculates the feature quantity h using the following equation (2). The sparse block weight matrix ΔW is expressed, for example, by the following equation (3). As shown in Figure 2, the input data x and the feature quantity h are, for example, data of size d. h=W base x + ΔWx ... (2) ΔW = Sparse(p, vW)v ) ···(3)

[0031] Sparse() is a function that constructs a sparse matrix. p represents the positions of the selected K blocks. v represents the scores of each of the selected K blocks, v1 to v K This is a vector whose elements are . Thus, in equation (3), the weight matrix of K blocks is weighted by the score. vW v This can be expressed, for example, by equation (4) below. VW v =[v1W v 1,v2W v 2,···,v k W v k ] ···(4)

[0032] Sparse() generates the weight matrix W of the K blocks at the position indicated by p. v 1~W v k The output is a sparse block weight matrix ΔW which includes a weight matrix with scores assigned as weights, and the values ​​of unselected blocks are set to specific values.

[0033] The loss calculation unit 106 calculates the loss L, which is the value of the loss function based on the calculated features. total The loss calculation unit 106 calculates the loss L using the following equation (5). For example, the loss calculation unit 106 calculates the loss L using the following equation (5). total Calculate. L total =L base +α×L auxiliary ...(5)

[0034] L base This is the loss calculated using the loss function corresponding to the base model. The loss function corresponding to the base model can be any conventionally used loss function, but for example, it is a function that outputs a larger value the larger the difference between the output of the base model for feature h and the ground truth data included in the training data.

[0035] L auxiliaryThis is a sparse block weight matrix ΔW(W v The loss is calculated using the loss function corresponding to the block weight matrix expressed by equation (3) using ΔW. The loss function corresponding to the block weight matrix ΔW can be any conventionally used loss function, but for example, it is a function that outputs a larger value the larger the difference between the output of the block weight matrix ΔW among the features h and the ground truth data included in the training data.

[0036] L auxiliary This can be interpreted as corresponding to the loss required to control the block. α is L auxiliary This is a coefficient that adjusts the degree to which it is considered. In other words, the coefficient α corresponds to a coefficient that adjusts at least one of the positions and scores of the K blocks relative to the domain model. By setting α=0, L auxiliary A configuration that does not use (not explicitly controlling K blocks) is possible. The larger the value of α, the larger the weight matrix W of the domain model. domain The weight matrix W of the selected block within v The degree of control over (K ​​blocks) increases.

[0037] The loss is not limited to the value calculated by equation (4). For example, the following loss function may also be used. • A loss function that outputs a larger value the more overlap there is in the blocks selected for input data from different domains: This makes it possible to control the selection of blocks for each domain to avoid bias. • A loss function that outputs a larger value the greater the difference between a pre-specified block and the selected block for a specific domain: This allows the user to control which block the input data for a specific domain is assigned to.

[0038] The update unit 107 is responsible for the loss L total The weight matrix W of the selected block from the sparse block weight matrix ΔW minimizes the (value of the loss function). vThe corresponding parameters are updated. At this time, the update unit 107 updates the weight matrix W of the base model. base This will not be changed. In this way, only the parameters of some blocks are updated, which helps to prevent the amount of memory required during training from becoming excessive.

[0039] The method used to minimize the loss can be any method used to update the parameters of the neural network model, such as backpropagation.

[0040] The update applies to the weight matrix W of the selected block from the sparse block weight matrix ΔW. v That is the case.

[0041] The update unit 107 is the updated weight matrix W of the learnable blocks. v Only the value of is stored in the memory unit 121. The weight matrix W of the base model base Since it will not be updated, there is no need to memorize it again.

[0042] The inference unit 108 performs inference using the trained domain model. For example, the inference unit 108 uses the weight matrix W of the base model. base Then, a domain model is constructed that includes a sparse block weight matrix ΔW, and this constructed domain model is used for inference.

[0043] The output control unit 109 controls the output of various types of information used by the information processing device 100. For example, the output control unit 109 outputs the inference results from the inference unit 108. The output control unit 109 may also output multiple scores v calculated for each of the multiple blocks. The method of outputting the information can be any method, but for example, it can be displayed on a display device or transmitted to an external device via a network.

[0044] At least a portion of each of the above-mentioned parts (acquisition unit 101, generation unit 102, score calculation unit 103, selection unit 104, feature calculation unit 105, loss calculation unit 106, update unit 107, inference unit 108, and output control unit 109) may be implemented by one or more processing units. Each of the above-mentioned parts may be implemented by, for example, one or more processors. For example, each of the above-mentioned parts may be implemented by having a processor such as a CPU (Central Processing Unit) and a GPU (Graphics Processing Unit) execute a program, i.e., by software. Each of the above-mentioned parts may be implemented by a processor such as a dedicated IC (Integrated Circuit), i.e., by hardware. Each of the above-mentioned parts may be implemented by using a combination of software and hardware. When multiple processors are used, each processor may implement one of the above-mentioned parts, or two or more of the above-mentioned parts.

[0045] The memory unit 121 stores various types of information used in the information processing device. For example, the memory unit 121 stores various types of information (weight matrix W) acquired by the acquisition unit 101. base It stores the input data, etc., and the updated sparse block weight matrix ΔW.

[0046] The storage unit 121 can be composed of any commonly used storage medium, such as flash memory, memory card, RAM (Random Access Memory), HDD (Hard Disk Drive), and optical disc.

[0047] The information processing device 100 may be composed of one physical device or multiple physical devices. For example, the information processing device 100 may be built on a cloud environment. Also, each part of the information processing device 100 may be distributed and provided on multiple devices. For example, the information processing device 100 (information processing system) may be configured to include a device (e.g., a learning device) that has functions necessary for learning (e.g., acquisition unit 101 to update unit 107) and a device (e.g., an inference device) that has functions necessary for inference (e.g., an inference unit 108).

[0048] Next, the learning process by the information processing device 100 of this embodiment will be described. The learning process is the process of learning and constructing a domain model based on a base model. Figure 3 is a flowchart of an example of the learning process in this embodiment.

[0049] The acquisition unit 101 is the weight matrix W of the base model. base The unit 102 obtains the weight matrix W (step S101). The generation unit 102 generates a sparse block weight matrix ΔW containing multiple blocks, and obtains the weight matrix W base And a sparse block weight matrix ΔW and a weight matrix W containing ΔW. domain A domain model is generated with the parameters (step S102).

[0050] The acquisition unit 101 acquires the input data (step S103). The score calculation unit 103 calculates multiple scores v between the input data and each of the multiple blocks (step S104). The selection unit 104 selects K blocks from the multiple blocks using the multiple scores v (step S105).

[0051] The feature calculation unit 105 generates a sparse block weight matrix ΔW using the selected K blocks (step S106). The feature calculation unit 105 calculates features using the domain model including the sparse block weight matrix ΔW (step S107).

[0052] The loss calculation unit 106 uses the calculated features to calculate the loss L, which is the value of the loss function. total The update unit 107 calculates the block weight matrix ΔW (the weight matrix W of the selected block) to minimize the calculated loss. v Update (step S109).

[0053] The update unit 107 determines whether or not to terminate the learning process (step S110). For example, the update unit 107 determines the loss L total If the value falls below a threshold, if the number of repetitions of the update process from step S103 to step S109) reaches a specified value, or if processing with all the input data used for learning is completed, it is determined that learning will end.

[0054] If learning is not terminated (step S110: No), the process returns to step S103 and is repeated for the next input data. If learning is terminated (step S110: Yes), the output control unit 109 outputs the learned block weight matrix ΔW (weight matrix W of the selected block). v The data is stored in the memory unit 121 (step S111), and the learning process is terminated.

[0055] The output control unit 109 may display a confirmation screen on a display device or the like that allows the user to verify the correspondence between multiple blocks and domains. The display device may be, for example, a liquid crystal display. The display device may be provided on the information processing device 100, or it may be provided on an external device (such as a personal computer or mobile terminal) connected to the information processing device 100 via a network or the like.

[0056] Figure 4 shows an example of the confirmation screen 400. The confirmation screen 400 in Figure 4 includes patterns 401, 402, and 403 of four blocks (K=4) selected for each of the three input data sets. The numbers within the blocks represent the scores calculated for those blocks. In each pattern, four blocks with the highest scores are selected from a total of 4 × 4 (= 16) blocks. In this way, the output control unit 109 outputs a confirmation screen 400 that includes multiple scores v calculated for each set of blocks.

[0057] Pattern 401 shows the block pattern selected for a dataset of input data where the domain is “news”. Patterns 402 and 403 show the block patterns selected for a dataset of input data where the domain is “infrastructure”.

[0058] In the learning process, it is expected that the same block will be selected for input data (datasets) from the same domain. Conversely, it is expected that different blocks will be selected for multiple input data (datasets) from different domains. Patterns 401 to 403 in Figure 4 are examples where blocks were selected as expected.

[0059] The confirmation screen 400 makes it easier for the user to interpret the domain model. The confirmation screen 400 may also include a function (such as a button) that allows the user to instruct the system to run the learning process again depending on the result of the confirmation.

[0060] The output control unit 109 may output the confirmation screen 400 when the learning process is executed (for example, after step S111 in Figure 3), or it may output the confirmation screen 400 when the inference unit 108 performs inference.

[0061] As described above, according to the embodiment, a model can be efficiently obtained that is an adjusted version of the base model, and in which model interpretation can be performed more easily.

[0062] Next, the hardware configuration of the information processing device of the embodiment will be described using Figure 5. Figure 5 is an explanatory diagram showing an example of the hardware configuration of the information processing device of the embodiment.

[0063] The information processing device of this embodiment includes a control device such as a CPU (Central Processing Unit) 51, a storage device such as a ROM (Read Only Memory) 52 and a RAM (Random Access Memory) 53, a communication interface 54 that connects to a network for communication, and a bus 61 that connects each part.

[0064] The program to be executed in the information processing device of this embodiment is provided pre-installed in a ROM 52 or the like.

[0065] The program executed by the information processing device of this embodiment may be configured to be provided as a computer program product by recording it in an installable or executable file format onto a computer-readable recording medium such as a CD-ROM (Compact Disk Read Only Memory), a flexible disk (FD), a CD-R (Compact Disk Recordable), or a DVD (Digital Versatile Disk).

[0066] Furthermore, the program executed by the information processing device of the embodiment may be stored on a computer connected to a network such as the Internet and provided by downloading it via the network. Alternatively, the program executed by the information processing device of the embodiment may be provided or distributed via a network such as the Internet.

[0067] The program executed in the information processing device of this embodiment can cause the computer to function as a component of the information processing device described above. This computer can read the program from a computer-readable storage medium onto the main memory and execute it using the CPU 51.

[0068] While several embodiments of the present invention have been described, these embodiments are presented as examples only and are not intended to limit the scope of the invention. These novel embodiments can be carried out in a variety of other forms, and various omissions, substitutions, and modifications can be made without departing from the spirit of the invention. These embodiments and their variations are included in the scope and spirit of the invention, as well as in the claims of the invention and its equivalents. [Explanation of Symbols]

[0069] 100 Information Processing Devices 101 Acquisition Department 102 Generation part 103 Score Calculation Unit 104 Selection Section 105 Feature Calculation Unit 106 Loss calculation section 107 Update Department 108 Reasoning section 109 Output Control Unit 121 Storage section

Claims

1. On the computer, A generation step to generate a second model whose parameters include a first weight matrix, which is the parameter of the first model, and a second weight matrix, which is the same size as the first weight matrix and includes a block weight matrix containing multiple blocks. A score calculation step that calculates multiple scores representing the degree of association between the input data used for training the second model and each of the multiple blocks, A selection step of selecting K blocks (where K is an integer of 2 or more) from a plurality of blocks using a plurality of scores, A feature calculation step involves inputting the aforementioned input data into the second model and calculating a feature that is the output of the second model using the first weight matrix and the selected block-corresponding parameters from the second weight matrix. An update step to update the parameters corresponding to the selected blocks in the second weight matrix so as to minimize the value of the loss function based on the aforementioned features, A program to execute.

2. To the aforementioned computer, Output control step that outputs multiple scores calculated for each of the multiple blocks. Further execution The program according to claim 1.

3. The loss function includes a coefficient that adjusts at least one of the positions and scores of the K blocks relative to the second model. The program according to claim 1.

4. The loss function includes a loss function that outputs a larger value the more overlap there is in the blocks selected for multiple input data from different domains. The program according to claim 1.

5. The loss function includes a loss function that outputs a larger value the greater the difference between a block specified for a particular domain and the selected block. The program according to claim 1.

6. The multiple blocks are all the same size. The program according to claim 1.

7. The first model described above is a model constructed using training data that is independent of a specific domain. The second model is a model that is adapted to the specific domain, The input data is data from the specific domain. The program according to claim 1.

8. A generation unit generates a second model whose parameters include a first weight matrix, which is the parameter of the first model, and a second weight matrix, which is the same size as the first weight matrix and includes a block weight matrix containing multiple blocks. A score calculation unit calculates a number of scores representing the degree of association between the input data used for training the second model and each of the multiple blocks, A selection unit that selects K blocks (where K is an integer of 2 or more) from a plurality of blocks using a plurality of scores, A feature calculation unit inputs the aforementioned input data into the second model and calculates a feature quantity which is the output of the second model using the first weight matrix and the selected block-corresponding parameters from the second weight matrix. An update unit updates the parameters corresponding to the selected blocks in the second weight matrix so as to minimize the value of the loss function based on the aforementioned features, An information processing device equipped with the following features.

9. An information processing method performed by an information processing device, A generation step to generate a second model whose parameters include a first weight matrix, which is the parameter of the first model, and a second weight matrix, which is the same size as the first weight matrix and includes a block weight matrix containing multiple blocks. A score calculation step that calculates multiple scores representing the degree of association between the input data used for training the second model and each of the multiple blocks, A selection step of selecting K blocks (where K is an integer of 2 or more) from a plurality of blocks using a plurality of scores, A feature calculation step involves inputting the aforementioned input data into the second model and calculating a feature that is the output of the second model using the first weight matrix and the selected block-corresponding parameters from the second weight matrix. An update step to update the parameters corresponding to the selected blocks in the second weight matrix so as to minimize the value of the loss function based on the aforementioned features, Information processing methods including