Original: F EW -S HOT O NE -C LASS C LASSIFICATION VIA M ETAL EARNING
Revised: F EW -S HOT O NE -C LASS C LASSIFICATION VIA M ETAL EARNING

Original: Anonymous authors
Revised: Anonymous authors

Original: Paper under double-blind review
Revised: Paper under double-blind review

Original: A BSTRACT
Revised: A BSTRACT

Original: Although few-shot learning and one-class classiﬁcation (OCC), i.e. learning a binary classiﬁer with data from only one class, have been separately well studied, their intersection remains rather unexplored.
Revised: Although few-shot learning and one-class classiﬁcation (OCC), i.e. learning a binary classiﬁer with data from only one class, have been separately well studied, their intersection remains rather unexplored.

Original: Our work addresses the few-shot
Revised: Our work addresses the few-shot

Original: OCC problem and presents a meta-learning approach that requires only few data examples from only one class to adapt to unseen tasks.
Revised: OCC problem and presents a meta-learning approach that requires only few data examples from only one class to adapt to unseen tasks.

Original: The proposed method builds upon the model-agnostic meta-learning (MAML) algorithm
Revised: The proposed method builds upon the model-agnostic meta-learning (MAML) algorithm

Original: (Finn et al., 2017) and learns a model initialization particularly suited for learning few-shot
Revised: (Finn et al., 2017) and learns a model initialization particularly suited for learning few-shot

Original: OCC tasks.
Revised: OCC tasks.

Original: This is done by explicitly optimizing for a parameter initializationfrom which taking a few gradient steps with one-class minibatches results in a performance increase on class-balanced  data.
Revised: This is done by explicitly optimizing for a parameter initialization which only requires a few gradient steps with one-class minibatches to yield a performance increase on class-balanced test data.

Original: We provide a theoretical analysis that explains why our approach works in the few-shot OCC scenario, while other meta-learning algorithms, including MAML, fail.
Revised: We provide a theoretical analysis that explains why our approach works in the few-shot OCC scenario, while other meta-learning algorithms, including MAML, fail.

Original: Empirical results on six datasets from the image and time-series domains show that our method substantially outperforms both, classical OCC and few-shot classiﬁcation approaches, and demonstrate the ability to quickly learn unseen tasks from only few normal class samples.
Revised: Empirical results on six datasets from the image and time-series domains show that our method substantially outperforms both, classical OCC and few-shot classiﬁcation approaches, and demonstrate the ability to quickly learn unseen tasks from only few normal class samples.

Original: Moreover, we successfully learn anomaly detectors for a real world application involving sensor readings recorded during industrial manufacturing of workpieces with a CNC milling machine usingonly a few examples from the normal class.
Revised: Moreover, we successfully learn anomaly detectors for a real-world application on sensor readings recorded during industrial manufacturing of workpieces with a CNC milling machine using a few examples from the normal class.

Original:  I NTRODUCTION
Revised:  I NTRODUCTION

Original: The anomaly detection (AD) task (Chandola et al., 2009; Aggarwal, 2015) consists in differentiating between normal and abnormal data samples.
Revised: The anomaly detection (AD) task (Chandola et al., 2009; Aggarwal, 2015) consists in differentiating between normal and abnormal data samples.

Original: AD applications are common in various domains that involve different data types, including medical diagnosis (Prastawa et al., 2004), cybersecurity (Garcia-Teodoro et al., 2009) and quality control in industrial manufacturing (Scime & Beuth, 2018).
Revised: AD applications are common in various domains that involve different data types, including medical diagnosis (Prastawa et al., 2004), cybersecurity (Garcia-Teodoro et al., 2009) and quality control in industrial manufacturing (Scime & Beuth, 2018).

Original: Due to the rarity of anomalies, the data underlying AD problems exhibits high class-imbalance.
Revised: Due to the rarity of anomalies, the data underlying AD problems exhibits high class-imbalance.

Original: Therefore, AD problems are usually formulated as one-class classiﬁcation (OCC) problems (Moya et al., 1993), where either only a few or no anomalous data samples are available for training the model (Khan & Madden, 2014).
Revised: Therefore, AD problems are usually formulated as one-class classiﬁcation (OCC) problems (Moya et al., 1993), where either only a few or no anomalous data samples are available for training the model (Khan & Madden, 2014).

Original: While most of the developed approaches (Khan & Madden, 2014) require a substantial amount of normal data to yield good generalization, in many real-world applications, e.g. in industrial manufacturing, only small datasets are available.
Revised: While most of the developed approaches (Khan & Madden, 2014) require a substantial amount of normal data to yield good generalization, in many real-world applications, e.g. in industrial manufacturing, only small datasets are available.

Original: Data scarcity can have many reasons: data collection itself might be expensive, e.g. in healthcare, or happens only gradually, such as in a cold-start situation.
Revised: Data scarcity can have many reasons: data collection itself might be expensive, e.g. in healthcare, or happens only gradually, such as in a cold-start situation.

Original: To enable learning from few examples, various viable meta-learning approaches (Lake et al., 2011; Ravi & Larochelle, 2016; Finn et al., 2017) have been developed.
Revised: To enable learning from few examples, various viable meta-learning approaches (Lake et al., 2011; Ravi & Larochelle, 2016; Finn et al., 2017) have been developed.

Original: However, they rely on having examples from each of the classiﬁcation task’s classes, which prevents their application to OCC tasks.
Revised: However, they rely on having examples from each of the classiﬁcation task’s classes, which prevents their application to OCC tasks.

Original: To the best of our knowledge, the few-shot OCC (FS-OCC) problem has only been addressed by Kozerawski & Turk (2018) in the image domain.
Revised: To the best of our knowledge, the few-shot OCC (FS-OCC) problem has only been addressed by Kozerawski & Turk (2018) in the image domain.

Original: Our contribution is threefold: Firstly, we show that classical OCC approaches fail in the few-shot data regime.
Revised: Our contribution is threefold: Firstly, we show that classical OCC approaches fail in the few-shot data regime.

Original: Secondly, we demonstrate theoretically that classical gradient-based meta-learning algorithms do not yield initializations suitable for OCC tasks and that second-order derivatives are needed to optimize for such initializations.
Revised: Secondly, we provide a theoretical analysis showing that classical gradient-based metalearning algorithms do not yield initializations suitable for OCC tasks and that second-order derivatives are needed to optimize for such initializations.

Original: Thirdly, we propose one-class model-agnostic metalearning (OC-MAML), a data-domain-agnostic algorithm that quickly learns FS-OCC tasks, to serve as a ﬁrst, simple and strong baseline for future research in the understudied FS-OCC problem.
Revised: Thirdly, we propose one-class model-agnostic meta-learning (OC-MAML), a data-domain-agnostic algorithm that quickly learns FS-OCC tasks, to serve as a ﬁrst, simple and strong baseline for future research in the understudied FS-OCC problem.

Original: OC-MAML builds upon model-agnostic meta-learning (MAML)
Revised: OC-MAML builds upon model-agnostic meta-learning (MAML)

Original: (Finn et al., 2017), which is a meta-learning method that explicitly optimizes for few-shot learning and yields a model initialization that enables quick adaptation to a new task using only few of its datapoints.
Revised: (Finn et al., 2017), which is a meta-learning method that explicitly optimizes for few-shot learning and yields a model initialization that enables quick adaptation to a new task using only few of its datapoints.

Original: Like MAML, OCMAML yields model parameters that are easily adaptable to unseen tasks.
Revised: Like MAML, OCMAML yields model parameters that are easily adaptable to unseen tasks.

Original: The difference is that the model initialization delivered by OC-MAML is particularly suited for adaptation to OCC tasks and hence requires few examples from only one class of the target task for good adaptation.
Revised: The difference is that the model initialization delivered by OC-MAML is particularly suited for adaptation to OCC tasks and hence requires few examples from only one class of the target task for good adaptation.

Original: We provide a theoretical analysis that shows that OC-MAML explicitly optimizes for parameter initializations which yield performance increase on class-balanced  data by taking only a few gradient steps with one-class minibatches.
Revised: We provide a theoretical analysis that shows that OC-MAML explicitly optimizes for parameter initializations which yield performance increase on class-balanced test data by taking only a few gradient steps with one-class minibatches.

Original: This is done by maximizing the inner product of gradients computed on different minibatches with different class-imbalance rates.
Revised: This is done by maximizing the inner product of gradients computed on different minibatches with different class-imbalance rates.

Original: While recent meta-learning approaches focused on the few-shot learning problem, i.e. learning to learn with few examples, we extend their use to the OCC problem, i.e. learning to learn with examples from only one class.
Revised: While recent meta-learning approaches focused on the few-shot learning problem, i.e. learning to learn with few examples, we extend their use to the OCC problem, i.e. learning to learn with examples from only one class.

Original: We empirically validate our theoretical analysis on six datasets from the image and time-series domains, and demonstrate the robustness and maturity of our approach for real-world application by successfully testing it on a real-world dataset of sensor readings recorded during manufacturing of metal workpieces with a CNC milling machine.
Revised: We empirically validate our theoretical analysis on six datasets from the image and time-series domains, and demonstrate the robustness and maturity of our approach for real-world application by successfully testing it on a real-world dataset of sensor readings recorded during manufacturing of metal workpieces with a CNC milling machine.

Original:  A PPROACH 2. P ROBLEM STATEMENT
Revised:  A PPROACH 2. P ROBLEM STATEMENT

Original: Our goal is to learn a one-class classiﬁcation (OCC) task using only a few examples from the normal class.
Revised: Our goal is to learn a one-class classiﬁcation (OCC) task using only a few examples from the normal class.

Original: In the following, we ﬁrst discuss the unique challenges of the few-shot one-class classiﬁcation (FS-OCC) problem.
Revised: In the following, we ﬁrst discuss the unique challenges of the few-shot one-class classiﬁcation (FS-OCC) problem.

Original: Subsequently, we formulate the FS-OCC problem as a meta-learning problem.
Revised: Subsequently, we formulate the FS-OCC problem as a meta-learning problem.

Original: In order to perform one-class classiﬁcation, i.e. differentiate between in-class and out-of-class examples, approximating a generalized decision boundary for the normal class is necessary.
Revised: In order to perform one-class classiﬁcation, i.e. differentiate between in-class and out-of-class examples, approximating a generalized decision boundary for the normal class is necessary.

Original: Learning such a class decision boundary in the few-shot regime can be especially challenging for the following reasons.
Revised: Learning such a class decision boundary in the few-shot regime can be especially challenging for the following reasons.

Original: On the one hand, if the model overﬁts to the few available datapoints, the class decision boundary would be too restrictive, which would prevent generalization to unseen examples.
Revised: On the one hand, if the model overﬁts to the few available datapoints, the class decision boundary would be too restrictive, which would prevent generalization to unseen examples.

Original: As a result, some normal samples would be predicted as anomalies.
Revised: As a result, some normal samples would be predicted as anomalies.

Original: On the other hand, if the model overﬁts to the majority class, e.g. predicting almost everything as normal, the class decision boundary would overgeneralize, and out-of-class (anomalous) examples would not be detected.
Revised: On the other hand, if the model overﬁts to the majority class, e.g. predicting almost everything as normal, the class decision boundary would overgeneralize, and out-of-class (anomalous) examples would not be detected.

Original: In our meta-learning problem formulation, we assume access to data from classiﬁcation tasks T traini sampled from a task distribution p ( T ) related to our target OCC tasks.
Revised: In our meta-learning problem formulation, we assume access to data from classiﬁcation tasks T traini sampled from a task distribution p ( T ) related to our target OCC tasks.

Original: In the few-shot classiﬁcation context, N -way K -shot learning tasks are usually used to test the learning procedure, in our case a model initialization, yielded by the meta-learning algorithm.
Revised: In the few-shot classiﬁcation context, N -way K -shot learning tasks are usually used to test the learning procedure, in our case the model initialization, yielded by the meta-learning algorithm.

