Device and computer implemented method for adapting, in particular, pretrained model to task
The method efficiently adapts pre-trained models by learning vectors with unit length and using cross product transformations to adjust weights, addressing inefficiencies and weight overwriting issues, enabling effective task adaptation for digital images, audio, and virtual sensor data.
Patent Information
- Application Number
- JP2025040746
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-03-14
- Filing Date
- 2025-03-13
- Publication Date
- 2025-09-29
AI Technical Summary
Existing methods for adapting pre-trained models to specific tasks are inefficient in terms of computational resources and risk catastrophic overwriting of weights, particularly in tasks involving digital images, audio, or virtual sensor data.
A method and apparatus that adapt pre-trained models by learning vectors with unit length and using transformations based on cross products of these vectors and their transposes, such as hyperplane reflections or interactions, to efficiently adjust weights while minimizing the risk of catastrophic overwriting.
The method reduces computational resource usage and minimizes weight overwriting, enabling effective adaptation of pre-trained models for tasks like output classification, digital images, audio, or virtual sensor data.
Smart Images

Figure 2025141939000001_ABST
Abstract
Description
[Technical Field]
[0001] background In particular, the present invention relates to an apparatus and computer-implemented method for adapting a pre-trained model to a task. [Background technology]
[0002] In deep learning, models can be pre-trained for a wide variety of tasks, and then the pre-trained models can be adapted to specific tasks within the wide variety of tasks. Summary of the Invention [Problem to be solved by the invention]
[0003] Disclosure of the Invention The apparatus and the computer-implemented method efficiently adapt a particular pre-trained model to a given task, in particular to output classification, digital images, audio or video data, or virtual sensor data, depending on the model's input. [Means for solving the problem]
[0004] A method for adapting a pre-trained model to a task includes providing a pre-trained model, the pre-trained model including a layer configured to map a multidimensional input of the layer to a multidimensional output of the layer depending on weights, the vector including a subset of weights that weight each element of the multidimensional input for one dimension of the output of the layer, the method including providing training data and learning at least one vector of a transformation for adapting the subset of weights depending on the training data and the output of the model, the at least one vector having unit length and the transformation including a cross product of the at least one vector and a transpose of the at least one vector, or the at least one vector is normalized to have unit length and the transformation including a cross product of the normalized at least one vector and a transpose of the normalized at least one vector. According to one example, a transformation is determined for a layer including forward propagation y=Wx+b, where x is the input, y is the output, b is an optional bias, and W are weights transformed by the method. The transformation can be based on one vector u or multiple vectors, for example two vectors u and v. The vectors of the transformation define a hyperplane. The result of a transformation using one vector is a reflection of the weight vector on the hyperplane. The result of a transformation using two vectors is a more complex transformation involving the interaction of the two hyperplanes. Learning at least one vector is very efficient in terms of computational resources.
[0005] The transformation may comprise a single vector, and learning involves determining the output of the layer depending on the product of the transformation and the weights, i.e., the same transformation is used for multiple different subsets of the weights.
[0006] For a single vector, the transformation includes a matrix. The matrix corresponding to the transformation has a constant Frobenius distance to the identity matrix, which reduces the risk of catastrophic overwriting of the weights.
[0007] The transform can include a first vector and a second vector, and learning includes learning the first vector and the second vector, and the transform includes the difference between the cross product of the second vector and its transpose and the cross product of the first vector and its transpose, which allows for finer weight adjustment than learning a single vector.
[0008] For the first and second vectors, the transformation includes a matrix. The matrix corresponding to the transformation has a bounded Frobenius distance to the identity matrix, which reduces the risk of catastrophic overwriting of the weights.
[0009] Learning the first vector and the second vector may include determining an output of the layer depending on a result of a product of a transform and a weight, where the output of the layer depends on a product of the result and a transform including a cross product of another first vector and a transpose of the other first vector, where the other first vector has unit length or the other first vector is normalized to have unit length, and the transform includes a cross product of another second vector and a transpose of the other second vector, where the other second vector has unit length or the other second vector is normalized to have unit length. That is, the output depends on a product of another transform of a similar type to the transformation and the result.
[0010] The model may include multiple layers, and the method includes learning at least one vector for each of the multiple layers depending on the training data.
[0011] The model may be configured to determine the inputs of a layer depending on the inputs of the model and to determine the output of the model depending on the outputs of the layer, and the training data may comprise pairs of inputs of the model and ground truth for the outputs of the model, where the inputs represent or comprise sensor signals and the outputs and ground truth represent or comprise classifications of the sensor signals, or the inputs represent or comprise text and the outputs and ground truth represent or comprise digital images and / or audio signals, or the inputs represent or comprise text and semantic maps and the outputs and ground truth represent or comprise digital images, or the inputs represent or comprise at least one operating quantity of a technical system and the outputs and ground truth represent or comprise sensor signals.
[0012] The method may comprise receiving model inputs containing or representing information about the technical system, determining adapted model outputs that the adapted model outputs for the model inputs, outputting the adapted model outputs and / or operating the technical system in dependence on the adapted model.
[0013] An apparatus for adapting a pre-trained model to a task includes at least one processor and at least one memory, the at least one memory including instructions executable by the at least one processor that, when executed by the at least one processor, cause the apparatus to perform a method for adapting a pre-trained model to a task.
[0014] A computer program may include instructions that are executable by a computer and that, when executed by the computer, cause the computer to perform a method for adapting a pre-trained model to a task.
[0015] 1. A data structure, particularly a computer-implemented data structure, for adapting a pre-trained model to a task, the data structure comprising at least one data field, particularly for the pre-trained model, the pre-trained model comprising a layer configured to map a multidimensional input of the layer to a multidimensional output of the layer depending on weights, the data structure comprising at least one data field for a vector, the vector comprising a subset of weights that weight each element of the multidimensional input for one dimension of the output of the layer, the data structure comprising at least one data field for training data and at least one data field for a transformation and for at least one vector of the transformation to adapt the subset of weights, the at least one vector having unit length and the transformation comprising a cross product of the at least one vector and a transpose of the at least one vector, or the at least one vector is normalized to have unit length and the transformation comprising a cross product of the normalized at least one vector and a transpose of the normalized at least one vector.
[0016] Further embodiments can be derived from the following description and drawings. [Brief explanation of the drawings]
[0017] [Figure 1] FIG. 1 illustrates a schematic diagram of an apparatus for adapting a pre-trained model to a task. [Figure 2] FIG. 1 illustrates an embodiment of a first exemplary transformation for adapting a pre-trained model to a task. [Figure 3] FIG. 10 illustrates an embodiment of a second exemplary transformation for adapting a pre-trained model to a task. [Figure 4] FIG. 1 shows a schematic flow chart including steps of a method for adapting a pre-trained model to a task. DETAILED DESCRIPTION OF THE INVENTION
[0018] 1 schematically illustrates an apparatus 100. The apparatus 100 includes at least one processor 102 and at least one memory 104. The at least one memory 104 stores instructions. The at least one processor 102 is configured to execute the instructions.
[0019] The apparatus 100 is configured to perform a method for adapting a pre-trained model 106 to a task. The instructions, when executed by at least one processor, cause the apparatus 100 to perform the method.
[0020] In this example, at least one memory 104 stores a model 106 .
[0021] The model 106 may be configured to receive inputs that contain or represent information about the technical system 108. The model 106 may be configured to determine outputs of the model 106 for operating the technical system 108 depending on the inputs of the model 106.
[0022] The technological system 108 may be a robot, in particular a vehicle, a computer-controlled machine, in particular a manufacturing machine, a power tool, a household appliance, or a personal assistance system.
[0023] According to one example, the model 106 is a neural network configured to determine the output of the model 106 depending on the input of the model 106 .
[0024] A neural network includes at least one layer configured to determine the output of the layer depending on the input of the layer.
[0025] According to one example, the neural network includes a series of layers, including an input layer configured to receive an input of the model, and an output layer configured to output an output of the model. The neural network includes at least one layer l between the input layer and the output layer. The layer l disposed between the input layer and the output layer receives the input x of the layer and weights
number
number
[0026] According to one example, a series of n layers l arranged between the input layer and the output layer i ,i=1,···,layer l of n i The input x of this layer l i Layer l preceding x=φ(y) i-1 Output of y i is determined by the activation function φ, depending on
[0027] The inputs of the first layer l0 are the inputs of the model 106. The last layer l n The output of is the output of model 106.
[0028] According to this example, the weights W are pre-trained.
[0029] FIG. 2 illustrates a first exemplary transformation embodiment for adapting the weights W of the pre-trained model 106 to the task.
[0030] The first transformation represents the hyperplane reflection.
[0031] Figure 2 shows the hyperplane H and the weight vector
number
number
number
number
number
[0032] The matrix H corresponding to the first transformation is the identity matrix
number
[0033] According to the present example, the reflected weight r is a vector that must have length L.
[0034] The reflected weights r of the weight vector w are determined depending on the transformation: Hw=(I-2uu T )w=w-2u(u T w)
[0035] Based on the transformation H, the output y of the adapted layer is forward propagated (HW). T Depends on x+b.
[0036] FIG. 3 illustrates a second exemplary transformation embodiment for adapting a pre-trained model 106 to a task.
[0037] The second transformation includes two interacting hyperplanes, namely, the first hyperplane H1 and the second hyperplane H2. To adapt the layers, two separate transformation matrices H + and
number
[0038] 3 shows the first hyperplane H1 and the second hyperplane H2.
number
number
[0039] The output of the adapted layer, y, is
number
[0040] Transformation matrix
number
number
number
number
number
[0041] The matrix H of the second transformation + is the identity matrix
number
[0042] Transformation matrix H of column weight vector w + teeth, H + w=(I-uu T +vv T )w=wu(u T w)+v(v T w) is determined depending on
[0043] Transformation matrix
number
number
number
number
number
number
[0044] The matrix of the second transformation
number
number
[0045] row weight vector
number
number
number
[0046] These transformation matrices
number
number
number
[0047] FIG. 4 shows a schematic flow chart including the steps of a method for adapting a pre-trained model 106 to a task.
[0048] The method includes step 402 .
[0049] In step 402, a pre-trained model 106 is provided.
[0050] The pre-trained model 106 is i Including layer l i is the layer l i Multidimensional input x i , the weight W i and optional bias b i And the multidimensional output depends on:
number
[0051] Weight W i is the vector w i,j These vectors w i,j is the layer l i Output of yi,j multidimensional input x for one dimension j of i Weights W that weight each element of i contains a subset of each of
[0052] The method includes step 404 .
[0053] In step 404, training data is provided.
[0054] The training data includes pairs of inputs for the model 106 and ground truth for the outputs of the model 106. The inputs for the model 106 may include or represent information about the technical system 108. The outputs of the model 106 may be outputs for operating the technical system 108.
[0055] Training data is provided depending on the task.
[0056] In the case of a task of classifying sensor signals, the inputs may represent or include, for example, the sensor signals, and the outputs and ground truth may represent or include, for example, classifications of the sensor signals.
[0057] In the case of a task to generate content, e.g., a digital image or an audio signal, the input may represent or include, e.g., text, and the output and ground truth may represent or include, e.g., a digital image and / or an audio signal.
[0058] In the case of a task of generating digital images, the inputs may represent or include, for example, text and semantic maps, and the outputs and ground truth may represent or include digital images.
[0059] In the case of a virtual sensing task, the inputs may for example represent or include at least one operating quantity of the technical system 108, and the outputs and ground truth may represent or include sensor signals.
[0060] The method includes step 406 .
[0061] In step 406, depending on the training data, at least one layer l i A transformation for is learned.
[0062] That is, at least one vector of the transformation is learned.
[0063] According to one example, in the case of the first transformation, layer l i Transformation for H i Vector u of i is learned. That is, the transformation is i Learning involves the transformation H i and layer l i Weight W i and bias b i Depending on the product of i Output of y i This involves determining the vector u i has unit length, and the transformation H i is the vector u i and the vector u i Transpose of
number
number
[0064] According to one example, in the case of the second transformation, layer l i Conversion for
number
number
number
[0065] That is, the second transformation is the transformation
number
number
number
number
number
number
number
number
number
[0066] Conversion H i The first vector u i has unit length, and the transformation H i is the first vector u i and the first vector u i Transpose of
number
number
number
number
number
number
number
number
[0067] conversion
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
[0068] The method involves the step of forming a single layer of model 106. i Transformation for each layer l among multiple layers i This may include learning a transformation for
[0069] That is, for the first transformation, the method relies on the training data to generate a single layer l i a single vector u for i or each layer l ifor each single vector u i This may include learning:
[0070] That is, in the case of the second transformation, the method relies on the training data to generate a single layer l i The first vector u for i and a second vector v i and the first vector
number
number
number
number
[0071] Learning is a layer i or multiple layers i , we find a vector u that minimizes a loss that depends on the difference between the output of the model 106 and the ground truth. i or determining the first vector u i and a second vector v i or determining the first vector
number
number
[0072] The method includes step 408 .
[0073] In step 408, input of the model 106 is received, which includes or represents information about the task.
[0074] According to one example, the input includes or represents information about the technical system 108 .
[0075] The method includes step 410 .
[0076] In step 410, the outputs of the adapted model 106 that the adapted model 106 outputs in response to the inputs received by the adapted model 106 are determined.
[0077] According to one example, the output includes or represents an output for operating the technical system 108 .
[0078] The method includes step 412 .
[0079] In step 412, the output of the fitted model 106 is output.
[0080] According to one example, the output is for operating a technical system 108 depending on the output of the adapted model 106 .
[0081] The method may include step 414 .
[0082] In step 414, the technical system 108 is operated depending on the output of the fitted model 106.
[0083] For example, the technical system 108 is a robot, in particular a vehicle. For example, the input is a digital image containing objects representing, for example, road users or infrastructure.
[0084] For example, the output may be a classification of the object, and the robot may be operated to move along a trajectory determined depending on the classification of the object, for example to avoid the object or to run over the object.
[0085] For example, the technological system 108 is a computer-controlled machine. The computer-controlled machine may be operated to manufacture a workpiece depending on the output of the model 106. The computer-controlled machine may include a human-machine interface or a machine-to-machine interface. The computer-controlled machine may be operated to receive input via the interface and / or to output output of the model 106 via the interface.
[0086] In this example,
number
number
[0087] The trainable vectors in this example have unit length. The trainable vectors do not necessarily have to have unit length. The trainable vectors may be vectors of a different length than unit length that have been normalized or scaled to have unit length. That is, at least one vector may be normalized to have unit length, and the transformation based on the at least one vector includes a cross product of the normalized at least one vector and the transpose of the normalized at least one vector.
Claims
1. A method for adapting a particular pre-trained model (106) to a task, comprising: The method includes providing (402) the specifically pre-trained model (106); the specifically pre-trained model (106) includes a layer configured to map a multidimensional input of the layer to a multidimensional output of the layer depending on weights; a vector containing a subset of weights that weight each element of the multidimensional input for one dimension of the output of the layer; The method comprises: providing training data (404); and learning (406) at least one vector of transformations for adapting the subset of weights depending on the training data and the output of the model (106); the at least one vector has unit length and the transformation comprises a cross product of the at least one vector and a transpose of the at least one vector; or the at least one vector is normalized to have unit length, and the transformation comprises a cross product of the normalized at least one vector and a transpose of the normalized at least one vector. A method characterized by:
2. the transformation comprises a single vector, The learning (406) includes determining the output of the layer depending on a product of the transformation and the weight. The method of claim 1.
3. the transformation includes a first vector and a second vector; the learning (406) includes learning the first vector and the second vector; the transformation comprises the difference between the cross product of the second vector and the transpose of the second vector and the cross product of the first vector and the transpose of the first vector. The method of claim 1.
4. learning the first vector and the second vector includes determining the output of the layer depending on a result of a product of the transformation and the weight; the output of the layer depends on a product of the result with a transformation that includes a cross product of another first vector and a transpose of the other first vector; the other first vector has unit length or the other first vector is normalized to have unit length; the transformation comprises a cross product of another second vector and a transpose of the other second vector; the other second vector has unit length, or the other second vector is normalized to have unit length; The method of claim 3.
5. The model (106) includes a plurality of layers; The method includes learning (406) at least one vector for each layer of the plurality of layers depending on the training data.
5. The method according to any one of claims 1 to 4.
6. the model (106) is configured to determine the input of the layer depending on the input of the model (106) and to determine the output of the model (106) depending on the output of the layer; the training data includes pairs of inputs for the model and ground truth for outputs of the model; the input represents or includes a sensor signal, and the output and the ground truth represents or includes a classification of the sensor signal; or the input represents or comprises text and the output and the ground truth represents or comprises digital images and / or audio signals, or the input represents or includes text and semantic maps, and the output and the ground truth represents or includes digital images, or - the input represents or comprises at least one operating quantity of a technical system, and the output and the ground truth represent or comprise sensor signals; 6. The method according to any one of claims 1 to 5.
7. The method comprises: receiving (408) an input of said model (106) containing or representing information about a technical system (108); determining (410) outputs of the fitted model (106) for the inputs of the fitted model (106); outputting (412) the output of the adapted model (106) and / or operating (414) the technical system (108) depending on the output of the adapted model (106); 7. The method of claim 1, comprising:
8. An apparatus (100) for adapting a particular pre-trained model to a task, comprising: The device (100) comprises at least one processor (102) and at least one memory (104); the at least one memory (104) includes instructions; The instructions are executable by the at least one processor (102) and, when executed by the at least one processor (102), cause the apparatus (100) to perform the method of any one of claims 1 to 7.
1. An apparatus (100) comprising:
9. A computer program comprising: The computer program includes instructions: The instructions are computer executable and, when executed by the computer, cause the computer to perform the method of any one of claims 1 to 7. A computer program characterized by:
10. A data structure, in particular a computer-implemented data structure, in particular for adapting a pre-trained model (106) to a task, comprising: the data structure includes at least one data field specifically for the pre-trained model (106); the specifically pre-trained model (106) includes a layer configured to map a multidimensional input of the layer to a multidimensional output of the layer depending on weights; the data structure includes at least one data field for a vector, the vector including a subset of weights that weight each element of the multidimensional input for one dimension of the output of the layer; the data structure includes at least one data field for training data, at least one data field for a transformation for adapting the subset of weights and for at least one vector of the transformation; the at least one vector has unit length and the transformation comprises a cross product of the at least one vector and a transpose of the at least one vector; or the at least one vector is normalized to have unit length, and the transformation comprises a cross product of the normalized at least one vector and a transpose of the normalized at least one vector.
1. A data structure comprising: