# US 2021/0174144 A1 · Method and apparatus for obtaining training sample of first model based on second model

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

- Number: US 2021/0174144 A1
- Document ID: US20210174144A1
- Status: Published application
- Kind: A1
- Application number: 17/173,062
- Filed: 2021-02-10
- Published: 2021-06-10
- Earliest claimed: 2018-10-22
- Assignees: Advanced New Technologies Co., Ltd.
- Applicants: Advanced New Technologies Co., Ltd.
- Inventors: Cen CHEN; Jun ZHOU; Chaochao CHEN; Xiaolong LI
- Web page: https://patentgrep.com/patent/US20210174144A1

## CPC

- G06Q 20/389: {Keeping log of transactions for guaranteeing non-repudiation of a transaction}
- G06F 17/18: for evaluating statistical data {, e.g. average values, frequency distributions, probability functions, regression analysis (forecasting specially adapted for a specific administrative, business or logistic context G06Q10/04)}
- G06F 18/211: Selection of the most significant subset of features
- G06F 18/214: Generating training patterns; Bootstrap methods, e.g. bagging or boosting
- G06N 3/006: based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
- G06N 3/08: Learning methods
- G06N 3/09: Supervised learning
- G06N 3/092: Reinforcement learning
- G06N 20/00: Machine learning
- G06Q 20/4016: {involving fraud or risk level assessment in transaction processing}
- G06Q 20/405: {Establishing or using transaction specific rules}
- G06N 7/01: Probabilistic graphical models, e.g. probabilistic networks
- G06Q: INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Implementations of the present specification provide a method and an apparatus for obtaining a training sample of a first model based on a second model. The method includes obtaining at least one first sample, each first sample including feature data and a label value, the label value corresponding to a predicted value of the first model; and separately inputting feature data of the at least one first sample into the second model so that the second model separately outputs multiple first output values each based on feature data of a first sample of the at least one first sample, and obtaining a first training sample set from the at least one first sample based on the first output values separately output by the second model, a first output value being used to determine whether a corresponding first sample is selected as a training sample of the first training sample set, where the first training set is for training the first model.

## Claims

### Claim 1

A method, comprising:
obtaining at least one first sample, each first sample including feature data and a label value, the label value corresponding to a predicted value of a first model based on the feature data;
obtaining at least one first output value of a second model by separately inputting feature data of each first sample of the at least one first sample into the second model, each first output value being obtained based on feature data of a first sample of the at least one first sample;
obtaining a first training sample set from the at least one first sample based on the at least one first output; and
training the first model using the first training sample set.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the second model includes a probability function corresponding to feature data of an input sample, calculates a probability of selecting the input sample as a training sample of the first model based on the probability function, and outputs a corresponding output value based on the probability, and
the method comprises training the second model through acts including:
obtaining at least one second sample, each second sample including feature data and a label value, the label value corresponding to a predicted value of the first model;
separately inputting feature data of the at least one second sample into the second model so that the second model separately outputs at least one second output value each based on feature data of a second sample, and determining a second training sample set of the first model from the at least one second sample based on the at least one second output value;
training the first model by using the second training sample set, and obtaining a first predicted loss of a trained first model based on multiple determined test samples;
calculating a reward value corresponding to the multiple second output values of the second model based on the first predicted loss; and
training the second model by using a policy gradient algorithm based on the feature data of the at least one second sample, a probability function corresponding to each feature data in the second model, each second output value of the second model for each feature data of the at least one second sample, and the reward value.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the acts further include after the obtaining the first predicted loss of the trained first model, restoring the first model to include model parameters that exist before the training the first model.

### Claim 4 (depends on 2)

The method according to claim 2, wherein the reward value is equal to a difference obtained by subtracting the first predicted loss from an initial predicted loss, and the method further comprises:
after the obtaining the at least one second sample, randomly obtaining an initial training sample set from the at least one second sample; and
training the first model by using the initial training sample set, and obtaining the initial predicted loss of a trained first model based on the multiple determined test samples.

### Claim 5 (depends on 2)

The method according to claim 2, wherein the acts are iterated in multiple iterations of trainings, and the reward value is equal to a difference obtained by subtracting a first predicted loss obtained in a current training from a first predicted loss obtained in a previous training immediately before the current training.

### Claim 6 (depends on 2)

The method according to claim 2, wherein the at least one first sample is same as the at least one second sample.

### Claim 7 (depends on 1)

The method according to claim 1, wherein the first model is an anti-fraud model, the feature data is feature data of a transaction, and the label value indicates whether the transaction is a fraudulent transaction.

### Claim 8

An apparatus, comprising:
a first sample acquisition unit, configured to obtain at least one first sample, each first sample including feature data and a label value, the label value corresponding to a predicted value of a first model based on the feature data; and
an input unit, configured to obtain at least one first output value of a second model by separately inputting feature data of each first sample of the at least one first sample into the second model, each first output value being obtained based on feature data of a first sample of the at least one first sample, and obtain a first training sample set from the at least one first sample based on the at least one first output value, wherein the first training set is configured to train the first model.

