incremental meta-learning via indirect discriminant alignment · sect. 4. 2. method the next...

15
Incremental Meta-Learning via Indirect Discriminant Alignment Qing Liu * Johns Hopkins University [email protected] Orchid Majumder AWS [email protected] Alessandro Achille AWS [email protected] Avinash Ravichandran AWS [email protected] Rahul Bhotika AWS [email protected] Stefano Soatto UCLA & AWS [email protected] Abstract We propose a method to train a model so it can learn new classification tasks while improving with each task solved. This amounts to combining meta-learning with incremental learning. Different tasks can have disjoint classes, so one cannot directly align different classifiers as done in model distillation. On the other hand, simply aligning features shared by all classes does not allow the base model sufficient flexibility to evolve to solve new tasks. We therefore indirectly align features relative to a minimal set of “anchor classes.” Such indirect discriminant alignment (IDA) adapts a new model to old classes without the need to re-process old data, while leaving maximum flexibility for the model to adapt to new tasks. This process enables incrementally improving the model by processing multiple learning episodes, each representing a different learning task, even with few training examples. Experiments on few-shot learning benchmarks show that this incremental approach performs favorably even compared to training the model with the entire dataset at once. 1. Introduction Meta-learning aims to train a model to learn new tasks leveraging knowledge accrued while solving related tasks. Most meta-learning methods do not incorporate experi- ence from learning new tasks to improve the “base” (meta- learned) model. Our goal is to enable such improvement, thus creating a virtuous cycle whereby every new task learned enhances the base model in an incremental fash- ion, without the need to re-process previously seen data. We call this incremental meta-learning (IML). While visual classification with a large number of training samples per class has reached performance close to human- * Work conducted while at AWS. x < l a t e x i t s h a 1 _ b a s e 6 4 = " E + x W b 6 2 2 b 2 P 9 7 o + C O 1 o W w c / 7 o r s = " > A A A B 6 H i c b V D L T g J B E O z F F + I L 9 e h l I j H x R H Y N R o 9 E L x 4 h k U c C G z I 7 9 M L I 7 O x m Z t Z I C F / g x Y P G e P W T v P k 3 D r A H B S v p p F L V n e 6 u I B F c G 9 f 9 d n J r 6 x u b W / n t w s 7 u 3 v 5 B 8 f C o q e N U M W y w W M S q H V C N g k t s G G 4 E t h O F N A o E t o L R 7 c x v P a L S P J b 3 Z p y g H 9 G B 5 C F n 1 F i p / t Q r l t y y O w d Z J V 5 G S p C h 1 i t + d f s x S y O U h g m q d c d z E + N P q D K c C Z w W u q n G h L I R H W D H U k k j 1 P 5 k f u i U n F m l T 8 J Y 2 Z K G z N X f E x M a a T 2 O A t s Z U T P U y 9 5 M / M / r p C a 8 9 i d c J q l B y R a L w l Q Q E 5 P Z 1 6 T P F T I j x p Z Q p r i 9 l b A h V Z Q Z m 0 3 B h u A t v 7 x K m h d l r 1 K + r F d K 1 Z s s j j y c w C m c g w d X U I U 7 q E E D G C A 8 w y u 8 O Q / O i / P u f C x a c 0 4 2 c w x / 4 H z + A O j R j Q Q = < / l a t e x i t > Training with IFA φ wt (x) < l a t e x i t s h a 1 _ b a s e 6 4 = " A Y i N c D C d k E S 3 y X b 2 N 7 Z u F e 1 l 5 x U = " > A A A B 9 H i c b V B N S 8 N A E J 3 4 W e t X 1 a O X Y B H q p S R S 0 W P R i 8 c K 9 g P a E D b b b b t 0 s 4 m 7 k 2 o J / R 1 e P C j i 1 R / j z X / j t s 1 B W x 8 M P N 6 b Y W Z e E A u u 0 X G + r Z X V t f W N z d x W f n t n d 2 + / c H D Y 0 F G i K K v T S E S q F R D N B J e s j h w F a 8 W K k T A Q r B k M b 6 Z + c 8 S U 5 p G 8 x 3 H M v J D 0 J e 9 x S t B I X i c e c D 9 9 9 H F S e j r z C 0 W n 7 M x g L x M 3 I 0 X I U P M L X 5 1 u R J O Q S a S C a N 1 2 n R i 9 l C j k V L B J v p N o F h M 6 J H 3 W N l S S k G k v n R 0 9 s U + N 0 r V 7 k T I l 0 Z 6 p v y d S E m o 9 D g P T G R I c 6 E V v K v 7 n t R P s X X k p l 3 G C T N L 5 o l 4 i b I z s a Q J 2 l y t G U Y w N I V R x c 6 t N B 0 Q R i i a n v A n B X X x 5 m T T O y 2 6 l f H F X K V a v s z h y c A w n U A I X L q E K t 1 C D O l B 4 g G d 4 h T d r Z L 1 Y 7 9 b H v H X F y m a O 4 A + s z x + t M p I L < / l a t e x i t > φ wt+1 (x) < l a t e x i t s h a 1 _ b a s e 6 4 = " B 8 M d P y t b M h i Z 8 5 T y 9 u z V v J f L u K 4 = " > A A A B + n i c b V B N S 8 N A E J 3 4 W e t X q k c v w S J U h J J I R Y 9 F L x 4 r 2 A 9 o Q 9 h s N + 3 S z S b s b q w l 5 q d 4 8 a C I V 3 + J N / + N 2 z Y H b X 0 w 8 H h v h p l 5 f s y o V L b 9 b a y s r q 1 v b B a 2 i t s 7 u 3 v 7 Z u m g J a N E Y N L E E Y t E x 0 e S M M p J U 1 H F S C c W B I U + I 2 1 / d D P 1 2 w 9 E S B r x e z W J i R u i A a c B x U h p y T N L v X h I v X T s p e r M y b L K 4 6 l n l u 2 q P Y O 1 T J y c l C F H w z O / e v 0 I J y H h C j M k Z d e x Y + W m S C i K G c m K v U S S G O E R G p C u p h y F R L r p 7 P T M O t F K 3 w o i o Y s r a 6 b + n k h R K O U k 9 H V n i N R Q L n p T 8 T + v m 6 j g y k 0 p j x N F O J 4 v C h J m q c i a 5 m D 1 q S B Y s Y k m C A u q b 7 X w E A m E l U 6 r q E N w F l 9 e J q 3 z q l O r X t z V y v X r P I 4 C H M E x V M C B S 6 j D L T S g C R j G 8 A y v 8 G Y 8 G S / G u / E x b 1 0 x 8 p l D + A P j 8 w f S 8 Z O 4 < / l a t e x i t > Independent Training d1 < l a t e x i t s h a 1 _ b a s e 6 4 = " y L f c h J U W D O N P r Y s 6 C 7 H c m U Z U / G U = " > A A A B 6 n i c b V B N S 8 N A E J 3 U r 1 q / q h 6 9 L B b B U 0 m k o s e i F 4 8 V 7 Q e 0 o W w 2 m 3 b p Z h N 2 J 0 I p / Q l e P C j i 1 V / k z X / j t s 1 B W x 8 M P N 6 b Y W Z e k E p h 0 H W / n c L a + s b m V n G 7 t L O 7 t 3 9 Q P j x q m S T T j D d Z I h P d C a j h U i j e R I G S d 1 L N a R x I 3 g 5 G t z O / / c S 1 E Y l 6 x H H K / Z g O l I g E o 2 i l h 7 D v 9 c s V t + r O Q V a J l 5 M K 5 G j 0 y 1 + 9 M G F Z z B U y S Y 3 p e m 6 K / o R q F E z y a a m X G Z 5 S N q I D 3 r V U 0 Z g b f z I / d U r O r B K S K N G 2 F J K 5 + n t i Q m N j x n F g O 2 O K Q 7 P s z c T / v G 6 G 0 b U / E S r N k C u 2 W B R l k m B C Z n + T U G j O U I 4 t o U w L e y t h Q 6 o p Q 5 t O y Y b g L b + 8 S l o X V a 9 W v b y v V e o 3 e R x F O I F T O A c P r q A O d 9 C A J j A Y w D O 8 w p s j n R f n 3 f l Y t B a c f O Y Y / s D 5 / A H v w Y 2 U < / l a t e x i t > d3 < l a t e x i t s h a 1 _ b a s e 6 4 = " h 2 Y Q L U 0 x 5 y I d 0 9 U K S L B U K A 3 G N k E = " > A A A B 6 n i c b V B N S 8 N A E J 3 U r 1 q / q h 6 9 L B b B U 0 m 0 o s e i F 4 8 V 7 Q e 0 o W w 2 m 3 b p Z h N 2 J 0 I p / Q l e P C j i 1 V / k z X / j t s 1 B q w 8 G H u / N M D M v S K U w 6 L p f T m F l d W 1 9 o 7 h Z 2 t r e 2 d 0 r 7 x + 0 T J J p x p s s k Y n u B N R w K R R v o k D J O 6 n m N A 4 k b w e j m 5 n f f u T a i E Q 9 4 D j l f k w H S k S C U b T S f d g / 7 5 c r b t W d g / w l X k 4 q k K P R L 3 / 2 w o R l M V f I J D W m 6 7 k p + h O q U T D J p 6 V e Z n h K 2 Y g O e N d S R W N u / M n 8 1 C k 5 s U p I o k T b U k j m 6 s + J C Y 2 N G c e B 7 Y w p D s 2 y N x P / 8 7 o Z R l f + R K g 0 Q 6 7 Y Y l G U S Y I J m f 1 N Q q E 5 Q z m 2 h D I t 7 K 2 E D a m m D G 0 6 J R u C t / z y X 9 I 6 q 3 q 1 6 s V d r V K / z u M o w h E c w y l 4 c A l 1 u I U G N I H B A J 7 g B V 4 d 6 T w 7 b 8 7 7 o r X g 5 D O H 8 A v O x z f y y Y 2 W < / l a t e x i t > s.d1 < l a t e x i t s h a 1 _ b a s e 6 4 = " + 8 Y j P u 8 c S T j B 4 p J f Z v C b Q S y 6 l 2 k = " > A A A B 7 H i c b V B N S 8 N A E J 3 U r 1 q / q h 6 9 L B b B U 0 h E 0 W P R i 8 c K p i 2 0 o W w 2 m 3 b p 7 i b s b o Q S + h u 8 e F D E q z / I m / / G b Z u D t j 4 Y e L w 3 w 8 y 8 K O N M G 8 / 7 d i p r 6 x u b W 9 X t 2 s 7 u 3 v 5 B / f C o r d N c E R q Q l K e q G 2 F N O Z M 0 M M x w 2 s 0 U x S L i t B O N 7 2 Z + 5 4 k q z V L 5 a C Y Z D Q U e S p Y w g o 2 V A u 3 G A 3 9 Q b 3 i u N w d a J X 5 J G l C i N a h / 9 e O U 5 I J K Q z j W u u d 7 m Q k L r A w j n E 5 r / V z T D J M x H t K e p R I L q s N i f u w U n V k l R k m q b E m D 5 u r v i Q I L r S c i s p 0 C m 5 F e 9 m b i f 1 4 v N 8 l N W D C Z 5 Y Z K s l i U 5 B y Z F M 0 + R z F T l B g + s Q Q T x e y t i I y w w s T Y f G o 2 B H / 5 5 V X S v n D 9 S / f q 4 b L R v C 3 j q M I J n M I 5 + H A N T b i H F g R A g M E z v M K b I 5 0 X 5 9 3 5 W L R W n H L m G P 7 A + f w B M A u O S Q = = < / l a t e x i t > s.d3 < l a t e x i t s h a 1 _ b a s e 6 4 = " e S 5 0 g F d w 8 Z B Q s i M F 0 T z a F A Q / I R 0 = " > A A A B 7 H i c b V B N S 8 N A E J 3 U r 1 q / q h 6 9 L B b B U 0 i 0 o s e i F 4 8 V T F t o Q 9 l s N u 3 S z S b s b o Q S + h u 8 e F D E q z / I m / / G T Z u D t j 4 Y e L w 3 w 8 y 8 I O V M a c f 5 t i p r 6 x u b W 9 X t 2 s 7 u 3 v 5 B / f C o o 5 J M E u q R h C e y F 2 B F O R P U 0 0 x z 2 k s l x X H A a T e Y 3 B V + 9 4 l K x R L x q K c p 9 W M 8 E i x i B G s j e c o O h 5 f D e s O x n T n Q K n F L 0 o A S 7 W H 9 a x A m J I u p 0 I R j p f q u k 2 o / x 1 I z w u m s N s g U T T G Z 4 B H t G y p w T J W f z 4 + d o T O j h C h K p C m h 0 V z 9 P Z H j W K l p H J j O G O u x W v Y K 8 T + v n + n o x s + Z S D N N B V k s i j K O d I K K z 1 H I J C W a T w 3 B R D J z K y J j L D H R J p + a C c F d f n m V d C 5 s t 2 l f P T Q b r d s y j i q c w C m c g w v X 0 I J 7 a I M H B B g 8 w y u 8 W c J 6 s d 6 t j 0 V r x S p n j u E P r M 8 f M x O O S w = = < / l a t e x i t > Base w t < l a t e x i t s h a 1 _ b a s e 6 4 = " m k w 5 3 h c B e U J 2 v Q Q p h a g 8 h s L Q P 4 Y = " > A A A B 6 n i c b V B N S 8 N A E J 3 U r 1 q / q h 6 9 L B b B U 0 l E 0 W P R i 8 e K 9 g P a U D b b T b t 0 s w m 7 E 6 W E / g Q v H h T x 6 i / y 5 r 9 x 2 + a g r Q 8 G H u / N M D M v S K Q w 6 L r f T m F l d W 1 9 o 7 h Z 2 t r e 2 d 0 r 7 x 8 0 T Z x q x h s s l r F u B 9 R w K R R v o E D J 2 4 n m N A o k b w W j m 6 n f e u T a i F g 9 4 D j h f k Q H S o S C U b T S / V M P e + W K W 3 V n I M v E y 0 k F c t R 7 5 a 9 u P 2 Z p x B U y S Y 3 p e G 6 C f k Y 1 C i b 5 p N R N D U 8 o G 9 E B 7 1 i q a M S N n 8 1 O n Z A T q / R J G G t b C s l M / T 2 R 0 c i Y c R T Y z o j i 0 C x 6 U / E / r 5 N i e O V n Q i U p c s X m i 8 J U E o z J 9 G / S F 5 o z l G N L K N P C 3 k r Y k G r K 0 K Z T s i F 4 i y 8 v k + Z Z 1 T u v X t y d V 2 r X e R x F O I J j O A U P L q E G t 1 C H B j A Y w D O 8 w p s j n R f n 3 f m Y t x a c f O Y Q / s D 5 / A F y T o 3 q < / l a t e x i t > Incremental w t+1 < l a t e x i t s h a 1 _ b a s e 6 4 = " D D x e q D 7 p v n P 3 v R j I e E R C t q H A p B c = " > A A A B 7 n i c b V B N S 8 N A E J 3 4 W e t X 1 a O X x S I I Q k m k o s e i F 4 8 V 7 A e 0 o W y 2 m 3 b p Z h N 2 J 0 o J / R F e P C j i 1 d / j z X / j t s 1 B W x 8 M P N 6 b Y W Z e k E h h 0 H W / n Z X V t f W N z c J W c X t n d 2 + / d H D Y N H G q G W + w W M a 6 H V D D p V C 8 g Q I l b y e a 0 y i Q v B W M b q d + 6 5 F r I 2 L 1 g O O E + x E d K B E K R t F K r a d e h u f e p F c q u x V 3 B r J M v J y U I U e 9 V / r q 9 m O W R l w h k 9 S Y j u c m 6 G d U o 2 C S T 4 r d 1 P C E s h E d 8 I 6 l i k b c + N n s 3 A k 5 t U q f h L G 2 p Z D M 1 N 8 T G Y 2 M G U e B 7 Y w o D s 2 i N x X / 8 z o p h t d + J l S S I l d s v i h M J c G Y T H 8 n f a E 5 Q z m 2 h D I t 7 K 2 E D a m m D G 1 C R R u C t / j y M m l e V L x q 5 f K + W q 7 d 5 H E U 4 B h O 4 A w 8 u I I a 3 E E d G s B g B M / w C m 9 O 4 r w 4 7 8 7 H v H X F y W e O 4 A + c z x 8 Q n o 9 m < / l a t e x i t > x < l a t e x i t s h a 1 _ b a s e 6 4 = " E + x W b 6 2 2 b 2 P 9 7 o + C O 1 o W w c / 7 o r s = " > A A A B 6 H i c b V D L T g J B E O z F F + I L 9 e h l I j H x R H Y N R o 9 E L x 4 h k U c C G z I 7 9 M L I 7 O x m Z t Z I C F / g x Y P G e P W T v P k 3 D r A H B S v p p F L V n e 6 u I B F c G 9 f 9 d n J r 6 x u b W / n t w s 7 u 3 v 5 B 8 f C o q e N U M W y w W M S q H V C N g k t s G G 4 E t h O F N A o E t o L R 7 c x v P a L S P J b 3 Z p y g H 9 G B 5 C F n 1 F i p / t Q r l t y y O w d Z J V 5 G S p C h 1 i t + d f s x S y O U h g m q d c d z E + N P q D K c C Z w W u q n G h L I R H W D H U k k j 1 P 5 k f u i U n F m l T 8 J Y 2 Z K G z N X f E x M a a T 2 O A t s Z U T P U y 9 5 M / M / r p C a 8 9 i d c J q l B y R a L w l Q Q E 5 P Z 1 6 T P F T I j x p Z Q p r i 9 l b A h V Z Q Z m 0 3 B h u A t v 7 x K m h d l r 1 K + r F d K 1 Z s s j j y c w C m c g w d X U I U 7 q E E D G C A 8 w y u 8 O Q / O i / P u f C x a c 0 4 2 c w x / 4 H z + A O j R j Q Q = < / l a t e x i t > φ wt (x) < l a t e x i t s h a 1 _ b a s e 6 4 = " A Y i N c D C d k E S 3 y X b 2 N 7 Z u F e 1 l 5 x U = " > A A A B 9 H i c b V B N S 8 N A E J 3 4 W e t X 1 a O X Y B H q p S R S 0 W P R i 8 c K 9 g P a E D b b b b t 0 s 4 m 7 k 2 o J / R 1 e P C j i 1 R / j z X / j t s 1 B W x 8 M P N 6 b Y W Z e E A u u 0 X G + r Z X V t f W N z d x W f n t n d 2 + / c H D Y 0 F G i K K v T S E S q F R D N B J e s j h w F a 8 W K k T A Q r B k M b 6 Z + c 8 S U 5 p G 8 x 3 H M v J D 0 J e 9 x S t B I X i c e c D 9 9 9 H F S e j r z C 0 W n 7 M x g L x M 3 I 0 X I U P M L X 5 1 u R J O Q S a S C a N 1 2 n R i 9 l C j k V L B J v p N o F h M 6 J H 3 W N l S S k G k v n R 0 9 s U + N 0 r V 7 k T I l 0 Z 6 p v y d S E m o 9 D g P T G R I c 6 E V v K v 7 n t R P s X X k p l 3 G C T N L 5 o l 4 i b I z s a Q J 2 l y t G U Y w N I V R x c 6 t N B 0 Q R i i a n v A n B X X x 5 m T T O y 2 6 l f H F X K V a v s z h y c A w n U A I X L q E K t 1 C D O l B 4 g G d 4 h T d r Z L 1 Y 7 9 b H v H X F y m a O 4 A + s z x + t M p I L < / l a t e x i t > d1 < l a t e x i t s h a 1 _ b a s e 6 4 = " y L f c h J U W D O N P r Y s 6 C 7 H c m U Z U / G U = " > A A A B 6 n i c b V B N S 8 N A E J 3 U r 1 q / q h 6 9 L B b B U 0 m k o s e i F 4 8 V 7 Q e 0 o W w 2 m 3 b p Z h N 2 J 0 I p / Q l e P C j i 1 V / k z X / j t s 1 B W x 8 M P N 6 b Y W Z e k E p h 0 H W / n c L a + s b m V n G 7 t L O 7 t 3 9 Q P j x q m S T T j D d Z I h P d C a j h U i j e R I G S d 1 L N a R x I 3 g 5 G t z O / / c S 1 E Y l 6 x H H K / Z g O l I g E o 2 i l h 7 D v 9 c s V t + r O Q V a J l 5 M K 5 G j 0 y 1 + 9 M G F Z z B U y S Y 3 p e m 6 K / o R q F E z y a a m X G Z 5 S N q I D 3 r V U 0 Z g b f z I / d U r O r B K S K N G 2 F J K 5 + n t i Q m N j x n F g O 2 O K Q 7 P s z c T / v G 6 G 0 b U / E S r N k C u 2 W B R l k m B C Z n + T U G j O U I 4 t o U w L e y t h Q 6 o p Q 5 t O y Y b g L b + 8 S l o X V a 9 W v b y v V e o 3 e R x F O I F T O A c P r q A O d 9 C A J j A Y w D O 8 w p s j n R f n 3 f l Y t B a c f O Y Y / s D 5 / A H v w Y 2 U < / l a t e x i t > d3 < l a t e x i t s h a 1 _ b a s e 6 4 = " h 2 Y Q L U 0 x 5 y I d 0 9 U K S L B U K A 3 G N k E = " > A A A B 6 n i c b V B N S 8 N A E J 3 U r 1 q / q h 6 9 L B b B U 0 m 0 o s e i F 4 8 V 7 Q e 0 o W w 2 m 3 b p Z h N 2 J 0 I p / Q l e P C j i 1 V / k z X / j t s 1 B q w 8 G H u / N M D M v S K U w 6 L p f T m F l d W 1 9 o 7 h Z 2 t r e 2 d 0 r 7 x + 0 T J J p x p s s k Y n u B N R w K R R v o k D J O 6 n m N A 4 k b w e j m 5 n f f u T a i E Q 9 4 D j l f k w H S k S C U b T S f d g / 7 5 c r b t W d g / w l X k 4 q k K P R L 3 / 2 w o R l M V f I J D W m 6 7 k p + h O q U T D J p 6 V e Z n h K 2 Y g O e N d S R W N u / M n 8 1 C k 5 s U p I o k T b U k j m 6 s + J C Y 2 N G c e B 7 Y w p D s 2 y N x P / 8 7 o Z R l f + R K g 0 Q 6 7 Y Y l G U S Y I J m f 1 N Q q E 5 Q z m 2 h D I t 7 K 2 E D a m m D G 0 6 J R u C t / z y X 9 I 6 q 3 q 1 6 s V d r V K / z u M o w h E c w y l 4 c A l 1 u I U G N I H B A J 7 g B V 4 d 6 T w 7 b 8 7 7 o r X g 5 D O H 8 A v O x z f y y Y 2 W < / l a t e x i t > Base w t < l a t e x i t s h a 1 _ b a s e 6 4 = " m k w 5 3 h c B e U J 2 v Q Q p h a g 8 h s L Q P 4 Y = " > A A A B 6 n i c b V B N S 8 N A E J 3 U r 1 q / q h 6 9 L B b B U 0 l E 0 W P R i 8 e K 9 g P a U D b b T b t 0 s w m 7 E 6 W E / g Q v H h T x 6 i / y 5 r 9 x 2 + a g r Q 8 G H u / N M D M v S K Q w 6 L r f T m F l d W 1 9 o 7 h Z 2 t r e 2 d 0 r 7 x 8 0 T Z x q x h s s l r F u B 9 R w K R R v o E D J 2 4 n m N A o k b w W j m 6 n f e u T a i F g 9 4 D j h f k Q H S o S C U b T S / V M P e + W K W 3 V n I M v E y 0 k F c t R 7 5 a 9 u P 2 Z p x B U y S Y 3 p e G 6 C f k Y 1 C i b 5 p N R N D U 8 o G 9 E B 7 1 i q a M S N n 8 1 O n Z A T q / R J G G t b C s l M / T 2 R 0 c i Y c R T Y z o j i 0 C x 6 U / E / r 5 N i e O V n Q i U p c s X m i 8 J U E o z J 9 G / S F 5 o z l G N L K N P C 3 k r Y k G r K 0 K Z T s i F 4 i y 8 v k + Z Z 1 T u v X t y d V 2 r X e R x F O I J j O A U P L q E G t 1 C H B j A Y w D O 8 w p s j n R f n 3 f m Y t x a c f O Y Q / s D 5 / A F y T o 3 q < / l a t e x i t > Incremental w t+1 < l a t e x i t s h a 1 _ b a s e 6 4 = " D D x e q D 7 p v n P 3 v R j I e E R C t q H A p B c = " > A A A B 7 n i c b V B N S 8 N A E J 3 4 W e t X 1 a O X x S I I Q k m k o s e i F 4 8 V 7 A e 0 o W y 2 m 3 b p Z h N 2 J 0 o J / R F e P C j i 1 d / j z X / j t s 1 B W x 8 M P N 6 b Y W Z e k E h h 0 H W / n Z X V t f W N z c J W c X t n d 2 + / d H D Y N H G q G W + w W M a 6 H V D D p V C 8 g Q I l b y e a 0 y i Q v B W M b q d + 6 5 F r I 2 L 1 g O O E + x E d K B E K R t F K r a d e h u f e p F c q u x V 3 B r J M v J y U I U e 9 V / r q 9 m O W R l w h k 9 S Y j u c m 6 G d U o 2 C S T 4 r d 1 P C E s h E d 8 I 6 l i k b c + N n s 3 A k 5 t U q f h L G 2 p Z D M 1 N 8 T G Y 2 M G U e B 7 Y w o D s 2 i N x X / 8 z o p h t d + J l S S I l d s v i h M J c G Y T H 8 n f a E 5 Q z m 2 h D I t 7 K 2 E D a m m D G 1 C R R u C t / j y M m l e V L x q 5 f K + W q 7 d 5 H E U 4 B h O 4 A w 8 u I I a 3 E E d G s B g B M / w C m 9 O 4 r w 4 7 8 7 H v H X F y W e O 4 A + c z x 8 Q n o 9 m < / l a t e x i t > {c k }2C t < l a t e x i t s h a 1 _ b a s e 6 4 = " d U / S z 3 H f Z 8 O j t J E N 3 N Q y m b J E c g Q = " > A A A C D H i c b V D L S s N A F J 3 U V 6 2 v q k s 3 g 0 V w V R K p 6 L L Y j c s K 9 g F N W i b T a T t 0 M g k z N 0 I J + Q A 3 / o o b F 4 q 4 9 Q P c + T d O 2 i y 0 9 c D A 4 Z x z m X u P H w m u w b a / r c L a + s b m V n G 7 t L O 7 t 3 9 Q P j x q 6 z B W l L V o K E L V 9 Y l m g k v W A g 6 C d S P F S O A L 1 v G n j c z v P D C l e S j v Y R Y x L y B j y U e c E j D S o F x x E z q Y 9 l 0 g s Z t i l 0 v s B g Q m l I i k k Q 4 y u Q 8 m Z V f t O f A q c X J S Q T m a g / K X O w x p H D A J V B C t e 4 4 d g Z c Q B Z w K l p b c W L O I 0 C k Z s 5 6 h k g R M e 8 n 8 m B S f G W W I R 6 E y T w K e q 7 8 n E h J o P Q t 8 k 8 w 2 1 c t e J v 7 n 9 W I Y X X s J l 1 E M T N L F R 6 N Y Y A h x 1 g w e c s U o i J k h h C p u d s V 0 Q h S h Y P o r m R K c 5 Z N X S f u i 6 t S q l 3 e 1 S v 0 m r 6 O I T t A p O k c O u k J 1 d I u a q I U o e k T P 6 B W 9 W U / W i / V u f S y i B S u f O U Z / Y H 3 + A B 6 W m 6 0 = < / l a t e x i t > {c 0 k }2C t+1 0 < l a t e x i t s h a 1 _ b a s e 6 4 = " b q W 9 b A G u X u I d F u M Z 5 b U x C H 7 a Q 3 M = " > A A A C F n i c b V B N S 8 N A E N 3 U r 1 q / q h 6 9 L B Z R E E s i F T 0 W e / F Y w X 5 A 0 4 b N d t s u 3 W z C 7 k Q o I b / C i 3 / F i w d F v I o 3 / 4 3 b N g e t P h h 4 v D f D z D w / E l y D b X 9 Z u a X l l d W 1 / H p h Y 3 N r e 6 e 4 u 9 f U Y a w o a 9 B Q h K r t E 8 0 E l 6 w B H A R r R 4 q R w B e s 5 Y 9 r U 7 9 1 z 5 T m o b y D S c S 6 A R l K P u C U g J G 8 4 p m b U G / c S 1 w g 8 X H q p t j l E r s B g R E l I q m l X u b 0 E j h 1 U q 9 Y s s v 2 D P g v c T J S Q h n q X v H T 7 Y c 0 D p g E K o j W H c e O o J s Q B Z w K l h b c W L O I 0 D E Z s o 6 h k g R M d 5 P Z W y k + M k o f D 0 J l S g K e q T 8 n E h J o P Q l 8 0 z k 9 W C 9 6 U / E / r x P D 4 K q b c B n F w C S d L x r E A k O I p x n h P l e M g p g Y Q q j i 5 l Z M R 0 Q R C i b J g g n B W X z 5 L 2 m e l 5 1 K + e K 2 U q p e Z 3 H k 0 Q E 6 R C f I Q Z e o i m 5 Q H T U Q R Q / o C b 2 g V + v R e r b e r P d 5 a 8 7 K Z v b R L 1 g f 3 5 W s n 6 M = < / l a t e x i t > Figure 1: Indirect Discriminant Alignment (IDA): Before align- ment (left), an orange (new input data) processed through a base model backbone yields an embedding that has a different distance- vector to apples (old class anchors) compared with the one pro- cessed through the incremental model backbone. After performing alignment, they produce embeddings that have a similar distance- vector signature, while the incremental model can use the remaining degrees of freedom to adapt the embedding to solve new tasks. level, learning from few samples (“shots”) remains a chal- lenge, as we discuss in Sect. 4. We explore the hypothesis that incrementally learning a model from a large number of different tasks, each with few training examples, yields a model comparable to one trained with a large number of images at once. Accordingly, we focus on the case of IML for few-shot learning. IML is not merely meta-training [31, 3, 35, 6, 25, 19] done by processing the training set in chunks: In IML, the meta-training set keeps changing, and we require both the performance of the model for the new tasks, as well as the base model, to improve. IML is also not just incremental (or continual) learning [26, 20, 21, 4, 17, 33], which focuses on a single model to tackle new tasks while avoiding catastrophic forgetting. In IML, we want to continuously improve the meta-trained model so that, presented with an unseen task, it achieves better performance now that it would have before solving the previous task. Moreover, we want to improve 1 arXiv:2002.04162v2 [cs.LG] 21 Apr 2020

