Electronic device for detecting malware, operating method thereof, and recording medium

Generative replay technology maintains previous malware feature distributions by generating and selecting replay samples based on model output values, addressing catastrophic forgetting in malware classification models and improving long-term model performance.

WO2026116690A1PCT designated stage Publication Date: 2026-06-04EWHA UNIV IND COLLABORATION FOUND

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
EWHA UNIV IND COLLABORATION FOUND
Filing Date
2025-08-22
Publication Date
2026-06-04

AI Technical Summary

Technical Problem

Machine learning-based malware classification models face the issue of catastrophic forgetting, where they forget previously learned feature distributions when retraining on new malware samples, necessitating frequent retraining on large datasets.

Method used

Implementing generative replay technology to maintain previous malware feature distributions by generating synthetic samples with a generative model, selecting replay samples based on output values from discrimination and classification models to minimize differences, and using these samples to train the model on new malware.

Benefits of technology

Prevents destructive forgetting by allowing malware classification models to learn new malware while retaining previous feature distributions, enhancing model performance and accuracy over time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure KR2025012778_04062026_PF_FP_ABST
    Figure KR2025012778_04062026_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed are an electronic device for detecting malware and an operating method thereof. The operating method of the electronic device comprises the operations of: generating a preset number of synthetic samples by using a generative model in the current task; acquiring a first output value by passing the generated synthetic samples through a discriminant model up to a preset layer; acquiring a second output value by extracting the same number of training samples as the synthetic samples from a training dataset including malware and passing the extracted training samples through the discriminant model up to the preset layer; and adjusting parameters of the generative model so as to minimize the difference between the acquired first output value and the acquired second output value.
Need to check novelty before this filing date? Find Prior Art

Description

Electronic device for detecting malicious code, method of operation thereof, and recording medium

[0001] Examples of the present disclosure relate to an electronic device for detecting malicious code, a method of operating the same, and a recording medium.

[0002] Machine learning (ML) has been applied to malware detection and classification across various domains, such as Windows and Android. However, due to the rapid changes in existing malware and the emergence of new types of malware, machine learning-based classification models must frequently retrain on large datasets to remain effective. In response, machine learning-based classification models must be continuously trained using newly introduced or evolved malware samples. However, these machine learning-based classification models tend to forget the feature distributions of previously learned malware, a phenomenon known as catastrophic forgetting.

[0003] The information described above may be provided as related art for the purpose of aiding understanding of the present disclosure. No claim or determination is made as to whether any of the foregoing may be applied as prior art related to the present disclosure.

[0004] The present disclosure may provide a method and apparatus that utilize generative replay technology to prevent destructive forgetting by maintaining the feature distribution of previously learned malware while a malware classification model learns new malware samples.

[0005] In addition, the present disclosure can provide a method and apparatus to more effectively solve the destructive forgetting problem by selecting replay samples similar to training samples corresponding to actual malicious code from among synthetic samples generated by a generative model.

[0006] However, technical challenges are not limited to the technical challenges described above, and other technical challenges may exist.

[0007] An electronic device according to one embodiment includes at least one processor including a processing circuit; and a memory including one or more storage media for storing instructions, wherein when the instructions are executed individually or collectively by the at least one processor, the electronic device may generate a preset number of synthetic samples using a generative model in a current task, pass the generated synthetic samples through a preset layer of a discrimination model to obtain a first output value, extract a number of training samples equal to the synthetic samples from a training data set containing malicious code, pass them through a preset layer of the discrimination model to obtain a second output value, and adjust the parameters of the generative model so as to minimize the difference between the obtained first output value and the second output value.

[0008] The first output value of the synthetic samples and the second output value of the training samples may be the output for the layer immediately preceding the fully connected layer among the plurality of layers included in the discrimination model.

[0009] When the above commands are executed individually or collectively by the at least one processor, the electronic device may be able to select replay samples among the synthetic samples to be used to train the generative model in the subsequent task using the output of the classification model.

[0010] When the above commands are executed individually or collectively by the at least one processor, the electronic device may be able to select the replay samples among the synthetic samples based on the straight-line distance between the first softmax output value, which is the final output value for the classification model of the synthetic samples, and the second softmax output value, which is the final output value for the classification model of the training samples.

[0011] The above straight-line distance can be determined by squaring the difference between the first softmax output value and the second softmax output value, accumulating the sum, and taking the square root of the result of the accumulation.

