# US 11,907,663 B2 · Methods for unsupervised prediction of performance drop due to domain shift

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

- Number: US 11,907,663 B2
- Document ID: US11907663B2
- Status: Granted
- Kind: B2
- Application number: 17/240,216
- Filed: 2021-04-26
- Published: 2021-11-04
- Granted: 2024-02-20
- Earliest claimed: 2020-04-30
- Assignees: Naver France
- Applicants: Naver France
- Inventors: Matthias Galle; Hady Elsahar
- Web page: https://patentgrep.com/patent/US11907663B2

## CPC

- G06F 40/30: Semantic analysis
- G06F 16/3344: {using natural language analysis}
- G06F 40/117: Tagging; Marking up (details of markup languages G06F40/143); Designating a block; Setting of attributes (style sheets, e.g. eXtensible Stylesheet Language Transformation [XSLT], G06F40/154)
- G06N 3/044: Recurrent networks, e.g. Hopfield networks
- G06N 3/0442: characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
- G06N 3/045: Combinations of networks
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06N 3/088: Non-supervised learning, e.g. competitive learning
- G06N 3/09: Supervised learning
- G06N 5/04: Inference or reasoning models
- G06N 20/00: Machine learning
- G06F 40/284: Lexical analysis, e.g. tokenisation or collocates
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A system includes: a natural language processing (NLP) model trained in a training domain and configured to perform natural language processing on an input dataset; an accuracy module configured to: calculate a domain shift metric based on the input dataset; and calculate a predicted decrease in accuracy of the NLP model attributable to domain shift relative to the training domain based on the domain shift metric; and a retraining module configured to selectively trigger a retraining of the NLP model based on the predicted decrease in accuracy of the NLP model.

## Claims

### Claim 1

A system comprising:
a natural language processing (NLP) model trained in a training domain and configured to perform natural language processing on an input dataset;
an accuracy module configured to:
calculate a domain shift metric based on the input dataset; and
calculate a predicted decrease in accuracy of the NLP model attributable to domain shift relative to the training domain based on the domain shift metric; and
a retraining module configured to selectively trigger a retraining of the NLP model based on the predicted decrease in accuracy of the NLP model wherein one of:
(a) the domain shift metric is a proxy A domain (PAD) metric and the accuracy module is configured to calculate the domain shift metric using the equation
PAD*=1−2ε(G*d(Gf(x)))
where PAD* is the domain shift metric, ε is a predetermined scalar value, and θf and θy are parameters of a first function Gf and a second function G*d learned by minimizing a loss function, and learnable parameters of Gf and G*d are learned parameters; and
(b) the domain shift metric is a reverse classification accuracy (RCA) metric and the accuracy module is configured to calculate the domain shift metric using the equation:
RCA
*=
1
U
s
′
⁢
∑
x
i
,
y
i
∈
U
s
′
m
′
⁢
⁡
[
y
i
=
C
′
⁡
(
x
i
)
]
-
⁡
[
y
i
=
C
_
⁡
(
x
i
)
]
,
where RCA* is the domain shift metric, C′ is a classifier learned on out-of-domain data and C the classifier learned on held-out in-domain data, xi and yi are data-points, Us' represents data in the training domain.

### Claim 2 (depends on 1)

The system of claim 1 wherein the retraining module is configured to trigger a retraining of the NLP model when the predicted decrease in accuracy of the NLP model is greater than a predetermined value,
wherein the predetermined value is greater than zero.

### Claim 3 (depends on 1)

The system of claim 1 further comprising a results module configured to:
determine a sentiment regarding a subject based on an output of the NLP model; and
provide results including the sentiment to a computing device from which a query regarding the subject was received.

### Claim 4 (depends on 1)

The system of claim 1 further comprising a results module configured to determine a tag for a point of speech (POS) based on an output of the NLP model.

### Claim 5 (depends on 1)

The system of claim 1, wherein the NLP model is trained based on a training dataset that is different than the input dataset.

### Claim 6 (depends on 5)

The system of claim 5 wherein the training domain of the training dataset is different than a second domain of the input dataset.

### Claim 7 (depends on 1)

The system of claim 1 wherein the input dataset includes text of N social media posts,
wherein N is an integer greater than 0.

### Claim 8