Upload: others

Post on 11-Aug-2020

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Incremental Meta-Learning via Indirect Discriminant Alignment · Sect. 4. 2. Method The next section establishes the notation and describes incremental learning and meta-learning

Incremental Meta-Learning via Indirect Discriminant Alignment

Qing Liu ∗

Johns Hopkins [email protected]

Orchid MajumderAWS

[email protected]

Alessandro AchilleAWS

[email protected]

Avinash RavichandranAWS

[email protected]

Rahul BhotikaAWS

[email protected]

Stefano SoattoUCLA & AWS

[email protected]

Abstract

We propose a method to train a model so it can learn newclassification tasks while improving with each task solved.This amounts to combining meta-learning with incrementallearning. Different tasks can have disjoint classes, so onecannot directly align different classifiers as done in modeldistillation. On the other hand, simply aligning featuresshared by all classes does not allow the base model sufficientflexibility to evolve to solve new tasks. We therefore indirectlyalign features relative to a minimal set of “anchor classes.”Such indirect discriminant alignment (IDA) adapts a newmodel to old classes without the need to re-process old data,while leaving maximum flexibility for the model to adapt tonew tasks. This process enables incrementally improvingthe model by processing multiple learning episodes, eachrepresenting a different learning task, even with few trainingexamples. Experiments on few-shot learning benchmarksshow that this incremental approach performs favorablyeven compared to training the model with the entire datasetat once.