[0012] When the above commands are executed individually or collectively by the at least one processor, the electronic device may be able to select the replay samples among the synthetic samples based on the orthogonal path distance between a first logit output value, which is an intermediate output value for the classification model of the synthetic samples, and a second logit output value, which is an intermediate output value for the classification model of the training samples.

[0013] The first log output value of the synthetic samples and the first log output value of the training samples may be the output for the layer immediately preceding the fully connected layer among the plurality of layers included in the classification model.

[0014] The above orthogonal path distance can be determined by accumulating the absolute difference between the first log output value and the second log output value.

[0015] When the above commands are executed individually or collectively by the at least one processor, the electronic device may be able to select the replay samples among the synthetic samples based on the orthogonal path distance between the average value of a first logit output value, which is an intermediate output value for the classification model of the synthetic samples, and a second logit output value, which is an intermediate output value for the classification model of the training samples.

[0016] The above orthogonal path distance can be determined by accumulating the absolute difference between the average value of the first log output value and the second log output value.

[0017] An electronic device according to one embodiment includes at least one processor including a processing circuit; and a memory including one or more storage media for storing instructions, wherein when the instructions are executed individually or collectively by the at least one processor, the electronic device generates a preset number of synthetic samples using a generative model in a current task and selects replay samples among the synthetic samples to be reused to train the generative model in an immediately following task using the output of a classification model, and the replay samples may be selected using at least one of the final output value and the intermediate output value for the classification model of the training samples extracted from the training data set containing the synthetic samples and malicious code.

[0018] A method of operation of an electronic device according to one embodiment may include: generating a preset number of synthetic samples using a generative model in a current task; passing the generated synthetic samples through a preset layer of a discrimination model to obtain a first output value; extracting a number of training samples equal to the synthetic samples from a training dataset containing malicious code and passing them through a preset layer of the discrimination model to obtain a second output value; and adjusting the parameters of the generative model so as to minimize the difference between the obtained first output value and the second output value.

[0019] The first output value of the synthetic samples and the second output value of the training samples may be the output for the layer immediately preceding the first fully connected layer among the plurality of layers included in the discrimination model.

[0020] The method may further include an operation of selecting replay samples from among the synthetic samples to be used to train the generative model in the subsequent task using the output of the classification model.

[0021] The operation of selecting the replay samples may include selecting the replay samples among the synthetic samples based on the straight-line distance between the first softmax output value, which is the final output value of the classification model of the synthetic samples, and the second softmax output value, which is the final output value of the classification model of the training samples.

[0022] The above straight-line distance can be determined by squaring the difference between the first softmax output value and the second softmax output value, accumulating the sum, and taking the square root of the result of the accumulation.

[0023] The operation of selecting the replay samples may include selecting the replay samples among the synthetic samples based on the orthogonal path distance between a first logit output value, which is an intermediate output value for the classification model of the synthetic samples, and a second logit output value, which is an intermediate output value for the classification model of the training samples.

[0024] The first log output value of the synthetic samples and the first log output value of the training samples may be the output for the layer immediately preceding the fully connected layer among the plurality of layers included in the classification model.

[0025] The operation of selecting the replay samples may include selecting the replay samples among the synthetic samples based on the orthogonal path distance between the average value of a first logit output value, which is an intermediate output value for the classification model of the synthetic samples, and a second logit output value, which is an intermediate output value for the classification model of the training samples.

[0026] According to one embodiment, instructions stored in a computer-readable recording medium can perform operations of the method of operation of the electronic device when executed by one or more processors.

[0027] According to one embodiment of the present disclosure, destructive forgetting can be prevented by utilizing generative replay technology so that a malware classification model learns new malware samples while simultaneously maintaining the feature distribution of previously learned malware.

[0028] In addition, according to one embodiment of the present disclosure, the destructive forgetting problem can be solved more effectively by selecting replay samples similar to training samples corresponding to actual malicious code among synthetic samples generated by a generative model.

[0029] In relation to the description of the drawings, the same or similar reference numerals may be used for identical or similar components.

[0030] FIG. 1 is a diagram showing the configuration of an electronic device for detecting malicious code according to one embodiment.

[0031] FIG. 2 is a diagram illustrating a malicious code classification system to which generative playback technology according to one embodiment is applied.