Original: An N -way K -shot classiﬁcation task includes K examples from each of the N classes that are used for learning this task, after which the trained classiﬁer is tested on a disjoint set of data (Vinyals et al., 2016).
Revised: An N -way K -shot classiﬁcation task includes K examples from each of the N classes that are used for learning this task, after which the trained classiﬁer is tested on a disjoint set of data (Vinyals et al., 2016).

Original: When the target task is an OCC task, only examples from one class are available for learning, which can be viewed as a 1 -way K -shot classiﬁcation task.
Revised: When the target task is an OCC task, only examples from one class are available for training, which can be viewed as a 1 -way K -shot classiﬁcation task.

Original: In order to align with the AD problem, the available examples have to belong to the normal (majority) class, which usually has a lower variance than the anomalous (minority) class.
Revised: In order to align with the AD problem, the available examples have to belong to the normal (majority) class, which usually has a lower variance than the anomalous (minority) class.

Original: This problem formulation is a prototype for a practical use case where an application-speciﬁc anomaly detector is needed and only few normal class examples are available.
Revised: This problem formulation is a prototype for a practical use case where an application-speciﬁc anomaly detector is needed and only few normal class examples are available.

Original: 2. M ODEL -A GNOSTIC M ETA -L EARNING
Revised: 2. M ODEL -A GNOSTIC M ETA -L EARNING

Original: Model-agnostic meta-learning (MAML)
Revised: Model-agnostic meta-learning (MAML)

Original: (Finn et al., 2017) is an optimization-based meta-learning algorithm upon which we build in our present work.
Revised: (Finn et al., 2017) is an optimization-based meta-learning algorithm upon which we build in our present work.

Original: MAML learns a model initialization that enables quick adaptation to unseen tasks using only few data samples.
Revised: MAML learns a model initialization that enables quick adaptation to unseen tasks using only few data samples.

Original: For that, MAML trains a model explicitly for few-shot learning on tasks T i coming from the same task distribution p ( T ) as the unseen target task T test .
Revised: For that, MAML trains a model explicitly for few-shot learning on tasks T i coming from the same task distribution p ( T ) as the unseen target task T test .

Original: In order to assess the model’s adaptation ability to unseen tasks, the available tasks are divided into mutually disjoint task sets: one for meta-training S tr , one for metavalidation S val and one for meta-testing S test .
Revised: In order to assess the model’s adaptation ability to unseen tasks, the available tasks are divided into mutually disjoint task sets: one for meta-training S tr , one for metavalidation S val and one for meta-testing S test .

Original: Each task T i is divided into two disjoint sets of data, each of which is used for a particular MAML operation: D tr is used for adaptation and D val is used for validation, i.e. evaluating the adaptation.
Revised: Each task T i is divided into two disjoint sets of data, each of which is used for a particular MAML operation: D tr is used for adaptation and D val is used for validation, i.e. evaluating the adaptation.

Original: The adaptation procedure of a model f θ to a particular task T i consists in taking one (or more) gradient descent step(s) using few datapoints sampled from
Revised: The adaptation procedure of a model f θ to a particular task T i consists in taking one (or more) gradient descent step(s) using few datapoints sampled from

Original: D tr .
Revised: D tr .

Original: We also refer to the adaptation updates as inner loop updates .
Revised: We also refer to the adaptation updates as inner loop updates .

Original: A good measure for the suitability of the initialization parameters θ for few-shot adaptation to a considered task T i is the loss L valT i ( f θ (cid:48) i ) , which is computed on the validation set D val using the task-speciﬁc adapted model f θ (cid:48)
Revised: A good measure for the suitability of the initialization parameters θ for few-shot adaptation to a considered task T i is the loss L valT i ( f θ (cid:48) i ) , which is computed on the validation set D val using the task-speciﬁc adapted model f θ (cid:48)

Original: i .
Revised: i .

Original: In order to optimize for few-shot learning, the model parameters θ are updated by minimizing the aforementioned loss across all meta-training tasks.
Revised: In order to optimize for few-shot learning, the model parameters θ are updated by minimizing the aforementioned loss across all meta-training tasks.

Original: This update, called the outer loop update , can be expressed as:
Revised: This update, called the outer loop update , can be expressed as:

Original: [Equation]
Revised: [Equation]

Original: where β is the learning rate used for the outer loop.
Revised: where β is the learning rate used for the outer loop.

Original: In order to avoid meta-overﬁtting, i.e. overﬁtting to the meta-training tasks, model selection can be done via conducting validation episodes using tasks from S val throughout meta-training.
Revised: In order to avoid meta-overﬁtting, i.e. overﬁtting to the meta-training tasks, model selection can be done via conducting validation episodes using tasks from S val throughout meta-training.

Original: At meta-test time, the few-shot adaptation to unseen tasks from S test is evaluated.
Revised: At meta-test time, the few-shot adaptation to unseen tasks from S test is evaluated.

Original: We note that, in the case of few-shot classiﬁcation, K datapoints from each class are sampled from D tr for the adaptation, during training, validation and testing.
Revised: We note that, in the case of few-shot classiﬁcation, K datapoints from each class are sampled from D tr for the adaptation, during training, validation and testing.

Original: 2. O NE -C LASS M ODEL -A GNOSTIC M ETA -L EARNING 2.3. A LGORITHM
Revised: 2. O NE -C LASS M ODEL -A GNOSTIC M ETA -L EARNING 2.3. A LGORITHM

Original: The primary contribution of our work is to show that second-order gradient-based meta-learning is a viable approach to the underexplored few-shot one-class classiﬁcation (FS-OCC) problem.
Revised: The primary contribution of our work is to show that second-order gradient-based meta-learning is a viable approach to the underexplored few-shot one-class classiﬁcation (FS-OCC) problem.

Original: We achieve this by adequately modifying the objective of the adaptation step, i.e. the inner loop updates, of the MAML algorithm.
Revised: We achieve this by adequately modifying the objective of the adaptation step, i.e. the inner loop updates, of the MAML algorithm.

Original: We choose to build upon gradient-based meta-learning algorithms, because these were shown to be universal learning algorithm approximators (Finn & Levine, 2017), which means that they could approximate a learning algorithm tailored for FS-OCC.
Revised: We choose to build upon gradient-based meta-learning algorithms, because these were shown to be universal learning algorithm approximators (Finn & Levine, 2017), which means that they could approximate a learning algorithm tailored for FS-OCC.

Original: As explained in Section 2.2, MAML optimizes explicitly for few-shot adaptation by creating and using auxiliary tasks that have the same characteristic as the target tasks, in this case tasks that include only few datapoints for training.
Revised: As explained in Section 2.2, MAML optimizes explicitly for few-shot adaptation by creating and using auxiliary tasks that have the same characteristic as the target tasks, in this case tasks that include only few datapoints for training.

Original: Analogously, OC-MAML trains explicitly for quick adaptation to OCC tasks by creating OCC auxiliary tasks for meta-training.
Revised: Analogously, OC-MAML trains explicitly for quick adaptation to OCC tasks by creating OCC auxiliary tasks for meta-training.

Original: Concretely, this is done by modifying the class-imbalance rate (CIR) of the inner loop data batches to match the one of the test task.
Revised: Concretely, this is done by modifying the class-imbalance rate (CIR) of the inner loop data batches to match the one of the test task.

Original: The meta-training procedure of OC-MAML is described in Algorithm 1 in Appendix A.
Revised: The meta-training procedure of OC-MAML is described in Algorithm 1 in Appendix A.

Original: As described in Section 1, OCC problems are binary classiﬁcation scenarios where only few or no minority class samples are available.
Revised: As described in Section 1, OCC problems are binary classiﬁcation scenarios where only few or no minority class samples are available.

Original: In order to address both of theses cases, we introduce a hyperparameter ( c ) which sets the CIR of the batch sampled for the inner updates.
Revised: In order to address both of theses cases, we introduce a hyperparameter ( c ) which sets the CIR of the batch sampled for the inner updates.

Original: Hereby, c gives the percentage of the samples belonging to the minority (anomalous) class w.r.t.
Revised: Hereby, c gives the percentage of the samples belonging to the minority (anomalous) class w.r.t.

Original: the total number of samples, e.g. setting c = 0% means only majority class samples are contained in the data batch.
Revised: the total number of samples, e.g. setting c = 0% means only majority class samples are contained in the data batch.

Original: We focus on this latter extreme case, where no anomalous samples are available for learning.
Revised: We focus on this latter extreme case, where no anomalous samples are available for learning.

Original: The key difference between MAML and OC-MAML is in the sampling operation of the inner loop batch (operation 5 in algorithm 1 in Appendix A).
Revised: The key difference between MAML and OC-MAML is in the sampling operation of the inner loop batch (operation 5 in Algorithm 1 in Appendix A).

Original: By reducing the size of the batch used for the adaptation (via the hyperparameter K ), MAML trains for few-shot adaptation.
Revised: By reducing the size of the batch used for the adaptation (via the hyperparameter K ), MAML trains for few-shot adaptation.

Original: OC-MAML extends this approach to train for few-shot one-class adaptation by reducing the CIR of the batch used for adaptation (via the hyperparameter c ).
Revised: OC-MAML extends this approach to train for few-shot one-class adaptation by reducing the CIR of the batch used for adaptation (via the hyperparameter c ).

Original: In order to evaluate the performance of the adapted model on both classes, we use a class-balanced validation batch B (cid:48) for the outer loop updates.
Revised: In order to evaluate the performance of the adapted model on both classes, we use a class-balanced validation batch B (cid:48) for the outer loop updates.

Original: This way, we maximize the performance of the model in recognizing both classes after having seen examples from only one class during adaptation.
Revised: This way, we maximize the performance of the model in recognizing both classes after having seen examples from only one class during adaptation.

Original: Using OCC tasks for adaptation during meta-training favors model initializations that enable a quick adaptation to OCC tasks over those that require classbalanced tasks.
Revised: Using OCC tasks for adaptation during meta-training favors model initializations that enable a quick adaptation to OCC tasks over those that require classbalanced tasks.

Original: From a representation learning standpoint, OC-MAML learns representations that are not only broadly suitable for the data underlying p ( T ) , but also particularly suited for OCC tasks.
Revised: From a representation learning standpoint, OC-MAML learns representations that are not only broadly suitable for the data underlying p ( T ) , but also particularly suited for OCC tasks.

Original: In Section 2.3.2, we discuss the unique characteristics of the model initializations yielded by OC-MAML and explain why adapting ﬁrst-order meta-learning algorithms to the OCC scenario does not yield the targeted results.
Revised: In Section 2.3.2, we discuss the unique characteristics of the model initializations yielded by OC-MAML and explain why adapting ﬁrst-order meta-learning algorithms to the OCC scenario does not yield the targeted results.

Original: 2.3. T HEORETICAL A NALYSIS : W HY DOES OC-MAML WORK ?
Revised: 2.3. T HEORETICAL A NALYSIS : W HY DOES OC-MAML WORK ?

Original: In this section we give a theoretical explanation of why OC-MAML works and why it is a more suitable approach than MAML for the few-shot one-class classiﬁcation (FS-OCC) problem.
Revised: In this section we give a theoretical explanation of why OC-MAML works and why it is a more suitable approach than MAML for the few-shot one-class classiﬁcation (FS-OCC) problem.

Original: To address the latter problem, we aim to ﬁnd a model parameter initialization, from which adaptation using few data examples from only one class yields a good performance on both classes, i.e. good generalization to the class-balanced task.
Revised: To address the latter problem, we aim to ﬁnd a model parameter initialization, from which adaptation using few data examples from only one class yields a good performance on both classes, i.e. good generalization to the class-balanced task.

