Self-supervised learning method and apparatus based on active memory for representation learning in class-imbalanced environment
The integration of an active memory and Hebbian metric learning in self-supervised learning addresses class imbalance, ensuring robust representation extraction and stable performance in diverse tasks by dynamically filtering and refining data.
Patent Information
- Application Number
- PCT/KR2025/000645
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-08-13
- Filing Date
- 2025-01-10
- Publication Date
- 2026-02-19
AI Technical Summary
Existing self-supervised learning techniques fail to effectively address class imbalance in training data, leading to performance degradation and overfitting to dominant classes, without providing a robust solution for class-imbalanced environments.
A self-supervised learning method and device that incorporates an active memory to dynamically adjust data weighting and filtering, using Hebbian metric learning and contrastive learning to optimize representation extraction, thereby addressing class imbalance.
The method enables robust representation learning in class-imbalanced environments, maintaining stable performance across various tasks by adaptively refining data and reducing redundancy, thus enhancing the effectiveness of self-supervised learning.
Smart Images

Figure KR2025000645_19022026_PF_FP_ABST
Abstract
Description
Active memory-based self-learning method and device for representation learning in class-imbalanced environments
[0001] Embodiments disclosed herein relate to a self-supervised learning method and device, and more particularly, to a self-supervised learning method and device utilizing active memory to enable a feature extractor to accurately output representations in a class imbalance environment.
[0002] This study was conducted as a result of the research projects "Development of agent technology that grows while recognizing uncertainty and asking questions (IITP-II220951)" and "Development of self-directed artificial intelligence technology that solves new problems (IITP-II220953)" of the Human-Centered Artificial Intelligence Core Technology Development Project of the Ministry of Science and ICT and the Institute of Information and Communications Technology Planning and Evaluation (IITP).
[0003] This study was conducted as a result of the "AI Research Center (NRF-00274280)" project of the Science and Engineering Research Infrastructure Establishment Project of the Ministry of Education and the National Research Foundation of Korea (NRF).
[0004] This study was conducted as a result of the research project "Artificial Intelligence Innovation Hub Research and Development (IITP-II212068)" of the Information and Communications Broadcasting Innovation Talent Development Project of the Ministry of Science and ICT and the Institute of Information and Communications Technology Planning and Evaluation (IITP).
[0005] A crucial factor in training a machine learning model is how well-curated the training data is. If the training data is biased or class-imbalanced, the majority class will have more influence than the minority class. This leads to overfitting to the information in the high-weight class. This means that data processing (pre- / post-processing) plays a crucial role in training machine learning models.
[0006] When real-world data is acquired and stored without any sorting, class imbalances often occur. Processing and labeling massive amounts of data individually incurs significant time and material costs. To minimize these costs, models must automatically and actively adjust the weighting of data to learn.
[0007] Among existing machine learning techniques, self-supervised learning (SSL) has been proposed as a model capable of extracting valid representations when class information is missing. However, these learning techniques do not account for data imbalance and instead learn from the data distribution itself, resulting in performance degradation when class imbalance is significant.
[0008] Therefore, a methodology is needed that can effectively apply self-supervised learning methods to class imbalanced environments.
[0009] For reference, Patent Document 1 is an invention regarding an attraction and repulsion learning method and device for alleviating data imbalance in class incremental learning, Patent Document 2 is an invention regarding a multi-class classification device and method that is robust to imbalanced data, and Patent Document 3 is an invention regarding a system and method for improving artificial intelligence model performance based on a loss function. Patent Documents 1 to 3 only disclose content for extracting features from class imbalanced learning data, and do not provide a self-supervised learning technology that efficiently resolves class imbalance.
[0010] (Patent Document 1) Korean Patent No. 10-2574428 (September 4, 2023)
[0011] (Patent Document 2) Korean Patent Publication No. 10-2023-0110998 (July 25, 2023)
[0012] (Patent Document 3) Korean Patent Publication No. 10-2023-0068107 (May 17, 2023)
[0013] The embodiments disclosed in this specification are intended to dynamically improve the learning limit of class imbalance learning data by connecting an active memory to a feature extractor, the feature extractor receiving a class imbalance data set through a basic input path, receiving representative data from the active memory, and performing self-supervised learning to output a representation using the class imbalance data set and the representative data.
[0014] Other objects and advantages of the present invention can be understood through the following description, and will be more clearly understood through specific examples. Furthermore, it will be readily apparent that the objects and advantages of the present invention can be realized by the means and combinations thereof set forth in the claims.
[0015] As a technical means for achieving the above-described technical task, a self-supervised learning method performed by a self-supervised learning device includes a step of connecting an active memory for replacing stored representative data and a feature extractor, and a step of mapping input data to a latent space through the feature extractor to output a representation, wherein the feature extractor is a self-supervised learning model that is trained to input a class imbalance data set as the input data through a basic input path, input the representative data from the active memory, and output the representation using the class imbalance data set and the representative data.
[0016] According to another embodiment, a self-supervised learning device includes an active memory for replacing stored representative data, and a feature extractor connected to the active memory for mapping input data to a latent space to output a representation, wherein the feature extractor is a self-supervised learning model that is trained to input a class imbalanced data set as the input data through a basic input path, input the representative data from the active memory, and output the representation using the class imbalanced data set and the representative data.
[0017] According to another embodiment, the recording medium is a computer-readable recording medium having recorded thereon a program for performing a self-supervised learning method.
[0018] According to another embodiment, the computer program is a computer program stored in a recording medium for performing a self-supervised learning method, and is executed by a self-supervised learning device.
[0019] According to any one of the above-described problem solving means, a self-supervised learning method and device can be proposed that extracts a robust representation applicable to various tasks in a form in which a representation extractor and an active memory collaborate, enables arbitrary filtering of new data input to the representation extractor by utilizing the active memory, and secures a sufficient data filtering effect for the learned representation extractor while being affected by the performance of the representation extractor used.
[0020] In addition, according to any one of the aforementioned problem solving means, a self-supervised learning method and device can be proposed that can extract robust representations while maintaining stable performance in various tasks even in an environment with severe class imbalance through Hebbian metric learning using Hebbian information calculated based on the mutual overlap probability for positive samples using a representation extractor and distinctiveness information calculated based on the mutual overlap probability for the entire data.
[0021] In addition, according to any one of the aforementioned problem solving means, a self-supervised learning method and device capable of resolving class imbalance of data by measuring the latent class ratio of data distribution, dynamically replacing duplicate data through active memory, selectively storing it, and transmitting representative samples can be proposed.
[0022] The effects that can be obtained from the disclosed embodiments are not limited to the effects mentioned above, and other effects that are not mentioned can be clearly understood by a person having ordinary skill in the art to which the disclosed embodiments belong from the description below.
[0023] The attached drawings below illustrate preferred embodiments disclosed in this specification, and serve to further understand the technical ideas disclosed in this specification along with specific details for carrying out the invention, so the contents disclosed in this specification should not be interpreted as being limited to the matters described in such drawings.
[0024] Figure 1 is a block diagram illustrating the functional configuration of a self-directed learning device according to one embodiment.
[0025] FIG. 2 is a diagram comparing the operation of a self-directed learning device according to one embodiment with human neural activity.
[0026] FIG. 3 is a diagram conceptually visualizing Hebbian metric learning for a representation extractor of a self-supervised learning device according to one embodiment.
[0027] FIG. 4 is a diagram visualizing a deduplication policy for an active memory of a self-directed learning device according to one embodiment.
[0028] FIG. 5 is a flowchart illustrating an operation of a self-supervised learning device according to one embodiment to learn a representation extractor.
[0029] FIG. 6 is a diagram visualizing the operation of an active memory of a self-directed learning device according to one embodiment.
[0030] Figure 7 is a flowchart illustrating a self-supervised learning method according to one embodiment.
[0031] Figures 8 to 10 are diagrams illustrating model performance simulated according to embodiments.
[0032] Below, various embodiments are described in detail with reference to the attached drawings. The embodiments described below may be modified and implemented in various different forms. To more clearly explain the features of the embodiments, detailed descriptions of matters widely known to those skilled in the art to which the embodiments pertain below have been omitted. In addition, parts of the drawings that are not related to the description of the embodiments have been omitted, and similar parts have been designated with similar drawing reference numerals throughout the specification.
[0033] Throughout the specification, when a component is said to be "connected" to another component, this includes not only the "direct connection" but also the "connection with other components in between." Furthermore, when a component is said to "include" another component, this does not exclude other components, but rather implies that other components may be included, unless otherwise specifically stated.
[0034] The embodiments will be described in detail with reference to the attached drawings below.
[0035] A feature extractor processes input data and outputs a representation, which is core information appropriately expressed to perform a specific task. This representation can be expressed in a computer-readable vector format, for example, and contains data features well-selected to suit the purpose of a specific task. The feature extractor is a learning model capable of learning according to the task's purpose and may include a neural network with multiple layers connected.
[0036] Active memory is a storage space for data that dynamically replaces stored data. Active memory can be implemented in hardware, software, or a combination of both, based on physical or logical form.
[0037] Self-supervised learning (SSL) is a type of metric learning that trains without labeled data and optimizes the distance between representations mapped to the latent space. A modernized form of metric learning, SSL overcomes the limitations of traditional metric learning methods, which require indirect access to class information. It can acquire positive samples through augmentation that reflects the inductive bias of the data. Similarly, by using mini-batches or data in memory as negative samples, SSL eliminates the need for class information to collect negatives.
[0038] Self-supervised learning, particularly using contrastive learning, utilizes data augmented with positive samples to minimize distance, while negative samples can be used for training together. Positive sample data are data that belong to a class identical or similar to the target data, while negative sample data are data that belong to a class different from or dissimilar to the target data. The degree of identity or similarity can be measured based on various distances between values. The loss function of contrastive learning can be trained to minimize the distance between positive samples and maximize the distance between negative samples.
[0039] Machine learning algorithms are significantly affected by the quantity and quality of data. When an agent program automatically performs actions and collects data in a real-world environment, the class distribution of the unprocessed data tends to be long-tailed. This indicates that data from certain classes are collected much more frequently than other classes. If the distribution from which the data is sampled is class imbalanced, the representations learned through self-supervised learning also suffer from class imbalance. When training on raw data without any processing, the learning model tends to overfit to these frequent classes.
[0040] In class-imbalanced environments, training self-supervised learning models can reveal uneven reflections of within-class and between-class relationships. This imbalance leads to performance degradation in both mini-batch and memory-based methods. Therefore, adaptive data refinement during the training process is essential to cost-effectively mitigate class imbalance.
[0041] This embodiment is an active memory-based framework that extends existing self-supervised learning, which does not consider the degree of class distribution imbalance, to enable effective application to class imbalance environments. This embodiment may include a feature extractor and an active memory for representation learning. Learning proceeds in a manner in which the feature extractor and the active memory are alternately optimized. The feature extractor learns by utilizing data in the active memory as additional negative samples based on contrastive learning. The active memory is optimized to maximize the amount of information in the memory by eliminating repeated similar information (duplicate elimination), inspired by human working memory.
[0042] This embodiment is a modular framework that incorporates active memory into existing self-supervised learning, offering the advantage of being able to utilize existing learning methods without significant changes. Furthermore, the active memory can be customized to the user's needs, allowing for arbitrary adjustment and optimization of resource and time consumption due to the memory structure.
[0043] This embodiment targets raw data with no additional information or processing. This embodiment demonstrates task versatility, as consistent performance improvements can be observed when applying learned representations to multiple tasks.
[0044] In the case of existing technologies for handling big data, there is the problem that it is difficult to resolve the class imbalance problem, and there is the difficulty of providing class information for the task in which each data will be utilized. However, this embodiment can adaptively solve these two problems simultaneously.
[0045] Figure 1 is a block diagram illustrating the functional configuration of a self-directed learning device according to one embodiment.
[0046] Referring to FIG. 1, a self-directed learning device (100) according to one embodiment may include an input / output unit (110), a memory (120), a control unit (130), and a communication unit (140).
[0047] The input / output unit (110) may include an input unit for receiving input from a user and an output unit for displaying information such as the results of a task or the status of the self-supervised learning device (100). That is, the input / output unit (110) is configured to receive data and output the results of processing the data. The self-supervised learning device (100) according to the embodiment may receive a request for representation output, etc., through the input / output unit (110).
[0048] The memory (120) is a configuration in which files and programs can be stored, and may be configured using various types of memory. In particular, the memory (120) may store data and programs that enable the control unit (130) described below to perform operations for self-supervised learning according to the algorithm presented below.
[0049] The memory (120) stores a learning model including a representation extractor and can allocate an active memory area. The memory (120) can store a class imbalanced data set input through the basic input path and representative data in the active memory area. The memory (120) can also store representations output using the class imbalanced data set and representative data.
[0050] The control unit (130) is a configuration including at least one processor, such as a CPU, GPU, etc., and can control the overall operation of the self-supervised learning device (100). That is, the control unit (130) can control other components included in the self-supervised learning device (100) to perform operations for self-supervised learning. The control unit (130) can perform operations for extracting a representation according to the algorithm presented below by executing a program stored in the memory (120).
[0051] The communication unit (140) can perform wired or wireless communication with other devices or networks. For example, if a server providing services for a specific online platform that collects or processes a class imbalanced data set is implemented as a separate device, the communication unit (140) can receive a class imbalanced data set through communication with the server providing services for the online platform, and can provide a representation output based on the received class imbalanced data set to the server or a user's terminal.
[0052] To this end, the communication unit (140) may include a communication module that supports at least one of various wired and wireless communication methods, and the communication module may be implemented in the form of a chipset. The mobile communication or wireless communication supported by the communication unit (140) may be, for example, an N-generation mobile communication protocol, WiFi (Wireless Fidelity), Wi-Fi Direct, Bluetooth, UWB (Ultra-Wide Band), or NFC (Near Field Communication).
[0053] The control unit (130) can output a representation through a learning model including a representation extractor that maps input data to a latent space.
[0054] The control unit (130) can connect an active memory to the feature extractor. The active memory can replace stored representative data according to a memory management policy.
[0055] The representation extractor may be a self-supervised learning model trained to output representations using a class-imbalanced data set and representative data. The representation extractor may receive the class-imbalanced data set as input data through the basic input path and the representative data from active memory.
[0056] The representation extractor can perform self-supervised learning based on contrastive learning. The representation extractor can input positive sample data through the basic input path and negative sample data from the active memory. Here, positive sample data may be data with a higher probability than a threshold of belonging to the same class as the learning target data, and negative sample data may be data with a higher probability than a threshold of belonging to a different class from the learning target data. The representation extractor can output a representation using the positive sample data and the negative sample data.
[0057] The representation extractor can perform Hebbian metric learning based on (i) Hebbian information indicating the mutual overlap probability of each data in the distribution of positive sample data calculated through the representation extractor, and (ii) distinctiveness information indicating the proportion of latent classes according to the mutual overlap probability of each data in the distribution of the entire data calculated through the representation extractor. The representation extractor can be trained to minimize the Hebbian information and maximize the distinctiveness information.
[0058] Active memory can remove redundant data from the representative data stored in the active memory based on the representation output by the representation extractor and replace it with new input data.
[0059] Active memory can update representative data according to a deduplication policy based on distinctiveness information, which indicates the ratio of latent classes according to the probability of mutual overlap of each data in the distribution of the entire data calculated through the representation extractor.
[0060] A representation extractor is trained to output representations based on a class-imbalanced data set and representative data. Once the representation extractor's training is complete, the representative data stored in active memory is updated based on the representations output by the representation extractor. Once the representative data stored in active memory is updated, the updated representative data is input to the representation extractor, and a new class-imbalanced data set is input to the representation extractor.
[0061] Figure 2 is a diagram comparing the operation of a self-supervised learning device according to one embodiment with human neural activity. The self-supervised learning device according to one embodiment may include a representation extractor (210) and an active memory (220).
[0062] Memory structures in algorithms can be fundamentally implemented by allocating information to contiguous units of space. When utilized in self-supervised learning, memory structures typically store predefined key representations or sequentially store previously input information. These structures are passive in response to data input, and are therefore susceptible to data imbalance. To address this, an active memory structure capable of retaining only the necessary data within memory is required.
[0063] Referring to Figure 2, human working memory has the characteristic of suppressing redundant information, thereby encouraging the storage of as diverse a variety of information as possible. Reflecting this characteristic, active memory (220) is implemented to store only representative samples with redundancy removed. This stored information can be used as additional data (e.g., negative samples) in self-supervised learning.
[0064] In order to implement the operation of the active memory (220), this embodiment defines and measures uniqueness information, which measures the degree of unique information contained in each data compared to other given data. This amount of information can be calculated based on the representation of each data extracted through the representation extractor. The data with the lowest calculated information amount is the data with the most redundancy. Through the process of eliminating this redundant data (Duplicate Elimination), the total amount of information in the memory can be maximized.
[0065] This embodiment, in contrast to conventional self-supervised learning, incorporates an active memory structure capable of recognizing and mitigating class imbalances. This allows for more effective representation extraction in diverse class imbalance environments similar to the real world. To organically design this complex structure, the operating mechanism of the active memory was defined with inspiration from human working memory. To mathematically define this mechanism, a new concept of uniqueness information is proposed.
[0066] By utilizing this embodiment, not only can a robust representation that can be applied to various tasks be extracted, but also arbitrary filtering of new data is possible based on a given representation extractor (210) by utilizing an active memory (220).
[0067] The representation extractor (210) functions as a function that maps given input data to a latent space. In a machine learning model, it may be comprised of an artificial neural network capable of learning internal parameters. The extracted representation can be applied to model training, and the trained model can be applied to tasks such as classification. For representation training, the given data can be augmented with two similar data sets, and self-supervised learning can be applied using these data sets.
[0068] Active memory architectures mimic the mechanisms of human working memory, selectively replacing stored data. When new data arrives, they can be implemented by calculating uniqueness information for existing data in memory and replacing the duplicate data with the new data, which has the lowest information content. This replacement can be performed sequentially for each data item.
[0069] To train and optimize each configuration, a two-step learning method can be implemented, alternately optimizing each configuration. When new data is provided in the form of a mini-batch, the representation extractor is trained by synthesizing this data with the data in the active memory. Once the representation extractor training is complete, the active memory is updated based on the updated representation. Once the data input into the active memory is complete, the process of acquiring new data is repeated. Depending on the design, the representation extractor can be trained first, or the representative information of the active memory can be set first.
[0070] In one embodiment, a self-supervised learning device (100) actively filters data during self-supervised learning to overcome class imbalance environments. The self-supervised learning device (100) integrates an active memory (220) inspired by human working memory into a representation extractor (210), and introduces uniqueness information, which measures the diversity of data within the memory, to optimize both the representation extractor and the memory. A policy of replacing the most duplicated data with new samples strengthens the uniqueness information in the memory, thereby mitigating class imbalance. The self-supervised learning device (100) demonstrates the efficiency and robustness of self-supervised learning in class imbalance environments and provides reliable results in downstream tasks.
[0071] Referring to Figure 2, the mechanism of human working memory suggests that the central executive system suppresses dominant information from perceived data and memorizes it while maximizing the amount of information. This cognitive phenomenon supports the hypothesis that removing the most redundant data increases the uniqueness of information in memory.
[0072] A self-supervised learning device (100) according to one embodiment defines distinctiveness information, which measures how different a data point is from other data points, to calculate the amount of information. Furthermore, inspired by the characteristics of Hebbian learning, it applies Hebbian Metric Learning (HML), which directly optimizes distinctiveness information while reducing information among similar data that are jointly executed. Active memory is essential for generalizing Hebbian Metric Learning in class-imbalanced environments. In this case, the memory management policy must maximize uniqueness information within memory.
[0073] Referring to Figure 2, a real agent recognizes data in the environment and maps representations to solve a task. Human working memory is a prominent cognitive concept that describes how humans deal with extreme class imbalance through an active data filtering process. Working memory identifies and reduces semantically redundant signals to maximize the overall amount of information. Inspired by this cognitive process, the self-supervised learning device (100) uses mutual overlap probabilities to form a graph structure of representations, which are then filtered to gradually maximize uniqueness information.
[0074] A self-supervised learning device (100) according to one embodiment may include two components: an active memory (220) and a representation extractor (210). The representation extractor (210) is trained using both current data and additional data from the active memory (220). The active memory (220) removes the most redundant data from the extracted representation. By repeatedly updating the operations of the two components, robust representations can be extracted even in environments with severe class imbalance.
[0075] A self-supervised learning device (100) according to one embodiment defines Hebbian measurement learning, which optimizes information measurement between data from a Hebbian perspective. To extend Hebbian measurement learning to class-imbalanced environments, active memory that maximizes uniqueness information is essential.
[0076] A self-supervised learning device (100) according to one embodiment sets a memory management policy. Inspired by working memory, a memory management policy is designed to remove the most frequently duplicated elements from memory.
[0077] A self-supervised learning device (100) according to one embodiment applies a framework for self-supervised learning. To simulate a class-imbalanced environment, it is assumed that one dominant class occurs more frequently than other classes. Even in cases where the data is severely class-imbalanced, the self-supervised learning device (100) maintains stable performance in downstream tasks and can observe consistent results in more realistic environments with long-tailed class distributions.
[0078] Hebbian metric learning, which can express the problem of representation extractor and memory optimization from the same perspective, includes Hebbian information and uniqueness information, and aims to represent data with the same latent class similarly while maximizing the diversity of information.
[0079] Data distribution is the joint distribution of observations x∈X and their corresponding latent classes c∈C. Each data with latent class c has its own data distribution , and the latent classes constitute the class distribution c ~ ρ. In this case, the joint distribution p(x, c) is It can be expressed as follows.
[0080] Self-supervised learning device (100) is Kullback-Leibler Divergence D KLWe aim to fit the estimated distribution q(x,c;f) with the representation extractor f:X→Z to the true distribution p(x,c) by minimizing (p(x,c)||q(x,c;f)). However, since we do not have direct access to the latent classes, indirect methods such as metric learning are needed to compute q(x,c;f).
[0081] To express p(x, c) and q(x, c; f) without directly using latent classes, we define the probability that two data samples share the same latent class as the mutual overlap probability. In this case, q(c i =c j |x i ,x j ;f) can be computed by measuring the similarity between the representations of two data samples in the latent space.
[0082] (x i ,c i ), (x j ,c j ) ~ Then, the mutual overlap probability q(c) using the representation extractor f i =c j |x i ,x j ;f) is defined as in mathematical expression 1.
[0083] [Mathematical Formula 1]
[0084]
[0085] sim * represents an arbitrary measurement function satisfying the property as a probability. The range is limited to [0, 1]. Using the mutual overlap probability, the overlap density functions P and Q are derived through Bayes' theorem.
[0086]
[0087]
[0088] P and Q represent the normalized joint distributions of two data samples that share the same class. Using the density functions P and Q, we can represent the two joint distributions p(x,c) and q(x,c;f). D KL Minimizing (p(x,c)||q(x,c;f)) is D KL It is equivalent to minimizing (P||Q), which is Hebbian metric learning. That is, D KL Minimizing (p(x,c)||q(x,c;f)) is L HML It is equivalent to minimizing (f;D) and can be expressed as follows.
[0089]
[0090] and represent Hebbian information and uniqueness information, respectively, and can be expressed as in mathematical expressions 2 and 3.
[0091] [Equation 2]
[0092]
[0093] [Equation 3]
[0094]
[0095] is the same latent class x i It represents the distribution of data belonging to each data x i About Hebbian Information I h (x i ;f,D) is It can be defined as the average information of the mutual overlap probability using positive samples. The Hebbian learning process strengthens the connection between similar data. This means that the Hebbian information between two data should be minimized.
[0096] Meanwhile, for each data xi, the identity information I d (x i ;f,D) is the class c in the distribution D iIt is an estimated information about the ratio of each data and represents uniqueness information for the entire data. Uniqueness information I d (x i ;f,D) is a measure of how diversely the latent class information is distributed within the data distribution. The i-th data x i The amount of information about the entire data D is calculated using the representation extractor f for each data x of D. j It can be defined as the amount of information about the average redundancy with .
[0097] For agent programs, it is essential to obtain as much information as possible from observations of a given environment to form diverse representations. This property is crucial for extracting the richest representations from data.
[0098] L HML Optimization for is a regularization term I d f that minimizes Hebbian information among similar data while preventing representation collapse by maximizing * It can be interpreted as finding .
[0099] Figure 3 is a conceptual visualization of Hebbian metric learning for a representation extractor of a self-supervised learning device according to one embodiment. The representation extractor can be trained to minimize Hebbian information and maximize uniqueness information.
[0100] Conventional metric learning assumes that D is an ideal distribution with evenly distributed class information. However, if the available data is unrefined, data with some dominant classes may occur more frequently than others, leading to class imbalance, which can hinder the formation of robust representations in self-supervised learning. To address this imbalance, it is necessary to maintain a memory that selectively stores data. Therefore, we introduce a memory M to extend Hebbian metric learning to memory for the empirical distribution D' with class distribution ρ.
[0101] Let D and D' be the ideal data distribution and the empirical data distribution, respectively. Then, the upper bound of the loss function for ideal Hebbian metric learning can be expressed as in Equation 4.
[0102] [Equation 4]
[0103]
[0104] The upper limit of mathematical expression 4 is L M-HML It is denoted as (f,M;D') and adopted as the objective function to minimize it. Optimized memory M * L to M-HML An optimized representation extractor f that minimizes * L using the ideal data distribution HML It is also optimized for .
[0105] Optimized Memory M * Assuming that D exists, memory M * Using the ideal loss L HML and empirical loss L M-HML is an optimized representation extractor f * Share.
[0106]
[0107] f * The probability of mutual overlap with satisfies the following properties:
[0108]
[0109] We describe a memory management policy that performs duplicate removal based on Hebbian metric learning. Uniqueness Information I d Adopting active memory based on L M-HML Effectively optimizes.
[0110] A self-supervised learning device (100) has a loss function L for both the memory and the representation extractor. M-HMLcan be applied. Since memory is a finite set that stores a limited number of incoming data, optimizing M is an individual process that determines which data to store. Therefore, the loss function L M-HML The loss function of the memory can be separated into the loss function of the representation extractor while the representation extractor is fixed and the loss function of the representation extractor while the memory is fixed, and this can be expressed as in Equations 5 and 6. In this case, K representative data points (M∈X K ) to hold memory M.
[0111] [Equation 5]
[0112]
[0113] [Equation 6]
[0114]
[0115] I with ideal data distribution D in Equation 6 d To remove the (f;D) term I d (f;D)≥I d Assuming (f;D',M), argmax M ∈X K It is simplified to Id(f;D',M), which means maximizing the uniqueness information of the memory. To optimize memory, an active memory M is procedurally updated by the memory management policy π. π Introduce the optimized policy π * Since finding it is NP-hard, the design is inspired by human cognitive processes.
[0116] Working memory is an active memory linked to human sensory neurons, enabling humans to selectively focus on information necessary for achieving a goal in the environment. By mimicking human cognitive processes, memory management policies are designed based on uniqueness information.
[0117] New data x new Active Memory M π. The memory management policy is provided with a minimum value I d (x j ; f,M π ) has the Jth element x J ∈M π It is a policy to choose.
[0118] [Equation 7]
[0119]
[0120] Mathematical expression 7 expresses the operation according to the memory management policy of the active memory, and can express the index J of duplicate data that is replaced for a memory that can store K pieces of data.
[0121] The memory management policy replaces the least unique information, which is the most duplicated element in memory. Replacement is performed incrementally, one element at a time. Ultimately, the memory management policy process increases the total amount of information.
[0122] FIG. 4 is a diagram visualizing a deduplication policy for the active memory of a self-supervised learning device according to one embodiment. The self-supervised learning device according to one embodiment may include a representation extractor (210) and an active memory (220).
[0123] The memory management policy illustrated in Figure 4 identifies the most densely populated regions within the latent space and removes the most duplicated elements. Appropriately dense and distributed regions within the latent space are not replaced, and leaving these regions as is increases the uniqueness information in the memory.
[0124] Reducing the memory usage and time consumption of the memory management policy is important for model implementation, so the memory management policy is optimized to minimize time consumption with a reasonable amount of additional resources.
[0125] The loss function L of Equation 4 is obtained through a memory management policy. M-HML Self-supervised learning can be performed to optimize the . Referring to Fig. 4, Augmentation methods can be used to sample positive samples from a class-imbalanced environment without class information, due to the inductive bias introduced by augmentation, rather than maintaining multiple repositories for each class.
[0126] FIG. 5 is a flowchart illustrating an operation of a self-supervised learning device according to one embodiment to learn a representation extractor.
[0127] At step S510, the self-supervised learning device receives a class-imbalanced data set as input.
[0128] In step S520, the self-supervised learning device trains the representation extractor to output representations based on the class-imbalanced data set input through the basic input path and the representative data input from the active memory. In step S530, the self-supervised learning device determines whether a learning termination condition of the representation extractor is satisfied. For example, the learning termination condition may be set such that a preset number of iterations is satisfied or a loss function satisfies a preset reference value. If the learning termination condition is not satisfied in step S530, step S520 may be repeated to update the parameters that configure the representation extractor.
[0129] If the learning termination condition is satisfied in step S530, the self-supervised learning device can update the data in the active memory based on the representation output by the representation extractor in step S540. In step S550, the self-supervised learning device determines whether the update termination condition of the active memory is satisfied. For example, the update termination condition can be set so that duplicate data cannot be replaced any more or so that the generated uniqueness information satisfies a preset criterion. If the update termination condition is not satisfied in step S550, step S540 can be repeated to update the data in the memory.
[0130] If the update termination condition is satisfied at step S550, the self-supervised learning device determines whether the overall learning termination condition is satisfied at step S560. For example, the overall learning termination condition may be set to be no input data, a preset number of iterations, or a loss function that satisfies a preset threshold. If the overall learning termination condition is not satisfied at step S560, the representation extractor can be trained repeatedly from step S510, and the data in the memory can be updated.
[0131] If the overall learning termination condition is satisfied at step S560, the self-supervised learning device can output a representation extractor that has completed learning at step S570.
[0132] In Figure 5, learning of the representation extractor is shown to proceed first, but data setting of the active memory may also proceed first.
[0133] The algorithm for self-supervised learning according to this embodiment can be called DUEL (Duplicate Elimination) and can be expressed in code as shown in Tables 1 to 4.
[0134] [Table 1]
[0135]
[0136] Referring to Table 1, Algorithm 1 presents self-supervised learning according to memory management policy. Given a specific condition q(c i =c j |x i ,x j ;f)=exp((f(x i ) ┬ f(x j )-1) / τ) and loss function L at λ=1 InfoNCE is the loss function L M-HML Since it is identical to L, we train the representation extractor. M-HML Instead, InfoNCE loss L InfoNCE can be utilized.
[0137] The Information Noise-Contrastive Estimation (InfoNCE) loss is a widely used loss function in contrastive learning. InfoNCE loss maximizes the similarity between positive pairs and minimizes the similarity between negative pairs.
[0138] After each training step of the representation extractor, a deduplication step begins. During the deduplication step, selected data is replaced with the current data according to a memory management policy. These two steps are repeated until the termination condition is met.
[0139] It is possible to learn robust representations based on raw, instantaneous data sampled from a class-imbalanced distribution.
[0140] [Table 2]
[0141]
[0142] Referring to Table 2, Algorithm 2 illustrates the representation extractor and memory updates for a single iteration. At each time step t, the agent perceives a new observation. Using the collected data, it updates the model parameters θ using Equation 5. Next, the memory is updated with the new data based on the memory management policy. If the uniqueness information does not increase during this process, the memory is not updated.
[0143] [Table 3]
[0144]
[0145] Referring to Table 3, Algorithm 3 presents the generalized code used to implement self-supervised learning. Because it focuses on class imbalance, the data distribution is fixed. A single iteration can be divided into three smaller steps. When new data is acquired, the initial step involves resampling additional data from memory, and then using these samples to optimize the loss function. Afterwards, a process is added to update the model and memory, depending on the model's architecture.
[0146] The memory management policy selects the element with the lowest uniqueness information among the elements in memory. However, when new data arrives in batches, repeatedly calculating uniqueness information for each replacement to find the optimal element results in computational duplication and reduced efficiency. To solve this problem, the uniqueness information calculation is q(c i =c j |x i ,x j ∈M π ;f) is replaced by the summation for q(c). - Since the LogSumExp function is monotonically decreasing, the replacement calculation using uniqueness information is q(c). i =c j |x i ,x j ;f) is the same as using the summation for . In this case, this summation can be called the measurement of the score.
[0147]
[0148] The DUEL process, a sequential operation that updates elements with a single replacement, needs to be optimized for GPU computing. To maximize parallelism, q is used for every pair in memory. ij =q(c i =c j |x i ,x j ;f) and input the batch. Next, we efficiently compute the score using a selection array that indicates the presence of elements in memory.
[0149] FIG. 6 is a diagram visualizing the operation of an active memory of a self-directed learning device according to one embodiment.
[0150] Drawing symbol 610 represents an operation for setting a target to be replaced, drawing symbol 630 represents a logical delete and update operation, and drawing symbol 630 represents a logical insert and update operation. If the representation is defined as Z-dimensional, the memory size is K, and the batch size is B, the complexity without optimization is O(ZBK 2 ) becomes O(Z(B+K) . However, if we use local insertion and deletion functions, the complexity becomes O(Z(B+K) 2 ) can be reduced to .
[0151] [Table 4]
[0152]
[0153] Referring to Table 4, Algorithm 4 presents the code of a memory management policy that applies these parallel operation optimizations.
[0154] Figure 7 is a flowchart illustrating an operation of a self-supervised learning device according to one embodiment to learn a representation extractor.
[0155] The self-supervised learning method according to the embodiment illustrated in FIG. 7 includes steps that are processed time-series in the self-supervised learning devices illustrated in FIGS. 1 to 6. Therefore, even if omitted below, the content described above regarding the self-supervised learning devices illustrated in FIGS. 1 to 6 can also be applied to the self-supervised learning method according to the embodiment illustrated in FIG. 7.
[0156] Referring to FIG. 7, in step S710, the self-supervised learning device connects a representation extractor and an active memory.
[0157] At step S720, the self-supervised learning device outputs a representation by mapping input data to a latent space through a representation extractor.
[0158] Active memory applied to self-supervised learning method dynamically replaces stored representative data.
[0159] The representation extractor applied to the self-supervised learning method may be a self-supervised learning model that is trained to input a class-imbalanced data set as input data through a basic input path, input representative data from an active memory, and output a representation using the class-imbalanced data set and the representative data.
[0160] The representation extractor applied to the self-supervised learning method can perform self-supervised learning based on contrastive learning.
[0161] A representation extractor applied to a self-supervised learning method can input positive sample data through the basic input path, input negative sample data from the active memory, and output a representation using the positive sample data and the negative sample data. Positive sample data may be data with a higher probability of belonging to the same class as the target data than a reference value, and negative sample data may be data with a higher probability of belonging to a different class than the reference value.
[0162] The representation extractor applied to the self-supervised learning method can perform Hebbian metric learning based on (i) Hebbian information indicating the mutual overlap probability of each data in the distribution of positive sample data calculated through the representation extractor, and (ii) distinctiveness information indicating the ratio of latent classes according to the mutual overlap probability of each data in the distribution of the entire data calculated through the representation extractor.
[0163] The representation extractor applied to the self-supervised learning method can be trained to minimize Hebbian information and maximize uniqueness information.
[0164] Active memory applied to self-supervised learning method can remove redundant data from representative data stored in active memory based on the representation output by the representation extractor and replace it with new input data.
[0165] Active memory applied to the self-supervised learning method can update representative data according to a deduplication policy based on distinctiveness information, which indicates the ratio of latent classes according to the mutual overlap probability of each data in the distribution of the entire data calculated through the representation extractor.
[0166] A representation extractor applied to a self-supervised learning method can be trained to output representations based on a class-imbalanced data set and representative data. Once the training of the representation extractor is complete, the representative data stored in active memory can be updated based on the representations output by the representation extractor. Once the update of the representative data stored in active memory is complete, the updated representative data can be input to the representation extractor, and a new class-imbalanced data set can be input to the representation extractor.
[0167] Figures 8 to 10 are diagrams illustrating model performance simulated according to embodiments.
[0168] The existing learning method, MoCo, performs momentum contrastive learning, a type of unsupervised learning that trains a learning model without data labels. The model can be trained to increase the similarity between positive pairs and decrease the similarity between negative pairs. MoCo defines a dictionary of a specific size to store the key values of samples, classifying values matching the query as positive keys and the rest as negative keys, and then applies momentum updates.
[0169] MoCo V2 is a version of MoCo that adds a Multi-Layer Perceptron (MLP) head and augmentation.
[0170] D-MoCo adds an active memory process to MoCo V2, as described in this example. After training, each model is evaluated using downstream tasks, such as linear search using a class-balanced dataset, to demonstrate that it can extract generalized representations.
[0171] To account for class imbalance environments, we design a two-stage data generator using a predefined dataset. The dataset D is a set of D with each class c∈C. c is divided into c max Assume that one class, denoted by , occurs much more frequently than the other classes. The probability of occurrence of the most frequent class is ρ max It is displayed as .
[0172] To analyze the robustness of representations, we measure and compare how well the representations extracted from the representation extractor clusters are formed. These measures include within-class variance and between-class similarity. Within-class variance and between-class similarity are expressed in Equations 8 and 9, respectively.
[0173] [Equation 8]
[0174]
[0175] [Equation 9]
[0176]
[0177] is the center of each class in the hypersphere.
[0178] , and the within-class variance indicates how densely representations of the same class are collected, and the between-class similarity indicates how far apart the centers of each class are.
[0179] Referring to Figure 8, we present quantitative results for MoCo and D-MoCo. In both cases, the within-class variance is preserved in all environments. However, the between-class similarity of MoCo is ρ max In extreme cases where ρ = 0.75, the accuracy increases dramatically. The accuracy gradually improves during the D-MoCo training phase. In D-MoCo, the memory management policy according to this embodiment allows for high ρ. max This can prevent a sharp performance degradation. This means that the framework according to the present embodiment extracts more distinguishable representations when the data is class imbalanced.
[0180] Referring to Figure 9, the t-SNE (t-Stochastic Neighbor Embedding) of the active data filtering process using the memory management policy is visualized.
[0181] Reference numeral 910 represents the representations and corresponding classes extracted by the trained model, reference numeral 920 represents that the agent program encounters a dominant class that occurs more frequently, and reference numeral 930 represents that duplicate data is replaced with new data and uniqueness information is maximized according to a memory management policy.
[0182] In Fig. 10, the drawing symbol 1010 (ρ max =0.5) and drawing symbol 1020(ρ max = 0.75), the upper two dashed lines represent the within-class variance, and the lower two solid lines represent the between-class similarity. Overall, the within-class variance values show similar trends between MoCo and D-MoCo. This indicates that the memory management policy does not significantly affect the concentration of the learned representations. However, in terms of between-class similarity, D-MoCo consistently produces lower values than MoCo in almost all cases. This suggests that D-MoCo effectively extracts representations by ensuring sufficient separation between the clusters constituting each class.
[0183] The term '~ unit' used in the above embodiments means a software or hardware component such as an FPGA (field programmable gate array) or an ASIC, and the '~ unit' performs certain roles. However, the '~ unit' is not limited to software or hardware. The '~ unit' may be configured to be on an addressable storage medium or may be configured to play one or more processors. Thus, as an example, the '~ unit' includes components such as software components, object-oriented software components, class components, and task components, processes, functions, attributes, procedures, subroutines, segments of program code, drivers, firmware, microcode, circuits, data, databases, data structures, tables, arrays, and variables.
[0184] The functionality provided within the components and '~sub-components' may be combined into a smaller number of components and '~sub-components' or separated into additional components and '~sub-components'.
[0185] Additionally, components and '~parts' may be implemented to regenerate one or more CPUs within a device or secure multimedia card.
[0186] Meanwhile, the self-supervised learning method according to one embodiment described in this specification may also be implemented in the form of a computer-readable medium that stores computer-executable commands and data. In this case, the commands and data may be stored in the form of program code, and when executed by a processor, may generate a predetermined program module to perform a predetermined operation. In addition, the computer-readable medium may be any available medium that can be accessed by a computer, and includes both volatile and nonvolatile media, removable and non-removable media. In addition, the computer-readable medium may be a computer recording medium, and the computer recording medium may include both volatile and nonvolatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable commands, data structures, program modules, or other data. For example, the computer recording medium may be a magnetic storage medium such as an HDD or SSD, an optical recording medium such as a CD, DVD, or Blu-ray disc, or a memory included in a server accessible via a network.
[0187] In addition, the self-supervised learning method according to one embodiment described in this specification may be implemented as a computer program (or computer program product) including computer-executable instructions. The computer program includes programmable machine instructions processed by a processor, and may be implemented in a high-level programming language, an object-oriented programming language, assembly language, or machine language. In addition, the computer program may be recorded on a tangible computer-readable recording medium (e.g., memory, a hard disk, a magnetic / optical medium, or a solid-state drive (SSD), etc.).
[0188] Accordingly, the self-supervised learning method according to one embodiment described herein can be implemented by executing the above-described computer program on a computing device. The computing device may include at least one of a processor, memory, a storage device, a high-speed interface connecting the memory and a high-speed expansion port, and a low-speed interface connecting the low-speed bus and the storage device. Each of these components may be interconnected using various buses and mounted on a common motherboard or in another suitable manner.
[0189] Here, the processor can process instructions within the computing device, such as instructions stored in a memory or storage device to display graphical information for providing a graphical user interface (GUI) on an external input / output device, such as a display connected to a high-speed interface. In another embodiment, multiple processors and / or multiple buses may be utilized, as appropriate, together with multiple memories and memory types. The processor may also be implemented as a chipset comprising multiple independent analog and / or digital processors.
[0190] Memory also stores information within a computing device. For example, memory may consist of volatile memory units or a collection of volatile memory units. In another example, memory may consist of nonvolatile memory units or a collection of nonvolatile memory units. Memory may also be another form of computer-readable media, such as magnetic or optical disks.
[0191] And, the storage device can provide a large amount of storage space to the computing device. The storage device can be a computer-readable medium or a configuration including such a medium, and can include, for example, devices within a storage area network (SAN) or other configurations, and can be a floppy disk device, a hard disk device, an optical disk device, a tape device, flash memory, or other similar semiconductor memory device or device array.
[0192] The embodiments described above are provided for illustrative purposes only, and those skilled in the art will readily appreciate that the embodiments described herein can be readily modified into other specific forms without altering the technical concepts or essential characteristics of the embodiments described herein. Therefore, the embodiments described above should be understood as illustrative in all respects and not restrictive. For example, components described as being single may be implemented in a distributed manner, and similarly, components described as being distributed may be implemented in a combined manner.
[0193] The scope of protection sought through this specification is indicated by the claims described below rather than the detailed description above, and all changes or modifications derived from the meaning and scope of the claims and their equivalent concepts should be interpreted as being included in the scope of the present invention.
Claims
1. In a self-supervised learning method performed by a self-supervised learning device, A step of connecting an active memory and a feature extractor that replaces stored representative data; and It includes a step of mapping input data to a latent space through the above representation extractor and outputting a representation. The above representation extractor is a self-supervised learning model that is trained to input a class imbalanced data set as the input data through the basic input path, input the representative data from the active memory, and output the representation using the class imbalanced data set and the representative data, a self-supervised learning method.
2. In paragraph 1, The above representation extractor performs self-supervised learning based on contrastive learning. The above representation extractor receives positive sample data through the basic input path, receives negative sample data from the active memory, and outputs the representation using the positive sample data and the negative sample data. A self-supervised learning method, wherein the positive sample data is data having a higher probability of belonging to the same class as the target data than the reference value, and the negative sample data is data having a higher probability of belonging to a different class than the reference value.
3. In paragraph 2, The above representation extractor is a self-supervised learning method that performs Hebbian metric learning based on (i) Hebbian information indicating the mutual overlap probability of each data in the distribution of positive sample data calculated through the representation extractor, and (ii) distinctiveness information indicating the ratio of latent classes according to the mutual overlap probability of each data in the distribution of the entire data calculated through the representation extractor.
4. In paragraph 3, A self-supervised learning method in which the above representation extractor is trained to minimize the Hebbian information and maximize the uniqueness information.
5. In paragraph 1, The above active memory is a self-supervised learning method that removes duplicate data from the representative data stored in the active memory based on the representation output by the representation extractor and replaces it with new input data.
6. In paragraph 5, The above active memory is a self-supervised learning method that updates the representative data according to a duplication removal policy based on distinctiveness information indicating the ratio of latent classes according to the mutual duplication probability of each data in the distribution of the entire data calculated through the representation extractor.
7. In paragraph 1, The above representation extractor is trained to output the representation based on the class imbalance data set and the representative data, When the training of the above representation extractor is completed, the representative data stored in the active memory is updated based on the representation output by the above representation extractor. A self-supervised learning method in which, when the update of the representative data stored in the active memory is completed, the updated representative data is input into the representation extractor, and a new class imbalance data set is input into the representation extractor.
8. Active memory that replaces stored representative data; and It is connected to the above active memory and includes a feature extractor that maps input data to a latent space and outputs a representation. The above representation extractor is a self-supervised learning device, which is a self-supervised learning model that receives a class imbalance data set as the input data through a basic input path, receives the representative data from the active memory, and outputs the representation using the class imbalance data set and the representative data.
9. A computer-readable recording medium having recorded thereon a program for performing the method described in paragraph 1.
10. A computer program stored in a recording medium to perform the method described in paragraph 1 and performed by a self-directed learning device.
Citation Information
Patent Citations
A multimodal continuous learning method, device, equipment and storage medium
CN117875407B
Sample imbalance classification optimization method based on feature representation contrast learning strategy
CN118395175A
Composition for forming hydrogel, hydrogel formed by photo-crosslinking the same, and method for preparing the hydrogel
KR102640102B1
Systems and methods for automatically assigning one or more labels to discussion topics shown in online forums on the dark web
US20190347327A1
Generalized hebbian learning for principal component analysis and automatic target recognition, systems and method
US6894639B1