[0032] FIG. 3 is a flowchart illustrating a method for training a generative model included in a malicious code classification system according to one embodiment.

[0033] FIG. 4 is a diagram illustrating the structure of a discrimination model according to one embodiment.

[0034] FIG. 5 is a flowchart illustrating a method for selecting a replay sample to be reused in an immediate task among synthetic samples generated in a current task according to one embodiment.

[0035] FIG. 6 is a diagram illustrating the structure of a classification model according to one embodiment.

[0036] Specific structural or functional descriptions of the embodiments are disclosed for illustrative purposes only and may be modified and implemented in various forms. Accordingly, actual implementations are not limited to the specific embodiments disclosed, and the scope of this specification includes modifications, equivalents, or substitutions included in the technical concept described by the embodiments.

[0037] In this document, each of the following phrases may include any one of the items listed together in the corresponding phrase, or any combination of A, B, and C, or all possible combinations thereof. Terms such as "A or B," "at least one of A and B," "at least one of A, B, and C," "at least one of A, B, or C," and "a combination of one or more of A, B, and C" may be used to describe various components, but these terms should be interpreted solely for the purpose of distinguishing one component from another. For example, the first component may be named the second component, and similarly, the second component may also be named the first component.

[0038] When it is stated that a component is "connected" to another component, it should be understood that it may be directly connected to or joined to that other component, or that there may be other components in between.

[0039] The singular expression includes the plural expression unless the context clearly indicates otherwise. In this specification, terms such as "comprising" or "having" are intended to specify the existence of the described features, numbers, steps, actions, components, parts, or combinations thereof, and should be understood as not precluding the existence or addition of one or more other features, numbers, steps, actions, components, parts, or combinations thereof.

[0040] Unless otherwise defined, all terms used herein, including technical or scientific terms, have the same meaning as generally understood by those skilled in the art. Terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant technology, and should not be interpreted in an ideal or overly formal sense unless explicitly defined in this specification.

[0041]

[0042] Hereinafter, embodiments will be described in detail with reference to the attached drawings. In the description with reference to the attached drawings, identical components are given the same reference numeral regardless of the drawing number, and redundant descriptions thereof will be omitted.

[0043]

[0044] FIG. 1 is a diagram showing the configuration of an electronic device for detecting malicious code according to one embodiment.

[0045] Referring to FIG. 1, the electronic device (100) may include one or more processors (110) and a memory (120) that loads or stores a computer program (130) executed by the processors (110). The processors (110) and the memory (120) may be connected to each other via a communication link (e.g., a bus) (140). Optionally, the electronic device (100) may further include a transceiver (150), and the transceiver (150) may be used for data exchange, such as the transmission and / or reception of data between the electronic device (100) and another electronic device. The components included in the electronic device (100) of FIG. 1 are merely examples, and a person skilled in the art to which this disclosure pertains will understand that other general-purpose components may be included in addition to the components shown in FIG. 1.

[0046] ​​The processor (110) can control the overall operation of each component of the electronic device (100). The processor (110) may be implemented as a circuitry (e.g., a processing circuit) such as a system on chip (SoC) or an integrated circuit (IC). The processor (110) may include one or more processors. For example, the processor (110) may include a combination of one or more processors such as a Central Processing Unit (CPU), a Micro Processor Unit (MPU), a Micro Controller Unit (MCU), a Graphic Processing Unit (GPU), a Neural Processing Unit (NPU), a Digital Signal Processor (DSP), an Application Processor (AP), a Communication Processor (CP), or any form of processor well known in the art of the present disclosure. Additionally, the processor (110) may perform operations on at least one application or computer program (130) for executing a method / operation according to various embodiments of the present disclosure.

[0047] The memory (120) can store one or more combinations of various data, instructions, and information used by a component (e.g., processor (110)) included in the electronic device (100). The memory (120) may include volatile memory and / or nonvolatile memory.

[0048] A computer program (130) may include one or more actions in which methods / actions according to various embodiments of the present disclosure are implemented, and may be stored in memory (120) in the form of software. Here, the actions may correspond to instructions implemented in the program (130). For example, the program (130) may include instructions to perform actions such as generating a preset number of synthetic samples using a generative model in a current task, passing the generated synthetic samples through a preset layer of a discrimination model to obtain a first output value, extracting the same number of training samples as the synthetic samples from a training data set containing malicious code and passing them through a preset layer of a discrimination model to obtain a second output value, and adjusting the parameters of the generative model so as to minimize the difference between the obtained first output value and the second output value.