Original: We additionally demonstrate that adapting ﬁrst-order metalearning algorithms, e.g. First-Order MAML (FOMAML)
Revised: We additionally demonstrate that adapting ﬁrst-order metalearning algorithms, e.g. First-Order MAML (FOMAML)

Original: (Finn et al., 2017) and Reptile (Nichol & Schulman, 2018), to the OCC scenario as done in OC-MAML, does not yield initializations with the desired characteristics, as it is the case for OC-MAML.
Revised: (Finn et al., 2017) and Reptile (Nichol & Schulman, 2018), to the OCC scenario as done in OC-MAML, does not yield initializations with the desired characteristics, as it is the case for OC-MAML.

Original: [Equation]
Revised: [Equation]

Original: By using a Taylor series expansion, Nichol & Schulman (2018) approximate the gradient used in the
Revised: By using a Taylor series expansion, Nichol & Schulman (2018) approximate the gradient used in the

Original: MAML update.
Revised: MAML update.

Original: For simplicity of exposition, in Equation 2 we give their results for the case where only 2 gradient-based updates are performed, i.e. one adaptation update on a minibatch including
Revised: For simplicity of exposition, in Equation 2 we give their results for the case where only 2 gradient-based updates are performed, i.e. one adaptation update on a minibatch including

Original: K datapoints from D tr and one meta-update on a minibatch including Q datapoints from D val .
Revised: K datapoints from D tr and one meta-update on a minibatch including Q datapoints from D val .

Original: We use the same notation used by Nichol & Schulman (2018), where g i and H i denote the gradient and
Revised: We use the same notation used by Nichol & Schulman (2018), where g i and H i denote the gradient and

Original: Hessian computed on the i th minibatch at the initial parameter point φ 1 , and α gives the learning rate.
Revised: Hessian computed on the i th minibatch at the initial parameter point φ 1 , and α gives the learning rate.

Original: Here it is assumed that the same learning rate is used for the adaptation and meta-updates.
Revised: Here it is assumed that the same learning rate is used for the adaptation and meta-updates.

Original: In Equation 2 Nichol & Schulman (2018) demonstrate that MAML partially optimizes for increasing the inner product of the gradients computed on different minibatches.
Revised: In Equation 2 Nichol & Schulman (2018) demonstrate that MAML partially optimizes for increasing the inner product of the gradients computed on different minibatches.

Original: In fact, when gradients from different minibatches have a positive inner product, taking a gradient step using one of them yields a performance increase on the other (Nichol & Schulman, 2018).
Revised: In fact, when gradients from different minibatches have a positive inner product, taking a gradient step using one of them yields a performance increase on the other (Nichol & Schulman, 2018).

Original: Equation 2 holds also for OC-MAML.
Revised: Equation 2 holds also for OC-MAML.

Original: However, in OC-MAML the minibatches 1 and 2 have different class-imbalance rates (CIRs), since the ﬁrst minibatch includes data from only one class and the second minibatch is class-balanced.
Revised: However, in OC-MAML the minibatches 1 and 2 have different class-imbalance rates (CIRs), since the ﬁrst minibatch includes data from only one class and the second minibatch is classbalanced.

Original: Hence, it optimizes for increasing the inner product of the gradients computed on different minibatches with different CIRs, while MAML does the same but for different minibatches with the same CIR, namely c = 50% .
Revised: Hence, it optimizes for increasing the inner product of the gradients computed on different minibatches with different CIRs, while MAML does the same but for different minibatches with the same CIR, namely c = 50% .

Original: Consequently, OC-MAML optimizes for a parameter initialization from which taking one (or few) gradient step(s) with one-class minibatch(es) results in a performance increase on class-balanced data.
Revised: Consequently, OC-MAML optimizes for a parameter initialization from which taking one (or few) gradient step(s) with one-class minibatch(es) results in a performance increase on class-balanced data.

Original: In contrast, MAML optimizes for a parameter initialization that requires class-balanced minibatches to yield the same effect.
Revised: In contrast, MAML optimizes for a parameter initialization that requires class-balanced minibatches to yield the same effect (Figure 1 in Appendix A).

Original: When adapting to OCC tasks, however, only examples from one class are available.
Revised: When adapting to OCC tasks, however, only examples from one class are available.

Original: We conclude, therefore, that using minibatches with different CIRs for meta-training, as done in OC-MAML, yields parameter initializations that are more suitable for adapting to OCC tasks.
Revised: We conclude, therefore, that using minibatches with different CIRs for meta-training, as done in OC-MAML, yields parameter initializations that are more suitable for adapting to OCC tasks.

Original: A natural question is whether applying our modiﬁcation of MAML, i.e. using only data from the normal class for adaptation during meta-training, to other gradient-based meta-learning algorithms would yield the same desired effect.
Revised: A natural question is whether applying our modiﬁcation of MAML, i.e. using only data from the normal class for adaptation during meta-training, to other gradient-based meta-learning algorithms would yield the same desired effect.

Original: We investigate this for First-Order MAML (FOMAML)
Revised: We investigate this for First-Order MAML (FOMAML)

Original: (Finn et al., 2017) and Reptile (Nichol & Schulman, 2018).
Revised: (Finn et al., 2017) and Reptile (Nichol & Schulman, 2018).

Original: FOMAML is a ﬁrst-order approximation of MAML, which ignores the second derivative terms.
Revised: FOMAML is a ﬁrst-order approximation of MAML, which ignores the second derivative terms.

Original: Reptile is also a ﬁrst-order meta-learning algorithm that learns an initialization that enables fast adaptation to test tasks using only few examples from each class.
Revised: Reptile is also a ﬁrst-order meta-learning algorithm that learns an initialization that enables fast adaptation to test tasks using only few examples from each class.

Original: In the following we demonstrate that adapting the FOMAML and Reptile algorithms to the one-class classiﬁcation scenario, to which we will refer as OC-FOMAML and OCReptile, does not result in optimizing for an initialization suitable for OCC tasks, as it is the case for
Revised: In the following we demonstrate that adapting the FOMAML and Reptile algorithms to the one-class classiﬁcation scenario, to which we will refer as OC-FOMAML and OCReptile, does not result in optimizing for an initialization suitable for OCC tasks, as it is the case for

Original: OC-MAML.
Revised: OC-MAML.

Original: We note that for OC-Reptile, the ﬁrst ( N − 1) batches contain examples from only one class and the last ( N th ) batch is class-balanced.
Revised: We note that for OC-Reptile, the ﬁrst ( N − 1) batches contain examples from only one class and the last ( N th ) batch is class-balanced.

Original: The approximated gradients used in the FOMAML and Reptile updates are given by Equations 3 and 4 (Nichol & Schulman, 2018), respectively.
Revised: The approximated gradients used in the FOMAML and Reptile updates are given by Equations 3 and 4 (Nichol & Schulman, 2018), respectively.

Original: [Equation]
Revised: [Equation]

Original: We note that these equations hold also for OC-FOMAML and OC-Reptile.
Revised: We note that these equations hold also for OC-FOMAML and OC-Reptile.

Original: By taking the expectation over minibatch sampling E τ, 1 , 2 for a meta-training task τ and two class-balanced minibatches,
Revised: By taking the expectation over minibatch sampling E τ, 1 , 2 for a meta-training task τ and two class-balanced minibatches,

Original: Nichol & Schulman (2018) establish that E τ, 1 , 2 [ H 1 g 2 ] =
Revised: Nichol & Schulman (2018) establish that E τ, 1 , 2 [ H 1 g 2 ] =

Original: E τ, 1 , 2 [ H 2 g 1 ] .
Revised: E τ, 1 , 2 [ H 2 g 1 ] .

Original: Averaging the two sides of the latter equation results in the following:
Revised: Averaging the two sides of the latter equation results in the following:

Original: [Equation]
Revised: [Equation]

Original: Equation 5 shows that, in expectation, FOMAML and Reptile, like MAML, optimize for increasing the inner product of the gradients computed on different minibatches with the same CIR.
Revised: Equation 5 shows that, in expectation, FOMAML and Reptile, like MAML, optimize for increasing the inner product of the gradients computed on different minibatches with the same CIR.

Original: However, when the minibatches 1 and 2 have different CIRs, which is the case for OC-FOMAML and
Revised: However, when the minibatches 1 and 2 have different CIRs, which is the case for OC-FOMAML and

Original: OC-Reptile, E τ, 1 , 2 [ H 1 g 2 ] (cid:54) =
Revised: OC-Reptile, E τ, 1 , 2 [ H 1 g 2 ] (cid:54) =

Original: E τ, 1 , 2 [ H 2 g 1 ] and therefore E τ, 1 , 2 [ H 2 g 1 ] (cid:54) = 1 2 E τ, 1 , 2 [ ∂ ( g 1 .g 2 ) ∂φ 1 ] .
Revised: E τ, 1 , 2 [ H 2 g 1 ] and therefore E τ, 1 , 2 [ H 2 g 1 ] (cid:54) = 1 2 E τ, 1 , 2 [ ∂ ( g 1 .g 2 ) ∂φ 1 ] .

Original: Hence, even though, similarly to OC-MAML, OC-FOMAML and OC-Reptile use minibatches with different CIRs for meta-training, contrarily to OC-MAML, they do not optimize for increasing the inner product of the gradients computed on different minibatches with different CIRs.
Revised: Hence, even though, similarly to OC-MAML, OC-FOMAML and OC-Reptile use minibatches with different CIRs for meta-training, contrarily to OC-MAML, they do not optimize for increasing the inner product of the gradients computed on different minibatches with different CIRs.

Original: The second derivative term H 1 g 2 is, thus, necessary to optimize for an initialization from which performance increase on a class-balanced task is yielded by taking few gradient steps using only data from one class.
Revised: The second derivative term H 1 g 2 is, thus, necessary to optimize for an initialization from which performance increase on a class-balanced task is yielded by taking few gradient steps using only data from one class.

Original:  R ELATED WORKS
Revised:  R ELATED WORKS

Original: Our proposed method addresses the few-shot one-class classiﬁcation (FS-OCC) problem, i.e. solving binary classiﬁcation problems using only few datapoints from only one class.
Revised: Our proposed method addresses the few-shot one-class classiﬁcation (FS-OCC) problem, i.e. solving binary classiﬁcation problems using only few datapoints from only one class.

Original: To the best of our knowledge, this problem was only addressed by Kozerawski & Turk (2018), and exclusively in the image data domain.
Revised: To the best of our knowledge, this problem was only addressed by Kozerawski & Turk (2018), and exclusively in the image data domain.

Original: Kozerawski & Turk (2018) train a feed-forward neural network (FFNN) to learn a transformation from feature vectors, extracted by a CNN pre-trained on ILSVRC(Russakovsky et al., 2015), to SVM decision boundaries.
Revised: Kozerawski & Turk (2018) train a feed-forward neural network (FFNN) to learn a transformation from feature vectors, extracted by a CNN pre-trained on ILSVRC(Russakovsky et al., 2015), to SVM decision boundaries.

Original: Hereby, the FFNN is trained on ILSVRC 2012.
Revised: Hereby, the FFNN is trained on ILSVRC 2012.

Original: At test time, an SVM boundary is inferred by using one image of one class from the test task, and then used to classify the test examples.
Revised: At test time, an SVM boundary is inferred by using one image of one class from the test task which is then used to classify the test examples.

Original: This approach is speciﬁc to the image domain since it relies on the availability of very large, well annotated datasets and uses data augmentation techniques speciﬁc to the image domain, e.g. mirroring.
Revised: This approach is speciﬁc to the image domain since it relies on the availability of very large, well annotated datasets and uses data augmentation techniques speciﬁc to the image domain, e.g. mirroring.

Original: OC-MAML offers a more general approach to
Revised: OC-MAML offers a more general approach to

Original: FS-OCC since it is data-domain-agnostic.
Revised: FS-OCC since it is data-domain-agnostic.

