# US 12,743,629 B2 · Method and apparatus for training unsupervised conditional generative model

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 12,743,629 B2
- Document ID: US12743629B2
- Status: Granted
- Kind: B2
- Application number: 18/204,457
- Filed: 2023-06-01
- Published: 2023-12-07
- Granted: 2026-09-22
- Earliest claimed: 2022-06-03
- Assignees: Seoul National University R&Db Foundation
- Applicants: Seoul National University R&DB Foundation
- Inventors: Sungroh Yoon; Uiwon Hwang; Heeseung Kim
- Web page: https://patentgrep.com/patent/US12743629B2

## CPC

- G06N 3/088: Non-supervised learning, e.g. competitive learning
- G06N 3/094: Adversarial learning
- G06N 3/044: Recurrent networks, e.g. Hopfield networks
- G06N 3/0455: Auto-encoder networks; Encoder-decoder networks
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/047: Probabilistic or stochastic networks
- G06N 3/0475: Generative networks
- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Disclosed is a method of training a generative model capable of robustly training the generative model even when there is no label in training data, salient attributes are uneven, and there is only a small number of pieces of data labeled with a salient attribute desired to be learned, and is a method of training an unsupervised conditional generative model using a method of learning parameters of a latent distribution, a generative model, and an encoder.

## Claims

### Claim 1

A processor-implemented method of training an unsupervised conditional generative model, the method comprising:
defining distributions of a plurality of components including mean vectors, respectively, and sampling a latent vector from a latent distribution including the distributions of the plurality of components;
generating synthetic data using the latent vector as input of the generative model;
inputting the synthetic data to an encoder to acquire an encoding vector;
training the generative model and the encoder based on a value of a loss function configured to make the synthetic data closer to real data,
wherein the loss function includes a generative model loss function and an unsupervised conditional contrastive loss function, and the unsupervised conditional contrastive loss function is configured so that the encoding vector is closer to a mean vector of one component determined based on responsibility with the latent vector among the plurality of components and farther from mean vectors of the other components; and
redetermining parameters of the latent distribution based on the value of the loss function,
wherein the parameters of the latent distribution include mixing coefficients for the plurality of component distributions, and the redetermining of the parameters comprises redetermining parameters for the plurality of component distributions and the mixing coefficients based on an estimated gradient of the loss function.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the distributions of the components are defined as Gaussian distributions, and the latent distribution is a Gaussian mixture in which the Gaussian distributions of the respective components are synthesized.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the unsupervised conditional contrastive loss function is configured based on cosine similarity between the encoding vector and the mean vectors of the plurality of components.

### Claim 4 (depends on 1)

The method according to claim 1, wherein:
the loss function is based on output of a discriminant model for the synthetic data; and
the discriminant model is adversarially trained with respect to the generative model to distinguish between the real data and the synthetic data.

### Claim 5 (depends on 1)

The method according to claim 1, further comprising encoding labeled data through the encoder when the labeled data is present,
wherein the loss function is configured so that the encoded labeled data is closer to a mean vector of at least one of the components and farther from mean vectors of the other components.

### Claim 6 (depends on 5)

The method according to claim 5, further comprising applying a mix-up technique for the labeled data.

### Claim 7 (depends on 5)

The method according to claim 5, wherein the loss function further includes an attribute manipulation loss function configured such that at least one component among the plurality of components is similar to a distribution for attributes of the labeled data.

### Claim 8 (depends on 1)

The method according to claim 1, wherein the estimated gradient of the loss function is computed based on implicit reparameterization using Stein's lemma, such that a gradient with respect to parameters of the latent distribution is expressed in terms of a gradient of the loss function with respect to the latent vector.

### Claim 9 (depends on 1)

The method according to claim 1, wherein the redetermining of the mixing coefficients is performed such that each mixing coefficient is prevented from being negative and a sum of the mixing coefficients of all components remains a predefined number.

### Claim 10 (depends on 1)

The method according to claim 1, wherein the redetermining of the parameters further comprises updating covariance matrices of the plurality of component distributions based on the estimated gradient of the loss function, such that a positive definite matrix property of the covariance matrices is retained.

### Claim 11

An apparatus for training an unsupervised conditional generative model, the apparatus comprising:
a processor; and
a memory operably connected to the processor to store at least one piece of code executed by the processor,
wherein, when executed by the processor, the memory stores code causing the processor to:
define distributions of a plurality of components including mean vectors, respectively, and sample a latent vector from a latent distribution including the distributions of the plurality of components;
generate synthetic data using the latent vector as input of the generative model;
input the synthetic data to an encoder to acquire an encoding vector;
train the generative model and the encoder based on a value of a loss function configured to make the synthetic data closer to real data,
wherein the loss function includes a generative model loss function and an unsupervised conditional contrastive loss function, and the unsupervised conditional contrastive loss function is configured so that the encoding vector is closer to a mean vector of one component determined based on responsibility with the latent vector among the plurality of components and farther from mean vectors of the other components; and
redetermine parameters of the latent distribution based on the value of the loss function,
wherein the parameters of the latent distribution include mixing coefficients for the plurality of component distributions, and the redetermining of the parameters comprises redetermining parameters for the plurality of component distributions and the mixing coefficients based on an estimated gradient of the loss function.

### Claim 12 (depends on 11)

The apparatus according to claim 11, wherein the distributions of the components are defined as Gaussian distributions, and the latent distribution is a Gaussian mixture in which the Gaussian distributions of the respective components are synthesized.

### Claim 13 (depends on 11)

The apparatus according to claim 11, wherein the unsupervised conditional contrastive loss function is configured based on cosine similarity between the encoding vector and the mean vectors of the plurality of components.

### Claim 14 (depends on 11)

The apparatus according to claim 11, wherein:
the loss function is based on output of a discriminant model for the synthetic data; and
the discriminant model is adversarially trained with respect to the generative model to distinguish between the real data and the synthetic data.

### Claim 15 (depends on 11)

The apparatus according to claim 11, wherein:
when labeled data is present, the memory further stores code causing the processor to encode the labeled data through the encoder; and
the loss function is configured so that the encoded labeled data is closer to a mean vector of at least one of the components and farther from mean vectors of the other components.

### Claim 16 (depends on 15)

The apparatus according to claim 15, wherein the memory further stores code causing the processor to apply a mix-up technique for the labeled data.

### Claim 17 (depends on 15)

The apparatus according to claim 15, wherein the loss function further includes an attribute manipulation loss function configured such that at least one component among the plurality of components is similar to a distribution for attributes of the labeled data.

### Claim 18 (depends on 11)

The apparatus according to claim 11, wherein the estimated gradient of the loss function is computed based on implicit reparameterization using Stein's lemma, such that a gradient with respect to parameters of the latent distribution is expressed in terms of a gradient of the loss function with respect to the latent vector.

### Claim 19 (depends on 11)

The apparatus according to claim 11, wherein the redetermining of the mixing coefficients is performed such that each mixing coefficient is prevented from being negative and a sum of the mixing coefficients of all components remains a predefined number.

### Claim 20 (depends on 11)

The apparatus according to claim 11, wherein the redetermining of the parameters further comprises updating covariance matrices of the plurality of component distributions based on the estimated gradient of the loss function, such that a positive definite matrix property of the covariance matrices is retained.