[0049] When a computer program (130) is loaded into memory (120), the processor (110) can perform methods / operations according to various embodiments of the present disclosure by executing a plurality of operations to implement the program (130).

[0050] A communication link (140) may include a path for transmitting at least one of various data, commands, and information between components included in an electronic device (100). The communication link (140) may be, for example, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, but the types of such buses are merely examples and are not limited to the above examples. For example, in FIG. 1, the bus is represented as a single line for convenience of explanation, but in reality, multiple buses or various types of buses may be included.

[0051]

[0052] ​FIG. 2 is a diagram illustrating a malicious code classification system to which generative playback technology according to one embodiment is applied.

[0053] Referring to FIG. 2, at least one operation performed by the malicious code classification system (200) may be performed by at least one component (e.g., processor (110) of FIG. 1) of an electronic device (e.g., electronic device (100) of FIG. 1). The malicious code classification system (200) comprises a generative adversarial network (hereinafter GAN) (210) and a classification model (classifier, It can be composed of )(220).

[0054] The generative model of GAN (210), (generator, )(211) can be trained to generate synthetic samples that mimic a training dataset (230) for the current task (e.g., task i). In this case, the training dataset (230) may include training samples corresponding to actual malicious code. The discriminator of the GAN (210), )(212) can be trained to distinguish between synthetic samples generated through the generative model (211) and training samples corresponding to actual malicious code. The classification model (220) can be trained to classify all malicious code families discovered to date using the training dataset (230).

[0055] The processor of the electronic device can obtain an output value by passing a synthetic sample generated from a generation model (211) through a preset layer of a classification model (220). Based on the output value of the synthetic sample for the classification model (220) thus obtained, the processor can select replay samples among the synthetic samples to be reused in the next task (e.g., task i+1).

[0056] The processor can measure the classification accuracy of the classification model (220) trained in each task (e.g., task 1, task 2, … task n) whenever training of each task (e.g., task 1, task 2, … task n) is completed using the replay samples selected in this way. At this time, the classification accuracy of the classification model (220) can be measured by a test data set containing malicious code samples with the same structure as the training data set (230). The processor can evaluate the performance of the malicious code classification system (200) by collecting the classification accuracy measured for all tasks and calculating the average value of the collected values.

[0057]

[0058] FIG. 3 is a flowchart illustrating a method for learning a generative model included in a malicious code classification system according to one embodiment. In one embodiment, at least one of the operations of FIG. 3 may be performed simultaneously or in parallel with other operations, and the order between the operations may be changed. Additionally, at least one of the operations may be omitted, and other operations may be performed additionally. The operations illustrated in FIG. 3 may be performed by at least one component (e.g., processor (110) of FIG. 1) of an electronic device (e.g., electronic device (100) of FIG. 1).

[0059] In operation (310), the processor can generate a preset number of synthetic samples using a generation model (e.g., generation model (211) of FIG. 2) in the current task (e.g., task i).

[0060] In operation (320), the processor can pass the generated synthetic samples through a preset layer of a discrimination model (e.g., discrimination model (212) of FIG. 2) to obtain a first output value. At this time, the first output value of the synthetic samples for the discrimination model may be the output value of an intermediate layer among a plurality of layers included in the discrimination model.

[0061] ​For example, the discriminant model of FIG. 4 may include two convolutional layers (conv 1d) and two subsequent fully connected layers (fully conn), and the processor may obtain the output of the layer immediately preceding the first fully connected layer (410) among the two fully connected layers as the first output value (420). At this time, ReLU (rectified linear unit) activation and batch normalization (BN) may be applied to all layers except the final fully connected layer. A sigmoid layer may be used as the output layer of the discriminant model.

[0062] In operation (330), the processor may obtain a second output value by extracting the same number of training samples as synthetic samples from a training data set containing malicious code (e.g., training data set (230) of FIG. 2) and passing them through a preset layer of a discrimination model. At this time, the second output value of the training samples for the discrimination model may be an output value for the same layer as the first output value of synthetic samples.

[0063] In operation (340), the processor can adjust the parameters of the generative model so that the difference between the first output value and the second output value obtained is minimized. More specifically, the processor can adjust the parameters of the generative model so that the difference between the first output value of the synthetic samples and the second output value of the training samples in the intermediate layer of the generative model is minimized through a loss function such as Equation 1 below.