Original: In fact, it does not require a pre-trained feature extraction model, which might not be available for some data domains, e.g. sensor readings.
Revised: In fact, it does not require a pre-trained feature extraction model, which might not be available for some data domains, e.g. sensor readings.

Original: 3. F EW - SHOT CLASSIFICATION
Revised: 3. F EW - SHOT CLASSIFICATION

Original: Recentapproaches for few-shot classiﬁcation  may be broadly categorized in optimization-based methods (Ravi & Larochelle, 2016; Finn et al., 2017; Nichol & Schulman, 2018) and metric-based methods (Koch, 2015;
Revised: Recent few-shot classiﬁcation approaches may be broadly categorized in optimization-based methods (Ravi & Larochelle, 2016; Finn et al., 2017; Nichol & Schulman, 2018) and metric-based methods (Koch, 2015;

Original: Vinyals et al., 2016;
Revised: Vinyals et al., 2016;

Original: Snell et al., 2017; Sung et al., 2018).
Revised: Snell et al., 2017; Sung et al., 2018).

Original: The optimizationbased approaches aim to learn an optimization algorithm (Ravi & Larochelle, 2016) and/or a parameter initialization (Finn et al., 2017; Nichol & Schulman, 2018), that is tailored for few-shot learning.
Revised: The optimization-based approaches aim to learn an optimization algorithm (Ravi & Larochelle, 2016) and/or a parameter initialization (Finn et al., 2017; Nichol & Schulman, 2018), that is tailored for few-shot learning.

Original: Metric-based techniques learn a metric space where samples belonging to the same class are close together, which facilitates few-shot classiﬁcation (Koch, 2015; Vinyals et al., 2016; Snell et al., 2017; Sung et al., 2018).
Revised: Metric-based techniques learn a metric space where samples belonging to the same class are close together, which facilitates few-shot classiﬁcation (Koch, 2015; Vinyals et al., 2016; Snell et al., 2017; Sung et al., 2018).

Original: Rusu et al.
Revised: Rusu et al.

Original: (2018) develops a hybrid method that combines the advantages of both categories.
Revised: (2018) develops a hybrid method that combines the advantages of both categories.

Original: Prior meta-learning approaches to few-shot classiﬁcation addressed the N -way
Revised: Prior meta-learning approaches to few-shot classiﬁcation addressed the N -way

Original: K -shot classiﬁcation problem described in Section 2.1, i.e they only consider neatly class-balanced test classiﬁcation tasks.
Revised: K -shot classiﬁcation problem described in Section 2.1, i.e they only consider neatly class-balanced test classiﬁcation tasks.

Original: Optimization-based techniques require these samples to ﬁnetune the learned initialization.
Revised: Optimization-based techniques require these samples to ﬁnetune the learned initialization.

Original: In the metric-based methods, these samples are necessary to compute class prototypes (Snell et al., 2017), embeddings needed for veriﬁcation (Koch, 2015) or relation scores (Sung et al., 2018).
Revised: In the metric-based methods, these samples are necessary to compute class prototypes (Snell et al., 2017), embeddings needed for veriﬁcation (Koch, 2015) or relation scores (Sung et al., 2018).

Original: Our approach, however, requires only samples from one of the test task’s classes for learning.
Revised: Our approach, however, requires only samples from one of the test task’s classes for learning.

Original: Moreover, while the evaluation of the previous approaches in the classiﬁcation context was limited to the image domain, we additionally validate OC-MAML on datasets from the time-series domain.
Revised: Moreover, while the evaluation of the previous approaches in the classiﬁcation context was limited to the image domain, we additionally validate OC-MAML on datasets from the time-series domain.

Original: 3. O NE - CLASS CLASSIFICATION
Revised: 3. O NE - CLASS CLASSIFICATION

Original: Classical OCC approaches rely on SVMs (Sch¨olkopf et al., 2001; Tax & Duin, 2004) to distinguish between normal and abnormal samples.
Revised: Classical OCC approaches rely on SVMs (Sch¨olkopf et al., 2001; Tax & Duin, 2004) to distinguish between normal and abnormal samples.

Original: Pal & Foody (2010) show that the classiﬁcation accuracy of
Revised: Pal & Foody (2010) show that the classiﬁcation accuracy of

Original: SVMs decreases with an increasing number of input features, particularly when small datasets are available for training.
Revised: SVMs decreases with an increasing number of input features, particularly when small datasets are available for training.

Original: Hybrid approaches combining SVM-based techniques with feature extractors were developed to compress the input samples in lower dimensional representations (Xu et al., 2015;
Revised: Hybrid approaches combining SVM-based techniques with feature extractors were developed to compress the input samples in lower dimensional representations (Xu et al., 2015;

Original: Erfani et al., 2016; Andrews et al., 2016).
Revised: Erfani et al., 2016; Andrews et al., 2016).

Original: Fully deep methods that jointly perform the feature extraction step and the OCC step have also been developed (Ruff et al., 2018).
Revised: Fully deep methods that jointly perform the feature extraction step and the OCC step have also been developed (Ruff et al., 2018).

Original: Another category of approaches to OCC use the reconstruction error of antoencoders (Hinton & Salakhutdinov, 2006) trained with only normal class examples as an anomaly score (Hawkins et al., 2002; An & Cho, 2015; Chen et al., 2017).
Revised: Another category of approaches to OCC uses the reconstruction error of antoencoders (Hinton & Salakhutdinov, 2006) trained with only normal class examples as an anomaly score (Hawkins et al., 2002; An & Cho, 2015; Chen et al., 2017).

Original: Yet, determining a decision threshold for such an anomaly score requires labeled data from both classes.
Revised: Yet, determining a decision threshold for such an anomaly score requires labeled data from both classes.

Original: Further more recent techniques rely on GANs (Goodfellow et al., 2014) to perform OCC (Schlegl et al., 2017; Ravanbakhsh et al., 2017; Sabokrou et al., 2018).
Revised: Further more recent techniques rely on GANs (Goodfellow et al., 2014) to perform OCC (Schlegl et al., 2017; Ravanbakhsh et al., 2017; Sabokrou et al., 2018).

Original: The aforementioned hybrid and fully deep approaches require a considerable amount of data from the OCC task to train the typically highly parametrized models to learn features speciﬁc to the normal class.
Revised: The aforementioned hybrid and fully deep approaches require a considerable amount of data from the OCC task to train the typically highly parametrized models to learn features speciﬁc to the normal class.

Original: By leveraging auxiliary OCC tasks and explicitly optimizing for few-shot learning,
Revised: By leveraging auxiliary OCC tasks and explicitly optimizing for few-shot learning,

Original: OC-MAML learns a representation that can be adapted to unseen OCC task with only few exaples.
Revised: OC-MAML learns a representation that can be adapted to unseen OCC task with only few exaples.

Original:  E XPERIMENTAL EVALUATION
Revised:  E XPERIMENTAL EVALUATION

Original: The conducted experiments 1 aim to address the following key questions: ( a ) How does OC-MAML perform compared to classical one-class classiﬁcation (OCC) approaches in the few-shot (FS) data regime?
Revised: The conducted experiments 1 aim to address the following key questions: ( a ) How does OC-MAML perform compared to classical one-class classiﬁcation (OCC) approaches in the few-shot (FS) data regime?

Original: ( b ) Does using OCC tasks for meta-training improve the adaptation to such tasks, as it is the case for few-shot tasks (Finn et al., 2017), and do our theoretical ﬁndings (Section 2.3.2) about the differences between the MAML and OC-MAML initializations hold in practice?
Revised: ( b ) Does using OCC tasks for meta-training improve the adaptation to such tasks, as it is the case for few-shot tasks (Finn et al., 2017), and do our theoretical ﬁndings (Section 2.3.2) about the differences between the MAML and OC-MAML initializations hold in practice?

Original: ( c ) How does
Revised: ( c ) How does

Original: OC-MAML compare to the ﬁrst-order meta-learning algorithms adapted to the OCC scenario, i.e.
Revised: OC-MAML compare to the ﬁrst-order meta-learning algorithms adapted to the OCC scenario, i.e.

Original: OC-FOMAML and OC-Reptile (Section 2.3.2)?
Revised: OC-FOMAML and OC-Reptile (Section 2.3.2)?

Original: ( d ) How does OC-MAML perform in FS-OCC problems from the time-series domain, which is understudied in the few-shot learning literature?
Revised: ( d ) How does OC-MAML perform in FS-OCC problems from the time-series domain, which is understudied in the few-shot learning literature?

Original: 4. B ASELINES AND D ATASETS
Revised: 4. B ASELINES AND D ATASETS

Original: This section provides information about the baselines and datasets we use in our experimental evaluation.
Revised: This section provides information about the baselines and datasets we use in our experimental evaluation.

Original: We compare OC-MAML to the classical one-class classiﬁcation (OCC) approaches One-Class
Revised: We compare OC-MAML to the classical one-class classiﬁcation (OCC) approaches One-Class

Original: SVM (OC-SVM) (Sch ¨ olkopf et al., 2001) and Isolation Forest (IF) (Liu et al., 2008)
Revised: SVM (OC-SVM) (Sch ¨ olkopf et al., 2001) and Isolation Forest (IF) (Liu et al., 2008)

Original: (Question ( a ) ), which we ﬁt to the adaptation set of the test task.
Revised: (Question ( a ) ), which we ﬁt to the adaptation set of the test task.

Original: Here, we apply PCA to reduce the dimensionality of the data, by choosing the minimum number of eigenvectors so that at least 95% of the variance is preserved as done by Erfani et al.
Revised: Here, we apply PCA to reduce the dimensionality of the data, by choosing the minimum number of eigenvectors so that at least 95% of the variance is preserved as done by Erfani et al.

Original: We additionally tune the inverse length scale γ by using 10% of the test set, as done by Ruff et al.
Revised: We additionally tune the inverse length scale γ by using 10% of the test set, as done by Ruff et al.

Original: (2018), which gives OC-SVM a supervised advantage, compared to the other methods.
Revised: (2018), which gives OC-SVM a supervised advantage, compared to the other methods.

Original: For a fairer comparison to OC-MAML, where these latter methods also beneﬁt from the meta-training and meta-validation tasks, we additionally train them on embeddings inferred by feature extractors learned on these tasks.
Revised: For a fairer comparison to OC-MAML, where these latter methods also beneﬁt from the meta-training and meta-validation tasks, we additionally train them on embeddings inferred by feature extractors learned on these tasks.

Original: Here, we train two types of feature extractors on the meta-training tasks: one is trained in a Multi-Task-Learning (MTL) setting and the other trained using the ”Finetune” baseline (FB)
Revised: Here, we train two types of feature extractors on the meta-training tasks: one is trained in a Multi-Task-Learning (MTL) setting and the other trained using the ”Finetune” baseline (FB)

Original: (Triantaﬁllou et al., 2019).
Revised: (Triantaﬁllou et al., 2019).

Original: FB is a few-shot classiﬁcation approach, where one multi-class classiﬁer is trained with all the classes available in all meta-training tasks, after which, an output layer is ﬁnetuned with the few available examples of the target task on top of the learned feature extractor.
Revised: FB is a few-shot classiﬁcation approach, where one multi-class classiﬁer is trained with all the classes available in all meta-training tasks, after which, an output layer is ﬁnetuned with the few available examples of the target task on top of the learned feature extractor.

Original: Moreover, we compare OC-MAML to class-balanced meta-learning algorithms, namely MAML, FOMAML and Reptile, as well as ﬁrstorder meta-learning algorithms adapted to the OCC scenario, i.e. OC-FOMAML and OC-Reptile (Questions ( b ) and ( c ) ).
Revised: Moreover, we compare OC-MAML to class-balanced meta-learning algorithms, namely MAML, FOMAML and Reptile, as well as ﬁrstorder meta-learning algorithms adapted to the OCC scenario, i.e. OC-FOMAML and OC-Reptile (Questions ( b ) and ( c ) ).