### Claim 9 (depends on 8)

The apparatus according to claim 8, wherein the second model includes a probability function corresponding to feature data of an input sample, calculates a probability of selecting the sample as a training sample of the first model based on the probability function, and outputs a corresponding output value based on the probability, the second model being trained by a training apparatus, the training apparatus including:
a second sample acquisition unit, configured to obtain at least one second sample, each second sample including feature data and a label value, the label value corresponding to a predicted value of the first model;
an input unit, configured to separately input feature data of the at least one second sample into the second model so that the second model separately outputs at least one second output values each based on feature data of a second sample, and determine a second training sample set of the first model from the at least one second sample based on the at least one second output values;
a first training unit, configured to train the first model by using the second training sample set, and obtain a first predicted loss of a trained first model based on multiple determined test samples;
a calculation unit, configured to calculate a reward value corresponding to the multiple second output values of the second model based on the first predicted loss; and
a second training unit, configured to train the second model by using a policy gradient algorithm based on the feature data of the at least one second sample, a probability function corresponding to each feature data in the second model, each second output value of the second model for each feature data of the at least one second sample, and the reward value.

### Claim 10 (depends on 9)

The apparatus according to claim 9, further comprising a restoration unit, configured to after the first predicted loss of the trained first model, restore the first model to include model parameters that exist before the training the first model.

### Claim 11 (depends on 9)

The apparatus according to claim 9, wherein the reward value is equal to a difference obtained by subtracting the first predicted loss from an initial predicted loss, and the apparatus further comprises:
a random acquisition unit, configured to after the at least one second sample is obtained, randomly obtain an initial training sample set from the at least one second sample; and
an initial training unit, configured to train the first model by using the initial training sample set, and obtain the initial predicted loss of a trained first model based on the multiple determined test samples.

### Claim 12 (depends on 9)

The apparatus according to claim 9, wherein implementation of the training apparatus is iterated in multiple iterations of trainings, and the reward value is equal to a difference obtained by subtracting a first predicted loss obtained in a currently implemented training apparatus from a first predicted loss obtained in a previously implemented training apparatus immediately before the currently implemented training apparatus.

### Claim 13 (depends on 9)

The apparatus according to claim 9, wherein the at least one first sample is same as the at least one second sample.

### Claim 14 (depends on 8)

The apparatus according to claim 8, wherein the first model is an anti-fraud model, the feature data is feature data of a transaction, and the label value indicates whether the transaction is a fraudulent transaction.

### Claim 15

A computing device, comprising a memory and a processor, the memory storing executable code, and when executing the executable code, the processor implements acts including:
obtaining at least one first sample, each first sample including feature data and a label value, the label value corresponding to a predicted value of a first model based on the feature data;
obtaining at least one first output value of a second model by separately inputting feature data of each first sample of the at least one first sample into the second model, each first output value being obtained based on feature data of a first sample of the at least one first sample;
obtaining a first training sample set from the at least one first sample based on the at least one first output; and
training the first model using the first training sample set.

### Claim 16 (depends on 15)

The computing device according to claim 15, wherein the second model includes a probability function corresponding to feature data of an input sample, calculates a probability of selecting the input sample as a training sample of the first model based on the probability function, and outputs a corresponding output value based on the probability, and
the acts comprises training the second model through training actions including:
obtaining at least one second sample, each second sample including feature data and a label value, the label value corresponding to a predicted value of the first model;
separately inputting feature data of the at least one second sample into the second model so that the second model separately outputs at least one second output value each based on feature data of a second sample, and determining a second training sample set of the first model from the at least one second sample based on the at least one second output value;
training the first model by using the second training sample set, and obtaining a first predicted loss of a trained first model based on multiple determined test samples;
calculating a reward value corresponding to the multiple second output values of the second model based on the first predicted loss; and
training the second model by using a policy gradient algorithm based on the feature data of the at least one second sample, a probability function corresponding to each feature data in the second model, each second output value of the second model for each feature data of the at least one second sample, and the reward value.

### Claim 17 (depends on 16)

The computing device according to claim 16, wherein the training actions further include after the obtaining the first predicted loss of the trained first model, restoring the first model to include model parameters that exist before the training the first model.

### Claim 18 (depends on 16)

The computing device according to claim 16, wherein the reward value is equal to a difference obtained by subtracting the first predicted loss from an initial predicted loss, and the training actions further include:
after the obtaining the at least one second sample, randomly obtaining an initial training sample set from the at least one second sample; and
training the first model by using the initial training sample set, and obtaining the initial predicted loss of a trained first model based on the multiple determined test samples.

### Claim 19 (depends on 16)

The computing device according to claim 16, wherein the training actions are iterated in multiple iterations of trainings, and the reward value is equal to a difference obtained by subtracting a first predicted loss obtained in a current training from a first predicted loss obtained in a previous training immediately before the current training.

### Claim 20 (depends on 15)

The computing device according to claim 15, wherein the first model is an anti-fraud model, the feature data is feature data of a transaction, and the label value indicates whether the transaction is a fraudulent transaction.