[0064] [Mathematical Formula 1]

[0065]

[0066] Here, represents the output value for the intermediate layer of the discriminant model, and represents the training samples, is sampled from the training samples It represents the expected value of, and is a random distribution used as input to a generative model (e.g., Gaussian distribution, Laplace distribution) Noise sampled from Represents the expected value of, represents a synthetic sample generated through a generative model, and represents the batch size.

[0067]

[0068] FIG. 5 is a flowchart illustrating a method for selecting a replay sample to be reused in an immediate task among the synthetic samples generated in a current task according to one embodiment. In one embodiment, at least one of the operations of FIG. 5 may be performed simultaneously or in parallel with other operations, and the order between the operations may be changed. Additionally, at least one of the operations may be omitted, and other operations may be performed additionally. The operations illustrated in FIG. 5 may be performed by at least one component (e.g., processor (110) of FIG. 1) of an electronic device (e.g., electronic device (100) of FIG. 1).

[0069] In operation (510), the processor can generate a preset number of synthetic samples using a generation model (e.g., generation model (211) of FIG. 2) in the current task (e.g., task i).

[0070] In operation (520), the processor can use the output of a classification model (e.g., classification model (220) of FIG. 2) to select a replay sample among the synthetic samples to be reused to train a generative model in the subsequent task.

[0071] According to one embodiment, a processor may select replay samples among synthetic samples based on a straight-line distance (e.g., L2 distance) between a first softmax output value, which is the final output value for a classification model of synthetic samples, and a second softmax output value, which is the final output value for a classification model of training samples. For example, the straight-line distance may be determined by squaring the difference between the first softmax output value and the second softmax output value, accumulating the sum, and taking the square root of the result of the accumulating sum. The processor may select replay samples from synthetic samples based on the following Equation 2 using such a straight-line distance.

[0072] [Mathematical Formula 2]

[0073]

[0074] Here, is the synthetic sample input to the i-th classification model Represents the final softmax output of, and is a class Represents the label vector corresponding to the reference data (ground truth, GT).

[0075] The processor, according to the above mathematical formula 2, and Calculate the Euclidean distance between each class Regarding the top with the shortest L2 distance Synthetic samples can be selected as replay samples. These selected replay samples can then be used to train the classification model for the task immediately afterward.

[0076] According to one embodiment, the processor may select the replay samples among the synthetic samples based on an orthogonal path distance (e.g., L1 distance) between a first logit output value, which is an intermediate output value for the classification model of the synthetic samples, and a second logit output value, which is an intermediate output value for the classification model of the training samples. For example, the first logit output value of the synthetic samples and the second logit output value of the training samples may be outputs for the layer immediately preceding the fully connected layer among a plurality of layers included in the classification model.

[0077] For example, the classification model of FIG. 6 may include three convolutional layers (conv 1d) and one subsequent fully connected layer (fully conn), and the processor may obtain the output for the layer immediately preceding the fully connected layer (610) as a first logit output value and a second logit output value (620). In this case, the first two convolutional layers may each perform max pooling and dropout operations, and the third convolutional layer and the fully connected layer may perform dropout. A softmax layer may be used as the output layer of the classification model.

[0078] In addition, the orthogonal path distance can be determined by accumulating the absolute difference between the first log output value and the second log output value. The processor can select replay samples from the synthetic samples based on the following mathematical formula 3 using such orthogonal path distances.

[0079] [Mathematical Formula 3]

[0080]

[0081] Here, and is the synthetic sample input to the i-th classification model and training samples Represents the logit output from the intermediate layer of respectively.

[0082] The processor synthesizes the sample according to the above mathematical formula 3. and training samples Calculate the Manhattan distance between the lodges and the top ones with the shortest L1 distance Synthetic samples can be selected as replay samples. These selected replay samples can then be used to train the classification model for the task immediately afterward.

[0083] According to one embodiment, a processor may select replay samples among synthetic samples based on the orthogonal path distance between the average value of a first logit output value, which is an intermediate output value for a classification model of synthetic samples, and a second logit output value, which is an intermediate output value for a classification model of training samples. For example, the first logit output value of synthetic samples and the second logit output value of training samples may be outputs for the layer immediately preceding a fully connected layer among a plurality of layers included in the classification model.