Original: Experimental details are provided in Appendix B.
Revised: Experimental details are provided in Appendix B.

Original: We evaluate our approach on six datasets, including 3 from the image domain and 3 from the timeseries domain.
Revised: We evaluate our approach on six datasets, including 3 from the image domain and 3 from the timeseries domain.

Original: In the image domain we use 2 few-shot learning benchmark datasets, namely MiniImageNet (Ravi & Larochelle, 2016) and Omniglot (Lake et al., 2015), and 1 OCC benchmark dataset, the Multi-Task MNIST (MT-MNIST) dataset.
Revised: In the image domain we use 2 few-shot learning benchmark datasets, namely MiniImageNet (Ravi & Larochelle, 2016) and Omniglot (Lake et al., 2015), and 1 OCC benchmark dataset, the Multi-Task MNIST (MT-MNIST) dataset.

Original: To adapt the datasets to the OCC scenario, we create binary classiﬁcation tasks, where the normal class contains examples from one class of the initial dataset and the anomalous class contains examples from multiple other classes.
Revised: To adapt the datasets to the OCC scenario, we create binary classiﬁcation tasks, where the normal class contains examples from one class of the initial dataset and the anomalous class contains examples from multiple other classes.

Original: We create 9 different datasets based on MNIST, where the meta-testing task of each dataset consists in differentiating between a certain digit and the others.
Revised: We create 9 different datasets based on MNIST, where the meta-testing task of each dataset consists in differentiating between a certain digit and the others.

Original: We use the same ( 10 th ) task for meta-validation in all datasets.
Revised: We use the same ( 10 th ) task for meta-validation in all datasets.

Original: Since most of the time-series datasets for anomaly detection include data from only one domain and only one normal class, adapting them to the meta-learning problem formulation where several different tasks are required is not possible.
Revised: Since most of the time-series datasets for anomaly detection include data from only one domain and only one normal class, adapting them to the meta-learning problem formulation where several different tasks are required is not possible.

Original: Therefore, we create two synthetic timeseries (STS) datasets, each including 30 synthetically generated time-series that underlie 30 different anomaly detection tasks, to assess the suitability of OC-MAML to time-series data (Question ( d ) ).
Revised: Therefore, we create two synthetic timeseries (STS) datasets, each including 30 synthetically generated time-series that underlie 30 different anomaly detection tasks, to assess the suitability of OC-MAML to time-series data (Question ( d ) ).

Original: The time-series underlying the datasets are sawtooth waveforms (STS-Sawtooth) and sine functions (STS-Sine).
Revised: The time-series underlying the datasets are sawtooth waveforms (STS-Sawtooth) and sine functions (STS-Sine).

Original: We propose the STS-datasets as benchmark datasets for the few-shot (one-class) classiﬁcation problem in the time-series domain.
Revised: We propose the STS-datasets as benchmark datasets for the few-shot (one-class) classiﬁcation problem in the time-series domain.

Original: Finally, we validate OC-MAML on a real-world anomaly detection dataset of sensor readings recorded during industrial manufacturing using a CNC milling machine.
Revised: Finally, we validate OC-MAML on a real-world anomaly detection dataset of sensor readings recorded during industrial manufacturing using a CNC milling machine.

Original: Various consecutive roughing and ﬁnishing operations (pockets, edges, holes, surface ﬁnish) were performed on ca.
Revised: Various consecutive roughing and ﬁnishing operations (pockets, edges, holes, surface ﬁnish) were performed on ca.

Original: 100 aluminium workpieces to record the CNC Milling Machine
Revised: 100 aluminium workpieces to record the CNC Milling Machine

Original: Data (CNC-MMD).
Revised: Data (CNC-MMD).

Original: We give details about all 6 datasets, the task creation procedures adopted to adapt them to the OCC case and the generation of the STS-datasets in Appendix C.
Revised: In Appendix C, we give details about all 6 datasets, the task creation procedures adopted to adapt them to the OCC case, as well as the generation of the STS-datasets.

Original: [Table]
Revised: [Table]

Original: [Table]
Revised: [Table]

Original: R ESULTS AND D ISCUSSION
Revised: R ESULTS AND D ISCUSSION

Original: Our results of the comparison between OC-MAML and the classical OCC approaches on the 3 image datasets and on the STS-Sawtooth dataset are summarized in Table 1.
Revised: Our results of the comparison between OC-MAML and the classical OCC approaches on the 3 image datasets and on the STS-Sawtooth dataset are summarized in Table 1.

Original: OC-MAML consistently outperforms all baselines across all datasets and on both adaptation set sizes.
Revised: OC-MAML consistently outperforms all baselines across all datasets and on both adaptation set sizes.

Original: While FB and MTL yield relatively good performance when adapting to class-balanced tasks ( c = 50% ), they completely fail in adapting to OCC tasks.
Revised: While FB and MTL yield relatively good performance when adapting to class-balanced tasks ( c = 50% ), they completely fail in adapting to OCC tasks.

Original: Test accuracies close to 50% show that the baselines overﬁt to the few adaptation examples and are, hence, not able to generalize to unseen examples.

Original: On the MT-MNIST dataset and the STS-Sawtooth dataset, some of the baselines that combine a feature extractor and a shallow model yield high performance, when an adaptation set size of K = 10 is used.
Revised: On the MT-MNIST dataset and the STS-Sawtooth dataset, some of the baselines that combine a feature extractor and a shallow model yield high performance, when the adaptation set size is K = 10 .

Original: We explain that by the lower variance between the meta-training and meta-testing tasks in these datasets.

Original: Our results of the comparison between OC-MAML and the classical few-shot classiﬁcation approaches on the 3 image datasets and on the STS-Sawtooth dataset are summarized in Table 2.
Revised: Our results of the comparison between OC-MAML and the classical few-shot classiﬁcation approaches on the 3 image datasets and on the STS-Sawtooth dataset are summarized in Table 2.

Original: The results on the other 8 MT-MNIST datasets and on the STS-Sine dataset are presented in Appendix D and are consistent with the results in Tables 1 and 2.
Revised: The results on the other 8 MT-MNIST datasets and on the STS-Sine dataset are presented in Appendix D and are consistent with the results in Tables 1 and 2.

Original: We observe that OC-MAML consistently outperforms the other meta-learning algorithms with a substantial margin on all datasets and for both adaptation set sizes.
Revised: We observe that OC-MAML consistently outperforms the other meta-learning algorithms with a substantial margin on all datasets and for both adaptation set sizes.

Original: This conﬁrms our theoretical ﬁndings (Section 2.3.2) that the initializations yielded by class-balanced meta-learning algorithms as well as OC-FOMAML and OC-Reptile are not optimized for adaptation using data from only one class.
Revised: This conﬁrms our theoretical ﬁndings (Section 2.3.2) that the initializations yielded by class-balanced meta-learning algorithms as well as OC-FOMAML and OC-Reptile are not optimized for adaptation using data from only one class.

Original: These latter yield test accuracies close to 50% showing that they overﬁtted to the normal class (Table 2 (top)).
Revised: These latter yield test accuracies close to 50% showing that they overﬁtted to the normal class (Table 2 (top)).

Original: In an attempt to increase the performance of the other meta-learning algorithms in the OCC scenario, we add a batch normalization (BN) (Ioffe & Szegedy, 2015) layer immediately before the output layer of the network.
Revised: In an attempt to increase the performance of the other meta-learning algorithms in the OCC scenario, we add a batch normalization (BN) (Ioffe & Szegedy, 2015) layer immediately before the output layer of the network.

Original: This BN operation standardizes the latent features using the mean and standard deviation of the K datapoints available for adaptation, which all belong to the normal class.
Revised: This BN operation standardizes the latent features using the mean and standard deviation of the K datapoints available for adaptation, which all belong to the normal class.

Original: As a result, this layer would output features with mean close to 0 and standard deviation close to 1 for normal class examples.
Revised: As a result, this layer would output features with mean close to 0 and standard deviation close to 1 for normal class examples.

Original: In contrast, anomalous examples would yield features with other statistics, which simpliﬁes their detection.
Revised: In contrast, anomalous examples would yield features with other statistics, which simpliﬁes their detection.

Original: We hypothesize that by enforcing a mapping of the data to a latent space standardized only by examples from the normal class, the anomalies would clearly fall out of the normal-class-distribution, making their detection easier.
Revised: We hypothesize that by enforcing a mapping of the data to a latent space standardized only by examples from the normal class, the anomalies would clearly fall out of the normal-class-distribution, making their detection easier.

Original: We note that the BN layer is used during meta-training as well.
Revised: We note that the BN layer is used during meta-training as well.

Original: Hereby, we ﬁx the learnable scaling ( γ ) and centering ( β ) parameters of the BN layer to 1 and 0 , respectively, to prevent it from shifting the standard distribution.
Revised: Hereby, we ﬁx the learnable scaling ( γ ) and centering ( β ) parameters of the BN layer to 1 and 0 , respectively, to prevent it from shifting the standard distribution.

Original: We ﬁnd that this simple modiﬁcation increases the performance of the other meta-learning algorithms on all image datasets.
Revised: We ﬁnd that this simple modiﬁcation increases the performance of the other meta-learning algorithms on all image datasets.

Original: However, OC-MAML without BN still yields the highest results, with only one exception.
Revised: However, OC-MAML without BN still yields the highest results, with only one exception.

Original: The higher performance increase when a bigger adaptation set is available ( K = 10 ) conﬁrms our hypothesis that enforcing a mapping of the data to a latent space standardized only by examples from the normal class makes the detection of the anomalies easier.
Revised: The higher performance increase when a bigger adaptation set is available ( K = 10 ) conﬁrms our hypothesis that enforcing a mapping of the data to a latent space standardized only by examples from the normal class makes the detection of the anomalies easier.

Original: In fact, using more examples yields more accurate mean and standard deviation measures, which enables a better approximation of the distribution of the normal class, and hence leads to an improved detection of[Table] [Table] the anomalies.
Revised: In fact, using more examples yields more accurate mean and standard deviation measures, which enables a better approximation of the distribution of the normal class, and hence leads to an improved detection of the anomalies.

Original: We also tested these algorithms on networks including a trainable BN layer after each convolutional layer.
Revised: We also tested these algorithms on networks including a trainable BN layer after each convolutional layer.

Original: This yielded comparable results to just adding one non-trainable BN layer  before the output layer.
Revised: This yielded comparable results to just adding one non-trainable BN layer [Table] [Table] before the output layer.

Original: Even though some of the meta-learning algorithms and OCC approaches sometimes outperform OC-MAML (Tables 2, 5, 8, 9), they do not consistently yield high performance in learning FS-OCC tasks across several datasets, as it is the case for OC-MAML.
Revised: Even though some of the meta-learning algorithms and OCC approaches sometimes outperform OC-MAML (Tables 2, 5, 8, 9), they do not consistently yield high performance in learning FS-OCC tasks across several datasets, as it is the case for OC-MAML.

Original: We note that this happens only on few MT-MNIST datasets and explain that by the high overlap between the digit classes underlying the meta-training and meta-testing tasks in the MT-MNIST datasets.
Revised: We note that this happens only on few MT-MNIST datasets and explain that by the high overlap between the digit classes underlying the meta-training and meta-testing tasks in the MT-MNIST datasets.

Original: The results of OC-MAML experiments on the CNC-MMD dataset are presented in Table 3.
Revised: The results of OC-MAML experiments on the CNC-MMD dataset are presented in Table 3.

Original: We compute F1-scores for evaluation since the test sets are class-imbalanced.
Revised: We compute F1-scores for evaluation since the test sets are class-imbalanced.

Original: OC-MAML consistently achieves high F1-scores across the 6 different milling processes.
Revised: OC-MAML consistently achieves high F1-scores across the 6 different milling processes.