1. Introduction

Meta-learning aims to train a model to learn new tasksleveraging knowledge accrued while solving related tasks.Most meta-learning methods do not incorporate experi-ence from learning new tasks to improve the “base” (meta-learned) model. Our goal is to enable such improvement,thus creating a virtuous cycle whereby every new tasklearned enhances the base model in an incremental fash-ion, without the need to re-process previously seen data. Wecall this incremental meta-learning (IML).

While visual classification with a large number of trainingsamples per class has reached performance close to human-

∗Work conducted while at AWS.

x

<latexit sha1_base64="E+xWb622b2P97o+CO1oWwc/7ors=">AAAB6HicbVDLTgJBEOzFF+IL9ehlIjHxRHYNRo9ELx4hkUcCGzI79MLI7OxmZtZICF/gxYPGePWTvPk3DrAHBSvppFLVne6uIBFcG9f9dnJr6xubW/ntws7u3v5B8fCoqeNUMWywWMSqHVCNgktsGG4EthOFNAoEtoLR7cxvPaLSPJb3ZpygH9GB5CFn1Fip/tQrltyyOwdZJV5GSpCh1it+dfsxSyOUhgmqdcdzE+NPqDKcCZwWuqnGhLIRHWDHUkkj1P5kfuiUnFmlT8JY2ZKGzNXfExMaaT2OAtsZUTPUy95M/M/rpCa89idcJqlByRaLwlQQE5PZ16TPFTIjxpZQpri9lbAhVZQZm03BhuAtv7xKmhdlr1K+rFdK1ZssjjycwCmcgwdXUIU7qEEDGCA8wyu8OQ/Oi/PufCxac042cwx/4Hz+AOjRjQQ=</latexit>

Training with IFA

�wt(x)

<latexit sha1_base64="AYiNcDCdkES3yXb2N7ZuFe1l5xU=">AAAB9HicbVBNS8NAEJ34WetX1aOXYBHqpSRS0WPRi8cK9gPaEDbbbbt0s4m7k2oJ/R1ePCji1R/jzX/jts1BWx8MPN6bYWZeEAuu0XG+rZXVtfWNzdxWfntnd2+/cHDY0FGiKKvTSESqFRDNBJesjhwFa8WKkTAQrBkMb6Z+c8SU5pG8x3HMvJD0Je9xStBIXicecD999HFSejrzC0Wn7MxgLxM3I0XIUPMLX51uRJOQSaSCaN12nRi9lCjkVLBJvpNoFhM6JH3WNlSSkGkvnR09sU+N0rV7kTIl0Z6pvydSEmo9D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uq9Yssv2DPgvcTJSQhnqXvHT7Yc0DpgEKojWHceOoJsQBZwKlhbcWLOI0DEZso6hkgRMd5PZWyk+MkofD0JlSgKeqT8nEhJoPQl80zk9WC96U/E/rxPD4KqbcBnFwCSdLxrEAkOIpxnhPleMgpgYQqji5lZMR0QRCibJggnBWXz5L2mel51K+eK2UqpeZ3Hk0QE6RCfIQZeoim5QHTUQRQ/oCb2gV+vRerberPd5a87KZvbRL1gf35Wsn6M=</latexit>

Figure 1: Indirect Discriminant Alignment (IDA): Before align-ment (left), an orange (new input data) processed through a basemodel backbone yields an embedding that has a different distance-vector to apples (old class anchors) compared with the one pro-cessed through the incremental model backbone. After performingalignment, they produce embeddings that have a similar distance-vector signature, while the incremental model can use the remainingdegrees of freedom to adapt the embedding to solve new tasks.

level, learning from few samples (“shots”) remains a chal-lenge, as we discuss in Sect. 4. We explore the hypothesisthat incrementally learning a model from a large numberof different tasks, each with few training examples, yieldsa model comparable to one trained with a large number ofimages at once. Accordingly, we focus on the case of IMLfor few-shot learning.

IML is not merely meta-training [31, 3, 35, 6, 25, 19]done by processing the training set in chunks: In IML, themeta-training set keeps changing, and we require both theperformance of the model for the new tasks, as well as thebase model, to improve. IML is also not just incremental (orcontinual) learning [26, 20, 21, 4, 17, 33], which focuses on asingle model to tackle new tasks while avoiding catastrophicforgetting. In IML, we want to continuously improve themeta-trained model so that, presented with an unseen task, itachieves better performance now that it would have beforesolving the previous task. Moreover, we want to improve

1

arX

iv:2

002.

0416

2v2

[cs

.LG

] 2

1 A

pr 2

020

Page 2: Incremental Meta-Learning via Indirect Discriminant Alignment · Sect. 4. 2. Method The next section establishes the notation and describes incremental learning and meta-learning

