-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathL2F_2yr.html
2263 lines (1324 loc) · 55.2 KB
/
L2F_2yr.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<title>L2M 2yr</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="fonts/quadon/quadon.css">
<link rel="stylesheet" href="fonts/gentona/gentona.css">
<link rel="stylesheet" href="slides_style_i.css">
<script type="text/javascript" src="assets/plotly/plotly-latest.min.js"></script>
</head>
<body>
<textarea id="source">
<!-- TODO add slide numbers & maybe slide name -->
### Lifelong Learning Forests (JHU)
Joshua T. Vogelstein | Neurostatistics<br>
Carey E. Priebe | Big data & network statistics<br>
Raman Arora | Representation learning
![:scale 60%](images/neurodata_blue.png)
<!--
{[BME](https://www.bme.jhu.edu/),[CIS](http://cis.jhu.edu/), [ICM](https://icm.jhu.edu/), [KNDI](http://kavlijhu.org/)}@[JHU](https://www.jhu.edu/) | [neurodata](https://neurodata.io)
<br>
[jovo@jhu.edu](mailto:[email protected]) | <http://neurodata.io/talks> | [@neuro_data](https://twitter.com/neuro_data) -->
---
## Outline
- [Introduction](#intro)
- [Definition](#def)
- [Metrics](#metrics)
- [Algorithm](#alg)
- [Simulations](#sims)
- [Real](#real)
- [Theory](#theory)
- [Neurobiology](#neuro)
- [Discussion](#disc)
- [Appendix 1: Extra Slides](#extra)
- [Appendix 2: Scenarios](#scenarios)
---
## Outline
- Introduction
- [Definition](#def)
- [Metrics](#metrics)
- [Algorithm](#alg)
- [Simulations](#sims)
- [Real](#real)
- [Theory](#theory)
- [Neurobiology](#neuro)
- [Discussion](#disc)
- [Appendix 1: Extra Slides](#extra)
- [Appendix 2: Scenarios](#scenarios)
---
## What are we trying to solve?
1. Formally define LL from a statistical decision theory perspective
2. Construct and implement a L2M that achieves the formal definition of L2M
---
## What is lifelong Learning?
A lifelong learning setting is a stream of .ye[potentially changing] tasks.
An agent lifelong learns when its performance improves by .ye[leveraging other tasks].
An .ye[efficient] lifelong learner does so under space/time complexity constraints.
Thus, the only way to lifelong learn is by .ye[transferring knowledge across tasks], ideally both .ye[forward] (to improve future task performance) and .ye[backward] (to improve past task performance).
<!--
## Proposed Metrics
##### **Transfer Efficiency:**
Improvement on a task by virtue of .ye[all other task data].
##### **Forward Transfer Efficiency:**
Improvement on a task by virtue of .ye[all past task data].
##### **Backward Transfer Efficiency:**
Improvement on a task by virtue of .ye[all future task data]. -->
---
## Key Claims
1. If you don't transfer, you haven't lifelong learned, rather, you've .ye[sequentially compressed].
2. We propose the only algorithm in the literature the .ye[demonstrates] lifelong learning, ie, sequential transfer.
---
name:def
## Outline
- [Introduction](#intro)
- Definition
- [Metrics](#metrics)
- [Algorithm](#alg)
- [Simulations](#sims)
- [Real](#real)
- [Theory](#theory)
- [Neurobiology](#neuro)
- [Discussion](#disc)
- [Appendix 1: Extra Slides](#extra)
- [Appendix 2: Scenarios](#scenarios)
---
## What is Learning?
In setting $\mathcal{S}$, given $n$ new samples, assuming $P$,
$f$ learns when its performance $\mathcal{E}$ improves due to the data:
.center[$f$ learns when $\mathcal{E}(f_n) < \mathcal{E}(f_0)$.]
$f_0$ is the algorithm's performance prior to seeing $n$ new samples.
---
## What is Learning?
In .ye[setting] $\mathcal{S}$, given $n$ new .ye[samples], .ye[assuming] $P$,
.ye[$f$] learns when its .ye[performance] $\mathcal{E}$ improves due to the data:
.center[$f$ learns when $\mathcal{E}(f_n) < \mathcal{E}(f_0)$.]
$f_0$ is the algorithm's performance prior to seeing $n$ new samples.
---
## What is a Setting?
The setting is determined by the available resources:
- .ye[Sample space]: $\mathcal{Z}$, determined by available sensors
- e.g., images, text, vectors, networks
- .ye[Action space]: $\mathcal{A}$, determined by available actuators
- e.g., {→, ←, ↑, ↓, A,B}, {reject, fail to reject}, $\mathbb{R}$
- .ye[Query space]: $\mathcal{Q}$, determined by system's "interface"
- e.g., in which cluster is $z$? what is this object?
- .ye[Constraints]: $\mathcal{C}$, determined by hardware, time, money, subject matter expertise
- e.g., $\mathcal{O}(n)$ training time, k-sparse, 8 GB
.ye[Setting]: is the tuple $\mathcal{S} := (\mathcal{Z}, \mathcal{A}, \mathcal{Q}, \mathcal{C})$
---
## What are samples?
- $z_i \in \mathcal{Z}$ for $i \in [n]$ are samples
- Classification Example
- $Z_i = (X_i,Y_i)$ where $\mathcal{X}=\mathbb{R}^p$ and $\mathcal{Y}=\lbrace 0,1\rbrace$
---
## What are the Assumptions?
These are required to have any theoretical performance guarantees, though they can be quite general:
- The data, $(Z_1,\ldots, Z_n) \in \mathcal{Z}^n$, are sampled from some true but unknown distribution $P_Z \in \, \mathcal{P}_Z$
- A query, $q \in \mathcal{Q}$ is sampled from some true but unknown distribution $P_Q \in \, \mathcal{P}_Q$
- An optimal action , $a \in \mathcal{A}$ given $q$, is sampled from some true but unknown distribution $P\_{A \mid Q} \in \, \mathcal{P}_{A \mid Q}$
Let $P = P\_Z \otimes P\_{A | Q} \otimes P\_Q \in \, \mathcal{P}$ denote the joint distribution over samples, queries, and optimal actions.
$\mathcal{P}$ is called the .ye[statistical model].
---
## What is $f$?
We get to choose this, though we must respect the resource constraints defined by the setting:
- A .ye[hypothesis], $h : \mathcal{Q} \rightarrow \mathcal{A}$ takes an action on the basis of a query
- $f_n$ is a .ye[learner], which maps from a subset of $n$ samples in $\mathcal{Z}$ to a hypothesis $h \in \mathcal{H}$
- $f=f_1, f_2, \ldots$ is a sequence of learners, called a learning .ye[algorithm]
$$f \in \mathcal{F} = \lbrace f_n : \mathcal{Z}^n \rightarrow \mathcal{H}\rbrace$$
- Supervised machine learning example
- $f$ is *RandomForestClassifier.fit*
- $h$ is *RandomForestClassifier.predict*
<!-- --- -->
<!--
## What are Constraints?
Provided by subject matter expect and available resources, including:
- Distributional constraints $P \in \, \mathcal{P}$,
- e.g, mixture of K Gaussians, or convex
- Decision rule (or hypothesis) constraints, $h \in \mathcal{H}$,
- e.g., $\mathcal{O}(1)$, or k-sparse
- Learning rule constraints, $f \in \mathcal{F}$,
- e.g., $\mathcal{O}(n)$, or Decision stump
-->
<!--
Let $\mathcal{C}= \lbrace \mathcal{P}, \mathcal{H}, \mathcal{F} \rbrace$.
-->
<!-- Let $\mathcal{S} = \lbrace \mathcal{Z}, \mathcal{Q}, \mathcal{A}, \mathcal{P}, \mathcal{H}, \mathcal{F} \rbrace$. -->
<!-- --- -->
<!-- ## Constraints -->
<!-- $\mathcal{P}$, $\mathcal{H}$, and $\mathcal{F}$ are sets of constraints on learning -->
<!--
| Constraint | Example |
| :--- | :---
| interpretability | hyperplanes or sparse
| complexity | $\mathcal{O}(n)$
| memory | $< 1$ gigabyte of memory for a given dataset
| time | $< 1$ sec on a specific hardware configuration for a given dataset
| scalability| must operate on distributed storage/compute
| power | $< 1$ watt on a given system for a given dataset
| price | $< 1$ USD on a given system for a given dataset
| hardware | must run on iPhone X
-->
---
## What is Performance?
- .ye[Loss],
<!-- quantifies the error of a specific action $a$ taken by $h$ for a query $q$, $\mathcal{L} = \lbrace \ell: \mathcal{A} \times \mathcal{A} \to \mathbb{R} \rbrace$, -->
<!-- - -->
e.g., 0-1 loss: $ \ell(a, a') := \mathbb{I}[a \neq a']. $
<!-- -->
<!-- $\mathsf{l}, \mathsf{R}, \mathsf{E}, \mathsf{h}, l, R, E, h$ -->
<!-- -->
- .ye[Risk]
<!-- quantifies the loss over the whole query sample space, $\mathcal{R} = \lbrace R : \mathcal{H} \times \mathcal{L} \times \mathcal{P}\_{Q, A} \to \mathbb{R} \rbrace$ -->
<!-- - We think of this only as a function of $h \in \mathcal{H}$, because the loss and distribution effectively index the function -->
<!-- - eg, expected loss: $ R(h) := R(h; \ell, P\_{Q, A}) = \ \mathbb{E}\_{Q, A}[\ell(h(Q), A)]. $ -->
<!-- - -->
e.g., expected loss: $ R(h) := \ \mathbb{E}\_{Q, A}[\ell(h(Q), A)]. $
- Performance, also called generalization .ye[error],
<!-- quantifies risk over the distribution of possible training datasets, -->
<!-- $\mathcal{E} : \mathcal{F} \times \mathcal{R} \times \mathcal{P}\_{z} \to \mathbb{R}$, -->
<!-- - We think of this only as a function of $f\_n \in \mathcal{F}$, for the same reason as above -->
<!-- - -->
e.g., expected risk:
<!-- $ \mathcal{E}(f\_n) := \mathcal{E}(f\_n; R, P\_Z) = \mathbb{E}\_Z[R(f\_n(Z))]. $ -->
$ \mathcal{E}(f\_n) := \mathbb{E}\_Z[R(f\_n(Z))]. $
<!-- TODO@ronak i put a \cdot in there. ok? -->
---
## Has $f$ Learned?
In setting $\mathcal{S}$, given $n$ new samples, assuming $P$,
$f$ learns when its performance $\mathcal{E}$ improves due to the data:
.center[$f$ learns when $\mathcal{E}(f_n) < \mathcal{E}(f_0)$.]
$f_0$ is the algorithm's performance prior to seeing $n$ new samples, and therefore a function of
- priors
- inductive bias of $\mathcal{H}$
<!-- - estimation bias of $f$ -->
- model bias of $\mathcal{P}$
- pre-training
<!--
## What is a Setting?
A setting is defined by a septuple $\mathcal{S} = \lbrace \mathcal{Z}, \mathcal{A}, \mathcal{L}, \mathcal{R}, \mathcal{P}, \mathcal{H}, \mathcal{F} \rbrace$
| Object | Notation | Example
|:--- |:--- |:--- |
| Measurements | $ \mathcal{Z}^n$ | $\mathbb{R}^p \times \lbrace 0, 1 \rbrace$ |
| Actions | $\mathcal{A}$ | {↑,↓,←, →,B,A,start}
| Loss | $\mathcal{L}: \mathcal{A} \to \mathbb{R}_+$ | $ (\hat{y} - y_*)^2$
| Risk | $\mathcal{R}: \mathcal{P} \times \mathcal{L} \to \mathbb{R}_+$ | $\mathbb{E}_P[ \mathcal{L}(a)]$
| Distributions | $\mathcal{P} := \lbrace P_Z \rbrace$ | Gaussian
| Hypotheses | $\mathcal{H} = \lbrace h: \mathcal{Z} \to \mathcal{A} \rbrace$ | hyperplanes
| Algorithms | $\mathcal{F} = \lbrace f : 2^{\mathcal{Z}^n} \to \mathcal{H} \rbrace$ | *RandomForest.fit*
-->
---
## What is a Learning Task?
- Given
- a setting $\mathcal{S}$
- a sample size $n$
- Assume a true but unknown distribution $P \in \, \mathcal{P}$
- Find $f$ that minimizes generalization error
$$f^* = \arg \min\_{f} \, \mathcal{E}(f_n).$$
---
## What is Transfer Learning?
- Given
- .ye[Environment]: $t_i \in \lbrace 0, 1 \rbrace$ label each sample
- $0$ denotes source data
- $1$ denotes target data
- .ye[Sample space]: $\mathcal{Z} \leftarrow (\mathcal{Z},\lbrace 0,1 \rbrace)$
- Assume a .ye[statistical model]: $\mathcal{P} = \lbrace P := P_{Z,T} \otimes P_Q \rbrace$, where
- $Z\_i | T\_i \sim P\_{Z|T}$, iid
- $(T\_1,\ldots, T\_n) \sim P\_T$
- Define a transfer learning .ye[algorithm] $f$ as a sequence
$$ \mathcal{F} = \lbrace f_n : (\mathcal{Z} \times \color{yellow}{\lbrace 0,1 \rbrace })^n \rightarrow \mathcal{H} \rbrace$$
<!-- - Identify the appropriate performance function. -->
---
## Has $f$ Transfer Learned?
In transfer setting $\mathcal{S}$, given $n$ samples, assuming $P$,
$f$ .ye[transfer] learns when its performance $\mathcal{E}$ improves due to the source data:
.center[$f$ learns when $\mathcal{E}(f_n) < \, \mathcal{E}(f_n^1)$.]
Where $f^t$ denote the learner that only sees samples where $t_i=t$.
---
## A Transfer Learning Task
- Given
- a transfer learning setting $\mathcal{S} = ( \mathcal{Z}, \mathcal{A}, \mathcal{Q}, \mathcal{C} )$
- a sample size $n$
- Assume a true but unknown distribution $P \in \, \mathcal{P}$
- Find $f$ that minimizes generalization error
$$f^* = \arg \min\_{f} \, \mathcal{E}(f_n).$$
---
## What is Multitask Learning?
- Given
- Environment: $t_i \in \color{yellow}{[T]}=\lbrace t_1, \ldots t_T \rbrace$ label each sample
- Sample space: $\mathcal{Z} \leftarrow (\mathcal{Z},\color{yellow}{[T]})$
- Assume a statistical model: $\mathcal{P} = \lbrace P := P_{Z,T} \otimes P_Q \rbrace$, where
- $Z\_i | T\_i \sim P\_{Z|T}$, iid
- $(T\_1,\ldots, T\_n) \sim P\_T$
- Define a multitask learning algorithm $f$ as a sequence
$$ \mathcal{F} = \lbrace f_n : (\mathcal{Z} \times \color{yellow}{[T]})^n \rightarrow \mathcal{H} \rbrace$$
---
## Has $f$ Multitask Learned?
In multitask learning setting $\mathcal{S}$, given $n$ samples, assuming $P$,
$f$ .ye[weakly multitask] learns when its performances $\lbrace \mathcal{E}_t \rbrace$ improve due to other task's data .ye[on average]:
$$ \sum\_{t \in [T]} \mathcal{E}\_t(f\_n ) P(t) < \sum\_{t \in [T]} \mathcal{E}\_t(f\_n^t) P(t),$$
<br>
$f$ .ye[strongly multitask] learns when its performances $\lbrace \mathcal{E}_t \rbrace$ improve due to other task's data .ye[for each task]:
$$ \mathcal{E}\_t(f_n) < \, \mathcal{E}\_t(f_n^t) \quad \forall t \in [T].$$
---
#### What is Task-Oblivious Lifelong Learning?
- Given
- Environment: $t_i \in \color{yellow}{\mathcal{T}}$ (.ye[potentially infinite]) set of tasks
- .ye[Side information]: $\xi_i \in \Xi$ such as expert advise, or reinforcement learning structure
<!-- - each batch may be associated with a new task -->
<!-- - the sequence of tasks is called the .ye[syllabus] -->
<!-- - there is potential for $\Xi$-valued side information -->
- Assume
- data arrive .ye[sequentially] in batches (potentially of size 1)
- .ye[no structure] to $P$, ie, could be iid, adversarial, etc.
- Define a task-oblivious lifelong learning algorithm $f$ to update existing hypotheses on the basis of a batch of $m$ new samples
$$\mathcal{F} = \lbrace f\_m : \color{yellow}{\mathcal{H}} \times ({\mathcal{Z}} \times \Xi)^m \rightarrow \mathcal{H} \rbrace$$
- Note:
- $f$ is oblivious to whether the setting has changed
- $n_t$ is the number of samples for task $t$
<!-- - $m=1$ is a special case -->
---
#### A Task-Oblivious Lifelong Learning Task
In task-oblivious lifelong setting $\mathcal{S}$, given $n$ samples, assuming $P$,
$f$ .ye[weakly lifelong] learns when its performances $\lbrace \mathcal{E}_t \rbrace$ improve due to other task's data .ye[on average]:
<!-- $$ \mathbb{E} \Big[ \sum\_{t \in [T\_n]} \mathcal{E}\_t(f\_n ) \Big] <
\mathbb{E} \sum\_{t \in [T\_n]} \mathcal{E}\_t(f\_n^t),$$ -->
$$ \sum\_{t \in \mathcal{T}} n\_t \mathcal{E}\_t(f\_n ) <
\sum\_{t \in \mathcal{T}} n\_t \mathcal{E}\_t(f\_n^t) ,$$
<!-- $$ \sum\_{i \in [n]} \mathcal{E}\_{t\_i}(f\_i )
<
\sum\_{i \in [n]} \mathcal{E}\_{t\_i}(f\_i^{t_i}),$$ -->
<br>
$f$ .ye[strongly lifelong] learns when its performances $\lbrace \mathcal{E}_t \rbrace$ improve due to other task's data .ye[for each task]:
$$ \mathcal{E}\_t(f_n) < \, \mathcal{E}\_t(f_n^t) \quad \forall t \in \mathcal{T}.$$
---
#### What is Task-Aware Lifelong Learning?
- Given
- Environment: $t_i \in \mathcal{T}$ (potentially infinite) set of tasks
- Sample space: $\mathcal{Z} \leftarrow (\mathcal{Z},\mathcal{T})$
- Assume a statistical model: $\mathcal{P} = \lbrace P := P_{Z,T} \otimes P_Q \rbrace$
- $Z\_i | T\_i \sim P\_{Z|T}$,
- $(T\_1,\ldots, T\_n) \sim P\_T$
- data arrive sequentially in batches
- Define a task-aware lifelong learning algorithm $f$ to update existing hypotheses on the basis of a batch of $m$ new samples
<!-- - Define a lifelong learning algorithm $f$ as a sequence -->
$$ \mathcal{F} = \lbrace f : \mathcal{H} \times (\mathcal{Z} \times \color{yellow}{\mathcal{T}})^m \rightarrow \mathcal{H} \rbrace$$
<!-- - Requires .ye[out of task] capabilities -->
<!-- - $N_T$ is the number of tasks observed after $n$ samples -->
---
#### A Task-Aware Lifelong Learning Task
In task-aware lifelong setting $\mathcal{S}$, given $n$ samples, assuming $P$,
$f$ weakly lifelong learns when its performances $\lbrace \mathcal{E}_t \rbrace$ improve due to other task's data on average:
<!-- $$ \mathbb{E} \Big[ \sum\_{t \in [T\_n]} \mathcal{E}\_t(f\_n ) \Big] <
\mathbb{E} \sum\_{t \in [T\_n]} \mathcal{E}\_t(f\_n^t),$$ -->
$$ \sum\_{t \in \mathcal{T}} n\_t \mathcal{E}\_t(f\_n ) <
\sum\_{t \in \mathcal{T}} n\_t \mathcal{E}\_t(f\_n^t) ,$$
<!-- $$ \sum\_{i \in [n]} \mathcal{E}\_{t\_i}(f\_i )
<
\sum\_{i \in [n]} \mathcal{E}\_{t\_i}(f\_i^{t_i}),$$ -->
<br>
$f$ strongly lifelong learns when its performances $\lbrace \mathcal{E}_t \rbrace$ improve due to other task's data for each task:
$$ \mathcal{E}\_t(f_n) < \, \mathcal{E}\_t(f_n^t) \quad \forall t \in \mathcal{T}.$$
---
## Lifelong Learning Taxonomy
![:scale 100%](images/learning-taxonomy.svg)
---
## Ways Tasks can Differ
| Component | Notation | Examples |
| :--- | :--- | :---
| Sample Space | $\mathcal{Z}$ | another modality
| Action Space | $\mathcal{A}$ | class incremental, task incremental
| Query Space | $\mathcal{Q}$ | new keyboard introduced
| Constraints | $\mathcal{C}$ | added/removed hardware
| Performance | $\mathcal{E}$ | $L_2 \to L_1$
| Distribution | $P$ | Gaussian to Log-Gaussian
| Task Awareness | $T_i$ | {aware, oblivious, ambivalent}
$2^6 \times 3 \approx 200$ ways tasks can differ.
---
name:metrics
## Outline
- [Introduction](#intro)
- [Definition](#def)
- Metrics
- [Algorithm](#alg)
- [Simulations](#sims)
- [Real](#real)
- [Theory](#theory)
- [Neurobiology](#neuro)
- [Discussion](#disc)
- [Appendix 1: Extra Slides](#extra)
- [Appendix 2: Scenarios](#scenarios)
---
## Transfer Efficiency (TE)
The transfer efficiency of learning algorithm $f$ for task $t$ is
$$ TE\_t(f) :=
\frac{\mathcal{E}\_t(f^t_n)}{\mathcal{E}\_t(f_n)}.
$$
<br>
Algorithm $ f $ transfer learns if $ TE_t(f) > 1 $.
---
## Forward / Backward TE
- Let $f^{t_-}_n$ denote the algorithm with all access up to the last sample associated with task $t$.
<!-- - Let $\mathcal{D}_F^t = \{(X_i, Y_i, T_i) \in \, \mathcal{D} : i \leq n_t\}$ be the set of all data up to sample $n_t$. -->
- .ye[Forward] transfer efficiency is the improvement on task $t$ resulting from all data .ye[preceding] task $t$
$$ FTE\_t(f) :=
\frac{\mathcal{E}\_t(f^t\_n)}{\mathcal{E}\_t(f^{t\_-}\_n)}.
$$
--
<!-- ## Backward Transfer Efficiency -->
<!-- Backward Transfer Efficiency (BTE) for task $t$ measures the improvement on task $t$ resulting from all data occurring after the last sample $i$ with $T_i = j$. -->
- .ye[Backward] transfer efficiency is the improvement on task $t$ resulting from all data .ye[after] task $t$
<!-- The backward transfer efficiency of $ f $ for task $t$ is -->
$$ BTE\_t(f) :=
\frac{\mathcal{E}\_t(f^{t\_-}_n)}{\mathcal{E}_t(f_n)}.
$$
---
## TE Factorizes
$$ TE\_t(f) :=
\frac{\mathcal{E}\_t(f^t\_n)}{\mathcal{E}\_t(f\_n)}
= \frac{\mathcal{E}\_t(f^t\_n)}{\mathcal{E}\_t(f^{t\_-}\_n)}
\times
\frac{\mathcal{E}\_t(f^{t\_-}\_n)}{\mathcal{E}\_t(f\_n)}.
$$
<br>
We therefore have a single metric to quantify transfer.
---
name:alg
## Outline
- [Introduction](#intro)
- [Definition](#def)
- [Metrics](#metrics)
- Algorithm
- [Simulations](#sims)
- [Real](#real)
- [Theory](#theory)
- [Neurobiology](#neuro)
- [Discussion](#disc)
- [Appendix 1: Extra Slides](#extra)
- [Appendix 2: Scenarios](#scenarios)
---
## Basic Idea
For each new task,
1. learn a new representation function,
2. apply it to all data from all tasks: the updated representation for everything is the composition of this new representation with existing representations.
4. update all decision rules using this representation.
Notes:
- This linearly increases representation capacity.
- Without increasing representation capacity, performance on all tasks will necessarily drop to chance levels eventually as number of tasks increases.
- Thus, fixed capacity systems can only lifelong learn insofar as they are inefficient (unnecessarily big) for individual tasks.
---
## Composable Hypotheses
.center[ .ye[$h(\cdot) := w \circ v \circ u (\cdot) = w(v(u(\cdot)))$]]
- Let $u$ be .ye[transformer] data to a new representation,
$$ u : \mathcal{X} \to \tilde{\mathcal{X}}$$
- Let $v$ be .ye[voter] which operate on the transformed data outputs votes on all possible actions
$$ v : \tilde{\mathcal{X}} \to \mathcal{P}_{A|X}$$
- Let $w$ be .ye[decider] which decides which actions to take on the basis of the votes
$$ w : \mathcal{P}_{A|X} \to \mathcal{A}$$
---
## Simple Examples
- Linear Discriminant Analysis (shallow)
- $u$: projection onto a line
- $v$: fraction of points per over/under threshold
- $w$: maximum a posteriori class
--
- Decision Tree (deep)
- $u$: union of polytopes
- $v$: fraction of points per class per leaf node
- $w$: maximum a posteriori class
---
## Complicated Example
- Decision Forest
- $u_b$ for $B$ trees: union of overlapping polytopes
- $v_b$ for $B$ trees: fraction of points per class per leaf node
- $w$: maximum a posteriori class averaging over trees
--
- Deep Nets
- $u$: "backbone" (all but last layer)
- $v$: softmax layer
- $w$: max
---
## Key Idea
- .ye[Different transformers can composed with voters]
- Learn many different transformers $u_t(\cdot)$'s
- For each $u\_t$, learn voter per task $v\_{t,t'}$'s
- Use the decider to weight the various options
- This is .ye[ensembling representations].
### Notes
- We learn new representation for each task.
- Dimensionality of internal representation grows linearly with number of tasks.
<!-- TODO@jv: somewhere must introduce the concept of adjusting representations -->
---
## Composable Learning
<br>
| Scenario | Composition
| :--- | :---
| Single task learning | $ h(\cdot) = w \circ v \circ u (\cdot)$
| Multiple independent task learning | $ h_t(\cdot) = w_t \circ v_t \circ u_t (\cdot)$
| Single task ensemble learning |$ h(\cdot) = w \circ \bigcup_t [ v_t \circ u_t (\cdot)] $
| Multitask learning | $ h_t(\cdot) = w_t \circ v \circ \bigcup_t u_t (\cdot)$
| .ye[Multitask ensemble representation learning] | $ h\_t(\cdot) = w\_t \circ \bigcup\_{t'} [v\_{t,t'} \circ u\_{t'} (\cdot) ] $
---
## Lifelong Learning Schema
![:scale 100%](images/learning-schemas3.svg)
- Any learner with an explicit internal representation is ok,
- e.g., decision trees, decision forests, deep networks
<!-- - SVM's are not obviously -->
---
## Pseudocode
- Given $\color{magenta}{j-1}$ transformers learned from the previous $\color{magenta}{j-1}$ datasets and a new $\color{yellow}{j^{th}}$ dataset with task label $\color{yellow}{t_j}$, do:
- learn a new transformer using $\color{yellow}{j^{th}}$ data
- .magenta[reverse transfer update] for each of the $\color{magenta}{j-1}$ previous tasks:
1. transform a subset of the data through the $\color{yellow}{j^{th}}$ transformer
(this requires having stored some of the data)
3. learn a new voter using the $\color{yellow}{j^{th}}$ representation of data
4. update decision rules by appending this additional voter
- .ye[forward transfer update] for all data associated with $\color{yellow}{j^{th}}$ task:
1. transform a subset of the data through the $\color{yellow}{j^{th}}$ transformer
2. transform through each of the $\color{magenta}{j-1}$ existing transformers
3. learn a new voter for all $j$ transformers
4. make decision rule by averaging over $j$ voters
---
## General Representations
- Transformers learn representations
- We desire representations that are sufficient for one task, and useful for other tasks
- Decision trees, decision forests, and deep nets (with ReLu nodes) .ye[partition] feature space into polytopes
--
![:scale 100%](images/deep-polytopes.png)
<!-- <img src="images/deep-polytopes.png" style="width:500px;"/> -->
---
name:sims
## Outline
- [Introduction](#intro)
- [Definition](#def)
- [Metrics](#metrics)
- [Algorithm](#alg)
- Simulations
- [Real](#real)
- [Theory](#theory)
- [Neurobiology](#neuro)
- [Discussion](#disc)
- [Appendix 1: Extra Slides](#extra)
- [Appendix 2: Scenarios](#scenarios)
---
## A Transfer Example
- .ye[XOR]
- Samples in the (0,0) and (1,1) quadrants are purple
- samples in the (0,1) and (1,0) quadrants are green
- .lb[N-XOR]
- Samples in the (0,0) and (1,1) quadrants are green
- samples in the (0,1) and (1,0) quadrants are purple
- Optimal decision boundaries for both problems are coordinate axes
<img src="images/gaussian-xor-nxor.png" style="width:475px" class="center"/>
<!-- TODO@HH replace with svg of Gaussian XOR & N-XOR -->
<!--
## Lifelong Classifier
<img src="images/columbia20/xor-nxor-all.png" style="height:300px;">
<!-- TODO@HH replace with 3 lower panels of Fig 2 -->
<!-- TODO@HH add titles to left and middle panel saying "Forward Transfer" and "Reverse Transfer", respectively-->
- .lb[Uncertainty Forest] uses 100 samples from XOR to learn partitions
- .ye[Lifelong Forest] uses 100 samples from XOR and $n$ samples from N-XOR to learn partitions -->
---
### XOR vs NXOR Transfer Efficiency
![:scale 100%](images/xor-te.png)
---
### Lots of Transfer Efficiency
![:scale 55%](images/lotsa-te.png)
<!--
## Different # of Classes
<img src="images/spiral-all.png" style="height:500px;"> -->
---
## Graceful Forgetting
![:scale 100%](images/rxor-te.png)
---
name:real