Original: This high model performance on the minority class, i.e. in detecting anomalous data samples, is reached by using only K =non-anomalous data samples ( c = 0% ).
Revised: This high model performance on the minority class, i.e. in detecting anomalous data samples, is reached by using only K =non-anomalous data samples ( c = 0% ).

Original: These results show that OC-MAML yielded a parameter initialization suitable for learning OCC tasks in the time-series data domain.
Revised: These results show that OC-MAML yielded a parameter initialization suitable for learning OCC tasks in the time-series data domain.

Original: Moreover, the high performance reached show the maturity of this method for industrial real-world applications.
Revised: Moreover, the high performance reached show the maturity of this method for industrial real-world applications.

Original:  C ONCLUSION
Revised:  C ONCLUSION

Original: This work addressed the novel and challenging problem of few-shot one-class classiﬁcation (FSOCC) and introduced OC-MAML, a robust meta-learning approach to FS-OCC problems that learns model parameters which are easily adaptable to unseen tasks using few examples from only one class.
Revised: This work addressed the novel and challenging problem of few-shot one-class classiﬁcation (FSOCC) and introduced OC-MAML, a robust meta-learning approach to FS-OCC problems that learns model parameters which are easily adaptable to unseen tasks using few examples from only one class.

Original: We demonstrated the viability of our method on six datasets from the image time-series domains, including a real-world dataset of industrial sensor readings, where it signiﬁcantly out- performed classical OCC and few-shot classiﬁcation methods.
Revised: We demonstrated the viability of our method on six datasets from the image time-series domains, including a real-world dataset of industrial sensor readings, where it signiﬁcantly outperformed classical OCC and few-shot classiﬁcation methods.

Original: Future works could investigate an unsupervised approach to FS-OCC, as done by Hsu et al.
Revised: Future works could investigate an unsupervised approach to FS-OCC, as done by Hsu et al.

Original: (2018) in the class-balanced scenario.
Revised: (2018) in the class-balanced scenario.

Original: A  A LGORITHM 
Revised: A OC-MAML: A LGORITHM AND P ARAMETER I NITIALIZATION

Original: In this section we present the pseudo-code of OC-MAML in Algorithm 
Revised: In this section we present the pseudo-code of OC-MAML in Algorithm 1 and a diagram visualizing the parameter initializations yielded by MAML and OC-MAML.

Original: Require: S tr : Set of meta-training 
Revised: Require: S tr : Set of meta-training tasks

Original: Require: α, β : Learning rates
Revised: Require: α, β : Learning rates

Original: Require: K, Q: Batch size for the  updatesRequire: c : CIR for the inner-updates do
Revised: Require Q for the inner and outer updates