the base learner without the need to re-process old data,since that may no longer be accessible, or it may becometoo expensive to re-process. However, we also want IML toallow exploiting old data, if that is available. Thus far wehave used terms like “training task” or “model” informally.In the next section, we elaborate on these terms and thenmake them formal in Sect. 2.1.

1.1. Nomenclature

We identify a learning task with a training set. Thisdataset, together with a function to be minimized (loss) andthe set of functions to minimize it (models), defines an op-timization problem whose solution is a trained model that“solves the task.” So, a learning task can be identified withboth a training set, and a suitably trained model. In Sect. 2.1,we will introduce empirical cross-entropy as a loss, deepneural networks (DNNs) as a set of functions, and stochasticgradient descent (SGD) as an optimization scheme. A modelconsists of a feature representation, or embedding, obtainedby processing each datum through a backbone, which is thenused to test each hypothesis, or class, using a discriminantfunction. A discriminant is a function that maps a feature tothe hypothesis space, where its value is used to render a deci-sion. A discriminant vector is the collection of discriminantvalues associated to each hypothesis or class. A classifieris a function that outputs the minimizer (or maximizer) ofa discriminant function, which corresponds to a predictedclass or hypothesis. For instance, the Bayesian discriminantis the posterior density of the classes given the data. The cor-responding discriminant vector is the collection of posteriorprobabilities for each hypothesis. Any sufficient statistic ofa discriminant is also a discriminant, for instance its nega-tive log or any other invertible function of it. The optimalBayesian classifier is one one that returns the hypothesiswith the maximum a-posteriori probability (MAP), or withthe smallest negative log-posterior.

1.2. Key Contribution and Organization

The main contribution of this paper can be more easily un-derstood for the case of metric classifiers, where each classis represented by a prototype, or “center” (Fig. 1), and thediscriminant compares features to prototypes, for instance us-ing the Euclidean distance in the embedding space, althoughour method is not restricted to this case. Each new learningtask has a set of classes that is possibly disjoint from thoseof old tasks. The goal of IML is to update the base modelincrementally while solving each new task, without neces-sarily requiring access to data from old tasks, and despiteeach new task having only few samples per class. Simplyimposing that all tasks use the same features would be toorestrictive, as different tasks may require the embedding tochange while preserving the old centers. On the other hand,we cannot compare discriminants or classifiers directly since

they map to different hypothesis spaces.Since we cannot compare classifiers directly, and we do

not want to needlessly restrict the model’s freedom to evolve,the key idea is to align models for the old and new tasksindirectly, by imposing that their discriminants (in the metriccase, the vector of distances to the class centers) be alignedrelative to a minimal set of “anchor classes,” and other-wise leaving the embedding free to adapt to new tasks. Theminimal anchor set is represented by the old centers. Thus,indirect discriminant alignment (IDA) is performed by map-ping the data to old centers, through both the new and theold backbones, and minimizing the misalignment betweenthe two resulting discriminant vectors. Misalignment canbe measured in a number of ways, and the process can beconducted by only processing new data incrementally, re-sulting in a continuous improvement of the old model. Themore general case, which applies to non-metric classifiers,is explained in Sect. 2.2. It results in the main contribu-tion of our work, which is to propose what is, to the bestof our knowledge, the first method for incremental few-shotmeta-learning.

We tackle the case of few-shot learning since, in thepresence of large amounts of data for the classes of interest,pre-training a large model and fine-tuning it for the task athand already yields a strong baseline. This is not the casefor few-shot learning, where the current state-of-the-art stilllags far behind [5]. Our method directly generalizes severalmeta-learning algorithms [19, 35, 25], and is applicable tomore yet.

In Sect. 2.4 we describe two implementations for per-forming incremental meta-learning and a number of base-lines (Sect. 3.1), which form the basis for empirical evalua-tion in Sect. 3.3 on few-shot benchmark datasets outlined inSect. 3.2. We also introduce DomainImageNet in Sect. 3.2to measure the effect of meta-learning on incremental learn-ing when new classes are both in- and out-of-domain. Wehighlight some limitations and failure cases in Sect. 3.4.We further discuss related work and future opportunities inSect. 4.

2. MethodThe next section establishes the notation and describes

incremental learning and meta-learning in a formalism thatwill make it easy to describe our key contribution in Sect. 2.2.At that point, it is a small step to incremental meta-learning,as described in Sect. 2.3.

2.1. Preliminaries

A model for a classification task is a parametric ap-proximation pw(y|x) of the posterior distribution of theclass y ∈ {c1, . . . , cK} given the test datum x. For agiven class of functions (architecture), the model may beidentified with its parameters (weights) w. The model is

2

Page 3: Incremental Meta-Learning via Indirect Discriminant Alignment · Sect. 4. 2. Method The next section establishes the notation and describes incremental learning and meta-learning

trained by minimizing a loss function L that depends on adataset D = {(xi, yi)}Ni=1, which defines the task, so thatw0

.= argminw L(w;D).

Incremental learning assumes that an incrementaldataset E is provided in addition toD. If the two are disjoint,we can write

L(w;D ∪ E) = L(w;D) + L(w; E) (1)

If L is differentiable with respect to w and we train un-til convergence (∇wL(w0,D) = 0), we can expand L tosecond-order around the previous parameters w0 to obtain

L(w;D ∪ E) = L(w;D) + L(w; E)' L(w0 + δw; E) + L(w0;D)+ δwTH(w0;D)δw

where w = w0 + δw and H(w0;D) is the Hessian of theloss L(w;D) computed at w0. Ignoring the constant termL(w0;D) yields the derived loss

L(w) = L(w; E) + δwTH(w0;D)δw (2)

minimizing which corresponds to fine-tuning the base modelfor the new task while ensuring that the parameters changelittle, using the Hessian as the metric,1 a process known asElastic Weight Consolidation [17]. Note that, even if theincremental set E is small, there is no guarantee that theweight update δw will be small. Moreover, making δw smallin eq. (2) is unnecessary, since the weights can often changeconsiderably without changing the network behavior.

Distillation is based on approximating the loss not by per-turbing the weights, w0 → w0 + δw, but by perturbing thediscriminant function, pw0 → pw0+δw, which can be doneby minimizing

L(w) = L(w; E) + λEx∼D KL(pw0(y|x)||pw(y|x)) (3)

where the Kullback-Leibler (KL) divergence measures theperturbation of the new discriminant pw with respect to theold one pw0 in units λ. The losses in eq. (2) and eq. (3) areequivalent up to first-order, meaning that a local first-orderoptimization would yield the same initial step when minimiz-ing them. Eq. (3) may be interpreted as model distillation[2, 13] or trust-region optimization [32]. The drawback ofthis method is that it needs access to old samples to computethe loss, since the KL is averaged over D. Our goal is toextend these ideas to meta-learning where D may no longerbe accessible.

1A metric is a positive semi-definite symmetric bilinear form. Since theHessian H for deep networks typically has some negative eigenvalues, it istypically approximated by the Fisher Information Matrix, which is positivesemi-definite and also easier to compute.

Meta-Learning presents an additional difficulty: A meta-training dataset consists of several tasks, indexed by τ , eachlearned in a separate training episode, each representedby a different dataset Dτ with possibly different classes{cτ1 , . . . , cτK} = Cτ . Rather than training a single modelto minimize the loss on a single dataset, a meta-learningalgorithm aims to produce a task-agnostic model that mini-mizes the loss across all meta-training tasks. For the case ofempirical cross-entropy:

L(w;D) = 1

∑τ

1

|Dτ |∑

(xi,yi)∈Dτ

− log pτw(yi|xi) (4)

The first sum ranges over however many meta-training tasksDτ are available. To formalize the core idea in the nextsection, without loss of generality we write the posteriordensity p(y|x) in terms of a “backbone” function φ thatmaps each sample x to a feature vector: z = φ(x), anda discriminant “head” f that maps a feature vector to theposterior p(y|x) = f(y|φ(x)).

2.2. Indirect Discriminant Alignment (IDA)

The challenge in extending incremental learning (3) tometa-learning (4) is that each task Dτ in the latter has a dif-ferent discriminant fτ for a different set of classes Cτ . Thus,aligning the discriminants directly would be imposing align-ment between different classes, which is not meaningful.

A naive solution would be to just align the features φw(x)on all inputs, for instance by minimizing their average dis-tance

Ex‖φwt(x)− φwt+1(x)‖2 (5)

However, this would be needlessly restrictive: Completelydifferent features can yield the same posterior density, andwe want to exploit this flexibility for incremental learning.Moreover, we want our method to only process new data,rather than keep re-processing old data, which would defythe goal of incremental processing. To simplify the notation,we refer to pwτ as pold and pwτ+1 as pnew, and so for theheads fold, fnew and the backbones φold, φnew. Each can betrained on different tasks, or episodes, τ .

The key idea of this paper is to enable aligning the oldand new discriminants using “class anchors” from the oldtask τ , while processing only data from the new task τ ′. Thisis done through indirect discriminative alignment (IDA),illustrated in Fig. 1, which addresses the challenge that thetasks τ and τ ′ may not share any classes. IDA uses theclasses defined by the old discriminants as “anchors,” andimposes that the features processed through the old and newembeddings share the same discriminant relative to theseanchor classes. For metric-based classifiers, the classes canbe represented by points in latent (feature, or embedding)space, and the anchors are just an under-complete basis ofthis space, with the discriminant vector represented by the

3

Page 4: Incremental Meta-Learning via Indirect Discriminant Alignment · Sect. 4. 2. Method The next section establishes the notation and describes incremental learning and meta-learning

Euclidean distance to each anchor class representative. Theunder-complete alignment leaves the residual degrees offreedom free for continual learning. However, the method ismore general, allowing any discriminant function.

To make the dependency on the anchor classes andepisodes explicit, we write the model pτw(y|x) =fτw(y|φw(x)). Indirect discriminative alignment of the newmodel to the old one is then performed by minimizing:

Ex∼E,τ ′[KL(fτ

′old(y|φold(x)||fτ

′old(y|φnew(x)))

](6)

where Cold is a set of classes obtained after training on theold training set and τ ′ are tasks sampled from the new datasetE .

Intuitively, we reuse the old class representatives Cold andask that the new features φnew remain compatible with thediscriminant fold. Moreover, instead of sampling from theold dataset D – which we may no longer have access to – wesample from x ∼ E . In the case of metric classifiers, this canbe interpreted as aligning the new features to a set of anchorpoints, which in particular are the old class representatives.

Note that f can be any discriminant that can processdata generated via a representation function φ, where bothf and φ have their own parameters. Also, the choice of KL-divergence to measure the discrepancy between discriminantvectors is due to the fact that it yields a simple expression formost commonly used models, but IDA is not limited to it andany other divergence measure could be employed instead.

2.3. Incremental Meta-Learning

Given (14), incremental meta-learning consists of solving

wt+1 = arg minwt+1

L(wt+1; E) + λ IDAE(φwt+1 |φwt ; Ct)(7)

where the first term corresponds to fine-tuning the basemodel on the new data, while the second term enforces indi-rect discriminant alignment relative to the anchors from oldclasses. In the next section, we describe our implementationand empirical evaluation.

2.4. Implementation

The simplest implementation of our method eq. (7) isobtained by using a metric classifier as the base meta-learner.This choice limits us to each task having the same number ofclasses, a choice we will discuss and extend in App. F. Werepresent a metric-based classifier using a function ψw thatcomputes the class representatives, or prototypes, or “cen-ters,” cτk = ψw(Dτ )k,2 and a function (metric) χw(zi, cτk)that scores the fit of a datum, represented by the featurevector zi, with an hypothesis corresponding to a class cτk.Each function can be fixed [35] or learned [25]. Note that

2We overload the notation c to indicate the classes in C and the classrepresentation, which are the argument ofχ, since both represent the classes.

the backbone φw is common to all tasks, whereas the metricchanges with each few-shot task Dτ , since cτk ∈ Cτ andCτ = {cτk = ψw(Dτ )k}Kk=1. According to this model, theoptimal (Bayesian) discriminant for the task Dτ is of theform:

p(y = k|z) = eχw(z,cτk)∑j eχw(z,cτj )

(8)

where z = φw(x). Note that χw and p(y|x) are equivalentdiscriminants: Maximizing the posterior is equivalent tominimizing the negative log, which yields a loss of the form

L(w;D) = 1

∑τ

1

|Dτ |∑

(xi,yi)∈Dτ

−χw(zi, cτyi)

+ log(∑K

k=1 eχw(zi,c

τk))

(9)

Our first implementation has a trained backbone φw but fixesthe metric χ to be the L2 distance and the class representa-tives to be the means:

χ(z, c) := −‖z − c‖2,ψ(Dτ , k) := 1

|Ck|∑i δyi,kzi

Cτ = ψ(Dτ , k)Kk=1.

The detailed computation of the loss eq. (9) is describedin the appendix. After every training episode, we discardthe data used for meta-training and only retain the classanchors Cτ . Our paragon (oracle), that will be describedin eq. (10), does not retain any class anchors but trains anew meta-learner at every episode, utilizing all data seenthus far. Ideally, the final performance of the two should besimilar, which would justify incremental processing of newdatasets without the need to re-process old data, which wasour working hypothesis and the basis of eq. (2). Indeed, thisis what we observe in Sect. 3.3.

For meta-training, we sample few-shot tasks usingepisodic sampling i.e. each batch consists of K classes sam-pled at random. We then sample Ns samples as the supportsamples and Nq samples as the query samples. The classrepresentations are calculated only using the support sam-ples, while the query samples are used to compute the loss.For training the base model, we sample few-shot tasks τfrom the old dataset D and train the model using the lossfunction in eq. (4). To train the incremental model we sam-ple a few-shot task τ ′ from the new dataset E . We thensample K random class anchors (of the old dataset D) fromCtτ , which are calculated and preserved after the previoustraining phase. During incremental phase(s), the network istrained by minimizing eq. (9).

3. Empirical ValidationWe compare our simplest method, which is based on

a Prototypical Network architecture (PN) [35] as the base

4

Page 5: Incremental Meta-Learning via Indirect Discriminant Alignment · Sect. 4. 2. Method The next section establishes the notation and describes incremental learning and meta-learning

meta-learner, with several baselines as well as the paragonmodel that uses the same architecture but is free to re-processall past data along with new data. In Sect. 3.3 we assess per-formance on standard few-shot image classification bench-marks (MiniImageNet and TieredImageNet) as well as on anewly curated dataset described in Sect. 3.2. To show thatour method is not tied to the specifics of PN, we also performthe same experiments using ECM [25]. That is the basis forextending our simplest method to the case where each taskhas a different number of classes, described in the appendix.

Implementation Details: We use a ResNet-12 [12] fol-lowing [23] as our feature extractor φw. It consists of fourresidual layers each with 3×3 convolutional layers followedby a max-pooling layer. We use DropBlock regularization[9], a form of structured dropout with a keep-rate of 0.9after the max-pooling layers. At each round, we train for200 epochs, each consisting of 800 few-shot training taskscontaining 5 (1) support examples per class for 5-shot 5-way (1-shot 5-way). We use 15 query points per class forcomputing the loss to update the network parameters. Testperformance is also measured with 15 query points per class.We use Adam [16] with an initial learning-rate of 0.001which is reduced by a factor of 0.5 when performance onthe validation set does not improve for more than 3 epochs.We use cross-entropy loss with softmax temperature 2.0,following [20]. For IDA, we choose λ to be 1.0 and weshow the effect of varying λ in the range of [0.0, 10.0] in theappendix.

3.1. Baselines and Ablation Studies

To evaluate the method quantitatively, we need an upper-bound (oracle) represented by a model that performs meta-training using all the data as well as few other baselines toenable a fair comparison and ablation studies.No Update (NU) is the simplest baseline, that is a modelmeta-trained only using the old dataset.Fine-Tuning (FT) starts with the model meta-trained on olddata and performs additional steps of SGD on the new datawit no additional constraint, using the first term of eq. (7).Direct Feature Alignment (DFA) adds to the first term ofeq. (7) a penalty for the direct misalignment of features (5)averaged over the new tasks

DFAE(φwt+1|φwt) = Ex∼Eτ ′‖φwt+1(x) − φwt(x)‖22

akin to feature distillation.Exemplar-based incremental meta-learning (EIML) hasaccess to (possibly a subset of) the old data, so we can addan additional term to eq. (7) to foster tighter alignment via

L(wt+1) = L(wt+1; E)+ λEx∈Dτ

[KL(fτwt(y|φwt(x))||f

τwt+1

(y|φwt+1(x)))]

+ λEx∈Eτ′[KL(fτwt(y|φwt(x))||f

τwt(y|φwt+1(x)))

](10)

where Eτ ′ is task sampled from the new dataset and Ct andCt+1 are obtained by re-processing Dτ (a task sampled fromthe old dataset) through the old and the new embeddingsrespectively. We expect this method to perform best, as ithas access to old data. However, it is computationally moreexpensive than IDA as we need to re-process old data.Full training paragon (PAR) consists of meta-learning us-ing the union of data from old and the new datasets, mini-mizing the left-hand side of eq. (1). There is no incrementaltraining, so this method serves as an upper bound for perfor-mance.

3.2. Datasets

We test our algorithm on MiniImageNet [38], TieredIma-geNet [28] and another variant of ImageNet [29] which wecall DomainImageNet. MiniImageNet consists of imagesof size 84 × 84 sampled from 100 classes of the ILSVRCdataset [29], with 600 images per class. We used the datasplit outlined in [24], where 64 classes are used for training,16 classes for validation and 20 for testing. We further splitthe 64 training classes randomly into 32 for meta-trainingthe base model and the remaining for training the incremen-tal model; 16 validation classes are only used for assessinggeneralization during meta-training for both the base andincremental models. For a fair measurement of performanceon the old data, we also use a separate test set comprising300 new images per class [10].

TieredImageNet is a larger subset of ILSVRC, with779, 165 images of size 84 × 84 representing 608 classesthat are hierarchically grouped into 34. This dataset issplit to ensure that sub-classes within the 34 groups arenot shared among training, validation and test sets. The re-sult is 448, 695 images in 351 classes for training, 124, 261images in 97 classes for validation, and 206, 209 imagesin 160 classes for testing. For a fair comparison, we usethe same training, validation and testing splits of [28] anduse the classes at the lowest level of the hierarchy. Similarto MiniImageNet, we randomly pick 176 classes from thetraining set for meta-training the base model and use theremaining 175 classes for incremental meta-training. Herewe also use a separate test set of about 1000 images per classfor measuring old task performance.

To investigate the role of domain gap in IML, we assem-ble DomainImageNet, along the format of MiniImageNet,with 32 old meta-training classes, 32 new meta-trainingclasses, 16 meta-validation classes and 40 meta-test (un-seen) classes. All classes are sampled from the ILSVRCdataset, but old, new and meta-test set have two subdivisions,one sampled from natural categories, the other sampled fromman-made categories. 40 unseen classes consist of 20 classeseach of natural and man-made categories. The domain splitwe use follows [41].

5

Page 6: Incremental Meta-Learning via Indirect Discriminant Alignment · Sect. 4. 2. Method The next section establishes the notation and describes incremental learning and meta-learning

3.3. Quantitative Results

We test IML on each dataset using two common few-shot scenarios: 5-shot 5-way and 1-shot 5-way. We referto the data used to train the base model as old classes, andthat of the incremental model as new classes. We refer tounseen classes as classes that the model has not seen in anytraining. Final performance of the meta-learner is reportedas the mean and 95% confidence interval of the classificationaccuracy across 2000 episodes or few-shot tasks.

Results of the different methods using PN as a meta-learner are shown in Table 1 for MiniImageNet, Table 3 forTieredImageNet and Table 4 for DomainImageNet. Further,we show results using ECM as a meta-learner in Table 2for MiniImageNet. We also show the results using ECM onDomainImageNet for 5-shot 5-way in Table 5. All resultsfor DomainImageNet are using natural objects as the olddomain and man-made objects as the new domain. In theappendix, we show the results for 1-shot 5-way and alsofor all combinations of shots and meta-learners while usingman-made objects as the old domain and natural objects asthe new domain.

Catastrophic Forgetting: Tables 1,2, 3, 4, 5 and 6 showthat the classification accuracy on old classes using the in-cremental model drops significantly when compared withthe base model for methods that perform IML without usingthe old data (i.e. FT and DFA). This holds for both 1-shot5-way and 5-shot 5-way, both PN and ECM, and across alldatasets.

Incremental Meta Learning (IML) with any of the meth-ods described above yields increased performance on boththe new classes and the unseen classes. If performance onthe old classes is not a priority, any IML method will performbetter on the new classes with an added bonus of better per-formance on unseen classes compared with the base model.Again, these conclusions hold across shots, meta-learnersand datasets.

EIML vs IDA: Table 1 shows that the difference in perfor-mance of between EIML and IDA is not significant. Whilewe expected EIML to dominate IDA, in some cases EIMLperformed worse (Table 1: 1-shot 5-way case for MiniIma-geNet). This illustrates the limited benefit of re-processingold data, justifying IML. We also varied the number of sam-ples we retained from the old dataset in the range of 15 to120 and noticed that the performance was almost constant(shown in the appendix). Hence, we do not run tests on EIMLusing ECM. Furthermore, for a class of methods that learnthe class anchors such as [19], running EIML is far moreexpensive as we need to run an additional inner optimizationat every step of IML. For completeness, the performance

on different datasets using EIML (with PN) is shown in theappendix.

IDA outperforms all baselines for unseen classes acrossall scenarios shown in this section, except for 1-shot 5-wayin Table 3. We further notice better performance comparedwith FT and DFA for old classes. For new classes, IDAtrails FT and DFA but overall it performs best on average,approaching the paragon when new tasks are sampled acrossold, new and unseen classes.

TieredImageNet: Table 3 shows results using PN [35] asthe meta-learner. For this dataset, the improvement fromusing more classes is relatively small compared with Mini-ImageNet (Table 1). When the base model is trained witha large number of classes, the generalization ability of thenetwork is already satisfactory, and we observe negligiblecatastrophic forgetting or increase in meta-learning perfor-mance. We also see that IDA is similar to the baselines. Thisraises the question of what new classes would best improveperformance in IML. Our experiments on DomainImageNetaddress this question.

DomainImageNet: Results for 5-shot 5-way are shownfor PN [35] in Table 4 and for ECM [25] in Table 5. Themodel is first trained using natural classes and then incremen-tally trained using man-made classes. This helps evaluate theeffect of domain shift between old and new training classes.We test on five different sets: seen and unseen classes fromnatural objects, seen and unseen classes from man-madeobjects and unseen classes from a mixture of the two.

The tables show that the accuracy on the joint test setimproves significantly compared with the baselines. Most ofthe gain is for the new domain, i.e., man-made objects. Also,catastrophic forgetting is significant since there is domainshift between the classes from the old and new domains. Thiseffect is also seen with unseen classes on the same domain.IDA is shows improvement across the board relative to thebaselines. The results for 1-shot 5-way and using the reversedomain training (i.e., old domain is man-made objects andincremental domain is natural objects) on the three sets forall IML algorithms show similar trends. This suggests thatit matters what classes are selected for incremental training.Adding classes with diverse statistics yields maximum ad-vantage. While we can expect this to be the trend for samplesbelonging to the same class, we find it to be true for samplesbelonging to unseen classes as well from the same domain.Our method successfully mitigates catastrophic forgetting toa large extent and performs well across different domains.

Multiple Rounds of IML: In the above experiments, ourconfiguration consists of one old and one new dataset. In

6

Page 7: Incremental Meta-Learning via Indirect Discriminant Alignment · Sect. 4. 2. Method The next section establishes the notation and describes incremental learning and meta-learning

Table 1: Classification accuracy on 3 different sets: tasks sampled from old, new and unseen classes of MiniImageNet usingPN [35] and different IML methods.

Model1-shot 5-way 5-shot 5-way

Old classes(32)

New classes(32)

Unseenclasses (20)

Old classes(32)

New classes(32)

Unseenclasses (20)

NU 73.84± 0.50 49.05± 0.48 50.55± 0.42 91.17± 0.18 68.35± 0.39 68.60± 0.33

FT 60.64± 0.49 72.61± 0.51 53.60± 0.42 82.25± 0.26 89.63± 0.22 72.13± 0.33DFA 60.77± 0.49 72.23± 0.51 53.81± 0.42 82.53± 0.26 89.32± 0.22 72.07± 0.33EIML 68.95± 0.50 71.43± 0.52 54.86± 0.42 90.20± 0.20 86.91± 0.25 74.39± 0.50IDA 66.54± 0.49 71.92± 0.51 55.52± 0.43 89.14± 0.21 87.32± 0.25 75.11± 0.31

PAR 74.65± 0.49 75.85± 0.50 56.88± 0.43 91.77± 0.17 92.49± 0.17 75.27± 0.13

Table 2: Classification accuracy on 3 different sets: tasks sampled from old, new and unseen classes of MiniImageNet usingECM [25] and different IML methods.

Model1-shot 5-way 5-shot 5-way

Old classes(32)

New classes(32)

Unseenclasses (20)

Old classes(32)

New classes(32)

Unseenclasses (20)

NU 73.82± 0.43 53.00± 0.43 52.77± 0.37 89.38± 0.38 71.90± 0.36 71.57± 0.36

FT 63.71± 0.43 75.05± 0.43 56.00± 0.38 82.90± 0.21 89.37± 0.21 74.29± 0.32DFA 64.66± 0.42 75.71± 0.43 56.68± 0.39 83.37± 0.21 89.70± 0.21 74.69± 0.31IDA 72.52± 0.42 68.43± 0.44 57.13± 0.39 88.46± 0.27 85.45± 0.27 75.55± 0.30

PAR 74.40± 0.40 75.74± 0.42 59.02± 0.39 89.68± 0.21 89.93± 0.21 77.60± 0.30

Table 3: Classification accuracy on 3 different sets: tasks sampled from the old, new and from unseen classes of TieredImageNetusing PN [35] and different IML methods.

Model1-shot 5-way 5-shot 5-way

Old classes(176)

New classes(175)

Unseenclasses (160)

Old classes(176)

New classes(175)

Unseenclasses (160)

NU 73.10± 0.52 66.18± 0.43 56.82± 0.50 89.03± 0.27 81.97± 0.37 75.78± 0.43

FT 71.87± 0.52 71.03± 0.52 58.63± 0.50 87.77± 0.29 87.60± 0.30 78.20± 0.42DFA 72.03± 0.51 70.83± 0.53 58.81± 0.50 87.82± 0.29 87.38± 0.30 78.11± 0.42IDA 72.65± 0.51 70.17± 0.53 58.71± 0.50 89.13± 0.15 86.91± 0.31 78.40± 0.42

PAR 78.57± 0.51 77.43± 0.50 61.87± 0.51 91.05± 0.24 90.44± 0.26 80.58± 0.40

Table 4: Results of 5-shot 5-way classification accuracy on different sets of DomainImageNet using PN [35] and different IMLmethods.

ModelOld classes

from olddomain (32)

New classesfrom new

domain (32)

Unseenclasses fromold domain

(20)

Unseenclasses fromnew domain

(20)

Unseenclasses fromboth domains

(40)NU 86.94± 0.22 49.14± 0.36 57.66± 0.38 51.72± 0.32 59.59± 0.35

FT 64.42± 0.35 84.80± 0.28 50.72± 0.38 71.16± 0.32 65.44± 0.40DFA 65.12± 0.35 83.95± 0.29 51.33± 0.38 70.46± 0.33 65.52± 0.40IDA 81.26± 0.27 82.06± 0.30 59.32± 0.39 70.61± 0.32 70.36± 0.36

PAR 87.44± 0.22 88.77± 0.25 58.59± 0.37 74.46± 0.32 74.02± 0.37

Table 6, we show the performance of different IML algo-rithms for a scenario where there are multiple new datasets.We split the new classes of MiniImageNet into two sets each

having 16 classes (classes are split randomly) and run IMLfor a 5-shot 5-way setup using PN. From the table, we canobserve that IDA does not incur any performance loss and

7

Page 8: Incremental Meta-Learning via Indirect Discriminant Alignment · Sect. 4. 2. Method The next section establishes the notation and describes incremental learning and meta-learning

Table 5: Results of 5-shot 5-way classification accuracy on different sets of DomainImageNet using ECM [25] with differentIML methods.

ModelOld classes

from olddomain (32)

New classesfrom new

domain (32)

Unseenclasses fromold domain

(20)

Unseenclasses fromnew domain

(20)

Unseenclasses fromboth domains

(40)NU 87.86± 0.20 56.71± 0.39 63.30± 0.38 58.10± 0.35 66.09± 0.35

FT 67.35± 0.34 89.68± 0.20 55.37± 0.38 74.00± 0.31 69.98± 0.39DFA 69.33± 0.33 88.72± 0.22 57.06± 0.38 73.97± 0.31 70.77± 0.38IDA 86.09± 0.22 81.82± 0.28 64.22± 0.38 69.92± 0.33 72.64± 0.33

PAR 86.83± 0.22 88.84± 0.21 65.77± 0.38 75.98± 0.31 77.31± 0.33

achieves similar accuracy on the unseen classes comparedto a single training with 32 classes. For other methods likeDFA and FT, we can observe some performance drop whencomparing with Table 1, which shows that IDA scales betterbeyond single incremental training.

3.4. Limitations and Failure Cases

The implementation we chose, based on [35] and [25],and the tests we performed limit our assessment to tasks thatshare the same number of classes, K = 5, as customary inthe literature. While technically not a limitation as one couldalways build a set of models, each for a different number ofclasses, and indeed it is not uncommon to train and fine-tunedifferent models for different “ways” as seen in the litera-ture, we use the same model for all tests. It is nonethelessdesirable to have a meta-learner that can handle an arbitrarynumber of classes, different for each training episode. Whileour general framework eq. (7) enables it, our simplest im-plementation described in eq. (2.4) does not. In appendix,section F, however, we describe a modified implementationthat is not subject to this restriction. Since benchmarks inthe literature most commonly refer to the cases K = 1, 5,we use the simpler model in our experiments.

Further, sampling K classes among many has low prob-ability of yielding hard tasks that can be informative ofmeta-learning. Even simple classifiers can easily tell 5 ran-dom classes from ImageNet apart. Hard task mining couldbe done by selecting tasks using a distance such as [1], bysampling a random class and picking the 4 closest ones inTask2Vec space for a 5-way setup.

Finally, in our experiments we have noticed that thereis still a performance gap between IDA and the paragon.The performance is matched for the case of unseen classes,but there is room for improvement in tasks sampled fromnew/current task distribution across shots, datasets and meth-ods.

4. Discussion and Related Work

The natural occurrence of classes in the world is a longtailed distribution [42, 37, 39], whereby instances for mostclasses are rare and instances for few classes are abundant.Deep neural networks trained for classification [18, 12, 14]do not fare well when trained with small datasets typicalof the tail [37], leading to increased interest in few-shotlearning. Meta-learning [36, 22, 31] for few-shot learning[24, 6, 30, 38, 35, 19, 25, 10] uses a relatively “meta training”dataset from which several few-shot tasks are sampled tomimic phenomena at the tail. Once meta-trained on the olddataset, these methods cannot take advantage of the newfew-shot tasks to update the meta-learner. The obvious fix,to re-train the meta-learner every time a few-shot task arises,is impractical if at all possible, as one may not have accessto all past data.

Incremental learning, or continual learning, is typicallyperformed by adapting a neural network model, trained us-ing some dataset, using a new dataset, to arrive at a sin-gle model. The main challenge here is to prevent catas-trophic forgetting [8]. A few relevant works in this areainclude [26, 20, 21, 4, 17, 33]. To learn classifiers in a class-incremental way where new classes are added progressively,[26] proposed to keep exemplars from old classes based ontheir representation power and the computational budget.[20] used knowledge distillation to preserve the model’scapabilities on the old tasks when only new data is acces-sible. [21] and its extension [4] leveraged a small episodicmemory to alleviate forgetting. [17] slowed down learn-ing on the weights that were important for old tasks, while[33] extended it by training a knowledge-base in alternatingphases.

Methods that used few-shot incremental sets such as [10]unified the recognition of both new and old classes usingattention based few-shot classification. Similarly, [27] usedrecurrent back-propagation to train a set of new weightsto achieve good overall classification on both old and newclasses. [40, 34] extended this class-incremental frameworkto other visual recognition tasks like semantic segmentation

8

Page 9: Incremental Meta-Learning via Indirect Discriminant Alignment · Sect. 4. 2. Method The next section establishes the notation and describes incremental learning and meta-learning

Table 6: Results of 5-shot 5-way classification accuracy on MiniImageNet using PN [35] with 2 rounds of incrementalmeta-training, where each round consists of an 16 new classes.

Model Incremental - Round I Incremental - Round II

Old classes (32) New classes(16)

Unseen classes(20)

Old classes(32+16)

New classes(16)

Unseen classes(20)

NU 91.17± 0.18 65.60± 0.39 68.60± 0.33 82.25± 0.37 71.45± 0.38 68.60± 0.33FT 80.70± 0.31 87.67± 0.37 67.45± 0.37 76.03± 0.36 90.72± 0.23 70.57± 0.32DFA 87.69± 0.26 88.43± 0.36 68.20± 0.36 80.69± 0.38 91.27± 0.21 71.19± 0.37IDA 87.30± 0.25 89.56± 0.20 72.08± 0.36 84.21± 0.30 93.25± 0.17 75.15± 0.35PAR 93.94± 0.05 93.09± 0.06 72.10± 0.13 93.03± 0.06 95.58± 0.05 75.27± 0.13

and attribute recognition. Accordingly, despite being calledincremental few-shot learning, these methods are more ac-curately described as incremental learning using few-shotdatasets.

On-line meta-learning [7] can be done by exposing anagent to new tasks in a sequential manner. One may see thisexperimental setup to be similar to ours; however, unlikeIML, [7] retains data from all previous tasks and leveragesit for meta-training, thus forgoing incremental learning. Inour experimental setup, we retain minimal amounts of datafrom the old training set. [15, 11] on the other hand, tackleda continual/online meta-learning setup where an explicitdelineation between different tasks is not available, whereasin our experimental setup we are primarily trying to solvenew classification tasks with clear task boundaries.

To summarize, there are several approaches to solve IML:One that biases new weights to remain similar to those of thebase model (elastic weight consolidation) as in eq. (2), andone that looks at function space and imposes that the activa-tions remain similar to that of the base model (knowledgedistillation), as in eq. (4). We adopt the latter and empiri-cally test how our general framework performs in the caseof two metric-based meta-learners [35, 25]. This is a partic-ular instance of the right-hand side of eq. (1), that was ourstarting point in Sect. 2.1. It yields empirical performancecomparable to meta-learning on the union of the old and newdatasets, which is the gold standard. This gives empiricalvalidation to our method, and to the many possible variantsthat can be explored considering combinations of meta andfew-shot set, choices of metrics, classifiers, divergence mea-sures, and a myriad of other ingredients in the IML recipeto minimize eq. (7). We have tested several options in ourexperiments and in the appendix, and many more are openfor investigation in future work.

References[1] Alessandro Achille, Michael Lam, Rahul Tewari, Avinash

Ravichandran, Subhransu Maji, Charless C Fowlkes, StefanoSoatto, and Pietro Perona. Task2vec: Task embedding formeta-learning. In Proceedings of the IEEE InternationalConference on Computer Vision, pages 6430–6439, 2019.

[2] Jimmy Ba and Rich Caruana. Do deep nets really need tobe deep? In Z. Ghahramani, M. Welling, C. Cortes, N. D.Lawrence, and K. Q. Weinberger, editors, Advances in NeuralInformation Processing Systems 27, pages 2654–2662. CurranAssociates, Inc., 2014.

[3] Samy Bengio, Yoshua Bengio, Jocelyn Cloutier, and JanGecsei. On the optimization of a synaptic learning rule. InPreprints Conf. Optimality in Artificial and Biological NeuralNetworks, volume 2. Univ. of Texas, 1992.

[4] Arslan Chaudhry, Marc’Aurelio Ranzato, Marcus Rohrbach,and Mohamed Elhoseiny. Efficient lifelong learning witha-gem. In International Conference on Learning Representa-tions, 2019.

[5] Guneet S Dhillon, Pratik Chaudhari, Avinash Ravichandran,and Stefano Soatto. A baseline for few-shot image classifica-tion. arXiv preprint arXiv:1909.02729, 2019.

[6] Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks.In Proceedings of the 34th International Conference on Ma-chine Learning-Volume 70, pages 1126–1135. JMLR. org,2017.

[7] Chelsea Finn, Aravind Rajeswaran, Sham Kakade, andSergey Levine. Online meta-learning. arXiv preprintarXiv:1902.08438, 2019.

[8] Robert M French. Catastrophic forgetting in connectionistnetworks. Trends in cognitive sciences, 3(4):128–135, 1999.

[9] Golnaz Ghiasi, Tsung-Yi Lin, and Quoc V Le. Dropblock: Aregularization method for convolutional networks. In Ad-vances in Neural Information Processing Systems, pages10727–10737, 2018.

[10] Spyros Gidaris and Nikos Komodakis. Dynamic few-shotvisual learning without forgetting. In Proceedings of the IEEEConference on Computer Vision and Pattern Recognition,pages 4367–4375, 2018.

[11] James Harrison, Apoorva Sharma, Chelsea Finn, and MarcoPavone. Continuous meta-learning without tasks. arXivpreprint arXiv:1912.08866, 2019.

[12] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun.Deep residual learning for image recognition. In Proceed-ings of the IEEE conference on computer vision and patternrecognition, pages 770–778, 2016.

[13] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling theknowledge in a neural network. NIPS 2014 Deep LearningWorkshop, 2015.

9

Page 10: Incremental Meta-Learning via Indirect Discriminant Alignment · Sect. 4. 2. Method The next section establishes the notation and describes incremental learning and meta-learning

[14] Gao Huang, Zhuang Liu, Laurens van der Maaten, and Kil-ian Q. Weinberger. Densely connected convolutional net-works. In The IEEE Conference on Computer Vision andPattern Recognition (CVPR), July 2017.

[15] Ghassen Jerfel, Erin Grant, Tom Griffiths, and Katherine AHeller. Reconciling meta-learning and continual learning withonline mixtures of tasks. In Advances in Neural InformationProcessing Systems, pages 9119–9130, 2019.

[16] Diederik P Kingma and Jimmy Ba. Adam: A method forstochastic optimization. arXiv preprint arXiv:1412.6980,2014.

[17] James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, JoelVeness, Guillaume Desjardins, Andrei A Rusu, Kieran Milan,John Quan, Tiago Ramalho, Agnieszka Grabska-Barwinska,et al. Overcoming catastrophic forgetting in neural net-works. Proceedings of the national academy of sciences,114(13):3521–3526, 2017.

[18] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. Im-agenet classification with deep convolutional neural networks.In Proceedings of the 25th International Conference on Neu-ral Information Processing Systems - Volume 1, NIPS’12,pages 1097–1105, 2012.

[19] Kwonjoon Lee, Subhransu Maji, Avinash Ravichandran, andStefano Soatto. Meta-learning with differentiable convex op-timization. In Proceedings of the IEEE Conference on Com-puter Vision and Pattern Recognition, pages 10657–10665,2019.

[20] Zhizhong Li and Derek Hoiem. Learning without forget-ting. IEEE transactions on pattern analysis and machineintelligence, 40(12):2935–2947, 2017.

[21] David Lopez-Paz and Marc’Aurelio Ranzato. Gradientepisodic memory for continual learning. In Advances inNeural Information Processing Systems, pages 6467–6476,2017.

[22] Devang K Naik and Richard J Mammone. Meta-neural net-works that learn by learning. In [Proceedings 1992] IJCNNInternational Joint Conference on Neural Networks, volume 1,pages 437–442. IEEE, 1992.

[23] Boris Oreshkin, Pau Rodrıguez Lopez, and Alexandre La-coste. Tadam: Task dependent adaptive metric for improvedfew-shot learning. In Advances in Neural Information Pro-cessing Systems, pages 721–731, 2018.

[24] Sachin Ravi and Hugo Larochelle. Optimization as a modelfor few-shot learning. In ICLR 2017, 2017.

[25] Avinash Ravichandran, Rahul Bhotika, and Stefano Soatto.Few-shot learning with embedded class models and shot-freemeta training. In International Conference on ComputerVision, 2019.

[26] Sylvestre-Alvise Rebuffi, Alexander Kolesnikov, Georg Sperl,and Christoph H Lampert. icarl: Incremental classifier andrepresentation learning. In Proceedings of the IEEE con-ference on Computer Vision and Pattern Recognition, pages2001–2010, 2017.

[27] Mengye Ren, Renjie Liao, Ethan Fetaya, and Richard SZemel. Incremental few-shot learning with attention attractornetworks. arXiv preprint arXiv:1810.07218, 2018.

[28] Mengye Ren, Eleni Triantafillou, Sachin Ravi, Jake Snell,Kevin Swersky, Joshua B Tenenbaum, Hugo Larochelle, andRichard S Zemel. Meta-learning for semi-supervised few-shotclassification. arXiv preprint arXiv:1803.00676, 2018.

[29] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, San-jeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy,Aditya Khosla, Michael Bernstein, et al. Imagenet largescale visual recognition challenge. International journal ofcomputer vision, 115(3):211–252, 2015.

[30] Andrei A Rusu, Dushyant Rao, Jakub Sygnowski, OriolVinyals, Razvan Pascanu, Simon Osindero, and Raia Hadsell.Meta-learning with latent embedding optimization. arXivpreprint arXiv:1807.05960, 2018.

[31] Jurgen Schmidhuber. Evolutionary principles in self referen-tial learning. On learning how to learn: The meta-meta-...hook. Diploma thesis, Institut f. Informatik, Tech. Univ. Mu-nich, 1987.

[32] John Schulman, Sergey Levine, Pieter Abbeel, Michael Jor-dan, and Philipp Moritz. Trust region policy optimization. InInternational conference on machine learning, pages 1889–1897, 2015.

[33] Jonathan Schwarz, Jelena Luketina, Wojciech M Czarnecki,Agnieszka Grabska-Barwinska, Yee Whye Teh, Razvan Pas-canu, and Raia Hadsell. Progress & compress: A scalableframework for continual learning. In International Confer-ence on Machine Learning, 2018.

[34] Mennatullah Siam and Boris Oreshkin. Adaptive maskedweight imprinting for few-shot segmentation. arXiv preprintarXiv:1902.11123, 2019.

[35] Jake Snell, Kevin Swersky, and Richard Zemel. Prototypi-cal networks for few-shot learning. In Advances in NeuralInformation Processing Systems, pages 4077–4087, 2017.

[36] Sebastian Thrun and Lorien Pratt. Learning to learn. SpringerScience & Business Media, 2012.

[37] Grant Van Horn and Pietro Perona. The devil is in thetails: Fine-grained classification in the wild. arXiv preprintarXiv:1709.01450, 2017.

[38] Oriol Vinyals, Charles Blundell, Timothy Lillicrap, DaanWierstra, et al. Matching networks for one shot learning. InAdvances in neural information processing systems, pages3630–3638, 2016.

[39] Yu-Xiong Wang, Deva Ramanan, and Martial Hebert. Learn-ing to model the tail. In I. Guyon, U. V. Luxburg, S. Bengio,H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, edi-tors, Advances in Neural Information Processing Systems 30,pages 7029–7039. Curran Associates, Inc., 2017.

[40] Liuyu Xiang, Xiaoming Jin, Guiguang Ding, Jungong Han,and Leida Li. Incremental few-shot learning for pedestrianattribute recognition. arXiv preprint arXiv:1906.00330, 2019.

[41] Jason Yosinski, Jeff Clune, Yoshua Bengio, and Hod Lipson.How transferable are features in deep neural networks? InZ. Ghahramani, M. Welling, C. Cortes, N. D. Lawrence, andK. Q. Weinberger, editors, Advances in Neural InformationProcessing Systems 27, pages 3320–3328. Curran Associates,Inc., 2014.

[42] Xiangxin Zhu, Dragomir Anguelov, and Deva Ramanan. Cap-turing long-tail distributions of object subcategories. In Pro-ceedings of the 2014 IEEE Conference on Computer Visionand Pattern Recognition, CVPR ’14, pages 915–922, Wash-ington, DC, USA, 2014. IEEE Computer Society.

10

Page 11: Incremental Meta-Learning via Indirect Discriminant Alignment · Sect. 4. 2. Method The next section establishes the notation and describes incremental learning and meta-learning

AppendixIn this appendix we report empirical comparison between Indirect Discriminant Alignment (IDA) and Exemplar Incre-

mental Meta-Learning (EIML) for all three datasets - MiniImageNet, TieredImageNet and DomainImageNet with PN asthe meta-learner. We also report performance of IDA on different tasks by varying λ. Along the same lines, we show theperformance of EIML as we vary the number of exemplars stored from the old task distribution. Additional empirical results onDomainImageNet dataset to better portray the impact of the domain gap. Performance comparison of different meta-learningalgorithms when the “shots” and “ways” vary between meta-training and few-shot testing are also shown.

A. Full expression for the loss functionThe full expression for the loss function defined in eq. (9) for Prototypical Networks (PN) [35] is obtained as follows:

Define

χ(z, c) := −‖z − c‖2

ψ(Dτ , k) := 1|Ck|

∑i δyi,kzi

Cτ = ψ(Dτ , k)Kk=1

Using these choices, we can rewrite fw(y = k|x, C) as

fw(y = k|x, C) = e−‖z−ck‖2∑

j e−‖z−cj‖2

(11)

Applying the negative logarithm on both sides we get

− log(fw(y = k|x, C)) = ‖z − ck‖2 + log∑j

e−‖z−cj‖2

= ‖z − ck‖2 + LSE(z, C) (12)

where LSE(z, C) = log∑c∈C e

−‖z−c‖2 . The new model weights wt+1 can then be obtained by solving the followingoptimization problem

arg minwt+1

L(wt+1) = arg minwt+1

L(wt+1; E) + λ IDAE(φwt+1|φwt ; Ct) (13)

where the Indirect Feature Alignment (IFA) loss is defined by

IFAE(φwt+1 |φwt ; Ct) = Ex∼Eτ ′,C∼Ct[KL(fwt+1(y|x, C))||fwt(y|x, C)

](14)

where

fwt+1(y = k|x,Ctτ ) =e−‖φwt+1

(x)−ctk‖2∑

j e−‖φwt+1

(x)−ctj‖2(15)

fwt(y = k|x,Ctτ ) =e−‖φwt (x)−c

tk‖

2∑j e−‖φwt (x)−ctj‖2

(16)

Eq (16) shows the discriminant calculated using the old embeddings, the old class centers and the input as new classes.Similarly, (15) shows the discriminant calculated using the new model embeddings, the old class centers and the input as newclasses.

The cross-entropy loss L(w; E) can be rewritten explicitly in the case of prototypical networks as:

L(w; E) = 1

∑τ

1

|Eτ |∑

(xi,yi)∈Eτ

− log pτw(yi|xi) (17)

=1

∑τ

1

|Eτ |∑

(xi,yi)∈Eτ

‖zi − cτyi‖2 + LSE(zi, C) (18)

We use this as our loss when we meta-train with PN. The loss for ECM is identical, with the caveat that the class identities ctτare not sample means but are instead learned via optimization [25].

11

Page 12: Incremental Meta-Learning via Indirect Discriminant Alignment · Sect. 4. 2. Method The next section establishes the notation and describes incremental learning and meta-learning

Table 7: Comparison of EIML and IDA across multiple datasets

dataset Method 1-shot 5-way 5-shot 5-way

Old classes New classes Unseenclasses Old classes New classes Unseen

classes

MiniImageNet EIML 68.95± 0.50 71.43± 0.52 54.86± 0.42 90.20± 0.20 86.91± 0.25 74.39± 0.50IDA 66.54± 0.49 71.92± 0.51 55.22± 0.43 89.14± 0.21 87.32± 0.25 75.11± 0.31

TieredImageNet EIML 72.50± 0.51 69.44± 0.52 58.42± 0.50 88.93± 0.27 86.25± 0.32 77.97± 0.42IDA 72.65± 0.51 70.17± 0.53 58.71± 0.50 89.03± 0.27 86.91± 0.31 78.40± 0.42

DomainImageNet EIML 48.48± 0.44 42.27± 0.41 43.91± 0.42 83.23± 0.25 65.81± 0.40 69.99± 0.36IDA 42.57± 0.41 38.95± 0.39 44.88± 0.43 81.26± 0.27 65.78± 0.41 70.36± 0.36

B. Comparison of Exemplar Incremental Meta-Learning and Indirect Discriminant Alignment

In Table 7, we show the performance comparison between EIML and IDA on all datasets we considered — both in the5-shot 5-way and 1-shot 5-way setup — using prototypical network as the meta-learner. While we expected EIML to performbetter than IDA on all scenarios due to availability of additional samples from the old task distribution, we actually observedthat IDA outperforms EIML on unseen classes and performs equally well on few-shot tasks containing new classes. However,as expected, EIML performs better when it comes to handling tasks from the old task distribution.

C. Varying λ in Indirect Discriminant Alignment

By varying λ for IDA (Eq. 9), we can maintain a trade-off between the IDA loss and the standard meta-learning loss. In thisexperiment, we investigate how changing the value of λ affects the model’s performance on old, new and the unseen test set. Weinvestigated this in the 5-shot 5-way setup for MiniImageNet using PN. We chose λ ∈ {0.0, 0.25, 0.5, 0.75, 1.0, 2.0, 5.0, 10.0}.All numbers reported in the main paper were with λ = 1.0. The outcome of this experiment can be visualized in Fig. 2 wherewe can see that as λ is increased, the model’s performance on old tasks improves while its performance deteriorates on thenew set of tasks. This is intuitive as IDA loss adds a constraint for the incremental model to be similar to the model learnedfrom old tasks and increasing its contribution in the overall loss enhances the model’s ability to perform better on old tasks.However, for the same reason, it diminishes the impact of the standard meta-learning loss and hampers performance on newtasks. At λ = 0.0, the model only trains with the standard meta-learning loss and its performance is identical to our baselinenamed “Fine-Tuning (FT)”. At λ value of 10.0, IDA loss dominates and the performance is similar (not fully identical though)to our “No Update (NU)” baseline which is the model trained only using old tasks. While measuring performance on theunseen clases, we observe that the ideal value of λ lies somewhere between the values of λ that provide the best performanceon the old tasks and the values of λ that work best for the new tasks. The farther λ strays from this range, the more it degradeson the unseen tasks.

D. Varying number of samples in Exemplar Incremental Meta-Learning

While using exemplars in EIML to retain information about the old tasks for meta-training our model incrementally, wekept the number of exemplars fixed to 15. We investigate the effect of storing more exemplars per class to see if it helpsimprove performance on old, new or unseen tasks. We investigated this in a 5-shot 5-way setup for MiniImageNet using PNwith number of examples ∈ {15, 30, 60, 120}. The outcome of this experiment is shown in Fig. 3. This shows that increasingthe number of exemplars per class does not yield much positive advantage on any of the task segments i.e. old, new or unseen.

E. Additional experimental results on DomainImageNet

In Tables 8, 9, 10, 11, 12 & 13 we report some additional experimental results on the DomainImageNet dataset whichexplain the effects of domain gap better while using the baseline methods and our proposed algorithm. In our original paper, inTable 4 and Table 5, we showed the result of applying Incremental Meta-Learning (IML) on DomainImageNet for 5-shot5-way setup using PN and ECM where the model is first trained using natural object classes and then incrementally trainedusing man-made object classes. Here we provide results for the same scenario in a 1-shot 5-way setup and also the results forPN and ECM in both 1-shot 5-way and 1-shot 5-way setup by reversing the domains i.e. the model is first trained using tasksconsisting of classes from man-made images and then incrementally trained using natural images.

12

Page 13: Incremental Meta-Learning via Indirect Discriminant Alignment · Sect. 4. 2. Method The next section establishes the notation and describes incremental learning and meta-learning

0 100 101

70

75

80

85

90

Mea

n Ac

cura

cyOld TasksNew TasksUnseen Tasks

Figure 2: Performance of the model on different few-shot tasks: old, new and unseen with λ varying from 0.0 to 10.0. Thefigure shows the mean accuracy averaged over 2000 episodes. The errorbars indicate the 95% confidence interval.

1.5 × 101 3 × 101 6 × 101 1.2 × 102

Number of Samples

75.0

77.5

80.0

82.5

85.0

87.5

90.0

Mea

n Ac

cura

cy

Old DataNew TasksUnseen Tasks

Figure 3: Performance of the EIML model with different number of exemplars. The figure shows the mean accuracy averagedover 2000 episodes. The errorbars indicate the 95% confidence interval.

F. Meta-Learning algorithms and their dependency on the number of shots and ways

One of the main limitations of the simplest implementation of our method, which is based on PN, is the fact that old andnew tasks must have the same number of classes. This is not a limitation of our method, but of the use of PN as a baselearner. Our second implementation, which uses ECM instead of PN, is not subject to this restriction. Therefore, in Table14 and Table 15 we show the dependency of our method on the number of shots and ways as they vary across old and newdatasets. We first see that PN is highly dependent on the number of shots and ways it is being trained on. We see a drop inperformance when the shots are changed between meta-training and few-shot testing. We also notice for PN, training using alarger number of ways helps to improve performance. However, we notice that for ECM, the performance remains the sameirrespective of what configuration the meta-learning model was trained with. These results use the feature extractor proposedin the original PN [35] paper instead of ResNet-12 for simplicity and ease of reproducibility. All models were trained usingidentical hyperparameter settings (batch size, learning rate, optimization scheme). These results collectively show that our

13

Page 14: Incremental Meta-Learning via Indirect Discriminant Alignment · Sect. 4. 2. Method The next section establishes the notation and describes incremental learning and meta-learning

Table 8: Results of 1-shot 5-way classification accuracy of our method on different sets of DomainImageNet using PN as themeta-learning algorithm. Here old tasks are from natural images and incremental tasks are from man-made images.

ModelOld classes

from olddomain (32)

New classesfrom new

domain (32)

Unseenclasses fromold domain

(20)

Unseenclasses fromnew domain

(20)

Unseenclasses fromboth domains

(40)NU 56.32± 0.50 32.88± 0.34 37.90± 0.37 33.91± 0.33 39.56± 0.40

FT 37.12± 0.36 61.34± 0.56 32.81± 0.32 46.61± 0.43 42.91± 0.42DFA 37.20± 0.37 60.23± 0.55 32.32± 0.32 46.12± 0.44 42.20± 0.41IDA 42.57± 0.41 59.31± 0.55 35.01± 0.35 45.55± 0.43 43.91± 0.42

PAR 62.23± 0.50 67.25± 0.53 40.06± 0.39 50.78± 0.45 54.57± 0.48

Table 9: Results of 1-shot 5-way classification accuracy of our method on different sets of DomainImageNet using ECM as themeta-learning algorithm. Here old tasks are from natural images and incremental tasks are from man-made images.

ModelOld classes

from olddomain (32)

New classesfrom new

domain (32)

Unseenclasses fromold domain

(20)

Unseenclasses fromnew domain

(20)

Unseenclasses fromboth domains

(40)NU 72.58± 0.40 39.68± 0.37 45.33± 0.39 40.43± 0.34 46.72± 0.39

FT 48.54± 0.40 76.46± 0.43 39.37± 0.35 54.93± 0.41 51.64± 0.43DFA 49.83± 0.40 74.63± 0.43 40.36± 0.36 54.80± 0.41 52.32± 0.43IDA 69.82± 0.41 62.56± 0.44 46.22± 0.39 49.83± 0.40 53.03± 0.41

PAR 70.10± 0.42 73.70± 0.44 46.81± 0.40 55.19± 0.41 57.97± 0.42

Table 10: Results of 5-shot 5-way classification accuracy of our method on different sets of DomainImageNet using PN as themeta-learning algorithm. Here old tasks are from man-made images and incremental tasks are from natural images.

ModelOld classes

from olddomain (32)

New classesfrom new

domain (32)

Unseenclasses fromold domain

(20)

Unseenclasses fromnew domain

(20)

Unseenclasses fromboth domains

(40)NU 91.75± 0.18 50.67± 0.37 70.94± 0.35 45.04± 0.34 62.57± 0.44

FT 71.41± 0.31 84.40± 0.30 57.11± 0.32 59.61± 0.43 63.40± 0.38DFA 73.51± 0.31 83.31± 0.31 58.87± 0.32 59.64± 0.42 64.36± 0.37IDA 88.39± 0.23 81.24± 0.34 70.83± 0.34 60.82± 0.39 71.13± 0.38PAR 90.35± 0.21 87.11± 0.27 73.03± 0.34 62.44± 0.42 75.27± 0.38

Table 11: Results of 1-shot 5-way classification accuracy of our method on different sets of DomainImageNet using PN as themeta-learning algorithm. Here old tasks are from man-made images and incremental tasks are from natural images.

ModelOld classes

from olddomain (32)

New classesfrom new

domain (32)

Unseenclasses fromold domain

(20)

Unseenclasses fromnew domain

(20)

Unseenclasses fromboth domains

(40)NU 72.45± 0.51 33.41± 0.34 51.48± 0.48 32.32± 0.31 43.88± 0.45

FT 46.08± 0.42 61.72± 0.56 39.90± 0.39 42.38± 0.43 44.85± 0.43DFA 48.35± 0.44 58.13± 0.56 40.66± 0.40 41.30± 0.41 44.04± 0.42IDA 58.98± 0.47 58.90± 0.56 46.33± 0.44 43.14± 0.42 48.33± 0.44

PAR 73.31± 0.50 68.54± 0.55 52.29± 0.45 44.28± 0.45 58.11± 0.50

method is flexible and allows meta-training with an arbitrary number of ways and shots. The results also show that ECM is a

14

Page 15: Incremental Meta-Learning via Indirect Discriminant Alignment · Sect. 4. 2. Method The next section establishes the notation and describes incremental learning and meta-learning

Table 12: Results of 5-shot 5-way classification accuracy of our method on different sets of DomainImageNet using ECM asthe meta-learning algorithm. Here old tasks are from man-made images and incremental tasks are from natural images.

ModelOld classes

from olddomain (32)

New classesfrom new

domain (32)

Unseenclasses fromold domain

(20)

Unseenclasses fromnew domain

(20)

Unseenclasses fromboth domains

(40)NU 59.58± 0.40 91.91± 0.16 73.04± 0.32 53.20± 0.37 68.12± 0.40

FT 87.66± 0.24 72.11± 0.31 61.39± 0.31 63.87± 0.40 67.91± 0.35DFA 82.45± 0.31 77.01± 0.29 62.91± 0.32 62.31± 0.42 67.79± 0.36IDA 79.80± 0.33 90.43± 0.19 74.04± 0.31 61.31± 0.39 72.60± 0.37

PAR 85.66± 0.28 89.44± 0.20 74.60± 0.32 66.12± 0.39 76.92± 0.35

Table 13: Results of 1-shot 5-way classification accuracy of our method on different sets of DomainImageNet using ECM asthe meta-learning algorithm. Here old tasks are from man-made images and incremental tasks are from natural images.

ModelOld classes

from olddomain (32)

New classesfrom new

domain (32)

Unseenclasses fromold domain

(20)

Unseenclasses fromnew domain

(20)

Unseenclasses fromboth domains

(40)NU 42.27± 0.38 79.97± 0.40 53.49± 0.42 37.67± 0.34 49.74± 0.42

FT 73.37± 0.47 51.59± 0.40 42.22± 0.35 47.09± 0.42 48.64± 0.41DFA 66.49± 0.50 56.71± 0.42 43.68± 0.36 46.29± 0.43 49.12± 0.41IDA 60.64± 0.46 76.91± 0.41 54.02± 0.42 44.01± 0.39 53.16± 0.42

PAR 68.86± 0.47 73.87± 0.43 53.91± 0.42 48.00± 0.42 58.00± 0.43

Table 14: Performance of different models trained using PN [35] on different few-shot sets with varying “ways” and “shots”.Mean accuracy averaged over 2000 episodes is shown here.

Model 1-shot 5-shot5-way 10-way 20-way 5-way 10-way 20-way

1-shot 5-way 49.35 33.78 21.99 65.63 49.60 35.761-shot 10-way 51.47 35.65 23.54 68.45 52.80 38.935-shot 5-way 47.09 31.94 20.68 69.09 53.52 39.785-shot 10-way 45.83 30.89 19.90 69.93 54.77 41.05Range 5.63 4.76 3.64 4.30 5.18 5.29

Table 15: Performance of different models trained using ECM [25] on different few-shot sets with varying “ways” and “shots”.Mean accuracy averaged over 2000 episodes is shown here.

Model 1-shot 5-shot5-way 10-way 20-way 5-way 10-way 20-way

1-shot 5-way 50.13 35.15 23.48 68.40 53.30 39.681-shot 10-way 50.91 35.69 23.84 69.62 54.34 40.535-shot 5-way 51.15 35.95 24.08 69.50 54.40 40.965-shot 10-way 50.78 35.44 23.73 69.64 54.46 40.72Range 1.0224 0.7921 0.6009 1.2455 1.1688 1.2748

more practical choice of base learner, despite the increased training cost, since it provides flexibility to be be used with anynumber of shots and ways, without having to train separate models.

15