[0084] Additionally, the orthogonal path distance can be determined by accumulating the absolute difference between the average value of the first log output value and the second log output value. The processor can select replay samples from the synthetic samples based on the following mathematical formula 4 using such orthogonal path distances.

[0085] [Mathematical Formula 4]

[0086]

[0087] Here, is a class It can represent the average value of the second log output values ​​of the training samples included in, and can be expressed as Equation 5 below. Also, is a class Represents the set of training samples included in.

[0088] [Mathematical Formula 5]

[0089]

[0090] Here, is a class Indicates the number of training samples included in.

[0091] The processor can preferentially select the synthetic sample with the shortest L1 distance from the average logit of the training samples as a replay sample according to the above mathematical formulas 4 and 5. The replay samples selected in this way can be used to train the classification model of the task immediately afterward.

[0092]

[0093] ​The embodiments described above may be implemented as hardware components, software components, and / or combinations of hardware and software components. For example, the devices, methods, and components described in the embodiments may be implemented using a general-purpose computer or a special-purpose computer, such as, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA), a programmable logic unit (PLU), a microprocessor, or any other device capable of executing and responding to instructions. The processing unit may execute an operating system (OS) and software applications executed on said operating system. Additionally, the processing unit may access, store, manipulate, process, and generate data in response to the execution of the software. For ease of understanding, the processing unit may be described as being used as a single unit, but those skilled in the art will understand that the processing unit may include multiple processing elements and / or multiple types of processing elements. For example, the processing unit may include multiple processors or one processor and one controller. In addition, other processing configurations, such as parallel processors, are also possible.

[0094] Software may include computer programs, code, instructions, or a combination of one or more of these, and may configure a processing unit to operate as desired or instruct the processing unit independently or collectively. Software and / or data may be stored on any type of machine, component, physical device, virtual equipment, computer storage medium, or device so as to be interpreted by the processing unit or to provide instructions or data to the processing unit. Software may be distributed over networked computer systems and stored or executed in a distributed manner. Software and data may be stored on computer-readable recording media.

[0095] The method according to the embodiment may be implemented in the form of program instructions that can be executed through various computer means and recorded on a computer-readable medium. The computer-readable medium may store program instructions, data files, data structures, etc., either individually or in combination, and the program instructions recorded on the medium may be those specifically designed and configured for the embodiment or those known and available to those skilled in the art of computer software. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes; optical recording media such as CD-ROMs and DVDs; magneto-optical media such as floptical disks; and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, and flash memory. Examples of program instructions include machine code, such as that generated by a compiler, as well as high-level language code that can be executed by a computer using an interpreter, etc.

[0096] The hardware device described above may be configured to operate as one or more software modules to perform the operation of the embodiment, and vice versa.

[0097] Although the embodiments have been described above with reference to the limited drawings, those skilled in the art can apply various technical modifications and variations based thereon. For example, suitable results may be achieved even if the described techniques are performed in a different order than described, and / or if the components of the described system, structure, device, circuit, etc. are combined or assembled in a form different from described, or replaced or substituted by other components or equivalents.

[0098] Therefore, other implementations, other embodiments, and equivalents to the claims also fall within the scope of the claims set forth below.

Claims

1. In an electronic device, At least one processor including a processing circuit; and Memory comprising one or more storage media that store instructions Includes, When the above commands are executed individually or collectively by the at least one processor, the electronic device, In the current task, a generative model is used to generate a preset number of synthetic samples, and The above-mentioned generated synthetic samples are passed through a preset layer of the discrimination model to obtain a first output value, and A second output value is obtained by extracting the same number of training samples as the synthetic samples from a training dataset containing malicious code and passing them through a preset layer of the discrimination model, and Adjusting the parameters of the generation model so that the difference between the first output value and the second output value obtained above is minimized, Electronic device.

2. In Paragraph 1, The first output value of the synthetic samples and the second output value of the training samples are The output of the layer immediately preceding the fully connected layer among the multiple layers included in the above discrimination model, Electronic device.

3. In Paragraph 1, When the above commands are executed individually or collectively by the at least one processor, the electronic device, Selecting replay samples from among the synthetic samples to be used to train the generative model in the subsequent task using the output of the classification model, Electronic device.