Original: Sample batch of tasks T i from S tr Let { D tr, D val } =
Revised: Require do tr Let { D tr

Original: T i 4: for all sampled T i do 5: Sample K datapoints B = { x ( l ) , y ( l ) } from Dtr such that CIR = c 6: Initialize θ (cid:48) i 
Revised: D i datapoints

Original: = θ 7: for number of adaptation steps do 8: Compute adaptation loss L trT i ( f θ (cid:48) i ) using B 9: Compute adapted parameters with gradient descent: θ (cid:48)
Revised: Figure 1 visualizes the adaptation to a binary classiﬁcation test task T s from the parameter initializations yielded by OC-MAML and MAML, denoted by θ OCMAML and θ MAML respectively.

Original: trT f i 10: end for 11: Sample Q datapoints B = x
Revised: θ ∗ s,CB denotes the optimal parameters for T s .

Original: , y from D val 12: Compute outer loop loss L valT i i using
Revised: Taking a gradient step using a one-class adaptation set D s,OC (gradient direction denoted by ∇ L s,OC ), yields a performance increase on T s when starting from the OC-MAML parameter initialization.

Original: 13: end for 14: Update 15: end while 16: return meta-learned parameters θ
Revised: In contrast, when starting from the parameter initialization reached by MAML a class-balanced adaptation set D s,CB (gradient direction denoted by ∇ L s,CB ) is required for a performance increase in T s .

Original: B E XPERIMENT D ETAILS
Revised: B E XPERIMENT D ETAILS

Original: For MT-MNIST, we use the same 4-block convolutional architecture as used by Hsu et al.
Revised: For MT-MNIST, we use the same 4-block convolutional architecture as used by Hsu et al.

Original: (2018) for their multi-class MNIST experiments.
Revised: (2018) for their multi-class MNIST experiments.

Original: However, we exclude the batch normalization (Ioffe &
Revised: However, we exclude the batch normalization (Ioffe &

Original: Szegedy, 2015) layers, as we want to assess their effect in the OCC case, as discussed in Section 4.2.
Revised: Szegedy, 2015) layers, as we want to assess their effect in the OCC case, as discussed in Section 4.2.

Original: Each convolutional block includes a 3 x 3 convolutional layer with 32 ﬁlters, a 2 x 2 pooling and a
Revised: Each convolutional block includes a 3 x 3 convolutional layer with 32 ﬁlters, a 2 x 2 pooling and a

Original: ReLU non-linearity.
Revised: ReLU non-linearity.

Original: The same model architecture is used for the MiniImageNet experiments as done by Ravi & Larochelle (2016).
Revised: The same model architecture is used for the MiniImageNet experiments as done by Ravi & Larochelle (2016).

Original: For the Omniglot experiments, we use the same architecture used by
Revised: For the Omniglot experiments, we use the same architecture used by

Original: Finn et al.
Revised: Finn et al.

Original: We also do not include the batch normalization layers for the two latter datasets.
Revised: We also do not include the batch normalization layers for the two latter datasets.

Original: On the STS datasets, the model architecture used is composed of 3 modules, each including a 5 xconvolutional layer with 32 ﬁlters, a 2 x 2 pooling and a ReLU non-linearity.
Revised: On the STS datasets, the model architecture used is composed of 3 modules, each including a 5 xconvolutional layer with 32 ﬁlters, a 2 x 2 pooling and a ReLU non-linearity.

Original: The model architecture used for the CNC-MMD experiments is composed of 4 of these aforementioned modules, except that the convolutional layers in the last two modules include 64 ﬁlters.
Revised: The model architecture used for the CNC-MMD experiments is composed of 4 of these aforementioned modules, except that the convolutional layers in the last two modules include 64 ﬁlters.

Original: The last layer of all architectures is a linear layer followed by softmax.
Revised: The last layer of all architectures is a linear layer followed by softmax.

Original: We note that in the experiments on the time-series datasets (STS and CNC-MMD) 1-D convolutional ﬁlters are used.
Revised: We note that in the experiments on the time-series datasets (STS and CNC-MMD) 1-D convolutional ﬁlters are used.

Original: [Table]
Revised: [Table]

Original: Table 4 shows the hyperparameters used in the experiments of each model on the different datasets.
Revised: Table 4 shows the hyperparameters used in the experiments of each model on the different datasets.

Original: We note that we did not ﬁx the outer loop size Q in the experiments on the CNC-MMD dataset, because the sizes and CIRS of the validation sets D val differ across the different tasks.
Revised: We note that we did not ﬁx the outer loop size Q in the experiments on the CNC-MMD dataset, because the sizes and CIRS of the validation sets D val differ across the different tasks.

Original: For the meta-learning algorithms, including OC-MAML, we used vanilla SGD in the inner loop and the
Revised: For the meta-learning algorithms, including OC-MAML, we used vanilla SGD in the inner loop and the

Original: Adam optimizer (Kingma & Ba, 2014) in the outer loop, as done by Finn et al. (2017).
Revised: Adam optimizer (Kingma & Ba, 2014) in the outer loop, as done by Finn et al. (2017).

Original: The MTL and FB baselines are also trained with the Adam optimizer.
Revised: The MTL and FB baselines are also trained with the Adam optimizer.

Original: In the following, we provide details about the meta-training procedure adopted in the meta-learning experiments.
Revised: In the following, we provide details about the meta-training procedure adopted in the meta-learning experiments.

Original: We use disjoint sets of data for adaptation ( D tr ) and validation ( D val ) on the metatraining tasks, as it was empirically found to yield better ﬁnal performance (Nichol & Schulman, 2018).
Revised: We use disjoint sets of data for adaptation ( D tr ) and validation ( D val ) on the metatraining tasks, as it was empirically found to yield better ﬁnal performance (Nichol & Schulman, 2018).

Original: Hereby, the same sets of data are used in the OC-MAML and baseline experiments.
Revised: Hereby, the same sets of data are used in the OC-MAML and baseline experiments.

Original: In the
Revised: In the

Original: MT-MNIST, Omniglot, MiniImageNet and STS experiments, the aforementioned sets of data are class-balanced.
Revised: MT-MNIST, Omniglot, MiniImageNet and STS experiments, the aforementioned sets of data are class-balanced.

Original: The sampling of the batch used for adaptation B ensures that this latter has the appropriate CIR ( c = 50% for MAML, FOMAML and Reptile, and c = c target for OC-MAML,
Revised: The sampling of the batch used for adaptation B ensures that this latter has the appropriate CIR ( c = 50% for MAML, FOMAML and Reptile, and c = c target for OC-MAML,

Original: OC-FOMAML and OC-Reptile)
Revised: OC-FOMAML and OC-Reptile)

Original: For the one-class meta-learning algorithms, c target = 0% , i.e. no anomalous samples of the target task are available, sothat only normal examples are sampled from D tr during meta-training.
Revised: For the one-class meta-learning algorithms, c target = 0% , i.e. no anomalous samples of the target task are available, sothat only normal examples are sampled from D tr during meta-training.

Original: In order to ensure that class-balanced and one-class meta-learning algorithms are exposed to the same data during meta-training, we move the anomalous examples from the adaptation set of data ( D tr ) to the validation set of data ( D val ).
Revised: In order to ensure that class-balanced and one-class meta-learning algorithms are exposed to the same data during meta-training, we move the anomalous examples from the adaptation set of data ( D tr ) to the validation set of data ( D val ).

Original: We note that this is only done in the experiments using one-class meta-learning algorithms.
Revised: We note that this is only done in the experiments using one-class meta-learning algorithms.

Original: During meta-training, meta-validation episodes are conducted to perform model selection.
Revised: During meta-training, meta-validation episodes are conducted to perform model selection.

Original: In order to mimic the adaptation to unseen FS-OCC tasks with CIR c = c target at test time, the CIR of the batches used for adaptation during meta-validation episodes is also set to c = c target .
Revised: In order to mimic the adaptation to unseen FS-OCC tasks with CIR c = c target at test time, the CIR of the batches used for adaptation during meta-validation episodes is also set to c = c target .

Original: We note that the hyperparameter K denotes the total number of datapoints, i.e. batch size, used to perform the adaptation updates, and not the number of datapoints per class as done by Finn et al.
Revised: We note that the hyperparameter K denotes the total number of datapoints, i.e. batch size, used to perform the adaptation updates, and not the number of datapoints per class as done by Finn et al.

Original: Hence, a task with size K = 10 and CIR c = 50% is equivalent to a 2-way 5-shot classiﬁcation task.
Revised: Hence, a task with size K = 10 and CIR c = 50% is equivalent to a 2-way 5-shot classiﬁcation task.

Original: In the following, we provide details about the adaptation to the target task(s) and the subsequent evaluation.
Revised: In the following, we provide details about the adaptation to the target task(s) and the subsequent evaluation.

Original: In the MT-MNIST and MiniImageNet experiments, we randomly sample 20 adaptation sets from the target task(s)’ data, each including K examples with the CIR corresponding to the experiment considered.
Revised: In the MT-MNIST and MiniImageNet experiments, we randomly sample 20 adaptation sets from the target task(s)’ data, each including K examples with the CIR corresponding to the experiment considered.

Original: After each adaptation episode conducted using one of these sets, the adapted model is evaluated on a disjoint class-balanced test set that includes 4,000 images for MT-MNIST and 600 for MiniImageNet.
Revised: After each adaptation episode conducted using one of these sets, the adapted model is evaluated on a disjoint class-balanced test set that includes 4,000 images for MT-MNIST and 600 for MiniImageNet.

Original: We note that the samples included in the test sets of the test tasks are not used nor for meta-training neither for meta-validation.
Revised: We note that the samples included in the test sets of the test tasks are not used nor for meta-training neither for meta-validation.

Original: This results in 20 and 400 (20 adaptation sets created from each of the 20 test classes) different test tasks for MT-MNIST and MiniImageNet, respectively.
Revised: This results in 20 and 400 (20 adaptation sets created from each of the 20 test classes) different test tasks for MT-MNIST and MiniImageNet, respectively.

Original: All the results presented give the mean over all adaptation episodes.
Revised: All the results presented give the mean over all adaptation episodes.

Original: Likewise, in the STS experiments, we evaluate the model on 10 different adaptation sets from each of thetest tasks.
Revised: Likewise, in the STS experiments, we evaluate the model on 10 different adaptation sets from each of thetest tasks.

Original: In the CNC-MMD experiments, the 30 tasks created from the target operation are used for adaptation and subsequent evaluation.
Revised: In the CNC-MMD experiments, the 30 tasks created from the target operation are used for adaptation and subsequent evaluation.

Original: For each of these target tasks, we randomly sample K datapoints belonging to the normal class that we use for adaptation, and use the rest of the datapoints for testing.
Revised: For each of these target tasks, we randomly sample K datapoints belonging to the normal class that we use for adaptation, and use the rest of the datapoints for testing.

Original: We do this 5 times for each target task, which results in 150 testing tasks.
Revised: We do this 5 times for each target task, which results in 150 testing tasks.

Original: For MTL and FB baselines, as well as all the baseline combining these model with shallow models, i.e. IF and OC-SVM, we use the meta-validation task(s) for model choice, like in the meta-learning experiments.
Revised: For MTL and FB baselines, as well as all the baseline combining these model with shallow models, i.e. IF and OC-SVM, we use the meta-validation task(s) for model choice, like in the meta-learning experiments.

Original: For the MTL baseline, for each validation task, we ﬁnetune a fully connected layer on top of the shared multi-task learned layers, as it is done at test time.
Revised: For the MTL baseline, for each validation task, we ﬁnetune a fully connected layer on top of the shared multi-task learned layers, as it is done at test time.

Original: C D ATASETS AND TASK CREATION PROCEDURES
Revised: C D ATASETS AND TASK CREATION PROCEDURES

Original: In this Section we provide information about the datasets used and the task creation procedures.
Revised: In this Section we provide information about the datasets used and the task creation procedures.

Original: Multi-task MNIST (MT-MNIST):
Revised: Multi-task MNIST (MT-MNIST):

Original: We derive 10 binary classiﬁcation tasks from the MNIST dataset (LeCun et al., 2010), where every task consists in recognizing one of the digits.
Revised: We derive 10 binary classiﬁcation tasks from the MNIST dataset (LeCun et al., 2010), where every task consists in recognizing one of the digits.

Original: This is a classical one-class classiﬁcation benchmark dataset.
Revised: This is a classical one-class classiﬁcation benchmark dataset.

Original: For a particular task T i , images of the digit i are labeled as normal samples, while out-of-distribution samples, i.e. the other digits, are labeled as anomalous samples.
Revised: For a particular task T i , images of the digit i are labeled as normal samples, while out-of-distribution samples, i.e. the other digits, are labeled as anomalous samples.

Original: We use 8 tasks for meta-training, 1 for meta-validation and 1 for meta-testing.
Revised: We use 8 tasks for meta-training, 1 for meta-validation and 1 for meta-testing.

Original: Hereby, images of digits to be recognized in the validation and test tasks are not used as anomalies in the meta-training tasks.
Revised: Hereby, images of digits to be recognized in the validation and test tasks are not used as anomalies in the meta-training tasks.

Original: This ensures that the model is not exposed to normal samples from the test task during meta-training.
Revised: This ensures that the model is not exposed to normal samples from the test task during meta-training.

Original: Moreover, the sets of anomalous samples of the meta-training, meta-validation and meta-testing tasks are mutually disjoint.
Revised: Moreover, the sets of anomalous samples of the meta-training, meta-validation and meta-testing tasks are mutually disjoint.

Original: We conduct experiments on 9 MTMNIST datasets, each of which involves a different target task ( T 0 − T 8 ).
Revised: We conduct experiments on 9 MTMNIST datasets, each of which involves a different target task ( T 0 − T 8 ).

Original: The task T 9 is used as a meta-validation task across all experiments.
Revised: The task T 9 is used as a meta-validation task across all experiments.

Original: MiniImageNet: This dataset was proposed by Ravi & Larochelle (2016) and includes 64 classes for training, 16 for validation and 20 for testing, and is a classical challenging benchmark dataset for few-shot learning.
Revised: MiniImageNet: This dataset was proposed by Ravi & Larochelle (2016) and includes 64 classes for training, 16 for validation and 20 for testing, and is a classical challenging benchmark dataset for few-shot learning.

Original: To adapt it to the few-shot one-class classiﬁcation setting, we create 64 binary classiﬁcation tasks for meta-training, each of which consists in differentiating one of the training classes from the others, i.e. the anomalous examples of a task T i are randomly sampled fromtheclasses with labels different from i . We do thesame to create 16 meta-validation and 20 meta-testing tasks using the corresponding classes.
Revised: To adapt it to the few-shot one-class classiﬁcation setting, we create 64 binary classiﬁcation tasks for meta-training, each of which consists in differentiating one of the training classes from the others, i.e. the anomalous examples of a task T i are randomly sampled from the using the corresponding classes.

Original: Omniglot: This dataset was proposed by Lake et al.
Revised: Omniglot: This dataset was proposed by Lake et al.

Original: and includes 20 instances of 1623 handwritten characters from 50 different alphabets.
Revised: and includes 20 instances of 1623 handwritten characters from 50 different alphabets.

Original: We generate our meta-training and meta-testing tasks based on the ofﬁcial data split (Lake et al., 2015), where 30 alphabets are reserved for training and 20 for evaluation.
Revised: We generate our meta-training and meta-testing tasks based on the ofﬁcial data split (Lake et al., 2015), where 30 alphabets are reserved for training and 20 for evaluation.

Original: For each character class, we create a binary classiﬁcation task, which consists in differentiating between this character and other characters from the same set (meta-training or meta-testing), i.e. the anomalous examples of a task T i are randomly sampled from the remaining characters.
Revised: For each character class, we create a binary classiﬁcation task, which consists in differentiating between this character and other characters from the same set (meta-training or meta-testing), i.e. the anomalous examples of a task T i are randomly sampled from the remaining characters.

Original: By removing 80 randomly sampled tasks from the meta-training tasks, we create the meta-validation tasks set.
Revised: By removing 80 randomly sampled tasks from the meta-training tasks, we create the meta-validation tasks set.

Original: Synthetic time-series (STS):
Revised: Synthetic time-series (STS):

Original: In order to investigate the applicability of OC-MAML to time-series (question ( c ) ), we created two datasets, each including 30 synthetically generated time-series that underlie 30 different anomaly detection tasks.
Revised: In order to investigate the applicability of OC-MAML to time-series (question ( c ) ), we created two datasets, each including 30 synthetically generated time-series that underlie 30 different anomaly detection tasks.

Original: The time-series underlying the datasets are sawtooth waveforms (STS-Sawtooth) and sine functions (STS-Sine).
Revised: The time-series underlying the datasets are sawtooth waveforms (STS-Sawtooth) and sine functions (STS-Sine).

Original: Each time-series is generated with random frequencies, amplitudes, noise boundaries, as well as anomaly width and height boundaries.
Revised: Each time-series is generated with random frequencies, amplitudes, noise boundaries, as well as anomaly width and height boundaries.

Original: Additionally, the width of the rising ramp as a proportion of the total cycle is sampled randomly for the sawtooth dataset, which results in tasks having rising and falling ramps with different steepness values.
Revised: Additionally, the width of the rising ramp as a proportion of the total cycle is sampled randomly for the sawtooth dataset, which results in tasks having rising and falling ramps with different steepness values.

Original: The data samples of a particular task are generated by randomly cropping windows of length 128 from the corresponding time-series.
Revised: The data samples of a particular task are generated by randomly cropping windows of length 128 from the corresponding time-series.

Original: We generate 200 normal and 200 anomalous data examples for each task.
Revised: We generate 200 normal and 200 anomalous data examples for each task.

Original: For each dataset, we randomly choose 20 tasks for meta-training, 5 for meta-validation and 5 for meta-testing.
Revised: For each dataset, we randomly choose 20 tasks for meta-training, 5 for meta-validation and 5 for meta-testing.

Original: We propose the STS-datasets as benchmark datasets for the few-shot one-class classiﬁcation problem in the time-series domain, and will make them public upon paper acceptance.
Revised: We propose the STS-datasets as benchmark datasets for the few-shot one-class classiﬁcation problem in the time-series domain, and will make them public upon paper acceptance.

Original: In the following, we give details about the generation procedure adopted to create the STS-Sawtooth dataset.
Revised: In the following, we give details about the generation procedure adopted to create the STS-Sawtooth dataset.

Original: The same steps were conducted to generate the STS-Sine dataset.
Revised: The same steps were conducted to generate the STS-Sine dataset.

Original: First, we generate the sawtooth waveforms underlying the different tasks by using the Signal package of the Scipy library (Jones et al., 2001–).
Revised: First, we generate the sawtooth waveforms underlying the different tasks by using the Signal package of the Scipy library (Jones et al., 2001–).

Original: Thereafter, a randomly generated noise is applied to each signal.
Revised: Thereafter, a randomly generated noise is applied to each signal.

Original: Subsequently, signal segments with window length l = 128 are randomly sampled from each noisy signal.
Revised: Subsequently, signal segments with window length l = 128 are randomly sampled from each noisy signal.

Original: These represent the normal, i.e. non-anomalous, examples of the corresponding task.
Revised: These represent the normal, i.e. non-anomalous, examples of the corresponding task.

Original: Then, some of the normal examples are randomly chosen, and anomalies are added to them to produce the anomalous examples.
Revised: Then, some of the normal examples are randomly chosen, and anomalies are added to them to produce the anomalous examples.

Original: Figure 1 shows exemplary normal and anomalous samples from the STS-Sawtooth and STS-Sine datasets.
Revised: Figure 2 shows exemplary normal and anomalous samples from the STS-Sawtooth and STS-Sine datasets.

Original: In order to increase the variance between the aforementioned synthetic signals underlying the different tasks, we randomly sample the frequency, i.e. the number of periods within the window length l , with which each waveform is generated, as well as the amplitude and the vertical position (see Figure 1).
Revised: In order to increase the variance between the aforementioned synthetic signals underlying the different tasks, we randomly sample the frequency, i.e. the number of periods within the window length l , with which each waveform is generated, as well as the amplitude and the vertical position (see Figure 2).

Original: For sawtooth waveforms, we also randomly sample the width of the rising ramp as a proportion of the total cycle between 0% and 100% , for each task.
Revised: For sawtooth waveforms, we also randomly sample the width of the rising ramp as a proportion of the total cycle between 0% and 100% , for each task.

Original: Setting this value to 100% and to 0% produces sawtooth waveforms with rising and falling ramps, respectively.
Revised: Setting this value to 100% and to 0% produces sawtooth waveforms with rising and falling ramps, respectively.

Original: Setting it to 50% corresponds to triangle waveforms.
Revised: Setting it to 50% corresponds to triangle waveforms.

Original: We note that the noise applied to the tasks are randomly sampled from task-speciﬁc intervals, the boundaries of which are also randomly sampled.
Revised: We note that the noise applied to the tasks are randomly sampled from task-speciﬁc intervals, the boundaries of which are also randomly sampled.

Original: Likewise, the width and height of each anomaly is sampled from a random task speciﬁc-interval.
Revised: Likewise, the width and height of each anomaly is sampled from a random task speciﬁc-interval.

Original: Moreover, we generate the anomalies of each task, such that half of them have a height between the signal’s minimum and maximum (e.g. anomalies ( a ) and ( d ) in Figure 1), while the other half can surpass these boundaries, i.e. the anomaly is higher than the normal signal’s maximum or lower than its minimum at least at one time step (e.g. anomalies ( b ) and ( c ) in Figure 1).
Revised: Moreover, we generate the anomalies of each task, such that half of them have a height between the signal’s minimum and maximum (e.g. anomalies ( a ) and ( d ) in Figure 2), while the other half can surpass these boundaries, i.e. the anomaly is higher than the normal signal’s maximum or lower than its minimum at least at one time step (e.g. anomalies ( b ) and ( c ) in Figure 2).

Original: We note that an anomalous sample can have more than one anomaly.
Revised: We note that an anomalous sample can have more than one anomaly.

Original: We preprocess the data by removing the mean and scaling to unit variance.
Revised: We preprocess the data by removing the mean and scaling to unit variance.

Original: Hereby, only the available normal examples are used for the computation of the mean and the variance.
Revised: Hereby, only the available normal examples are used for the computation of the mean and the variance.

Original: This means that in the experiments, where the target task’s size K = 2 and only normal samples are available c = 0% , only two examples are used for the mean and variance computation.
Revised: This means that in the experiments, where the target task’s size K = 2 and only normal samples are available c = 0% , only two examples are used for the mean and variance computation.

Original: We note that the time-series in
Revised: We note that the time-series in

Original: Figure 1 are not preprocessed.
Revised: Figure 2 are not preprocessed.

Original: CNC Milling Machine Data (CNC-MMD): This dataset consists of ca.
Revised: CNC Milling Machine Data (CNC-MMD): This dataset consists of ca.

Original: 100 aluminum workpieces on which various consecutive roughing and ﬁnishing operations (pockets, edges, holes, surface ﬁnish) are performed.
Revised: 100 aluminum workpieces on which various consecutive roughing and ﬁnishing operations (pockets, edges, holes, surface ﬁnish) are performed.

Original: The sensor readings which were recorded at a rate of 500Hz measure various quantities that are important for the process monitoring including the torques of the various axes.
Revised: The sensor readings which were recorded at a rate of 500Hz measure various quantities that are important for the process monitoring including the torques of the various axes.

Original: Each run of machining a single workpiece can be seen as a multivariate time-series.
Revised: Each run of machining a single workpiece can be seen as a multivariate time-series.

Original: We segmented the data of each run in the various operations performed on the workpieces.
Revised: We segmented the data of each run in the various operations performed on the workpieces.

Original: E.g. one segment would describe the milling of a pocket where another describes a surface ﬁnish operation on the workpiece.
Revised: E.g. one segment would describe the milling of a pocket where another describes a surface ﬁnish operation on the workpiece.

Original: Since most manufacturing processes are highly efﬁcient, anomalies are quite rare but can be very costly if undetected.
Revised: Since most manufacturing processes are highly efﬁcient, anomalies are quite rare but can be very costly if undetected.

Original: For this reason, anomalies were provoked for 6 operations during manufacturing to provide a better basis for the analysis.
Revised: For this reason, anomalies were provoked for 6 operations during manufacturing to provide a better basis for the analysis.

Original: Anomalies were provoked by creating realistic scenarios for deﬁcient manufacturing.
Revised: Anomalies were provoked by creating realistic scenarios for deﬁcient manufacturing.

Original: Examples are using a workpiece that exhibits deﬁciencies which leads to a drop in the torque signal or using rather slightly decalibrated process parameters which induced various irritations to the workpiece surface which harmed production quality.
Revised: Examples are using a workpiece that exhibits deﬁciencies which leads to a drop in the torque signal or using rather slightly decalibrated process parameters which induced various irritations to the workpiece surface which harmed production quality.

Original: The data was labeled by domain experts from Siemens Digital Industries.
Revised: The data was labeled by domain experts from Siemens Digital Industries.

Original: It should be noted that this dataset more realistically reﬂects the data situation in many real application scenarios from industry where anomalies are rare and data is scarce and for this reason training models on huge class-balanced datasets is not an option.
Revised: It should be noted that this dataset more realistically reﬂects the data situation in many real application scenarios from industry where anomalies are rare and data is scarce and for this reason training models on huge class-balanced datasets is not an option.

Original: For our experiments, we created 30 tasks per operation by randomly cropping windows of length 2048 from the corresponding time-series of each operation.
Revised: For our experiments, we created 30 tasks per operation by randomly cropping windows of length 2048 from the corresponding time-series of each operation.

Original: As a result, the data samples of a particular task T i cropped from a milling operation
Revised: As a result, the data samples of a particular task T i cropped from a milling operation

Original: O j correspond to the same trajectory part of O j , but to different workpieces.
Revised: O j correspond to the same trajectory part of O j , but to different workpieces.

Original: The task creation procedure ensures that at least two anomalous data samples are available for each task.
Revised: The task creation procedure ensures that at least two anomalous data samples are available for each task.

Original: The resulting tasks include between 15 and 55 normal samples, and between 2 and 4 (9 and 22) anomalous samples for ﬁnishing (roughing) operations.
Revised: The resulting tasks include between 15 and 55 normal samples, and between 2 and 4 (9 and 22) anomalous samples for ﬁnishing (roughing) operations.

Original: We validate our approach on all 6 milling operations in the case where only 10 samples belonging to the normal class ( K = 10 , c = 0% ) are available.
Revised: We validate our approach on all 6 milling operations in the case where only 10 samples belonging to the normal class ( K = 10 , c = 0% ) are available.

Original: Given the type of the target milling operation,e.g. ﬁnishing, we use the tasks from the other operations of the same type for meta-training.
Revised: Given the type of the target milling operation,e.g. ﬁnishing, we use the tasks from the other operations of the same type for meta-training.

Original: We note that the model is not exposed to any sample belonging to any task of the target operation during training.
Revised: We note that the model is not exposed to any sample belonging to any task of the target operation during training.

Original: We preprocess each of the three signals separately by removing the mean and scaling to unit variance, as done for the STS datasets.
Revised: We preprocess each of the three signals separately by removing the mean and scaling to unit variance, as done for the STS datasets.

Original: Likewise, only the available normal examples are used for the computation of the mean and the variance.
Revised: Likewise, only the available normal examples are used for the computation of the mean and the variance.

Original: Exemplary anomalous signals recorded from a ﬁnishing and a roughing operations are shown in
Revised: Exemplary anomalous signals recorded from a ﬁnishing and a roughing operations are shown in

Original: Figure 2.
Revised: Figure 3.

Original: These signals are not mean centered and scaled to unit variance.
Revised: These signals are not mean centered and scaled to unit variance.

Original: We note that we do not use the labels per time-step, but rather the label ”anomalous” is assigned to each time-series that contains at least an anomalous time-step. 
Revised: We note that we do not use the labels per time-step, but rather the label ”anomalous” is assigned to each time-series that contains at least an anomalous time-step. [Table]

Original: D E XPERIMENTAL R ESULTS
Revised: D E XPERIMENTAL R ESULTS

Original: In this Section, we present the results of the experiments on the STS-Sine dataset and the 8 further
Revised: In this Section, we present the results of the experiments on the STS-Sine dataset and the 8 further

Original: MT-MNIST datasets.
Revised: MT-MNIST datasets.

Original: [Table]
Revised: [Table]

Original: [Table]

Original: [Table]

Original: [Table]

Original: [Table]

Original: [Table] [Table] [Table] [Table]
Revised: = 0% ) are used, unless otherwise speciﬁed.