A system comprising:
a training module configured to:
train, using a training dataset in a training domain, a machine learning (ML) model to perform processing on an input dataset;
determine properties of a domain shift metric for the training dataset in the training domain;
an accuracy module configured to:
calculate the domain shift metric based on the input dataset; and
calculate a predicted decrease in accuracy of the ML model attributable to domain shift relative to the training domain based on the domain shift metric using the properties of the domain shift metric for the training dataset; and
a retraining module configured to selectively trigger a retraining of the ML model based on the predicted decrease in accuracy of the ML model, wherein one of:
(a) the domain shift metric is a proxy A domain (PAD) metric and the accuracy module is configured to calculate the domain shift metric using the equation
PAD*=1−2ε(G*d(Gf(x)))
where PAD* is the domain shift metric, ε is a predetermined scalar value, and θf and θy are parameters of a first function Gf and a second function G*d learned by minimizing a loss function, and learnable parameters of Gf and G*d are learned parameters; and
(b) the domain shift metric is a reverse classification accuracy (RCA) metric and the accuracy module is configured to calculate the domain shift metric using the equation:
R
⁢
C
⁢
A
*
=
1
U
s
′
⁢
∑
x
i
,
y
i
∈
U
s
′
m
′
⁢
𝕀
[
y
i
=
C
′
(
x
i
)
]
-
𝕀
[
y
i
=
C
¯
(
x
i
)
]
,
where RCA* is the domain shift metric, C′ is a classifier learned on out-of-domain data and C the classifier learned on held-out in-domain data, xi and vi are data-points, Us' represents data in the training domain.

### Claim 9 (depends on 8)

The system of claim 8 wherein the retraining module is configured to trigger a retraining of the ML model when the predicted decrease in accuracy of the ML model is greater than a predetermined value,
wherein the predetermined value is greater than zero.

### Claim 10 (depends on 8)

The system of claim 8, wherein the ML model is a natural language processing (NLP) model that is trained based on a training dataset that is different than the input dataset.

### Claim 11

A computerized method performed by one or more processors, the method comprising:
training a natural language processing (NLP) model using a training dataset to perform natural language processing on an input dataset;
after receiving the input dataset that is different than the training dataset:
calculating a domain shift metric based on the input dataset; and
calculating a predicted decrease in accuracy of the NLP model attributable to domain shift relative to a training domain based on the domain shift metric; and
selectively triggering a retraining of the NLP model based on the predicted decrease in accuracy of the NLP model,
wherein one of:
(a) the domain shift metric is a proxy A domain (PAD) metric and the calculating the domain shift metric includes calculating the domain shift metric using the equation
PAD*=1−2ε(G*d(Gf(x)))
where PAD* is the domain shift metric, ε is a predetermined scalar value, and θf and θy are parameters of a first function Gf and a second function G*d learned by minimizing a loss function, and learnable parameters of Gf and G*d are learned parameters; and
(b) the domain shift metric is a reverse classification accuracy (RCA) metric and the calculating the domain shift metric includes calculating the domain shift metric using the equation:
RCA
*
=
1
U
s
′
⁢
∑
x
i
,
y
i
∈
U
s
′
m
′
⁢
𝕀
[
y
i
=
C
′
⁢
(
x
i
)
]
-
𝕀
[
y
i
=
C
¯
⁢
(
x
i
)
]
,
where RCA* is the domain shift metric, C′ is a classifier learned on out-of-domain data and C the classifier learned on held-out in-domain data, xi and yi are data-points, Us' represents data in the training domain.

### Claim 12

A system comprising:
a natural language processing (NLP) model trained in a training domain and configured to perform natural language processing on an input dataset;
a means for:
calculating a domain shift metric based on the input dataset; and
calculating a predicted decrease in accuracy of the NLP model attributable to domain shift relative to the training domain based on the domain shift metric; and
a means for selectively triggering a retraining of the NLP model based on the predicted decrease in accuracy of the NLP model,
wherein one of:
(a) the domain shift metric is a proxy A domain (PAD) metric and the means for calculating the domain shift metric is configured to calculate the domain shift metric using the equation
PAD*=1−2ε(G*d(Gf(x))),
where PAD* is the domain shift metric, ε is a predetermined scalar value, and θf and θy are parameters of a first function Gf and a second function G*d learned by minimizing a loss function, and learnable parameters of Gf and G*d are learned parameters; and
(b) the domain shift metric is a reverse classification accuracy (RCA) metric and the means for calculating the domain shift metric is configured to calculate the domain shift metric using the equation:
R
⁢
C
⁢
A
*
=
1
U
s
′
⁢
∑
x
i
,
y
i
∈
U
s
′
m
′
⁢
𝕀
[
y
i
=
C
′
(
x
i
)
]
-
𝕀
[
y
i
=
C
¯
(
x
i
)
]
,
where RCA* is the aomain snip metric, C′ is a classifier learned on out-of-domain data and C the classifier learned on held-out in-domain data, xi and yi are data-points, Us' represents data in the training domain.
