Apparatus and computer-implemented method for adapting particular pre-trained model to task

By configuring the layers of a specific pre-trained model and utilizing the vector transformation method, the problems of imprecise weight adjustment and catastrophic coverage in existing technologies are solved, efficient and precise model adaptation is achieved, and the accuracy and efficiency of task adaptation are improved.

CN120706487APending Publication Date: 2025-09-26ROBERT BOSCH GMBH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510289378.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-03-14
Filing Date
2025-03-12
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

Existing technologies make it difficult to efficiently adapt specific pre-trained models to specific tasks, especially for tasks with input and output categories, and there is a risk of imprecise weight adjustment and catastrophic coverage.

Method used

By configuring the layers of a specific pre-trained model and using vector transformation methods, including learning the outer product of a unit-length vector or a normalized vector and its transpose, we can adapt the weights, reduce the risk of weight coverage, and achieve fine-tuning.

Benefits of technology

It achieves efficient weight adjustment in computing resources, reduces the risk of catastrophic coverage, and improves the accuracy and efficiency of the model in task adaptation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120706487A_ABST
    Figure CN120706487A_ABST
Patent Text Reader

Abstract

A method for adapting a particular pre-training model (106) to a task, where the method comprises providing the particular pre-training model (106), where the particular pre-training model (106) comprises a layer configured to map a multi-dimensional input of the layer to a multi-dimensional output of the layer depending on a weight, where a vector comprises a subset of the weight, where the subset of the weight is a subset of the weight. The subset weighs elements of the multi-dimensional input for dimensions of the output of the layer, where the method comprises: providing training data, and learning at least one vector for adapting transformations of the subset of weights depending on the training data and the output of the model (106), where the at least one vector has a unit length, the at least one vector is normalized to have a unit length, and the transform comprises an outer product of the at least one vector and a transpose of the at least one vector, or wherein the at least one vector is normalized to have a unit length, and the transform comprises an outer product of the normalized at least one vector and a transpose of the normalized at least one vector.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0001] The present invention relates to an apparatus and a computer-implemented method for adapting a specific pre-trained model to a task.

[0002] In deep learning, models can be pre-trained for various tasks. The pre-trained models can then be adapted to specific tasks in the various tasks. Summary of the Invention

[0003] Apparatus and computer-implemented methods efficiently adapt a particular pre-trained model to a task, particularly a task that outputs a category, digital image, audio data, video data, or virtual sensor data depending on the model's input.

[0004] A method for adapting a specific pre-trained model to a task comprises providing a specific pre-trained model, wherein the specific pre-trained model comprises a layer configured to map a multidimensional input of the layer to a multidimensional output of the layer depending on weights, wherein a vector comprises a subset of weights that weights the elements of the multidimensional input relative to the dimensions of the output of the layer, wherein the method comprises: providing training data and at least one vector of a transformation for learning a transformation for adapting the subset of weights depending on the training data and the output of the model, wherein the at least one vector has unit length and the transformation comprises the outer product of the at least one vector with the transpose of the at least one vector, or wherein the at least one vector is normalized to have unit length and the transformation comprises the outer product of the normalized at least one vector with the transpose of the normalized at least one vector. According to an example, the transformation is determined for a layer comprising a forward propagation y=Wx+b, wherein x is the input, y is the output, b is an optional bias, and W is the weight to be transformed by the method. The transformation can be based on a vector u or multiple vectors, for example based on two vectors u and v. The vectors of the transformation define a hyperplane. The result of this transformation using one vector is a reflection of the weight vector with respect to the hyperplane. The result of this transformation using two vectors is a more complex transformation involving the interaction of the two hyperplanes. Learning the at least one vector is very efficient in terms of computational resources.

[0005] The transformation may comprise a single vector, wherein the learning comprises determining the output of the layer as a function of the product of the transformation and the weights. This means that the same transformation is used for different subsets of weights.

[0006] For a single vector, the transformation consists of a matrix. The matrix corresponding to the transformation has a constant Frobenius distance to the identity matrix. This reduces the risk of catastrophic overwriting of weights.

[0007] The transformation may include a first vector and a second vector, wherein the learning includes learning the first vector and the second vector, wherein the transformation includes a difference between an outer product of the second vector and a transpose of the second vector and an outer product of the first vector and a transpose of the first vector. This enables more refined weight adjustments than learning a single vector.