Original: MTL [Table] [Table] [Table]
Revised: Model \ Adaptation set size

Original: [Table] [Table] [Table] [Table]
Revised: K =

Original: SVM

Original: [Table] [Table] [Table] [Table]
Revised: K =

Original: IF

Original: [Table]

Original: [Table]

Original: [Table]

Original: [Table]

Original: FB + OCSVM 52 .

Original: [Table]

Original: [Table]

Original: [Table] FB + IF [Table] [Table]
Revised: FB ( c = 50% ) 68 .77 .

Original: MTL + OCSVM

Original: [Table]

Original: IF

Original: [Table]

Original: [Table]

Original: [Table]

Original: MAML

Original: [Table]

Original: ours) [Table] [Table] MTL ( c = 50% ) 64 .91 .
Revised: MTL ( c = 50% ) 64 .91 .

Original: FB 73 .76 .
Revised: FB 73 .76 .

Original: MTL
Revised: MTL

Original: OC-SVM 50 .51 .
Revised: OC-SVM 50 .51 .

Original: IF 49 .
Revised: IF 49 .

Original: FB + OCSVM 

Revised: FB + OCSVM

Original: FB + IF 62 .
Revised: FB + IF 62 .

Original: MTL + OCSVM 51 .
Revised: MTL + OCSVM 51 .

Original: MTL + IF 64 .
Revised: MTL + IF 64 .

Original: OC-MAML (ours) 
Revised: OC-MAML (ours) 99 .99 .

Original: [Table]
Revised: [Table]

Original: [Table]

Original: ( c
Revised: ( c

Original: [Table] [Table]
Revised: [Table] [Table]

Original: [Table] [Table]
Revised: [Table] [Table]

Original: [Table] [Table]
Revised: [Table] [Table]

Original: [Table] [Table]
Revised: [Table] [Table]

Original: [Table] [Table]
Revised: [Table] [Table]

Original: FOMAML
Revised: FOMAML

Original: [Table] [Table]
Revised: [Table] [Table]

Original: [Table] [Table]
Revised: [Table] [Table]

Original: [Table] [Table]
Revised: [Table] [Table]

Original: [Table] [Table]
Revised: [Table] [Table]

Original: [Table]
Revised: [Table]

Original: FOMAML      62 .
Revised: FOMAML      62 .

Original: MAML 70 .
Revised: MAML 70 .

Original: OC-Reptile
Revised: OC-Reptile

Original: OC-FOMAML 50 .
Revised: OC-FOMAML 50 .

Original: OC-MAML (ours) 83 .79 .84 .77 .88 .

Revised: OC-MAML (ours) 83 .79 .84 .77 .88 .

Original: Reptile (w. BN) ( c = 50% ) 

Revised: Reptile (w. BN) ( c = 50% )

Original: FOMAML (w. BN) ( c = 50% ) 75 .74 .

Revised: FOMAML (w. BN) ( c = 50% ) 75 .74 .

Original: MAML (w. BN) ( c = 50% ) 52 .66 .63 .64 .64 .

Revised: MAML (w. BN) ( c = 50% ) 52 .66 .63 .64 .64 .

Original: Reptile (w. BN) 

Revised: Reptile (w. BN)

Original: FOMAML (w. BN) 70 .
Revised: FOMAML (w. BN) 70 .

Original: MAML (w. BN) 51 . 51 .
Revised: MAML (w. BN) 51 . 51 .

Original: OC-Reptile (w. BN)
Revised: OC-Reptile (w. BN)

Original: OC-FOMAML (w. BN) 66 .79 .80 .60 .

Revised: OC-FOMAML (w. BN) 66 .79 .80 .60 .

Original: OC-MAML (w. BN) (ours) 69 .75 .69 .50 .86 .67 .86 .52 .
Revised: OC-MAML (w. BN) (ours) 69 .75 .69 .50 .86 .67 .86 .52 .

Original: [Table]
Revised: [Table]