Task-similarity Aware Meta-learning through Nonparametric Kernel Regression

1 INTRODUCTION . Meta-learning seeks to abstract a general learning rule applicable to a class of different learning problems or tasks , given the knowledge of a set of training tasks from the class ( Finn & Levine , 2018 ; Denevi et al. , 2018 ; Hospedales et al. , 2020 ; Grant et al. , 2018 ; Yoon et al. , 2018 ) . The setting is such that the data available for solving each task is often severely limited , resulting in a poor performance when the tasks are solved independently from each other . This also sets meta-learning apart from the transfer learning paradigm where the focus is to transfer a well-trained network from existing domain to another ( Pan & Yang , 2010 ) . While existing meta-learning approaches implicitly assume the tasks as being similar , it is generally unclear how this task-similarity could be quantified and used in the learning . As a result , most popular meta-learning approaches do not actively use the similarity/dissimilarity between the tasks , but rely on availability of huge number of tasks for their working . In many practical applications , the number of tasks could be limited and the tasks may not always be very similar . There might even be ‘ outlier tasks ’ or ‘ out-of-the-distribution tasks ’ that are less similar or dissimilar from the rest of the tasks . Our conjecture is that the explicit incorporation or awareness of task-similarity helps improve meta-learning performance in such task-limited and adverse settings . The goal of this paper is to test this hypothesis by developing a task-similarity aware meta-learning algorithm using nonparametric kernel regression . Specifically , our contribution is a novel metalearning algorithm called the Task-similarity Aware Nonparametric Meta-Learning ( TANML ) that : • Explicitly employs similarity across the tasks to fast adapt the meta-information to a given task , by using nonparametric kernel regression . • Models the parameters of a task as belonging to a reproducing kernel Hilbert space ( RKHS ) , obtained by viewing the popular meta-learning of MAML and Meta-SGD approaches through the lens of linear/kernel regression . • Uses task-descriptors through a kernel function to quantify task-similarity/dissimilarity . • Offers a general framework for incorporating task-similarity in the meta-learning process . Though we pursued the algorithm with a specific choice of the task-descriptors , the proposed RKHS task-similarity aware framework can be extended to other formulations . We wish to emphasize that our goal is not to propose another meta-learning algorithm that outperforms the state-of-the-art , but rather to investigate if task-similarity can be explicitly incorporated and used to advantage in a meaningful manner . We show how this is achieved as the consequence of viewing the popular MAML and Meta-SGD formulations through the lens of nonparametric kernel regression . In order to keep the comparison fair on an apple-to-apple level , we compare the performance of TANML with that of MAML and Meta-SGD algorithms . 1.1 MATHEMATICAL OVERVIEW OF THE PROPOSED TASK-SIMILARITY AWARE FRAMEWORK . Given pairs of data ( xk , yk ) ∈ Rnx ×Rny where k ∈ { 1 , 2 , · · · , K } generated by an unknown data source , we are interested in learning a predictor Rnx × RD 3 ( x , θ ) 7→ f ( x , θ ) ∈ Rny from the given data . For example , f ( x , θ ) could be a function defined by an artificial neural network ( ANN ) . We collect pairs of data in X = ( x1 , x2 , · · · , xK ) and Y = ( y1 , y2 , · · · , yK ) and define the loss function RKnx×RKny×RD 3 ( X , Y , θ ) 7→ L ( X , Y , θ ) ∈ R which we then minimize with respect to θ . This constitutes the training of the predictor . In the case of a ANN , L ( X , Y , θ ) ∈ R could be the mean-square loss or the cross-entropy function . The data X , Y used for training is referred to as the training data . Let θ̂ denote the optimal value of θ obtained from training . Given a new x ∈ Rnx , we use ŷ = f ( x , θ̂ ) to predict y . The goodness of θ̂ is evaluated using y − ŷ on a sequence of pairs of new data called the test data X̄ , Ȳ , defined similarly as X and Y , but with K̄ number of data pairs . The training of the predictor for the given data source is defined as a task . Now , consider that we are interested in carrying out several such tasks for data coming from different but similar sources . Let Xi , Yi , X̄i , Ȳi , i = 1 , · · · , Ttr denote the data from Ttr different datasources , and defined similarly as X , Y , X̄ , Ȳ above . We refer to the training of the predictor for data Xi , Yi , X̄i , Ȳi as the ith training task , and θi is referred to as the parameter for the task . Metalearning captures similarities across the tasks by learning a common θ̂ ( which we denote by θ0 ) from the data of these Ttr tasks ( called the meta-training data ) , such that θ0 can be quickly adapted to train a predictor for data from new and different but similar data-sources . Depending on how θ is obtained from θ0 , various meta-learning algorithms exist ( Denevi et al. , 2018 ; Finn & Levine , 2018 ; Allen et al. , 2019 ) . The performance of the meta-learning algorithm is evaluated on previously unseen data from several other similar sources X vi , Yvi , X̄ vi , Ȳvi , i = 1 , · · · , Tv ( called the meta-test data ) defined similarly to X , Y , X̄ , Ȳ − this constitutes the meta-test phase . The training of the predictor for test data X vi , Yvi , X̄ vi , Ȳvi is referred to as the ith test task , θvi denotes the parameter for the ith test task . In the existing meta-learning approaches , both θi and θvi are obtained by adapting θ0 using the gradient of L ( Xi , Yi , θ ) and L ( X vi , Yvi , θ ) , respectively , evaluated at θ0 . In our work , we propose a meta-learning algorithm where θi explicitly uses a similarity between the ith training task and all the training tasks . Similarly , the parameters θvi for the test tasks also use explicitly a similarity between the ith test task and all the training tasks . As specified later , we define this task-similarity between two tasks through kernel regression , and our algorithm learns the kernel regression coefficients Ψ as meta-parameters in addition to θ0 . A motivating example Let us now consider a specific loss function given by L ( X , Y , θ ) =∑K k=1 ‖yk − f ( xk , θ ) ‖22 . Training for tasks independently with limited training data will typically result in a predictor that overfits to X , Y , and generalizes poorly to X̄ , Ȳ . MAML-type metalearning approaches ( Finn et al. , 2017 ) solve this by inferring the information across tasks in the form of a good initialization θ0– specialized/adapted to a new task using the adaptation function RD × RKnx × RKny 3 ( θ0 , X , Y ) 7→ gMAML ( θ0 , X , Y ) ∈ RD defined as : gMAML ( θ0 , X , Y ) , θ0 − α∇θ0L ( X , Y , θ0 ) The parameters for the training and test tasks as obtained through adaptation of θ0 as θi = gMAML ( θ0 , Xi , Yi ) , i = 1 , · · · , Ttr , and θvi = gMAML ( θ0 , X vi , Yvi ) , i = 1 , · · · , Tv . The meta-parameter θ0 is learnt by iteratively taking a gradient descent with respect to the test loss on the training tasks given by ∑Ttr i=1 L ( X̄i , Ȳi , gMAML ( θ0 , Xi , Yi ) ) . The parameters for a task are obtained directly from θ0 and does not make use of any information from the other training tasks . As a result , the common θ0 learnt during the meta-training treats all tasks equally − the algorithm implicitly assumes similarity of all tasks , but is not able to discern or quantify the degree of similarity or dissimilarity among the tasks . In contrast , our algorithm involves an adaptation function gTANML ( to be defined later ) that explicitly uses a notion of similarity between the tasks to predict parameters for a task . As a result , we expect that our approach helps train predictors even when the data-sources that are not very similar to each other . In our numerical experiments in Section 4 , we see that this is indeed the case the sinusoidal function as the data source . 1.2 RELATED WORK . The structural characterization of tasks and use of task-dependent knowledge has gained interest in meta-learning recently . Edwards & Storkey ( 2017 ) proposed a variational autoencoder based approach to generate task/dataset statistics used to measure similarity . Ruder & Plank ( 2017 ) considered domain similarity and diversity measures in the context of transfer learning ( Ruder & Plank , 2017 ) . The study of how task properties affect the catastrophic forgetting in continual learning was pursued by Nguyen et al . ( 2019 ) . Lee et al . ( 2020 ) proposed a task-adaptive meta-learning approach for classification that adaptively balances meta-learning and task-specific learning differently for every task and class . Bayesian approaches have been proposed to capture the similarity across tasks in the form of task hyperpriors ( Yoon et al. , 2018 ; Finn et al. , 2018 ; Grant et al. , 2018 ; Rothfuss et al. , 2020 ) . Task-similarity defined through effective sample size has been used to develop a new offpolicy algorithm for meta-reinforcement learning ( Fakoor et al. , 2020 ) . It was shown by Oreshkin et al . ( 2018 ) that the performance few-shot learning shows significant improvements with the use of task-dependent metrics . While the use of kernels or similarity metrics is not new in meta-learning , they are typically seen in the context of defining relations between the classes or samples within a given task ( Qiao et al. , 2018 ; Rusu et al. , 2019 ; Vinyals et al. , 2016 ; Snell et al. , 2017 ; Oreshkin et al. , 2018 ; Fortuin & Rätsch , 2019 ; Goo & Niekum , 2020 ) . Qiao et al . ( 2018 ) use similarity metrics in the activation space to predict parameters for novel categories in few-shot learning with zero-training . Information-theoretic ideas have also been used in the study of the topology and the geometry of task spaces by Nguyen et al . ( 2019 ) ; Achille et al . ( 2018 ) . Achille et al . ( 2019 ) construct vector representations for tasks using partially trained probe networks , based on which task-similarity metrics are developed . Task descriptors have been of interest specially in vision related tasks in the context of transfer learning ( Zamir et al. , 2018 ; Achille et al. , 2019 ; Tran et al. , 2019 ) . Recently , neural tangent kernels were been proposed for asymptotic analysis of meta-learning for infinitely wide neural networks by considering gradient based kernels across tasks by Wang et al . ( 2020 ) . The work of Wang et al . ( 2020 ) is the closest in spirit to our work in that they consider kernels across meta-learning tasks . However , the premise of their work is very different from ours . The aim of their work is to show how global convergence behaviour of popular MAML type task-specific adaptation can be assymptotically described using specific kernels , when every task involves training deep neural networks of asymptotically infinite or very large widths . Our premise on the other hand is entirely different − we consider a task-specific adaptation that actively employs similarity of tasks in the form of valid kernel functions , in order to improve meta-learning performance . Our work does not make assumptions on the nature of the kernel , the structure of the learner , or its dimensions .

Summary: This paper proposes a theoretical formulation for meta-learning that uses task similarity based on task gradients, which helps learning in the presence of outlier tasks. The inner loop parameter update is given by linear kernel regression, where the kernel function computes similarity between gradients of different tasks. While the paper includes experiments that outperform MAML and Meta-SGD on estimating randomized linear predictors, and randomized sinusoids with outlier data-points, these are not sufficient to establish the efficacy of the approach.