SNR detection with few-shot trained models
Methods and systems for training a model include determining class prototypes of time series samples from a training dataset. A task corresponding to the time series samples is encoded using the class prototypes and a task-level configuration. A likelihood value is determined based on outputs of a time series density model, a task-class distance from a task embedding model, and a task density model. Parameters of the time series density model, the task embedding model, and the task density model are adjusted responsive to the likelihood value.
1 . A computer-implemented method for training a model, comprising:
determining class prototypes of time series samples from a training dataset;
encoding a task corresponding to the time series samples, having a measurement of an optical communications signal that includes one or more of data obtained after polarization decomposition and data obtained after digital signal processing, using the class prototypes and a task-level configuration that includes configuration parameters relating to an environment of an optical communications network;
determining a likelihood value based on outputs of a time series density model, a task-class distance from a task embedding model, and a task density model; and
adjusting parameters of the time series density model, the task embedding model, and the task density model responsive to the likelihood value.
2 . The method of claim 1 , further comprising encoding the time series samples into a vector representation before determining the class prototypes.
3 . The method of claim 1 , wherein encoding the task includes encoding task level features that include the task-level configuration and encoding task instance features by aggregating the class prototype.
4 . The method of claim 1 , wherein the task density model determines a task density as a probability of a task given a cluster center and a covariance matrix of a cluster.
5 . The method of claim 1 , wherein the time series density model determines a time series density as a probability of a time series sample based on a class prototype and a covariance matrix of a class.
6 . The method of claim 1 , wherein the task-class distance is determined as a maximum of a distance between a prototype and a set of optimal class prototypes.
7 . The method of claim 1 , wherein the likelihood value has a lower bound:
ℓ
L
(
D
τ
;
θ
,
)
=
1
N
∑
i
=
1
n
(
log
(
e
i
|
y
i
)
+
𝔼
v
τ
~
q
ϕ
(
v
τ
|
𝒟
τ
s
)
[
log
(
y
i
|
v
τ
)
+
log
∑
z
τ
=
1
r
p
(
v
τ
|
z
τ
)
p
(
z
τ
)
]
)
+
H
(
q
ϕ
(
v
τ
|
𝒟
τ
s
)
)
where H(⋅) is an entropy function, N is a number of classes, p θ,w (e i |y i ) is a probability of an embedding e i given a sample y i with model parameter θ and trainable parameters w, is an expectation function, v τ is an embedded representation of task τ, D t s is a set of training support samples, q ϕ (⋅) is an approximated posterior with inference network ϕ, z τ is a latent task variable, and r is a hyperparameter of a number of components in a mixture distribution.
8 . The method of claim 1 , further comprising determining a new task-level configuration that reflects configuration parameters relating to a new environment, to adapt to the new environment.
9 . A system for training a model, comprising:
a hardware processor; and
a memory that stores a computer program which, when executed by the hardware processor, causes the hardware processor to:
determine class prototypes of time series samples from a training dataset;
encode a task corresponding to the time series samples, having a measurement of an optical communications signal that includes one or more of data obtained after polarization decomposition and data obtained after digital signal processing, using the class prototypes and a task-level configuration that includes configuration parameters relating to an environment of an optical communications network;
determine a likelihood value based on outputs of a time series density model, a task-class distance from a task embedding model, and a task density model; and
adjust parameters of the time series density model, the task embedding model, and the task density model responsive to the likelihood value.
10 . The system of claim 9 , wherein the computer program further causes the hardware processor to encode the time series samples into a vector representation before determining the class prototypes.
11 . The system of claim 9 , wherein the computer program further causes the hardware processor to encode task level features that include the task-level configuration and to encode task instance features by aggregating the class prototype.
12 . The system of claim 9 , wherein the task density model determines a task density as a probability of a task given a cluster center and a covariance matrix of a cluster.
13 . The system of claim 9 , wherein the time series density model determines a time series density as a probability of a time series sample based on a class prototype and a covariance matrix of a class.
14 . The system of claim 9 , wherein the task-class distance is determined as a maximum of a distance between a prototype and a set of optimal class prototypes.
15 . The system of claim 9 , wherein the likelihood value has a lower bound:
ℓ
L
(
𝒟
τ
;
θ
,
)
=
1
N
∑
i
=
1
n
(
log
(
e
i
|
y
i
)
+
𝔼
v
τ
~
q
ϕ
(
v
τ
|
𝒟
τ
s
)
[
log
(
y
i
|
v
τ
)
+
log
∑
z
τ
=
1
r
p
(
v
τ
|
z
τ
)
p
(
z
τ
)
]
)
+
H
(
q
ϕ
(
v
τ
|
𝒟
τ
s
)
)
where H(⋅) is an entropy function, N is a number of classes, p θ,w (e i |y i ) is a probability of an embedding e i given a sample y i with model parameter θ and trainable parameters w, is an expectation function, v τ is an embedded representation of task τ, D τ s is a set of training support samples, q ϕ (⋅) is an approximated posterior with inference network ϕ, z τ is a latent task variable, and r is a hyperparameter of a number of components in a mixture distribution.
16 . The system of claim 9 , wherein the computer program further causes the hardware processor to determine a new task-level configuration that reflects configuration parameters relating to a new environment, to adapt to the new environment.