[0008] For the first vector and the second vector, the transformation includes a matrix. The matrix corresponding to the transformation has a bounded Frobenius distance to the identity matrix. This reduces the risk of catastrophic coverage of 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 the transformation and a weight, wherein the output of the layer depends on a product of the result and a transformation, the transformation comprising an outer product of another first vector and a transpose of the another first vector, wherein the another first vector has unit length, or wherein the another first vector is normalized to have unit length, and the transformation comprising an outer product of a second another vector and a transpose of the another second vector, wherein the another second vector has unit length, or wherein the another second vector is normalized to have unit length. This means that the output depends on the product of the result and another transformation, the another transformation being of the same type as the transformation.

[0010] The model may comprise a plurality of layers, wherein the method comprises learning a respective at least one vector for a respective layer of the plurality of layers depending on the training data.

[0011] The model can be configured to determine the input of a layer depending on the input of the model, and to determine the output of the model depending on the output of the layer, wherein the training data includes pairs of the input of the model and the reference truth value for the output of the model, wherein the input represents or includes a sensor signal, and wherein the output and the reference truth value represent or include the category of the sensor signal, or wherein the input represents or includes text, and the output and the reference truth value represent or include a digital image and / or an audio signal, or wherein the input represents or includes text and a semantic graph, and the output and the reference truth value represent or include a digital image, or wherein the input represents or includes at least one operation quantity of a technical system, and the output and the reference truth value represent or include a sensor signal.

[0012] The method may comprise receiving an input of a model comprising or representing information about a technical system, determining an output of an adapted model which the adapted model outputs with respect to the input of the model, and outputting the output of the adapted model and / or operating the technical system depending on the output of the adapted model.

[0013] An apparatus for adapting a pre-trained model to a task comprises at least one processor and at least one memory, wherein the at least one memory comprises instructions executable by the at least one processor, and when executed by the at least one processor, the instructions cause the apparatus to perform a method for adapting a pre-trained model to a task.

[0014] The computer program may include instructions executable by a computer, and when executed by the computer, the instructions cause the computer to perform a method for adapting a pre-trained model to a task.

[0015] A data structure, in particular a computer-implemented data structure, for adapting a specific pre-trained model to a task, wherein the data structure comprises at least one data field for the specific pre-trained model, wherein the specific pre-trained model comprises a layer, which is configured to map a multidimensional input of the layer to a multidimensional output of the layer depending on a weight, wherein the data structure comprises at least one data field for a vector, the vector comprising a subset of weights, the subset weighting the elements of the multidimensional input with respect to the dimensions of the output of the layer, wherein the data structure comprises at least one data field for training data, and at least one data field for a transformation and at least one vector for the transformation, the transformation being used to adapt the subset of weights, wherein the at least one vector has unit length and the transformation comprises the outer product of the at least one vector and the transpose of the at least one vector, or wherein the at least one vector is normalized to have unit length and the transformation comprises the outer product of the normalized at least one vector and the transpose of the normalized at least one vector. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Further embodiments are apparent from the following description and the accompanying drawings. In the drawings,

[0017] Figure 1 Schematically depicting an apparatus for adapting a pre-trained model to a task,

[0018] Figure 2 Describes aspects of a first exemplary transformation for adapting a pre-trained model to a task,

[0019] Figure 3 depicts aspects of a second exemplary transformation for adapting a pre-trained model to a task,

[0020] Figure 4 A flow chart comprising the steps of a method for adapting a pre-trained model to a task is schematically depicted. DETAILED DESCRIPTION

[0021] Figure 1The device 100 is schematically depicted. The device 100 comprises 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 instructions.

[0022] The device 100 is configured to perform a method for adapting the pre-trained model 106 to a task. When executed by at least one processor, the instructions cause the device 100 to perform the method.

[0023] In this example, at least one memory 104 stores a model 106 .

[0024] Model 106 may be configured to receive inputs that include or represent information about technical system 108. Model 106 may be configured to determine outputs of model 106 for operating technical system 108 depending on the inputs to model 106.

[0025] The technical system 108 may be a robot, in particular a vehicle. The technical system 108 may be a computer-controlled machine, in particular a manufacturing machine, a power tool, a household appliance or a personal assistance system.

[0026] According to an example, the model 106 is a neural network configured to determine an output of the model 106 depending on an input to the model 106 .

[0027] A neural network includes at least one layer configured to determine an output of the layer depending on an input to the layer.

[0028] According to an example, a neural network includes a series of layers. The series of layers includes an input layer configured to receive an input of a model. The series of layers includes an output layer configured to output an output of the model. The neural network includes at least one layer I between the input layer and the output layer. The layer I arranged between the input layer and the output layer is configured to depend on the input x of the layer, the weights and optional bias To determine the output y of the layer:

[0029] y=W T x+b