4. In Paragraph 3, When the above commands are executed individually or collectively by the at least one processor, the electronic device, Selecting the replay samples among the synthetic samples based on the straight-line distance between the first softmax output value, which is the final output value for the classification model of the synthetic samples, and the second softmax output value, which is the final output value for the classification model of the training samples. Electronic device.

5. In Paragraph 4, The above straight-line distance is, Determined by squaring the difference between the first softmax output value and the second softmax output value, accumulating the sum, and taking the square root of the result of the accumulating sum. Electronic device.

6. In Paragraph 3, When the above commands are executed individually or collectively by the at least one processor, the electronic device, Selecting the replay samples among the synthetic samples based on the orthogonal path distance between a first logit output value, which is an intermediate output value for the classification model of the synthetic samples, and a second logit output value, which is an intermediate output value for the classification model of the training samples. Electronic device.

7. In Paragraph 6, The first logit output value of the synthetic samples and the first logit output value of the training samples are, The output of the layer immediately preceding the fully connected layer among the multiple layers included in the above classification model, Electronic device.

8. In Paragraph 6, The above orthogonal path distance is, Determined by accumulating the absolute difference between the first log output value and the second log output value, Electronic device.

9. In Paragraph 3, When the above commands are executed individually or collectively by the at least one processor, the electronic device, Selecting the replay samples among the synthetic samples based on the orthogonal path distance between the average value of the first logit output value, which is the intermediate output value of the synthetic samples for the classification model, and the second logit output value, which is the intermediate output value of the training samples for the classification model. Electronic device.

10. In Paragraph 9, The above orthogonal path distance is, Determined by accumulating the absolute difference between the average value of the first log output value and the second log output value, Electronic device.

11. In an electronic device, At least one processor including a processing circuit; and Memory comprising one or more storage media that store instructions Includes, When the above commands are executed individually or collectively by the at least one processor, the electronic device, In the current task, a generative model is used to generate a preset number of synthetic samples, and Using the output of the classification model, replay samples among the synthetic samples to be reused to train the generative model in the subsequent task are selected, and The above replay samples are, Selected using at least one of the final output value and the intermediate output value for the classification model of the above synthetic samples and training samples extracted from the training dataset containing malicious code, Electronic device.

12. In a method of operating an electronic device, The operation of generating a preset number of synthetic samples using a generative model in the current task; The operation of passing the above-mentioned synthetic samples through a preset layer of a discrimination model to obtain a first output value; An operation to obtain a second output value by extracting the same number of training samples as the synthetic samples from a training dataset containing malicious code and passing them through a preset layer of the discrimination model; and The operation of adjusting the parameters of the generated model so that the difference between the first output value and the second output value obtained above is minimized. A method of operation including 13. In Paragraph 12, The first output value of the synthetic samples and the second output value of the training samples are The output of the layer immediately preceding the first fully connected layer among the multiple layers included in the above discrimination model, Method of operation.

14. In Paragraph 12, The operation of selecting replay samples from the synthetic samples to be used to train the generative model in the subsequent task using the output of the classification model. A method of operation that further includes 15. In Paragraph 14, The operation of selecting the above replay samples is, The operation of selecting the replay samples among the synthetic samples based on the straight-line distance between the first softmax output value, which is the final output value for the classification model of the synthetic samples, and the second softmax output value, which is the final output value for the classification model of the training samples. A method of operation including 16. In Paragraph 15, The above straight-line distance is, Determined by squaring the difference between the first softmax output value and the second softmax output value, accumulating the sum, and taking the square root of the result of the accumulating sum. Method of operation.

17. In Paragraph 14, The operation of selecting the above replay samples is, An operation of selecting the replay samples among the synthetic samples based on the orthogonal path distance between a first logit output value, which is an intermediate output value for the classification model of the synthetic samples, and a second logit output value, which is an intermediate output value for the classification model of the training samples. A method of operation including 18. In Paragraph 17, The first logit output value of the synthetic samples and the first logit output value of the training samples are, The output of the layer immediately preceding the fully connected layer among the multiple layers included in the above classification model, Method of operation.

19. In Paragraph 14, The operation of selecting the above replay samples is, The operation of selecting the replay samples among the synthetic samples based on the orthogonal path distance between the average value of the first logit output value, which is the intermediate output value of the synthetic samples for the classification model, and the second logit output value, which is the intermediate output value of the training samples for the classification model. A method of operation including 20. A computer-readable recording medium storing a computer program that executes the method of paragraph 12.