US-12626184-B2 - Electronic device for updating artificial intelligence model and operating method thereof
Abstract
Provided is a method, performed by an electronic device, of updating a pre-trained artificial intelligence (AI) model may include obtaining a sum, of at least two first factor values to which at least two second factor values are respectively applied, as a quantized value of a first weight value from among a plurality of weight values included in the pre-trained AI model; obtaining training data for updating the pre-trained AI model; updating the pre-trained AI model based on the the training data.
Inventors
- Dongsoo Lee
Assignees
- SAMSUNG ELECTRONICS CO., LTD.
Dates
- Publication Date
- 20260512
- Application Date
- 20211022
- Priority Date
- 20201029
Claims (5)
- 1 . A method, performed by an electronic device comprising at least one processor, the method comprising: obtaining, from an external device or memory of the electronic device, a pre-trained artificial intelligence (AI) model; obtaining, by the at least one processor comprising processing circuitry, at least two factor values and at least two sign values based on a first weight value from among a plurality of weight values included in the pre-trained AI model, wherein the at least two factor values are determined positive real numbers, and wherein the at least two sign values are determined −1 or 1; obtaining, from the external device or via an input interface of the electronic device, training data for updating the pre-trained AI model; and updating, by the at least one processor, the pre-trained AI model based on the training data by modifying the at least two factor values without changing the at least two sign values, wherein the obtaining the at least two factor values and the at least two sign values comprises: determining a first factor value among the at least two factor values based on an average value determined by using the first weight value and a second weight value from among the plurality of weight values, wherein the first factor value is determined to have a same value for the first weight value and the second weight value; determining a second factor value among the at least two first-factor values based on the average value and the first factor value; and determining the at least two sign values based on a difference between the first weight value and a value obtained by applying the at least two factor values to the at least two sign values, wherein the at least two sign values are determined independently for the first weight value and the second weight value.
- 2 . The method of claim 1 , wherein the training data comprises information obtained as a surrounding situation of the electronic device or state information of a user is continuously changed, and wherein the pre-trained AI model is repeatedly updated, based on the training data.
- 3 . An electronic device comprising: at least one processor comprising processing circuitry; and memory comprising one or more storage media storing at least one instruction that, when executed by the at least one processor individually or collectively, cause the electronic device to: obtain, from an external device or memory of the electronic device, a pre-trained artificial intelligence (AI) model; obtain at least two factor values and at least two sign values based on a first weight value from among a plurality of weight values included in the pre-trained AI model, wherein the at least two first-factor values are determined positive real numbers, and wherein the at least two sign values are determined −1 or 1, obtain, from the external device or via an input interface of the electronic device, training data for updating the pre-trained AI model, and update the pre-trained AI model based on the training data by modifying the at least two factor values without changing the at least two sign values, wherein the at least one instruction, when executed by the at least one processor individually or collectively, further cause the electronic device to: determine a first factor value among the at least two factor values based on an average value determined by using the first weight value and a second weight value from among the plurality of weight values, wherein the first factor value is determined to have a same value for the first weight value and the second weight value; determine a second factor value among the at least two factor values based on the average value and the first factor value; and determine the at least two sign values based on a difference between the first weight value and a value obtained by applying the at least two first-factor values to the at least two sign values, wherein the at least two sign values are determined independently for the first weight value and the second weight value.
- 4 . The electronic device of claim 3 , wherein the training data comprises information obtained as a surrounding situation of the electronic device or state information of a user is continuously changed, and wherein the pre-trained AI model is repeatedly updated, based on the training data.
- 5 . A non-transitory computer-readable medium storing one or more instructions that, when executed by one or more processors of an electronic device, cause the one or more processors to: obtain, from an external device or memory of the electronic device, a pre-trained artificial intelligence (AI) model; obtain at least two factor values and at least two sign values based on a first weight value from among a plurality of weight values included in the pre-trained AI model, wherein the at least two factor values are determined positive real numbers, and wherein the at least two sign values are determined −1 or 1; obtain, from the external device or via an input interface of the electronic device, training data for updating the pre-trained AI model; and update the pre-trained AI model based on the training data by modifying the at least two factor values without changing the at least two sign values, wherein the one or more instructions, when executed by the one or more processors, further cause the one or more processors to: determine a first factor value among the at least two first-factor values based on an average value determined by using the first weight value and a second weight value from among the plurality of weight values, wherein the first factor value is determined to have a same value for the first weight value and the second weight value; determine a second factor value among the at least two factor values based on the average value and the first factor value; and determine the at least two sign values based on a difference between the first weight value and a value obtained by applying the at least two factor values to the at least two sign values, wherein the at least two sign values are determined independently for the first weight value and the second weight value.
Description
CROSS-REFERENCE TO RELATED APPLICATIONS This application is a continuation application of International Application No. PCT/KR2021/013533, filed on Oct. 1, 2021, which is based on and claims priority to Korean Patent Application No. 10-2020-0142523, filed on Oct. 29, 2020, in the Korean Intellectual Property Office, the disclosures of which are incorporated by reference herein in their entireties. TECHNICAL FIELD The disclosure relates to an electronic device for updating an artificial intelligence (AI) model, based on training data, and an operating method thereof. BACKGROUND ART An AI model may be continuously updated so that an appropriate result value is output according to a change in a surrounding environment or a change in a user's state, taste, or the like. Because the AI model includes a large number of nodes, a significant amount of computation may be required to update the AI model by modifying a weight value applied to each of the nodes. However, because information about a situation in which the AI model is used, such as the surrounding environment or the user's state, taste, or the like, is continuously changing, in order to provide a service suitable for a current situation at an appropriate time by using the AI model, it is preferable to update the AI model to suit the current situation as soon as possible based on the changed information about the situation. Accordingly, in order to rapidly update the AI model, the amount of computation is considerable and thus high-performance resources should be provided, which is costly. As such, there is a demand for a method of rapidly updating an AI model which may require a significant amount of computation, even with limited resources. DESCRIPTION OF EMBODIMENTS Technical Problem To address the foregoing technical problems, the disclosure provides an electronic device for updating an AI model and an operating method thereof. Also, the disclosure provides a computer-readable recording medium having recorded thereon a program for executing the operating method on a computer. The technical problems to be solved are not limited to those described above, and other technical problems may be present. Technical Solution to Problem According to an aspect of the disclosure, a method, performed by an electronic device, of updating a pre-trained artificial intelligence (AI) model may include obtaining the pre-trained AI model; obtaining a sum, of at least two first factor values to which at least two second factor values are respectively applied, as a quantized value of a first weight value from among a plurality of weight values included in the pre-trained AI model; obtaining training data for updating the pre-trained AI model; and updating the pre-trained AI model based on the training data. Updating the pre-trained AI model may comprise modifying the first weight value based on modifying the at least two first factor values and maintaining the at least two second factor values. The at least two first factor values may be positive real numbers, and the at least two second factor values are −1 or 1. The method may include determining the at least two first factor values as a same value for the first weight value and a second weight value from among the plurality of weight values; and determining the at least two second factor values as different values for each of the first weight value and the second weight value. The method may include, based on an accuracy of the pre-trained AI model being equal to or less than a reference value, determining the pre-trained AI model as the pre-trained AI model of a first phase; and based on the accuracy greater than the reference value, determining the pre-trained AI model as the pre-trained AI model of a second phase. The method may include updating the pre-trained AI model of the second phase based on modifying the at least two first factor values, and maintaining the at least two second factor values. The method may include updating the pre-trained AI model of the first phase based on modifying the first weight value that is not quantized, or based on modifying the at least two first factor values or the at least two second factor values, based on the training data. The training data may include information obtained as a surrounding situation of the electronic device or state information of a user is continuously changed, and the pre-trained AI model may be repeatedly updated, based on the training data. According to an aspect of the disclosure, an electronic device for updating a pre-trained artificial intelligence (AI) model may include a memory configured to store the pre-trained AI model; and at least one processor configured to: obtain a sum, of at least two first factor values to which at least two second factor values are respectively applied, as a quantized value of a first weight value from among a plurality of weight values included in the pre-trained AI model, obtain training data for updating the pre-trained