[0030] According to the example, depending on layer l i Previous layer l i-1 The output y i , layer l in a series of n layers arranged between the input layer and the output layer i , the input x of i=1,...,n is determined by the activation function φ, and for multiple layers, x=φ(y).

[0031] The input of the first layer l0 is the input of model 106. The last layer l n The output of is the output of model 106.

[0032] According to this example, the weights W are pre-trained.

[0033] Figure 2 Aspects of a first exemplary transformation for adapting the weights W of the pre-trained model 106 to a task are depicted.

[0034] The first transformation represents a hyperplane reflection.

[0035] Figure 2 Depicts the hyperplane H and the weight vector The weight vector w is a vector of length L. The weight vector w includes the weights from weight W for the multidimensional input with respect to a single dimension of the output y. The reflection weight r is weighted by the transformation matrix To obtain:

[0036] H=I-2uu T

[0037] in is a learnable hyperplane unit normal vector and uu T is the vector u and the transpose u of vector u T This means that the vector u has unit length, i.e., the d elements u of the vector u i The sum of the squares of is 1:

[0038] The matrix H corresponding to the first transformation has a relative The constant Frobenius distance.

[0039] According to this example, the reflection weight r is a vector that must maintain a length L.

[0040] The reflection weight r of the weight vector w is determined by the following transformation:

[0041] Hw=(I-2uu T )w=w-2u(u T w)

[0042] Based on the transformation H, the output y of the adapted layer depends on the forward propagation (HW) T x+b.

[0043] Figure 3 Aspects of a second exemplary transformation for adapting the pre-trained model 106 to a task are depicted.

[0044] The second transformation involves two interacting hyperplanes: the first hyperplane H1 and the second hyperplane H2. To adapt the layer, two completely different transformation matrices H for the second transformation are learned.+ and

[0045] Figure 3 A first hyperplane H1 and a second hyperplane H2 are depicted. Figure 3 describes the transformation, which involves the weight vector The interaction of the first hyperplane H1 and the second hyperplane H2. Figure 3 The resulting transformation weight r is depicted. The resulting transformation weight r does not need to maintain the length L. Figure 3 Depicts an example where the length of the resulting transformation weight r is not equal to the length L. The weight vector w includes the weights from weight W for a single dimension of the output y for the multidimensional input The elements are weighted.

[0046] The output y of the adapted layer depends on the forward propagation

[0047] Transformation Matrix Obtained as follows:

[0048] H + =I-uu T +vv T

[0049] in is the first learnable hyperplane unit normal vector associated with the first hyperplane H1, where is the second learnable hyperplane unit normal vector associated with the second hyperplane H2, where uu T is the first vector u and the transpose u of the first vector u T The outer product of , and where vv T is the second vector v and the transpose v of the second vector v T The first vector u has unit length, i.e., the d elements u of vector u i The sum of the squares of is 1: The second vector v has unit length, i.e., the d elements v of vector v i The sum of the squares of is 1:

[0050] The second transformation matrix H + With respect to the identity matrix The bounded Frobenius distance of .

[0051] The transformation matrix H of the column weight vector w + It is determined by the following formula:

[0052] H + w=(I-uu T +vv T)w=wu(u T w)+v(v T w)

[0053] Transformation Matrix Correspondingly, it is obtained as follows:

[0054]

[0055] in is the first learnable vector and Is the second vector that can be learned. The first vector The second vector has unit length. Has unit length.

[0056] The matrix of the second transformation With respect to the identity matrix The bounded Frobenius distance of .

[0057] Row weight vector The transformation matrix It is determined by the following formula:

[0058]

[0059] The transformation matrix H is learned using the method for adapting the pre-trained model 106 + 、 This means that, learning the corresponding first vector u, and the corresponding second vector v,

[0060] Figure 4 A flow chart is schematically depicted, which comprises the steps of a method for adapting a pre-trained model 106 to a task.

[0061] The method includes step 402 .

[0062] In step 402 , a pre-trained model 106 is provided.

[0063] The pre-trained model 106 includes layer 1 i . Layer l i is configured to depend on the weight W i and optional bias b i And the layer l i Multidimensional input x i Mapping to multidimensional output:

[0064]

[0065] Weight W i Including vector w i,j , vector wi,j Including weight W i The corresponding subset of i The output y i,j The dimension j of multidimensional input x i The elements are weighted.

[0066] The method includes step 404 .

[0067] In step 404, training data is provided.

[0068] The training data includes pairs of inputs to model 106 and ground truth values ​​for outputs of model 106. The inputs to model 106 may include or represent information about technical system 108. The outputs of model 106 may be outputs used to operate technical system 108.

[0069] Provide training data based on the task.

[0070] For the task of classifying a sensor signal, the input represents or includes, for example, the sensor signal, and the output and the ground truth represent or include, for example, the class of the sensor signal.

[0071] For tasks of generating content (eg, digital images or audio signals), the input, for example, represents or comprises text, and the output and ground truth, for example, represent or comprise digital images and / or audio signals.

[0072] For the task of generating a digital image, the input, for example, represents or includes text and a semantic graph, and the output and the ground truth represent or include a digital image.

[0073] For a virtual sensing task, the input represents or includes, for example, at least one operating variable of the technical system 108 , and the output and the reference truth value represent or include a sensor signal.

[0074] The method includes step 406 .

[0075] In step 406, the learning of the at least one layer l is performed depending on the training data. i transformation.

[0076] This means that at least one vector of the transformation is learned.

[0077] According to the example, for the first transformation, the learning i Transformation H i The vector u i This means that the transformation consists of a single vector u i , and the learning consists in depending on the transformation H i With layer l i The weight W i The product of and bias bi To determine the layer l i The output y i . Vector u i has unit length, and the transformation H i Including vector u i With vector u i Transpose The outer product

[0078] y i =(H i -W i ) T x+b i

[0079] According to the example, for the second transformation, the learning i Transformation The vector u i , v i and transformation Vector

[0080] This means that the second transformation consists of transforming The first vector u i and the second vector v i and transformation The first vector and the second vector This means that the learning involves a bias that depends on the optional i and transformation With weight W i The result of the product of To determine the layer l i The output y i , where layer l i The output y i Depends on the results and transformation The product of:

[0081]

[0082] Transform H i The first vector u i has unit length, and the transformation H i Including the first vector u i With the first vector u i Transpose The outer product Transform H i The second vector v i has unit length, and the transformation H i Including the second vector vi With the second vector v i Transpose The outer product According to this example, transform H i Including the second vector v i With the second vector v i Transpose The outer product and the first vector u i With the first vector u i Transpose The outer product The difference between.

[0083] Transform The first vector has unit length, and the transformation Including the first vector With the first vector Transpose The outer product Transform The second vector has unit length, and the transformation Including the second vector With the second vector Transpose The outer product According to this example, the transformation Including the second vector With the second vector Transpose The outer product and the first vector With the first vector Transpose The outer product The difference between.

[0084] The method may include learning a single layer l for the model 106 i Or for the corresponding layer l in multiple layers i transformation.

[0085] This means that, for the first transformation, the method may comprise learning for a single layer l i A single vector u i , or learn for the corresponding layer l i The corresponding single vector u i .

[0086] This means that, for the second transformation, the method may comprise learning for a single layer l i The first vector u i and the second vector vi and the first vector and the second vector Or learn for the corresponding layer l i The corresponding first vector u i and the corresponding second vector v i and the corresponding first vector and the corresponding second vector

[0087] Learning can include targeting one or more layers l i And determine the vector u i Or determine the first vector u i and the second vector v i Or determine the first vector and the second vector It minimizes the loss that depends on the difference between the output of the model 106 and the ground truth.

[0088] The method includes step 408 .

[0089] In step 408 , input to the model 106 is received that includes or represents information about the task.

[0090] According to an example, the input includes or represents information about the technical system 108 .

[0091] The method includes step 410 .

[0092] In step 410 , the output of the adapted model 106 , which the adapted model 106 outputs for the received input to the model 106 , is determined.

[0093] According to an example, the output includes or represents an output for operating technical system 108 .

[0094] The method includes step 412 .

[0095] In step 412 , the output of the adapted model 106 is output.

[0096] According to an example, the output is output to operate the technical system 108 depending on the output of the adapted model 106 .

[0097] The method may include step 414 .

[0098] In step 414 , the technical system 108 is operated depending on the output of the adapted model 106 .

[0099] For example, the technical system 108 is a robot, in particular a vehicle. For example, the input is a digital image, for example including objects representing traffic participants or infrastructure.

[0100] For example, the output is the class of the object. The robot can be operated so that the robot moves on a trajectory (the trajectory being determined depending on the class of the object), for example, to avoid the object or to drive past the object.

[0101] For example, technical system 108 is a computer-controlled machine. Depending on the output of model 106, the computer-controlled machine can be operated to produce a workpiece. The computer-controlled machine can include a human-machine interface or a machine-to-machine interface. The computer-controlled machine can be operated to receive input via the interface and / or output output of model 106 via the interface.

[0102] In the example, u i , v i , Is a learnable vector. It is not required that the vector u i , v i , All are learnable vectors.

[0103] The learnable vectors in the example have unit length. It is not required that the learnable vectors have unit length. Compared to vectors with unit length (which are normalized or scaled to have unit length), the learnable vectors can be vectors with different lengths. This means that at least one vector can be normalized to have unit length, and the transformation based on the at least one vector includes the outer 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 specific pre-trained model (106) to a task, characterized in that The method comprises providing (402) the specific pre-trained model (106), wherein the specific pre-trained model (106) comprises a layer, the layer being configured to map a multi-dimensional input of the layer to a multi-dimensional output of the layer depending on weights, wherein a vector comprises a subset of the weights, the subset weighting the elements of the multi-dimensional input with respect to the dimensions of the output of the layer, wherein the method comprises providing (404) training data, and learning (406) at least one vector of a transformation for adapting the subset of weights depending on the training data and the output of the model (106), wherein the at least one vector has unit length and the transformation comprises the outer product of the at least one vector and the transpose of the at least one vector, or wherein the at least one vector is normalized to have unit length and the transformation comprises the outer product of the normalized at least one vector and the transpose of the normalized at least one vector.

2. The method according to claim 1, characterized in that The transformation comprises a single vector, wherein the learning (406) comprises determining the output of the layer as a function of a product of the transformation and the weights.

3. The method according to claim 1, characterized in that The transformation includes a first vector and a second vector, wherein the learning (406) includes learning the first vector and the second vector, wherein the transformation includes a difference between an outer product of the second vector and a transpose of the second vector and an outer product of the first vector and the transpose of the first vector.

4. The method according to claim 3, characterized in that Learning the first vector and the second vector comprises determining the output of the layer depending on a result of the product of the transformation and the weight, wherein the output of the layer depends on the product of the result and the transformation, the transformation comprising the outer product of another first vector and the transpose of the another first vector, wherein the another first vector has unit length, or wherein the another first vector is normalized to have unit length, and the transformation comprising the outer product of another second vector and the transpose of the another second vector, wherein the another second vector has unit length, or wherein the another second vector is normalized to have unit length.

5. The method according to claim 1, wherein The model (106) comprises a plurality of layers, wherein the method comprises learning (406) for a respective layer of the plurality of layers a respective at least one vector depending on the training data.

6. The method according to claim 1, wherein 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, wherein the training data comprises pairs of inputs to the model and ground truth values ​​for the outputs of the model, wherein the input represents or includes a sensor signal, and wherein the output and the ground truth value represent or include a category of the sensor signal, or wherein the input represents or includes text, and the output and the ground truth value represent or include a digital image and / or an audio signal, or wherein the input represents or includes text and a semantic graph, and the output and the ground truth value represent or include a digital image, or wherein the input represents or includes at least one operational quantity of a technical system, and the output and the ground truth value represent or include a sensor signal.

7. The method according to any one of the preceding claims, wherein the method comprises: An input to the model (106) comprising or representing information about a technical system (108) is received (408), an output of an adapted model (106) is determined (410), the adapted model (106) outputting the output in response to the input to the model (106), and the output of the adapted model (106) is output (412) and / or the technical system (108) is operated (414) depending on the output of the adapted model (106).

8. A device (100) for adapting a specific pre-trained model to a task, characterized in that The device (100) comprises at least one processor (102) and at least one memory (104), wherein the at least one memory (104) comprises instructions executable by the at least one processor (102) and which, when executed by the at least one processor (102), cause the device (100) to perform the method according to one of the preceding claims.

9. A computer program, characterized in that The computer program comprises instructions executable by a computer and, when executed by the computer, the instructions cause the computer to perform the method according to one of claims 1 to 7.

10. A data structure, in particular a computer-implemented data structure, for adapting a specific pre-trained model (106) to a task, characterized in that The data structure comprises at least one data field for the specific pre-trained model (106), wherein the specific pre-trained model (106) comprises a layer, the layer being configured to map a multi-dimensional input of the layer to a multi-dimensional output of the layer depending on a weight, wherein the data structure comprises at least one data field for a vector, the vector comprising a subset of the weights, the subset weighting elements of the multi-dimensional input with respect to a dimension of the output of the layer, wherein the data structure comprises at least one data field for training data, and at least one data field for a transformation and at least one vector for the transformation, the transformation being used to adapt the subset of weights, wherein the at least one vector has unit length and the transformation comprises the outer product of the at least one vector and the transpose of the at least one vector, or wherein the at least one vector is normalized to have unit length and the transformation comprises the outer product of the normalized at least one vector and the transpose of the normalized at least one vector.