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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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
WEBVTT

00:00:01.280 --> 00:00:06.759
so the class today is uh introduction to

00:00:04.680 --> 00:00:09.480
natural language processing and I'll be

00:00:06.759 --> 00:00:11.200
talking a little bit about you know what

00:00:09.480 --> 00:00:14.719
is natural language processing why we're

00:00:11.200 --> 00:00:16.720
motivated to do it and also some of the

00:00:14.719 --> 00:00:18.039
difficulties that we encounter and I'll

00:00:16.720 --> 00:00:19.880
at the end I'll also be talking about

00:00:18.039 --> 00:00:22.519
class Logistics so you can ask any

00:00:19.880 --> 00:00:25.439
Logistics questions at that

00:00:22.519 --> 00:00:27.720
time so if we talk about what is NLP

00:00:25.439 --> 00:00:29.320
anyway uh does anyone have any opinions

00:00:27.720 --> 00:00:31.439
about the definition of what natural

00:00:29.320 --> 00:00:33.239
language process would be oh one other

00:00:31.439 --> 00:00:35.680
thing I should mention is I am recording

00:00:33.239 --> 00:00:38.600
the class uh I put the class on YouTube

00:00:35.680 --> 00:00:40.520
uh afterwards I will not take pictures

00:00:38.600 --> 00:00:41.920
or video of any of you uh but if you

00:00:40.520 --> 00:00:44.719
talk your voice might come in the

00:00:41.920 --> 00:00:47.440
background so just uh be aware of that

00:00:44.719 --> 00:00:49.000
um usually not it's a directional mic so

00:00:47.440 --> 00:00:51.559
I try to repeat the questions after

00:00:49.000 --> 00:00:54.079
everybody um but uh for the people who

00:00:51.559 --> 00:00:57.680
are recordings uh listening to the

00:00:54.079 --> 00:00:59.320
recordings um so anyway what is NLP

00:00:57.680 --> 00:01:03.120
anyway does anybody have any ideas about

00:00:59.320 --> 00:01:03.120
the definition of what NLP might

00:01:06.119 --> 00:01:09.119
be

00:01:15.439 --> 00:01:21.759
yes okay um it so the answer was it

00:01:19.240 --> 00:01:25.759
helps machines understand language

00:01:21.759 --> 00:01:27.920
better uh so to facilitate human human

00:01:25.759 --> 00:01:31.159
and human machine interactions I think

00:01:27.920 --> 00:01:32.759
that's very good um it's

00:01:31.159 --> 00:01:36.520
uh similar to what I have written on my

00:01:32.759 --> 00:01:38.040
slide here uh but natur in addition to

00:01:36.520 --> 00:01:41.280
natural language understanding there's

00:01:38.040 --> 00:01:46.000
one major other segment of NLP uh does

00:01:41.280 --> 00:01:46.000
anyone uh have an idea what that might

00:01:48.719 --> 00:01:53.079
be we often have a dichotomy between two

00:01:51.399 --> 00:01:55.240
major segments natural language

00:01:53.079 --> 00:01:57.520
understanding and natural language

00:01:55.240 --> 00:01:59.439
generation yeah exactly so I I would say

00:01:57.520 --> 00:02:03.119
that's almost perfect if you had said

00:01:59.439 --> 00:02:06.640
understand and generate so very good um

00:02:03.119 --> 00:02:08.560
so I I say natural technology to handle

00:02:06.640 --> 00:02:11.400
human language usually text using

00:02:08.560 --> 00:02:13.200
computers uh to Aid human machine

00:02:11.400 --> 00:02:15.480
communication and this can include

00:02:13.200 --> 00:02:17.879
things like question answering dialogue

00:02:15.480 --> 00:02:20.840
or generation of code that can be

00:02:17.879 --> 00:02:23.239
executed with uh

00:02:20.840 --> 00:02:25.080
computers it can also Aid human human

00:02:23.239 --> 00:02:27.440
communication and this can include

00:02:25.080 --> 00:02:30.440
things like machine translation or spell

00:02:27.440 --> 00:02:32.640
checking or assisted writing

00:02:30.440 --> 00:02:34.560
and then a final uh segment that people

00:02:32.640 --> 00:02:37.400
might think about a little bit less is

00:02:34.560 --> 00:02:39.400
analyzing and understanding a language

00:02:37.400 --> 00:02:42.400
and this includes things like syntactic

00:02:39.400 --> 00:02:44.959
analysis text classification entity

00:02:42.400 --> 00:02:47.400
recognition and linking and these can be

00:02:44.959 --> 00:02:49.159
used for uh various reasons not

00:02:47.400 --> 00:02:51.000
necessarily for direct human machine

00:02:49.159 --> 00:02:52.720
communication but also for like

00:02:51.000 --> 00:02:54.400
aggregating information across large

00:02:52.720 --> 00:02:55.760
things for scientific studies and other

00:02:54.400 --> 00:02:57.519
things like that I'll give a few

00:02:55.760 --> 00:03:00.920
examples of

00:02:57.519 --> 00:03:04.040
this um we now use an many times a day

00:03:00.920 --> 00:03:06.480
sometimes without even knowing it so uh

00:03:04.040 --> 00:03:09.400
whenever you're typing a doc in Google

00:03:06.480 --> 00:03:11.599
Docs there's you know spell checking and

00:03:09.400 --> 00:03:13.959
grammar checking going on behind it's

00:03:11.599 --> 00:03:15.920
gotten frighten frighteningly good

00:03:13.959 --> 00:03:18.280
recently that where it checks like most

00:03:15.920 --> 00:03:20.720
of my mistakes and rarely Flags things

00:03:18.280 --> 00:03:22.799
that are not mistakes so obviously they

00:03:20.720 --> 00:03:25.080
have powerful models running behind that

00:03:22.799 --> 00:03:25.080
uh

00:03:25.640 --> 00:03:33.080
so and it can do things like answer

00:03:28.720 --> 00:03:34.599
questions uh so I asked chat GPT who is

00:03:33.080 --> 00:03:37.000
the current president of Carnegie melan

00:03:34.599 --> 00:03:38.920
University and chat GPT said I did a

00:03:37.000 --> 00:03:40.920
quick search for more information here

00:03:38.920 --> 00:03:43.439
is what I found uh the current president

00:03:40.920 --> 00:03:47.120
of car Mel University is faram Janan he

00:03:43.439 --> 00:03:50.040
has been serving since July 1 etc etc so

00:03:47.120 --> 00:03:50.040
as far as I can tell that's

00:03:50.400 --> 00:03:56.319
correct um at the same time I asked how

00:03:53.799 --> 00:04:00.280
many layers are included in the GP 3.5

00:03:56.319 --> 00:04:02.360
turbo architecture and it said to me

00:04:00.280 --> 00:04:05.400
GPT 3.5 turbo which is an optimized

00:04:02.360 --> 00:04:07.239
version of GPT 3.5 for faster responses

00:04:05.400 --> 00:04:08.959
doesn't have a specific layer art

00:04:07.239 --> 00:04:11.720
structure like the traditional gpt3

00:04:08.959 --> 00:04:13.560
models um and I don't know if this is

00:04:11.720 --> 00:04:16.600
true or not but I'm pretty sure it's not

00:04:13.560 --> 00:04:18.840
true I'm pretty sure that you know GPT

00:04:16.600 --> 00:04:20.560
is a model that's much like other models

00:04:18.840 --> 00:04:21.560
uh so it basically just made up the spec

00:04:20.560 --> 00:04:22.880
because it didn't have any information

00:04:21.560 --> 00:04:26.000
on the Internet or couldn't talk about

00:04:22.880 --> 00:04:26.000
it so

00:04:26.120 --> 00:04:33.479
um another thing is uh NLP can translate

00:04:29.639 --> 00:04:37.759
text pretty well so I ran um Google

00:04:33.479 --> 00:04:39.560
translate uh on Japanese uh this example

00:04:37.759 --> 00:04:41.639
is a little bit old it's from uh you

00:04:39.560 --> 00:04:44.639
know a few years ago about Co but I I

00:04:41.639 --> 00:04:46.240
retranslated it a few days ago and it

00:04:44.639 --> 00:04:47.680
comes up pretty good uh you can

00:04:46.240 --> 00:04:49.639
basically understand what's going on

00:04:47.680 --> 00:04:53.520
here it's not perfect but you can

00:04:49.639 --> 00:04:56.400
understand the uh the general uh

00:04:53.520 --> 00:04:58.560
gist at the same time uh if I put in a

00:04:56.400 --> 00:05:02.280
relatively low resource language this is

00:04:58.560 --> 00:05:05.759
Kurdish um it has a number of problems

00:05:02.280 --> 00:05:08.199
when you try to understand it and just

00:05:05.759 --> 00:05:12.400
to give an example this is talking about

00:05:08.199 --> 00:05:14.320
uh some uh paleontology Discovery it

00:05:12.400 --> 00:05:15.800
called this person a fossil scientist

00:05:14.320 --> 00:05:17.440
instead of the kind of obvious English

00:05:15.800 --> 00:05:20.120
term

00:05:17.440 --> 00:05:23.520
paleontologist um and it's talking about

00:05:20.120 --> 00:05:25.240
three different uh T-Rex species uh how

00:05:23.520 --> 00:05:27.039
T-Rex should actually be split into

00:05:25.240 --> 00:05:29.639
three species where T-Rex says king of

00:05:27.039 --> 00:05:31.560
ferocious lizards emperator says emperor

00:05:29.639 --> 00:05:33.720
of Savaged lizards and then T Regina

00:05:31.560 --> 00:05:35.120
means clean of ferocious snail I'm

00:05:33.720 --> 00:05:37.240
pretty sure that's not snail I'm pretty

00:05:35.120 --> 00:05:41.080
sure that's lizard so uh you can see

00:05:37.240 --> 00:05:41.080
that this is not uh this is not perfect

00:05:41.280 --> 00:05:46.680
either some people might be thinking why

00:05:43.960 --> 00:05:48.400
Google translate and why not GPD well it

00:05:46.680 --> 00:05:49.960
turns out um according to one of the

00:05:48.400 --> 00:05:51.759
recent studies we've done GPD is even

00:05:49.960 --> 00:05:55.479
worse at these slow resource languages

00:05:51.759 --> 00:05:58.120
so I use the best thing that's out

00:05:55.479 --> 00:06:00.440
there um another thing is language

00:05:58.120 --> 00:06:02.039
analysis can Aid scientific ific inquiry

00:06:00.440 --> 00:06:03.600
so this is an example that I've been

00:06:02.039 --> 00:06:06.120
using for a long time it's actually from

00:06:03.600 --> 00:06:09.160
Martin sap another faculty member here

00:06:06.120 --> 00:06:12.440
uh but I have been using it since uh

00:06:09.160 --> 00:06:14.160
like before he joined and it uh this is

00:06:12.440 --> 00:06:16.039
an example from computational social

00:06:14.160 --> 00:06:18.599
science uh answering questions about

00:06:16.039 --> 00:06:20.240
Society given observational data and

00:06:18.599 --> 00:06:22.280
their question was do movie scripts

00:06:20.240 --> 00:06:24.599
portray female or male characters with

00:06:22.280 --> 00:06:27.520
more power or agency in movie script

00:06:24.599 --> 00:06:30.120
films so it's asking kind of a so

00:06:27.520 --> 00:06:32.160
societal question by using NLP

00:06:30.120 --> 00:06:35.360
technology and the way they did it is

00:06:32.160 --> 00:06:36.880
they basically analyzed text trying to

00:06:35.360 --> 00:06:43.080
find

00:06:36.880 --> 00:06:45.280
uh the uh agents and patients in a a

00:06:43.080 --> 00:06:46.479
particular text which are the the things

00:06:45.280 --> 00:06:49.280
that are doing things and the things

00:06:46.479 --> 00:06:52.639
that things are being done to and you

00:06:49.280 --> 00:06:54.440
can see that essentially male characters

00:06:52.639 --> 00:06:56.560
in these movie scripts were given more

00:06:54.440 --> 00:06:58.080
power in agency and female characters

00:06:56.560 --> 00:06:59.960
were given less power in agency and they

00:06:58.080 --> 00:07:02.680
were able to do this because they had

00:06:59.960 --> 00:07:04.840
NLP technology that analyzed and

00:07:02.680 --> 00:07:08.960
extracted useful data and made turned it

00:07:04.840 --> 00:07:11.520
into a very easy form to do kind of

00:07:08.960 --> 00:07:15.840
analysis of the variety that they want

00:07:11.520 --> 00:07:17.400
so um I think that's a major use case of

00:07:15.840 --> 00:07:19.400
NLP technology that does language

00:07:17.400 --> 00:07:20.919
analysis nowadays turn it into a form

00:07:19.400 --> 00:07:23.960
that allows you to very quickly do

00:07:20.919 --> 00:07:27.440
aggregate queries and other things like

00:07:23.960 --> 00:07:30.479
this um but at the same time uh language

00:07:27.440 --> 00:07:33.520
analysis tools fail at very basic tasks

00:07:30.479 --> 00:07:36.000
so these are

00:07:33.520 --> 00:07:38.199
some things that I ran through a named

00:07:36.000 --> 00:07:41.080
entity recognizer and these were kind of

00:07:38.199 --> 00:07:43.160
very nice named entity recognizers uh

00:07:41.080 --> 00:07:46.240
that a lot of people were using for

00:07:43.160 --> 00:07:48.039
example Stanford core NLP and Spacey and

00:07:46.240 --> 00:07:50.319
both of them I just threw in the first

00:07:48.039 --> 00:07:53.120
thing that I found on the New York Times

00:07:50.319 --> 00:07:55.199
at the time and it basically made at

00:07:53.120 --> 00:07:58.319
least one mistake in the first sentence

00:07:55.199 --> 00:08:00.840
and here it recognizes Baton Rouge as an

00:07:58.319 --> 00:08:04.720
organization and here it recognized

00:08:00.840 --> 00:08:07.000
hurricane EA as an organization so um

00:08:04.720 --> 00:08:08.879
like even uh these things that we expect

00:08:07.000 --> 00:08:10.360
should work pretty well make pretty

00:08:08.879 --> 00:08:13.360
Solly

00:08:10.360 --> 00:08:16.199
mistakes so in the class uh basically

00:08:13.360 --> 00:08:18.479
what I want to cover is uh what goes

00:08:16.199 --> 00:08:20.360
into building uh state-of-the-art NLP

00:08:18.479 --> 00:08:24.000
systems that work really well on a wide

00:08:20.360 --> 00:08:26.240
variety of tasks um where do current

00:08:24.000 --> 00:08:28.840
systems

00:08:26.240 --> 00:08:30.479
fail and how can we make appropriate

00:08:28.840 --> 00:08:35.000
improvements and Achieve whatever we

00:08:30.479 --> 00:08:37.719
want to do with nalp and this set of

00:08:35.000 --> 00:08:39.360
questions that I'm asking here is

00:08:37.719 --> 00:08:40.919
exactly the same as the set of questions

00:08:39.360 --> 00:08:43.519
that I was asking two years ago before

00:08:40.919 --> 00:08:45.480
chat GPT uh I still think they're

00:08:43.519 --> 00:08:46.920
important questions but I think the

00:08:45.480 --> 00:08:48.399
answers to these questions is very

00:08:46.920 --> 00:08:50.040
different and because of that we're

00:08:48.399 --> 00:08:52.120
updating the class materials to try to

00:08:50.040 --> 00:08:54.399
cover you know the answers to these

00:08:52.120 --> 00:08:56.000
questions and uh in kind of the era of

00:08:54.399 --> 00:08:58.200
large language models and other things

00:08:56.000 --> 00:08:59.720
like

00:08:58.200 --> 00:09:02.079
that

00:08:59.720 --> 00:09:03.360
so that's all I have for the intro maybe

00:09:02.079 --> 00:09:06.640
maybe pretty straightforward are there

00:09:03.360 --> 00:09:08.480
any questions or comments so far if not

00:09:06.640 --> 00:09:14.399
I'll I'll just go

00:09:08.480 --> 00:09:17.160
on okay great so I want to uh first go

00:09:14.399 --> 00:09:19.480
into a very high Lev overview of NLP

00:09:17.160 --> 00:09:20.839
system building and most of the stuff

00:09:19.480 --> 00:09:22.399
that I want to do today is to set the

00:09:20.839 --> 00:09:24.320
stage for what I'm going to be talking

00:09:22.399 --> 00:09:25.040
about in more detail uh over the rest of

00:09:24.320 --> 00:09:29.200
the

00:09:25.040 --> 00:09:31.720
class and we could think of NLP syst

00:09:29.200 --> 00:09:34.040
systems through this kind of General

00:09:31.720 --> 00:09:36.560
framework where we want to create a

00:09:34.040 --> 00:09:40.600
function to map an input X into an

00:09:36.560 --> 00:09:44.440
output y uh where X and or Y involve

00:09:40.600 --> 00:09:47.000
language and uh do some people have

00:09:44.440 --> 00:09:50.120
favorite NLP tasks or NLP tasks that you

00:09:47.000 --> 00:09:52.399
want to uh want to be handling in some

00:09:50.120 --> 00:09:57.000
way or maybe what what do you think are

00:09:52.399 --> 00:09:57.000
the most popular and important NLP tasks

00:09:58.120 --> 00:10:03.200
nowadays

00:10:00.800 --> 00:10:06.120
okay so translation is maybe easy what's

00:10:03.200 --> 00:10:06.120
the input and output of

00:10:11.440 --> 00:10:15.720
translation okay yeah so uh in

00:10:13.800 --> 00:10:17.959
Translation inputs text in one language

00:10:15.720 --> 00:10:21.760
output is text in another language and

00:10:17.959 --> 00:10:21.760
then what what is a good

00:10:27.680 --> 00:10:32.160
translation yeah corre or or the same is

00:10:30.320 --> 00:10:35.839
the input basically yes um it also

00:10:32.160 --> 00:10:37.760
should be fluent but I agree any other

00:10:35.839 --> 00:10:39.839
things generation the reason why I said

00:10:37.760 --> 00:10:41.519
it's tough is it's pretty broad um and

00:10:39.839 --> 00:10:43.360
it's not like we could be doing

00:10:41.519 --> 00:10:46.360
generation with lots of different inputs

00:10:43.360 --> 00:10:51.440
but um yeah any any other things maybe a

00:10:46.360 --> 00:10:51.440
little bit different yeah like

00:10:51.480 --> 00:10:55.959
scenario a scenario and a multiple

00:10:54.000 --> 00:10:58.200
choice question about the scenario and

00:10:55.959 --> 00:10:59.680
so what would the scenario in the

00:10:58.200 --> 00:11:01.760
multiple choice question are probably

00:10:59.680 --> 00:11:04.040
the input and then the output

00:11:01.760 --> 00:11:06.480
is an answer to the multiple choice

00:11:04.040 --> 00:11:07.920
question um and then there it's kind of

00:11:06.480 --> 00:11:12.279
obvious like what is good it's the

00:11:07.920 --> 00:11:14.880
correct answer sure um interestingly I

00:11:12.279 --> 00:11:17.440
think a lot of llm evaluation is done on

00:11:14.880 --> 00:11:21.160
these multiple choice questions but I'm

00:11:17.440 --> 00:11:22.320
yet to encounter an actual application

00:11:21.160 --> 00:11:24.880
that cares about multiple choice

00:11:22.320 --> 00:11:26.880
question answering so uh there's kind of

00:11:24.880 --> 00:11:30.959
a funny disconnect there but uh yeah I

00:11:26.880 --> 00:11:33.519
saw hand that think about V search comp

00:11:30.959 --> 00:11:36.360
yeah Vector search uh that's very good

00:11:33.519 --> 00:11:36.360
so the input

00:11:37.120 --> 00:11:45.000
is can con it into or understanding and

00:11:42.560 --> 00:11:45.000
it to

00:11:47.360 --> 00:11:53.760
another okay yeah so I'd say the input

00:11:49.880 --> 00:11:56.160
there is a query and a document base um

00:11:53.760 --> 00:11:57.959
and then the output is maybe an index

00:11:56.160 --> 00:11:59.800
into the document or or something else

00:11:57.959 --> 00:12:01.279
like that sure um and then something

00:11:59.800 --> 00:12:05.040
that's good here here's a good question

00:12:01.279 --> 00:12:05.040
what what's a good result from

00:12:06.560 --> 00:12:10.200
that what's a good

00:12:10.839 --> 00:12:19.279
output be sort of simar the major

00:12:15.560 --> 00:12:21.680
problem there I see is how you def SAR

00:12:19.279 --> 00:12:26.199
and how you

00:12:21.680 --> 00:12:29.760
a always like you understand

00:12:26.199 --> 00:12:33.000
whether is actually

00:12:29.760 --> 00:12:35.079
yeah exactly so that um just to repeat

00:12:33.000 --> 00:12:36.880
it's like uh we need to have a

00:12:35.079 --> 00:12:38.399
similarity a good similarity metric we

00:12:36.880 --> 00:12:40.120
need to have a good threshold where we

00:12:38.399 --> 00:12:41.760
get like the ones we want and we don't

00:12:40.120 --> 00:12:43.240
get the ones we don't want we're going

00:12:41.760 --> 00:12:44.959
to talk more about that in the retrieval

00:12:43.240 --> 00:12:48.440
lecture exactly how we evaluate and

00:12:44.959 --> 00:12:49.920
stuff but um yeah good so this is a good

00:12:48.440 --> 00:12:53.279
uh here are some good examples I have

00:12:49.920 --> 00:12:55.519
some examples of my own um the first one

00:12:53.279 --> 00:12:58.360
is uh kind of the very generic one maybe

00:12:55.519 --> 00:13:00.800
kind of like generation here but text in

00:12:58.360 --> 00:13:02.959
continuing text uh so this is language

00:13:00.800 --> 00:13:04.160
modeling so you have a text and then you

00:13:02.959 --> 00:13:05.440
have the continuation you want to

00:13:04.160 --> 00:13:07.680
predict the

00:13:05.440 --> 00:13:10.480
continuation um text and text in another

00:13:07.680 --> 00:13:13.040
language is translation uh text in a

00:13:10.480 --> 00:13:15.800
label could be text classification uh

00:13:13.040 --> 00:13:17.760
text in linguistic structure or uh some

00:13:15.800 --> 00:13:21.360
s kind of entities or something like

00:13:17.760 --> 00:13:22.680
that could be uh language analysis or um

00:13:21.360 --> 00:13:24.839
information

00:13:22.680 --> 00:13:29.440
extraction uh we could also have image

00:13:24.839 --> 00:13:31.320
and text uh which is image captioning um

00:13:29.440 --> 00:13:33.560
or speech and text which is speech

00:13:31.320 --> 00:13:35.240
recognition and I take the very broad

00:13:33.560 --> 00:13:38.000
view of natural language processing

00:13:35.240 --> 00:13:39.519
which is if it's any variety of language

00:13:38.000 --> 00:13:41.519
uh if you're handling language in some

00:13:39.519 --> 00:13:42.800
way it's natural language processing it

00:13:41.519 --> 00:13:45.880
doesn't necessarily have to be text

00:13:42.800 --> 00:13:47.480
input text output um so that's relevant

00:13:45.880 --> 00:13:50.199
for the projects that you're thinking

00:13:47.480 --> 00:13:52.160
about too at the end of this course so

00:13:50.199 --> 00:13:55.519
the the most common FAQ for this course

00:13:52.160 --> 00:13:57.839
is does my project count and if you're

00:13:55.519 --> 00:13:59.360
uncertain you should ask but usually

00:13:57.839 --> 00:14:01.040
like if it has some sort of language

00:13:59.360 --> 00:14:05.079
involved then I'll usually say yes it

00:14:01.040 --> 00:14:07.920
does kind so um if it's like uh code to

00:14:05.079 --> 00:14:09.680
code there that's not code is not

00:14:07.920 --> 00:14:11.480
natural language it is language but it's

00:14:09.680 --> 00:14:13.000
not natural language so that might be

00:14:11.480 --> 00:14:15.320
borderline we might have to discuss

00:14:13.000 --> 00:14:15.320
about

00:14:15.759 --> 00:14:21.800
that cool um so next I'd like to talk

00:14:18.880 --> 00:14:25.240
about methods for creating NLP systems

00:14:21.800 --> 00:14:27.839
um and there's a lot of different ways

00:14:25.240 --> 00:14:29.720
to create MLP systems all of these are

00:14:27.839 --> 00:14:32.880
alive and well in

00:14:29.720 --> 00:14:35.759
2024 uh the first one is Rule uh

00:14:32.880 --> 00:14:37.959
rule-based system creation and so the

00:14:35.759 --> 00:14:40.399
way this works is like let's say you

00:14:37.959 --> 00:14:42.480
want to build a text classifier you just

00:14:40.399 --> 00:14:46.560
write the simple python function that

00:14:42.480 --> 00:14:48.639
classifies things into uh sports or

00:14:46.560 --> 00:14:50.240
other and the way it classifies it into

00:14:48.639 --> 00:14:52.959
sports or other is it checks whether

00:14:50.240 --> 00:14:55.160
baseball soccer football and Tennis are

00:14:52.959 --> 00:14:59.399
included in the document and classifies

00:14:55.160 --> 00:15:01.959
it into uh Sports if so uh other if not

00:14:59.399 --> 00:15:05.279
so has anyone written something like

00:15:01.959 --> 00:15:09.720
this maybe not a text classifier but um

00:15:05.279 --> 00:15:11.880
you know to identify entities or uh

00:15:09.720 --> 00:15:14.279
split words

00:15:11.880 --> 00:15:16.680
or something like

00:15:14.279 --> 00:15:18.399
that has anybody not ever written

00:15:16.680 --> 00:15:22.800
anything like

00:15:18.399 --> 00:15:24.639
this yeah that's what I thought so um

00:15:22.800 --> 00:15:26.079
rule-based systems are very convenient

00:15:24.639 --> 00:15:28.920
when you don't really care about how

00:15:26.079 --> 00:15:30.759
good your system is um or you're doing

00:15:28.920 --> 00:15:32.360
that's really really simple and like

00:15:30.759 --> 00:15:35.600
it'll be perfect even if you do the very

00:15:32.360 --> 00:15:37.079
simple thing and so I I think it's worth

00:15:35.600 --> 00:15:39.959
talking a little bit about them and I'll

00:15:37.079 --> 00:15:43.319
talk a little bit about that uh this

00:15:39.959 --> 00:15:45.680
time the second thing which like very

00:15:43.319 --> 00:15:47.680
rapidly over the course of maybe three

00:15:45.680 --> 00:15:50.279
years or so has become actually maybe

00:15:47.680 --> 00:15:52.720
the dominant Paradigm in NLP is

00:15:50.279 --> 00:15:56.360
prompting uh in prompting a language

00:15:52.720 --> 00:15:58.560
model and the way this works is uh you

00:15:56.360 --> 00:16:00.720
ask a language model if the following

00:15:58.560 --> 00:16:03.079
sent is about sports reply Sports

00:16:00.720 --> 00:16:06.120
otherwise reply other and you feed it to

00:16:03.079 --> 00:16:08.480
your favorite LM uh usually that's GPT

00:16:06.120 --> 00:16:11.399
something or other uh sometimes it's an

00:16:08.480 --> 00:16:14.440
open source model of some variety and

00:16:11.399 --> 00:16:17.759
then uh it will give you the

00:16:14.440 --> 00:16:20.639
answer and then finally uh fine-tuning

00:16:17.759 --> 00:16:22.240
uh so you take some paired data and you

00:16:20.639 --> 00:16:23.600
do machine learning from paired data

00:16:22.240 --> 00:16:25.680
where you have something like I love to

00:16:23.600 --> 00:16:27.440
play baseball uh the stock price is

00:16:25.680 --> 00:16:29.519
going up he got a hatrick yesterday he

00:16:27.440 --> 00:16:32.759
is wearing tennis shoes and you assign

00:16:29.519 --> 00:16:35.319
all these uh labels to them training a

00:16:32.759 --> 00:16:38.160
model and you can even start out with a

00:16:35.319 --> 00:16:41.480
prompting based model and fine-tune a a

00:16:38.160 --> 00:16:41.480
language model

00:16:42.920 --> 00:16:49.399
also so one major consideration when

00:16:47.519 --> 00:16:52.000
you're Building Systems like this is the

00:16:49.399 --> 00:16:56.440
data requirements for building such a

00:16:52.000 --> 00:16:59.319
system and for rules or prompting where

00:16:56.440 --> 00:17:02.240
it's just based on intuition really no

00:16:59.319 --> 00:17:04.640
data is needed whatsoever it you don't

00:17:02.240 --> 00:17:08.240
need a single example and you can start

00:17:04.640 --> 00:17:11.000
writing rules or like just just to give

00:17:08.240 --> 00:17:12.640
an example the rules and prompts I wrote

00:17:11.000 --> 00:17:14.679
here I didn't look at any examples and I

00:17:12.640 --> 00:17:17.240
just wrote them uh so this is something

00:17:14.679 --> 00:17:20.000
that you could start out

00:17:17.240 --> 00:17:21.559
with uh the problem is you also have no

00:17:20.000 --> 00:17:24.720
idea how well it works if you don't have

00:17:21.559 --> 00:17:26.760
any data whatsoever right so um you'll

00:17:24.720 --> 00:17:30.400
you might be in trouble if you think

00:17:26.760 --> 00:17:30.400
something should be working

00:17:30.919 --> 00:17:34.440
so normally the next thing that people

00:17:32.919 --> 00:17:36.880
move to nowadays when they're building

00:17:34.440 --> 00:17:39.559
practical systems is rules are prompting

00:17:36.880 --> 00:17:41.240
based on spot checks so that basically

00:17:39.559 --> 00:17:42.919
means that you start out with a

00:17:41.240 --> 00:17:45.840
rule-based system or a prompting based

00:17:42.919 --> 00:17:47.240
system and then you go in and you run it

00:17:45.840 --> 00:17:48.720
on some data that you're interested in

00:17:47.240 --> 00:17:50.799
you just kind of qualitatively look at

00:17:48.720 --> 00:17:52.160
the data and say oh it's messing up here

00:17:50.799 --> 00:17:53.440
then you go in and fix your prompt a

00:17:52.160 --> 00:17:54.919
little bit or you go in and fix your

00:17:53.440 --> 00:17:57.320
rules a little bit or something like

00:17:54.919 --> 00:18:00.400
that so uh this is kind of the second

00:17:57.320 --> 00:18:00.400
level of difficulty

00:18:01.400 --> 00:18:04.640
so the third level of difficulty would

00:18:03.159 --> 00:18:07.400
be something like rules are prompting

00:18:04.640 --> 00:18:09.039
with rigorous evaluation and so here you

00:18:07.400 --> 00:18:12.840
would create a development set with

00:18:09.039 --> 00:18:14.840
inputs and outputs uh so you uh create

00:18:12.840 --> 00:18:17.039
maybe 200 to 2,000

00:18:14.840 --> 00:18:20.080
examples um

00:18:17.039 --> 00:18:21.720
and then evaluate your actual accuracy

00:18:20.080 --> 00:18:23.880
so you need an evaluation metric you

00:18:21.720 --> 00:18:26.120
need other things like this this is the

00:18:23.880 --> 00:18:28.400
next level of difficulty but if you're

00:18:26.120 --> 00:18:30.240
going to be a serious you know NLP

00:18:28.400 --> 00:18:33.000
engineer or something like this you

00:18:30.240 --> 00:18:34.720
definitely will be doing this a lot I

00:18:33.000 --> 00:18:37.760
feel and

00:18:34.720 --> 00:18:40.360
then so that here now you start needing

00:18:37.760 --> 00:18:41.960
a depth set and a test set and then

00:18:40.360 --> 00:18:46.280
finally fine-tuning you need an

00:18:41.960 --> 00:18:48.480
additional training set um and uh this

00:18:46.280 --> 00:18:52.240
will generally be a lot bigger than 200

00:18:48.480 --> 00:18:56.080
to 2,000 examples and generally the rule

00:18:52.240 --> 00:18:56.080
is that every time you

00:18:57.320 --> 00:19:01.080
double

00:18:59.520 --> 00:19:02.400
every time you double your training set

00:19:01.080 --> 00:19:07.480
size you get about a constant

00:19:02.400 --> 00:19:07.480
Improvement so if you start

00:19:07.799 --> 00:19:15.080
out if you start out down here with

00:19:12.240 --> 00:19:17.039
um zero shot accuracy with a language

00:19:15.080 --> 00:19:21.559
model you you create a small printing

00:19:17.039 --> 00:19:21.559
set and you get you know a pretty big

00:19:22.000 --> 00:19:29.120
increase and then every time you double

00:19:26.320 --> 00:19:30.799
it it increases by constant fact it's

00:19:29.120 --> 00:19:32.480
kind of like just in general in machine

00:19:30.799 --> 00:19:37.360
learning this is a trend that we tend to

00:19:32.480 --> 00:19:40.679
see so um So based on this

00:19:37.360 --> 00:19:41.880
uh there's kind of like you get a big

00:19:40.679 --> 00:19:44.200
gain from having a little bit of

00:19:41.880 --> 00:19:45.760
training data but the gains very quickly

00:19:44.200 --> 00:19:48.919
drop off and you start spending a lot of

00:19:45.760 --> 00:19:48.919
time annotating

00:19:51.000 --> 00:19:55.880
an so um yeah this is the the general

00:19:54.760 --> 00:19:58.280
overview of the different types of

00:19:55.880 --> 00:20:00.000
system building uh any any question

00:19:58.280 --> 00:20:01.559
questions about this or comments or

00:20:00.000 --> 00:20:04.000
things like

00:20:01.559 --> 00:20:05.840
this I think one thing that's changed

00:20:04.000 --> 00:20:08.159
really drastically from the last time I

00:20:05.840 --> 00:20:09.600
taught this class is the fact that

00:20:08.159 --> 00:20:11.000
number one and number two are the things

00:20:09.600 --> 00:20:13.799
that people are actually doing in

00:20:11.000 --> 00:20:15.360
practice uh which was you know people

00:20:13.799 --> 00:20:16.679
who actually care about systems are

00:20:15.360 --> 00:20:18.880
doing number one and number two is the

00:20:16.679 --> 00:20:20.440
main thing it used to be that if you

00:20:18.880 --> 00:20:22.679
were actually serious about building a

00:20:20.440 --> 00:20:24.320
system uh you really needed to do the

00:20:22.679 --> 00:20:27.080
funing and now it's kind of like more

00:20:24.320 --> 00:20:27.080
optional

00:20:27.159 --> 00:20:30.159
so

00:20:44.039 --> 00:20:50.960
yeah

00:20:46.320 --> 00:20:53.960
so it's it's definitely an empirical

00:20:50.960 --> 00:20:53.960
observation

00:20:54.720 --> 00:21:01.080
um in terms of the theoretical

00:20:57.640 --> 00:21:03.120
background I am not I can't immediately

00:21:01.080 --> 00:21:05.840
point to a

00:21:03.120 --> 00:21:10.039
particular paper that does that but I

00:21:05.840 --> 00:21:12.720
think if you think about

00:21:10.039 --> 00:21:14.720
the I I think I have seen that they do

00:21:12.720 --> 00:21:17.039
exist in the past but I I can't think of

00:21:14.720 --> 00:21:19.000
it right now I can try to uh try to come

00:21:17.039 --> 00:21:23.720
up with an example of

00:21:19.000 --> 00:21:23.720
that so yeah I I should take

00:21:26.799 --> 00:21:31.960
notes or someone wants to share one on

00:21:29.360 --> 00:21:33.360
Piaza uh if you have any ideas and want

00:21:31.960 --> 00:21:34.520
to share on Patza I'm sure that would be

00:21:33.360 --> 00:21:35.640
great it'd be great to have a discussion

00:21:34.520 --> 00:21:39.320
on

00:21:35.640 --> 00:21:44.960
Patza um Pi

00:21:39.320 --> 00:21:46.880
one cool okay so next I want to try to

00:21:44.960 --> 00:21:48.200
make a rule-based system and I'm going

00:21:46.880 --> 00:21:49.360
to make a rule-based system for

00:21:48.200 --> 00:21:51.799
sentiment

00:21:49.360 --> 00:21:53.480
analysis uh and this is a bad idea I

00:21:51.799 --> 00:21:55.400
would not encourage you to ever do this

00:21:53.480 --> 00:21:57.440
in real life but I want to do it here to

00:21:55.400 --> 00:21:59.640
show you why it's a bad idea and like

00:21:57.440 --> 00:22:01.200
what are some of the hard problems that

00:21:59.640 --> 00:22:03.960
you encounter when trying to create a

00:22:01.200 --> 00:22:06.600
system based on rules

00:22:03.960 --> 00:22:08.080
and then we'll move into building a

00:22:06.600 --> 00:22:12.360
machine learning base system after we

00:22:08.080 --> 00:22:15.400
finish this so if we look at the example

00:22:12.360 --> 00:22:18.559
test this is review sentiment analysis

00:22:15.400 --> 00:22:21.799
it's one of the most valuable uh tasks

00:22:18.559 --> 00:22:24.039
uh that people do in NLP nowadays

00:22:21.799 --> 00:22:26.400
because it allows people to know how

00:22:24.039 --> 00:22:29.200
customers are thinking about products uh

00:22:26.400 --> 00:22:30.799
improve their you know their product

00:22:29.200 --> 00:22:32.919
development and other things like that

00:22:30.799 --> 00:22:34.799
may monitor people's you know

00:22:32.919 --> 00:22:36.760
satisfaction with their social media

00:22:34.799 --> 00:22:39.200
service other things like this so

00:22:36.760 --> 00:22:42.720
basically the way it works is um you

00:22:39.200 --> 00:22:44.400
have uh outputs or you have sentences

00:22:42.720 --> 00:22:46.720
inputs like I hate this movie I love

00:22:44.400 --> 00:22:48.520
this movie I saw this movie and this

00:22:46.720 --> 00:22:50.600
gets mapped into positive neutral or

00:22:48.520 --> 00:22:53.120
negative so I hate this movie would be

00:22:50.600 --> 00:22:55.480
negative I love this movie positive and

00:22:53.120 --> 00:22:59.039
I saw this movie is

00:22:55.480 --> 00:23:01.200
neutral so um

00:22:59.039 --> 00:23:05.200
that that's the task input tax output

00:23:01.200 --> 00:23:08.880
labels uh Kary uh sentence

00:23:05.200 --> 00:23:11.679
label and in order to do this uh we

00:23:08.880 --> 00:23:13.120
would like to build a model um and we're

00:23:11.679 --> 00:23:16.159
going to build the model in a rule based

00:23:13.120 --> 00:23:19.000
way but it we'll still call it a model

00:23:16.159 --> 00:23:21.600
and the way it works is we do feature

00:23:19.000 --> 00:23:23.159
extraction um so we extract the Salient

00:23:21.600 --> 00:23:25.279
features for making the decision about

00:23:23.159 --> 00:23:27.320
what to Output next we do score

00:23:25.279 --> 00:23:29.880
calculation calculate a score for one or

00:23:27.320 --> 00:23:32.320
more possib ities and we have a decision

00:23:29.880 --> 00:23:33.520
function so we choose one of those

00:23:32.320 --> 00:23:37.679
several

00:23:33.520 --> 00:23:40.120
possibilities and so for feature

00:23:37.679 --> 00:23:42.200
extraction uh formally what this looks

00:23:40.120 --> 00:23:44.240
like is we have some function and it

00:23:42.200 --> 00:23:48.039
extracts a feature

00:23:44.240 --> 00:23:51.159
Vector for score calculation um we

00:23:48.039 --> 00:23:54.240
calculate the scores based on either a

00:23:51.159 --> 00:23:56.279
binary classification uh where we have a

00:23:54.240 --> 00:23:58.279
a weight vector and we take the dot

00:23:56.279 --> 00:24:00.120
product with our feature vector or we

00:23:58.279 --> 00:24:02.480
have multi class classification where we

00:24:00.120 --> 00:24:04.520
have a weight Matrix and we take the

00:24:02.480 --> 00:24:08.640
product with uh the vector and that

00:24:04.520 --> 00:24:08.640
gives us you know squares over multiple

00:24:08.919 --> 00:24:14.840
classes and then we have a decision uh

00:24:11.600 --> 00:24:17.520
rule so this decision rule tells us what

00:24:14.840 --> 00:24:20.080
the output is going to be um does anyone

00:24:17.520 --> 00:24:22.200
know what a typical decision rule is

00:24:20.080 --> 00:24:24.520
maybe maybe so obvious that you don't

00:24:22.200 --> 00:24:28.760
think about it often

00:24:24.520 --> 00:24:31.000
but uh a threshold um so like for would

00:24:28.760 --> 00:24:34.440
that be for binary a single binary

00:24:31.000 --> 00:24:37.000
scaler score or a multiple

00:24:34.440 --> 00:24:38.520
class binary yeah so and then you would

00:24:37.000 --> 00:24:39.960
pick a threshold and if it's over the

00:24:38.520 --> 00:24:42.919
threshold

00:24:39.960 --> 00:24:45.760
you say yes and if it's under the

00:24:42.919 --> 00:24:50.279
threshold you say no um another option

00:24:45.760 --> 00:24:51.679
would be um you have a threshold and you

00:24:50.279 --> 00:24:56.080
say

00:24:51.679 --> 00:24:56.080
yes no

00:24:56.200 --> 00:25:00.559
obain so you know you don't give an

00:24:58.360 --> 00:25:02.520
answer and depending on how you're

00:25:00.559 --> 00:25:03.720
evaluated what what is a good classifier

00:25:02.520 --> 00:25:07.799
you might want to abstain some of the

00:25:03.720 --> 00:25:10.960
time also um for multiclass what what's

00:25:07.799 --> 00:25:10.960
a standard decision role for

00:25:11.120 --> 00:25:16.720
multiclass argmax yeah exactly so um

00:25:14.279 --> 00:25:19.520
basically you you find the index that

00:25:16.720 --> 00:25:22.000
has the highest score in you output

00:25:19.520 --> 00:25:24.480
it we're going to be talking about other

00:25:22.000 --> 00:25:26.559
decision rules also um like

00:25:24.480 --> 00:25:29.480
self-consistency and minimum based risk

00:25:26.559 --> 00:25:30.760
later uh for text generation so you can

00:25:29.480 --> 00:25:33.000
just keep that in mind and then we'll

00:25:30.760 --> 00:25:36.279
forget about it for like several

00:25:33.000 --> 00:25:39.559
classes um so for sentiment

00:25:36.279 --> 00:25:42.159
class um I have a Cod

00:25:39.559 --> 00:25:45.159
walk

00:25:42.159 --> 00:25:45.159
here

00:25:46.240 --> 00:25:54.320
and this is pretty simple um but if

00:25:50.320 --> 00:25:58.559
you're bored uh of the class and would

00:25:54.320 --> 00:26:01.000
like to um try out yourself you can

00:25:58.559 --> 00:26:04.480
Challenge and try to get a better score

00:26:01.000 --> 00:26:06.120
than I do um over the next few minutes

00:26:04.480 --> 00:26:06.880
but we have this rule based classifier

00:26:06.120 --> 00:26:10.240
in

00:26:06.880 --> 00:26:12.640
here and I will open it up in my vs

00:26:10.240 --> 00:26:15.360
code

00:26:12.640 --> 00:26:18.360
to try to create a rule-based classifier

00:26:15.360 --> 00:26:18.360
and basically the way this

00:26:22.799 --> 00:26:29.960
works is

00:26:25.159 --> 00:26:29.960
that we have a feature

00:26:31.720 --> 00:26:37.720
extraction we have feature extraction we

00:26:34.120 --> 00:26:40.679
have scoring and we have um a decision

00:26:37.720 --> 00:26:43.480
rle so here for our feature extraction I

00:26:40.679 --> 00:26:44.720
have created a list of good words and a

00:26:43.480 --> 00:26:46.720
list of bad

00:26:44.720 --> 00:26:48.960
words

00:26:46.720 --> 00:26:51.320
and what we do is we just count the

00:26:48.960 --> 00:26:53.000
number of good words that appeared and

00:26:51.320 --> 00:26:55.320
count the number of bad words that

00:26:53.000 --> 00:26:57.880
appeared then we also have a bias

00:26:55.320 --> 00:27:01.159
feature so the bias feature is a feature

00:26:57.880 --> 00:27:03.679
that's always one and so what that

00:27:01.159 --> 00:27:06.799
results in is we have a dimension three

00:27:03.679 --> 00:27:08.880
feature Vector um where this is like the

00:27:06.799 --> 00:27:11.320
number of good words this is the number

00:27:08.880 --> 00:27:15.320
of bad words and then you have the

00:27:11.320 --> 00:27:17.760
bias and then I also Define the feature

00:27:15.320 --> 00:27:20.039
weights that so for every good word we

00:27:17.760 --> 00:27:22.200
add one to our score for every bad word

00:27:20.039 --> 00:27:25.559
we add uh we subtract one from our score

00:27:22.200 --> 00:27:29.399
and for the BIOS we absor and so we then

00:27:25.559 --> 00:27:30.480
take the dot product between

00:27:29.399 --> 00:27:34.360
these

00:27:30.480 --> 00:27:36.919
two and we get minus

00:27:34.360 --> 00:27:37.640
0.5 and that gives us uh that gives us

00:27:36.919 --> 00:27:41.000
the

00:27:37.640 --> 00:27:46.000
squore so let's run

00:27:41.000 --> 00:27:50.320
that um and I read in some

00:27:46.000 --> 00:27:52.600
data and what this data looks like is

00:27:50.320 --> 00:27:55.000
basically we have a

00:27:52.600 --> 00:27:57.559
review um which says the rock is

00:27:55.000 --> 00:27:59.480
destined to be the 21st Century's new

00:27:57.559 --> 00:28:01.240
Conan and that he's going to make a

00:27:59.480 --> 00:28:03.600
splash even greater than Arnold

00:28:01.240 --> 00:28:07.000
Schwarzenegger jeanclaude vanam or

00:28:03.600 --> 00:28:09.519
Steven Seagal um so this seems pretty

00:28:07.000 --> 00:28:10.840
positive right I like that's a pretty

00:28:09.519 --> 00:28:13.200
high order to be better than Arnold

00:28:10.840 --> 00:28:16.080
Schwarzenegger or John Claude vanam uh

00:28:13.200 --> 00:28:19.519
if you're familiar with action movies um

00:28:16.080 --> 00:28:22.840
and so of course this gets a positive

00:28:19.519 --> 00:28:24.120
label and so uh we have run classifier

00:28:22.840 --> 00:28:25.240
actually maybe I should call this

00:28:24.120 --> 00:28:27.600
decision rule because this is

00:28:25.240 --> 00:28:29.120
essentially our decision Rule and here

00:28:27.600 --> 00:28:32.600
basically do the thing that I mentioned

00:28:29.120 --> 00:28:35.440
here the yes no obstain or in this case

00:28:32.600 --> 00:28:38.360
positive negative neutral so if the

00:28:35.440 --> 00:28:40.159
score is greater than zero we uh return

00:28:38.360 --> 00:28:42.480
one if the score is less than zero we

00:28:40.159 --> 00:28:44.679
return negative one which is negative

00:28:42.480 --> 00:28:47.240
and otherwise we returns

00:28:44.679 --> 00:28:48.760
zero um we have an accuracy calculation

00:28:47.240 --> 00:28:51.519
function just calculating the outputs

00:28:48.760 --> 00:28:55.840
are good and

00:28:51.519 --> 00:28:57.440
um this is uh the overall label count in

00:28:55.840 --> 00:28:59.919
the in the output so we can see there

00:28:57.440 --> 00:29:03.120
slightly more positives than there are

00:28:59.919 --> 00:29:06.080
negatives and then we can run this and

00:29:03.120 --> 00:29:10.200
we get a a score of

00:29:06.080 --> 00:29:14.760
43 and so one one thing that I have

00:29:10.200 --> 00:29:19.279
found um is I I do a lot of kind

00:29:14.760 --> 00:29:21.240
of research on how to make NLP systems

00:29:19.279 --> 00:29:23.600
better and one of the things I found

00:29:21.240 --> 00:29:26.679
really invaluable

00:29:23.600 --> 00:29:27.840
is if you're in a situation where you

00:29:26.679 --> 00:29:29.720
have a

00:29:27.840 --> 00:29:31.760
set task and you just want to make the

00:29:29.720 --> 00:29:33.760
system better on the set task doing

00:29:31.760 --> 00:29:35.159
comprehensive error analysis and

00:29:33.760 --> 00:29:37.320
understanding where your system is

00:29:35.159 --> 00:29:39.880
failing is one of the best ways to do

00:29:37.320 --> 00:29:42.200
that and I would like to do a very

00:29:39.880 --> 00:29:43.640
rudimentary version of this here and

00:29:42.200 --> 00:29:46.519
what I'm doing essentially is I'm just

00:29:43.640 --> 00:29:47.480
randomly picking uh several examples

00:29:46.519 --> 00:29:49.320
that were

00:29:47.480 --> 00:29:52.000
correct

00:29:49.320 --> 00:29:54.840
um and so like let let's look at the

00:29:52.000 --> 00:29:58.200
examples here um here the true label is

00:29:54.840 --> 00:30:00.760
zero um in this predicted one um it may

00:29:58.200 --> 00:30:03.440
not be as cutting as Woody or as true as

00:30:00.760 --> 00:30:05.039
back in the Glory Days of uh weekend and

00:30:03.440 --> 00:30:07.440
two or three things that I know about

00:30:05.039 --> 00:30:09.640
her but who else engaged in film Mak

00:30:07.440 --> 00:30:12.679
today is so cognizant of the cultural

00:30:09.640 --> 00:30:14.480
and moral issues involved in the process

00:30:12.679 --> 00:30:17.600
so what words in here are a good

00:30:14.480 --> 00:30:20.840
indication that this is a neutral

00:30:17.600 --> 00:30:20.840
sentence any

00:30:23.760 --> 00:30:28.399
ideas little bit tough

00:30:26.240 --> 00:30:30.919
huh starting to think maybe we should be

00:30:28.399 --> 00:30:30.919
using machine

00:30:31.480 --> 00:30:37.440
learning

00:30:34.080 --> 00:30:40.320
um even by the intentionally low

00:30:37.440 --> 00:30:41.559
standards of fratboy humor sority boys

00:30:40.320 --> 00:30:43.840
is a

00:30:41.559 --> 00:30:46.080
Bowser I think frat boy is maybe

00:30:43.840 --> 00:30:47.360
negative sentiment if you're familiar

00:30:46.080 --> 00:30:50.360
with

00:30:47.360 --> 00:30:51.960
us us I don't have any negative

00:30:50.360 --> 00:30:54.519
sentiment but the people who say it that

00:30:51.960 --> 00:30:55.960
way have negative senent maybe so if we

00:30:54.519 --> 00:31:01.080
wanted to go in and do that we could

00:30:55.960 --> 00:31:01.080
maybe I won't save this but

00:31:01.519 --> 00:31:08.919
uh

00:31:04.240 --> 00:31:11.840
um oh whoops I'll go back and fix it uh

00:31:08.919 --> 00:31:14.840
crass crass is pretty obviously negative

00:31:11.840 --> 00:31:14.840
right so I can add

00:31:17.039 --> 00:31:21.080
crass actually let me just add

00:31:21.760 --> 00:31:29.159
CR and then um I'll go back and have our

00:31:26.559 --> 00:31:29.159
train accurate

00:31:32.159 --> 00:31:36.240
wa maybe maybe I need to run the whole

00:31:33.960 --> 00:31:36.240
thing

00:31:36.960 --> 00:31:39.960
again

00:31:40.960 --> 00:31:45.880
and that budg the training accuracy a

00:31:43.679 --> 00:31:50.360
little um the dev test accuracy not very

00:31:45.880 --> 00:31:53.919
much so I could go through and do this

00:31:50.360 --> 00:31:53.919
um let me add

00:31:54.000 --> 00:31:58.320
unengaging so I could go through and do

00:31:56.000 --> 00:32:01.720
this all day and you probably be very

00:31:58.320 --> 00:32:01.720
bored on

00:32:04.240 --> 00:32:08.360
engage but I won't do that uh because we

00:32:06.919 --> 00:32:10.679
have much more important things to be

00:32:08.360 --> 00:32:14.679
doing

00:32:10.679 --> 00:32:16.440
um and uh so anyway we um we could go

00:32:14.679 --> 00:32:18.919
through and design all the features here

00:32:16.440 --> 00:32:21.279
but like why is this complicated like

00:32:18.919 --> 00:32:22.600
the the reason why it was complicated

00:32:21.279 --> 00:32:25.840
became pretty

00:32:22.600 --> 00:32:27.840
clear from the uh from the very

00:32:25.840 --> 00:32:29.639
beginning uh the very first example I

00:32:27.840 --> 00:32:32.200
showed you which was that was a really

00:32:29.639 --> 00:32:34.720
complicated sentence like all of us

00:32:32.200 --> 00:32:36.240
could see that it wasn't like really

00:32:34.720 --> 00:32:38.679
strongly positive it wasn't really

00:32:36.240 --> 00:32:40.519
strongly negative it was kind of like in

00:32:38.679 --> 00:32:42.919
the middle but it was in the middle and

00:32:40.519 --> 00:32:44.600
it said it in a very long way uh you

00:32:42.919 --> 00:32:46.120
know not using any clearly positive

00:32:44.600 --> 00:32:47.639
sentiment words not using any clearly

00:32:46.120 --> 00:32:49.760
negative sentiment

00:32:47.639 --> 00:32:53.760
words

00:32:49.760 --> 00:32:56.519
um so yeah basically I I

00:32:53.760 --> 00:33:00.559
improved um but what are the difficult

00:32:56.519 --> 00:33:03.720
cases uh that we saw here so the first

00:33:00.559 --> 00:33:07.639
one is low frequency

00:33:03.720 --> 00:33:09.760
words so um here's an example the action

00:33:07.639 --> 00:33:11.519
switches between past and present but

00:33:09.760 --> 00:33:13.120
the material link is too tenuous to

00:33:11.519 --> 00:33:16.840
Anchor the emotional connections at

00:33:13.120 --> 00:33:19.519
purport to span a 125 year divide so

00:33:16.840 --> 00:33:21.080
this is negative um tenuous is kind of a

00:33:19.519 --> 00:33:22.799
negative word purport is kind of a

00:33:21.080 --> 00:33:24.760
negative word but it doesn't appear very

00:33:22.799 --> 00:33:26.159
frequently so I would need to spend all

00:33:24.760 --> 00:33:29.720
my time looking for these words and

00:33:26.159 --> 00:33:32.480
trying to them in um here's yet another

00:33:29.720 --> 00:33:34.240
horse franchise mucking up its storyline

00:33:32.480 --> 00:33:36.639
with glitches casual fans could correct

00:33:34.240 --> 00:33:40.159
in their sleep negative

00:33:36.639 --> 00:33:42.600
again um so the solutions here are keep

00:33:40.159 --> 00:33:46.880
working until we get all of them which

00:33:42.600 --> 00:33:49.159
is maybe not super fun um or incorporate

00:33:46.880 --> 00:33:51.639
external resources such as sentiment

00:33:49.159 --> 00:33:52.880
dictionaries that people created uh we

00:33:51.639 --> 00:33:55.960
could do that but that's a lot of

00:33:52.880 --> 00:33:57.480
engineering effort to make something

00:33:55.960 --> 00:34:00.639
work

00:33:57.480 --> 00:34:03.720
um another one is conjugation so we saw

00:34:00.639 --> 00:34:06.600
unengaging I guess that's an example of

00:34:03.720 --> 00:34:08.359
conjugation uh some other ones are

00:34:06.600 --> 00:34:10.520
operatic sprawling picture that's

00:34:08.359 --> 00:34:12.040
entertainingly acted magnificently shot

00:34:10.520 --> 00:34:15.480
and gripping enough to sustain most of

00:34:12.040 --> 00:34:17.399
its 170 minute length so here we have

00:34:15.480 --> 00:34:19.079
magnificently so even if I added

00:34:17.399 --> 00:34:20.480
magnificent this wouldn't have been

00:34:19.079 --> 00:34:23.800
clocked

00:34:20.480 --> 00:34:26.599
right um it's basically an overlong

00:34:23.800 --> 00:34:28.839
episode of tales from the cryp so that's

00:34:26.599 --> 00:34:31.480
maybe another

00:34:28.839 --> 00:34:33.040
example um so some things that we could

00:34:31.480 --> 00:34:35.320
do or what we would have done before the

00:34:33.040 --> 00:34:37.720
modern Paradigm of machine learning is

00:34:35.320 --> 00:34:40.079
we would run some sort of normalizer

00:34:37.720 --> 00:34:42.800
like a stemmer or other things like this

00:34:40.079 --> 00:34:45.240
in order to convert this into uh the

00:34:42.800 --> 00:34:48.599
root wordss that we already have seen

00:34:45.240 --> 00:34:52.040
somewhere in our data or have already

00:34:48.599 --> 00:34:54.040
handed so that requires um conjugation

00:34:52.040 --> 00:34:55.879
analysis or morphological analysis as we

00:34:54.040 --> 00:34:57.400
say it in

00:34:55.879 --> 00:35:00.680
technicals

00:34:57.400 --> 00:35:03.960
negation this is a tricky one so this

00:35:00.680 --> 00:35:06.760
one's not nearly as Dreadful as expected

00:35:03.960 --> 00:35:08.800
so Dreadful is a pretty bad word right

00:35:06.760 --> 00:35:13.000
but not nearly as Dreadful as expected

00:35:08.800 --> 00:35:14.440
is like a solidly neutral um you know or

00:35:13.000 --> 00:35:16.359
maybe even

00:35:14.440 --> 00:35:18.920
positive I would I would say that's

00:35:16.359 --> 00:35:20.640
neutral but you know uh neutral or

00:35:18.920 --> 00:35:23.800
positive it's definitely not

00:35:20.640 --> 00:35:26.359
negative um serving s doesn't serve up a

00:35:23.800 --> 00:35:29.480
whole lot of laughs so laughs is

00:35:26.359 --> 00:35:31.880
obviously positive but not serving UPS

00:35:29.480 --> 00:35:34.440
is obviously

00:35:31.880 --> 00:35:36.839
negative so if negation modifies the

00:35:34.440 --> 00:35:38.240
word disregard it now we would probably

00:35:36.839 --> 00:35:41.440
need to do some sort of syntactic

00:35:38.240 --> 00:35:45.599
analysis or semantic analysis of

00:35:41.440 --> 00:35:47.520
some metaphor an analogy so puts a human

00:35:45.599 --> 00:35:50.640
face on a land most westerners are

00:35:47.520 --> 00:35:52.880
unfamiliar though uh this is

00:35:50.640 --> 00:35:54.960
positive green might want to hang on to

00:35:52.880 --> 00:35:58.800
that ski mask as robbery may be the only

00:35:54.960 --> 00:35:58.800
way to pay for this next project

00:35:58.839 --> 00:36:03.640
so this this is saying that the movie

00:36:01.960 --> 00:36:05.560
was so bad that the director will have

00:36:03.640 --> 00:36:08.359
to rob people in order to get money for

00:36:05.560 --> 00:36:11.000
the next project so that's kind of bad I

00:36:08.359 --> 00:36:12.880
guess um has all the depth of a waiting

00:36:11.000 --> 00:36:14.520
pool this is kind of my favorite one

00:36:12.880 --> 00:36:15.880
because it's really short and sweet but

00:36:14.520 --> 00:36:18.800
you know you need to know how deep a

00:36:15.880 --> 00:36:21.440
waiting pool is um so that's

00:36:18.800 --> 00:36:22.960
negative so the solution here I don't

00:36:21.440 --> 00:36:24.680
really even know how to handle this with

00:36:22.960 --> 00:36:26.880
a rule based system I have no idea how

00:36:24.680 --> 00:36:30.040
we would possibly do this yeah machine

00:36:26.880 --> 00:36:32.400
learning based models seem to be pretty

00:36:30.040 --> 00:36:37.000
adaptive okay and then I start doing

00:36:32.400 --> 00:36:37.000
these ones um anyone have a good

00:36:38.160 --> 00:36:46.800
idea any any other friends who know

00:36:42.520 --> 00:36:50.040
Japanese no okay um so yeah that's

00:36:46.800 --> 00:36:52.839
positive um that one's negative uh and

00:36:50.040 --> 00:36:54.920
the solution here is learn Japanese I

00:36:52.839 --> 00:36:56.800
guess or whatever other language you

00:36:54.920 --> 00:37:00.040
want to process so like obviously

00:36:56.800 --> 00:37:03.720
rule-based systems don't scale very

00:37:00.040 --> 00:37:05.119
well so um we've moved but like rule

00:37:03.720 --> 00:37:06.319
based systems don't scale very well

00:37:05.119 --> 00:37:08.160
we're not going to be using them for

00:37:06.319 --> 00:37:11.400
most of the things we do in this class

00:37:08.160 --> 00:37:14.240
but I do think it's sometimes useful to

00:37:11.400 --> 00:37:15.640
try to create one for your task maybe

00:37:14.240 --> 00:37:16.680
right at the very beginning of a project

00:37:15.640 --> 00:37:18.560
because it gives you an idea about

00:37:16.680 --> 00:37:21.160
what's really hard about the task in

00:37:18.560 --> 00:37:22.480
some cases so um yeah I wouldn't

00:37:21.160 --> 00:37:25.599
entirely discount them I'm not

00:37:22.480 --> 00:37:27.400
introducing them for no reason

00:37:25.599 --> 00:37:29.880
whatsoever

00:37:27.400 --> 00:37:34.160
so next is machine learning based anal

00:37:29.880 --> 00:37:35.400
and machine learning uh in general uh I

00:37:34.160 --> 00:37:36.640
here actually when I say machine

00:37:35.400 --> 00:37:38.160
learning I'm going to be talking about

00:37:36.640 --> 00:37:39.560
the traditional fine-tuning approach

00:37:38.160 --> 00:37:43.520
where we have a training set Dev set

00:37:39.560 --> 00:37:46.359
test set and so we take our training set

00:37:43.520 --> 00:37:49.680
we run some learning algorithm over it

00:37:46.359 --> 00:37:52.319
we have a learned feature extractor F A

00:37:49.680 --> 00:37:55.839
possibly learned feature extractor F

00:37:52.319 --> 00:37:57.880
possibly learned scoring function W and

00:37:55.839 --> 00:38:00.800
uh then we apply our inference algorithm

00:37:57.880 --> 00:38:02.839
our decision Rule and make decisions

00:38:00.800 --> 00:38:04.200
when I say possibly learned actually the

00:38:02.839 --> 00:38:06.119
first example I'm going to give of a

00:38:04.200 --> 00:38:07.760
machine learning based technique is uh

00:38:06.119 --> 00:38:10.079
doesn't have a learned feature extractor

00:38:07.760 --> 00:38:12.800
but most things that we use nowadays do

00:38:10.079 --> 00:38:12.800
have learned feature

00:38:13.200 --> 00:38:18.040
extractors so our first attempt is going

00:38:15.640 --> 00:38:21.760
to be a bag of words model uh and the

00:38:18.040 --> 00:38:27.119
way a bag of wordss model works is uh

00:38:21.760 --> 00:38:30.160
essentially we start out by looking up a

00:38:27.119 --> 00:38:33.240
Vector where one element in the vector

00:38:30.160 --> 00:38:36.240
is uh is one and all the other elements

00:38:33.240 --> 00:38:38.040
in the vector are zero and so if the

00:38:36.240 --> 00:38:40.319
word is different the position in the

00:38:38.040 --> 00:38:42.839
vector that's one will be different we

00:38:40.319 --> 00:38:46.280
add all of these together and this gives

00:38:42.839 --> 00:38:48.200
us a vector where each element is the

00:38:46.280 --> 00:38:50.359
frequency of that word in the vector and

00:38:48.200 --> 00:38:52.520
then we multiply that by weights and we

00:38:50.359 --> 00:38:55.520
get a

00:38:52.520 --> 00:38:57.160
score and um here as I said this is not

00:38:55.520 --> 00:39:00.359
a learned feature

00:38:57.160 --> 00:39:02.079
uh Vector this is basically uh sorry not

00:39:00.359 --> 00:39:04.359
a learn feature extractor this is

00:39:02.079 --> 00:39:06.200
basically a fixed feature extractor but

00:39:04.359 --> 00:39:09.839
the weights themselves are

00:39:06.200 --> 00:39:11.640
learned um so my my question is I

00:39:09.839 --> 00:39:14.599
mentioned a whole lot of problems before

00:39:11.640 --> 00:39:17.480
I mentioned infrequent words I mentioned

00:39:14.599 --> 00:39:20.760
conjugation I mentioned uh different

00:39:17.480 --> 00:39:22.880
languages I mentioned syntax and

00:39:20.760 --> 00:39:24.599
metaphor so which of these do we think

00:39:22.880 --> 00:39:25.440
would be fixed by this sort of learning

00:39:24.599 --> 00:39:27.400
based

00:39:25.440 --> 00:39:29.640
approach

00:39:27.400 --> 00:39:29.640
any

00:39:29.920 --> 00:39:35.200
ideas maybe not fixed maybe made

00:39:32.520 --> 00:39:35.200
significantly

00:39:36.880 --> 00:39:41.560
better any Brave uh brave

00:39:44.880 --> 00:39:48.440
people maybe maybe

00:39:53.720 --> 00:39:58.400
negation okay so maybe doesn't when it

00:39:55.760 --> 00:39:58.400
have a negative qu

00:40:02.960 --> 00:40:07.560
yeah yeah so for the conjugation if we

00:40:05.520 --> 00:40:09.200
had the conjugations of the stems mapped

00:40:07.560 --> 00:40:11.119
in the same position that might fix a

00:40:09.200 --> 00:40:12.920
conjugation problem but I would say if

00:40:11.119 --> 00:40:15.200
you don't do that then this kind of

00:40:12.920 --> 00:40:18.160
fixes conjugation a little bit but maybe

00:40:15.200 --> 00:40:21.319
not not really yeah kind of fix

00:40:18.160 --> 00:40:24.079
conjugation because like they're using

00:40:21.319 --> 00:40:26.760
the same there

00:40:24.079 --> 00:40:28.400
probably different variations so we

00:40:26.760 --> 00:40:31.359
learn how to

00:40:28.400 --> 00:40:33.400
classify surrounding

00:40:31.359 --> 00:40:35.000
structure yeah if it's a big enough

00:40:33.400 --> 00:40:36.760
training set you might have covered the

00:40:35.000 --> 00:40:37.880
various conjugations but if you haven't

00:40:36.760 --> 00:40:43.000
and you don't have any rule-based

00:40:37.880 --> 00:40:43.000
processing it it might still be problems

00:40:45.400 --> 00:40:50.359
yeah yeah so in frequent words if you

00:40:48.280 --> 00:40:52.560
have a large enough training set yeah

00:40:50.359 --> 00:40:54.599
you'll be able to fix it to some extent

00:40:52.560 --> 00:40:56.480
so none of the problems are entirely

00:40:54.599 --> 00:40:57.880
fixed but a lot of them are made better

00:40:56.480 --> 00:40:58.960
different languages is also made better

00:40:57.880 --> 00:41:00.119
if you have training data in that

00:40:58.960 --> 00:41:04.599
language but if you don't then you're

00:41:00.119 --> 00:41:06.240
out of BL so um so now what I'd like to

00:41:04.599 --> 00:41:10.800
do is I'd look to like to look at what

00:41:06.240 --> 00:41:15.079
our vectors represent so basically um in

00:41:10.800 --> 00:41:16.880
uh in binary classification each word um

00:41:15.079 --> 00:41:19.119
sorry so the vectors themselves

00:41:16.880 --> 00:41:21.880
represent the counts of the words here

00:41:19.119 --> 00:41:25.319
I'm talking about what the weight uh

00:41:21.880 --> 00:41:28.520
vectors or matrices correspond to and

00:41:25.319 --> 00:41:31.640
the weight uh Vector here will be

00:41:28.520 --> 00:41:33.680
positive if the word it tends to be

00:41:31.640 --> 00:41:36.680
positive if in a binary classification

00:41:33.680 --> 00:41:38.400
case in a multiclass classification case

00:41:36.680 --> 00:41:42.480
we'll actually have a matrix that looks

00:41:38.400 --> 00:41:45.480
like this where um each column or row uh

00:41:42.480 --> 00:41:47.079
corresponds to the word and each row or

00:41:45.480 --> 00:41:49.319
column corresponds to a label and it

00:41:47.079 --> 00:41:51.960
will be higher if that row tends to uh

00:41:49.319 --> 00:41:54.800
correlate with that uh that word tends

00:41:51.960 --> 00:41:56.920
to correlate that little

00:41:54.800 --> 00:41:59.240
bit so

00:41:56.920 --> 00:42:04.079
this um training of the bag of words

00:41:59.240 --> 00:42:07.720
model is can be done uh so simply that

00:42:04.079 --> 00:42:10.200
we uh can put it in a single slide so

00:42:07.720 --> 00:42:11.599
basically here uh what we do is we start

00:42:10.200 --> 00:42:14.760
out with the feature

00:42:11.599 --> 00:42:18.880
weights and for each example in our data

00:42:14.760 --> 00:42:20.800
set we extract features um the exact way

00:42:18.880 --> 00:42:23.920
I'm extracting features is basically

00:42:20.800 --> 00:42:25.720
splitting uh splitting the words using

00:42:23.920 --> 00:42:28.000
the python split function and then uh

00:42:25.720 --> 00:42:31.319
Counting number of times each word

00:42:28.000 --> 00:42:33.160
exists uh we then run the classifier so

00:42:31.319 --> 00:42:36.280
actually running the classifier is

00:42:33.160 --> 00:42:38.200
exactly the same as what we did for the

00:42:36.280 --> 00:42:42.640
uh the rule based system it's just that

00:42:38.200 --> 00:42:47.359
we have feature vectors instead and

00:42:42.640 --> 00:42:51.559
then if the predicted value is

00:42:47.359 --> 00:42:55.160
not value then for each of the

00:42:51.559 --> 00:42:56.680
features uh in the feature space we

00:42:55.160 --> 00:43:02.200
upweight

00:42:56.680 --> 00:43:03.599
the um we upweight The Weight by the

00:43:02.200 --> 00:43:06.000
vector

00:43:03.599 --> 00:43:09.920
size by or by the amount of the vector

00:43:06.000 --> 00:43:13.240
if Y is positive and we downweight the

00:43:09.920 --> 00:43:16.240
vector uh by the size of the vector if Y

00:43:13.240 --> 00:43:18.520
is negative so this is really really

00:43:16.240 --> 00:43:20.559
simple it's uh probably the simplest

00:43:18.520 --> 00:43:25.079
possible algorithm for training one of

00:43:20.559 --> 00:43:27.559
these models um but I have an

00:43:25.079 --> 00:43:30.040
example in this that you can also take a

00:43:27.559 --> 00:43:31.960
look at here's a trained bag of words

00:43:30.040 --> 00:43:33.680
classifier and we could step through

00:43:31.960 --> 00:43:34.960
this is on exactly the same data set as

00:43:33.680 --> 00:43:37.240
I did before we're training on the

00:43:34.960 --> 00:43:42.359
training set

00:43:37.240 --> 00:43:43.640
um and uh evaluating on the dev set um I

00:43:42.359 --> 00:43:45.880
also have some extra stuff like I'm

00:43:43.640 --> 00:43:47.079
Shuffling the order of the data IDs

00:43:45.880 --> 00:43:49.440
which is really important if you're

00:43:47.079 --> 00:43:53.160
doing this sort of incremental algorithm

00:43:49.440 --> 00:43:54.960
uh because uh what if what if your

00:43:53.160 --> 00:43:57.400
creating data set was ordered in this

00:43:54.960 --> 00:44:00.040
way where you have all of the positive

00:43:57.400 --> 00:44:00.040
labels on

00:44:00.359 --> 00:44:04.520
top and then you have all of the

00:44:02.280 --> 00:44:06.680
negative labels on the

00:44:04.520 --> 00:44:08.200
bottom if you do something like this it

00:44:06.680 --> 00:44:10.200
would see only negative labels at the

00:44:08.200 --> 00:44:11.800
end of training and you might have

00:44:10.200 --> 00:44:14.400
problems because your model would only

00:44:11.800 --> 00:44:17.440
predict negatives so we also Shuffle

00:44:14.400 --> 00:44:20.319
data um and then step through we run the

00:44:17.440 --> 00:44:22.559
classifier and I'm going to run uh five

00:44:20.319 --> 00:44:23.640
epochs of training through the data set

00:44:22.559 --> 00:44:27.160
uh very

00:44:23.640 --> 00:44:29.599
fast and calculate our accuracy

00:44:27.160 --> 00:44:33.280
and this got 75% accuracy on the

00:44:29.599 --> 00:44:36.160
training data set and uh 56% accuracy on

00:44:33.280 --> 00:44:40.000
the Deb data set so uh if you remember

00:44:36.160 --> 00:44:41.520
our rule-based classifier had 42 uh 42

00:44:40.000 --> 00:44:43.880
accuracy and now our training based

00:44:41.520 --> 00:44:45.760
classifier has 56 accuracy but it's

00:44:43.880 --> 00:44:49.359
overfitting heavily to the training side

00:44:45.760 --> 00:44:50.880
so um basically this is a pretty strong

00:44:49.359 --> 00:44:53.480
advertisement for why we should be using

00:44:50.880 --> 00:44:54.960
machine learning you know I the amount

00:44:53.480 --> 00:44:57.800
of code that we had for this machine

00:44:54.960 --> 00:44:59.720
learning model is basically very similar

00:44:57.800 --> 00:45:02.680
um it's not using any external libraries

00:44:59.720 --> 00:45:02.680
but we're getting better at

00:45:03.599 --> 00:45:08.800
this

00:45:05.800 --> 00:45:08.800
cool

00:45:09.559 --> 00:45:16.000
so cool any any questions

00:45:13.520 --> 00:45:18.240
here and so I'm going to talk about the

00:45:16.000 --> 00:45:20.760
connection to between this algorithm and

00:45:18.240 --> 00:45:22.839
neural networks in the next class um

00:45:20.760 --> 00:45:24.200
because this actually is using a very

00:45:22.839 --> 00:45:26.319
similar training algorithm to what we

00:45:24.200 --> 00:45:27.480
use in neural networks with some uh

00:45:26.319 --> 00:45:30.079
particular

00:45:27.480 --> 00:45:32.839
assumptions cool um so what's missing in

00:45:30.079 --> 00:45:34.800
bag of words um still handling of

00:45:32.839 --> 00:45:36.880
conjugation or compound words is not

00:45:34.800 --> 00:45:39.160
perfect it we can do it to some extent

00:45:36.880 --> 00:45:41.079
to the point where we can uh memorize

00:45:39.160 --> 00:45:44.079
things so I love this movie I love this

00:45:41.079 --> 00:45:46.920
movie another thing is handling word Ser

00:45:44.079 --> 00:45:49.240
uh similarities so I love this movie and

00:45:46.920 --> 00:45:50.720
I adore this movie uh these basically

00:45:49.240 --> 00:45:52.119
mean the same thing as humans we know

00:45:50.720 --> 00:45:54.200
they mean the same thing so we should be

00:45:52.119 --> 00:45:56.079
able to take advantage of that fact to

00:45:54.200 --> 00:45:57.839
learn better models but we're not doing

00:45:56.079 --> 00:46:02.760
that in this model at the moment because

00:45:57.839 --> 00:46:05.440
each unit is uh treated as a atomic unit

00:46:02.760 --> 00:46:08.040
and there's no idea of

00:46:05.440 --> 00:46:11.040
similarity also handling of combination

00:46:08.040 --> 00:46:12.760
features so um I love this movie and I

00:46:11.040 --> 00:46:14.920
don't love this movie I hate this movie

00:46:12.760 --> 00:46:17.079
and I don't hate this movie actually

00:46:14.920 --> 00:46:20.400
this is a little bit tricky because

00:46:17.079 --> 00:46:23.240
negative words are slightly indicative

00:46:20.400 --> 00:46:25.280
of it being negative but actually what

00:46:23.240 --> 00:46:28.119
they do is they negate the other things

00:46:25.280 --> 00:46:28.119
that you're saying in the

00:46:28.240 --> 00:46:36.559
sentence

00:46:30.720 --> 00:46:40.480
so um like love is positive hate is

00:46:36.559 --> 00:46:40.480
negative but like don't

00:46:50.359 --> 00:46:56.079
love it's actually kind of like this

00:46:52.839 --> 00:46:59.359
right like um Love is very positive POS

00:46:56.079 --> 00:47:01.760
hate is very negative but don't love is

00:46:59.359 --> 00:47:04.680
like slightly less positive than don't

00:47:01.760 --> 00:47:06.160
hate right so um It's actually kind of

00:47:04.680 --> 00:47:07.559
tricky because you need to combine them

00:47:06.160 --> 00:47:10.720
together and figure out what's going on

00:47:07.559 --> 00:47:12.280
based on that another example that a lot

00:47:10.720 --> 00:47:14.160
of people might not think of immediately

00:47:12.280 --> 00:47:17.880
but is super super common in sentiment

00:47:14.160 --> 00:47:20.160
analysis or any other thing is butt so

00:47:17.880 --> 00:47:22.599
basically what but does is it throws

00:47:20.160 --> 00:47:24.160
away all the stuff that you said before

00:47:22.599 --> 00:47:26.119
um and you can just pay attention to the

00:47:24.160 --> 00:47:29.000
stuff that you saw beforehand so like we

00:47:26.119 --> 00:47:30.440
could even add this to our um like if

00:47:29.000 --> 00:47:31.760
you want to add this to your rule based

00:47:30.440 --> 00:47:33.240
classifier you can do that you just

00:47:31.760 --> 00:47:34.640
search for butt and delete everything

00:47:33.240 --> 00:47:37.240
before it and see if that inputs your

00:47:34.640 --> 00:47:39.240
accuracy might be might be a fun very

00:47:37.240 --> 00:47:43.480
quick thing

00:47:39.240 --> 00:47:44.880
to cool so the better solution which is

00:47:43.480 --> 00:47:46.800
what we're going to talk about for every

00:47:44.880 --> 00:47:49.480
other class other than uh other than

00:47:46.800 --> 00:47:52.160
this one is neural network models and

00:47:49.480 --> 00:47:55.800
basically uh what they do is they do a

00:47:52.160 --> 00:47:59.400
lookup of uh dense word embeddings so

00:47:55.800 --> 00:48:02.520
instead of looking up uh individual uh

00:47:59.400 --> 00:48:04.640
sparse uh vectors individual one hot

00:48:02.520 --> 00:48:06.920
vectors they look up dense word

00:48:04.640 --> 00:48:09.680
embeddings and then throw them into some

00:48:06.920 --> 00:48:11.880
complicated function to extract features

00:48:09.680 --> 00:48:16.359
and based on the features uh multiply by

00:48:11.880 --> 00:48:18.280
weights and get a score um and if you're

00:48:16.359 --> 00:48:20.359
doing text classification in the

00:48:18.280 --> 00:48:22.520
traditional way this is normally what

00:48:20.359 --> 00:48:23.760
you do um if you're doing text

00:48:22.520 --> 00:48:25.960
classification with something like

00:48:23.760 --> 00:48:27.280
prompting you're still actually doing

00:48:25.960 --> 00:48:29.960
this because you're calculating the

00:48:27.280 --> 00:48:32.960
score of the next word to predict and

00:48:29.960 --> 00:48:34.720
that's done in exactly the same way so

00:48:32.960 --> 00:48:37.760
uh even if you're using a large language

00:48:34.720 --> 00:48:39.359
model like GPT this is still probably

00:48:37.760 --> 00:48:41.800
happening under the hood unless open the

00:48:39.359 --> 00:48:43.400
eye invented something that very

00:48:41.800 --> 00:48:45.559
different in Alien than anything else

00:48:43.400 --> 00:48:48.440
that we know of but I I'm guessing that

00:48:45.559 --> 00:48:48.440
that propably hasn't

00:48:48.480 --> 00:48:52.880
happen um one nice thing about neural

00:48:50.880 --> 00:48:54.480
networks is neural networks

00:48:52.880 --> 00:48:57.559
theoretically are powerful enough to

00:48:54.480 --> 00:49:00.000
solve any task if you make them uh deep

00:48:57.559 --> 00:49:01.160
enough or wide enough uh like if you

00:49:00.000 --> 00:49:04.520
make them wide enough and then if you

00:49:01.160 --> 00:49:06.799
make them deep it also helps further so

00:49:04.520 --> 00:49:08.079
anytime somebody says well you can't

00:49:06.799 --> 00:49:11.119
just solve that problem with neural

00:49:08.079 --> 00:49:13.240
networks you know that they're lying

00:49:11.119 --> 00:49:15.720
basically because they theoretically can

00:49:13.240 --> 00:49:17.359
solve every problem uh but you have you

00:49:15.720 --> 00:49:19.799
have issues of data you have issues of

00:49:17.359 --> 00:49:23.079
other things like that so you know they

00:49:19.799 --> 00:49:23.079
don't just necessarily work

00:49:23.119 --> 00:49:28.040
outs cool um so the final thing I'd like

00:49:26.400 --> 00:49:29.319
to talk about is the road map going

00:49:28.040 --> 00:49:31.319
forward some of the things I'm going to

00:49:29.319 --> 00:49:32.799
cover in the class and some of the

00:49:31.319 --> 00:49:35.200
logistics

00:49:32.799 --> 00:49:36.799
issues so um the first thing I'm going

00:49:35.200 --> 00:49:38.240
to talk about in the class is language

00:49:36.799 --> 00:49:40.559
modeling fun

00:49:38.240 --> 00:49:42.720
fundamentals and uh so this could

00:49:40.559 --> 00:49:44.240
include language models uh that just

00:49:42.720 --> 00:49:46.559
predict the next words it could include

00:49:44.240 --> 00:49:50.559
language models that predict the output

00:49:46.559 --> 00:49:51.599
given the uh the input or the prompt um

00:49:50.559 --> 00:49:54.559
I'm going to be talking about

00:49:51.599 --> 00:49:56.520
representing words uh how how we get

00:49:54.559 --> 00:49:59.319
word representation subword models other

00:49:56.520 --> 00:50:01.440
things like that uh then go kind of

00:49:59.319 --> 00:50:04.200
deeper into language modeling uh how do

00:50:01.440 --> 00:50:07.799
we do it how do we evaluate it other

00:50:04.200 --> 00:50:10.920
things um sequence encoding uh and this

00:50:07.799 --> 00:50:13.240
is going to cover things like uh

00:50:10.920 --> 00:50:16.280
Transformers uh self attention modals

00:50:13.240 --> 00:50:18.559
but also very quickly cnns and rnns

00:50:16.280 --> 00:50:20.880
which are useful in some

00:50:18.559 --> 00:50:22.200
cases um and then we're going to

00:50:20.880 --> 00:50:24.040
specifically go very deep into the

00:50:22.200 --> 00:50:25.960
Transformer architecture and also talk a

00:50:24.040 --> 00:50:27.280
little bit about some of the modern uh

00:50:25.960 --> 00:50:30.240
improvements to the Transformer

00:50:27.280 --> 00:50:31.839
architecture so the Transformer we're

00:50:30.240 --> 00:50:33.839
using nowadays is very different than

00:50:31.839 --> 00:50:36.200
the Transformer that was invented in

00:50:33.839 --> 00:50:37.240
2017 uh so we're going to talk well I

00:50:36.200 --> 00:50:38.760
wouldn't say very different but

00:50:37.240 --> 00:50:41.359
different enough that it's important so

00:50:38.760 --> 00:50:43.280
we're going to talk about some of those

00:50:41.359 --> 00:50:45.079
things second thing I'd like to talk

00:50:43.280 --> 00:50:47.000
about is training and inference methods

00:50:45.079 --> 00:50:48.839
so this includes uh generation

00:50:47.000 --> 00:50:52.119
algorithms uh so we're going to have a

00:50:48.839 --> 00:50:55.520
whole class on how we generate text uh

00:50:52.119 --> 00:50:58.319
in different ways uh prompting how uh we

00:50:55.520 --> 00:50:59.720
can prompt things I hear uh world class

00:50:58.319 --> 00:51:01.799
prompt engineers make a lot of money

00:50:59.720 --> 00:51:05.480
nowadays so uh you'll want to pay

00:51:01.799 --> 00:51:08.760
attention to that one um and instruction

00:51:05.480 --> 00:51:11.520
tuning uh so how do we train models to

00:51:08.760 --> 00:51:13.720
handle a lot of different tasks and

00:51:11.520 --> 00:51:15.839
reinforcement learning so how do we uh

00:51:13.720 --> 00:51:18.520
you know like actually generate outputs

00:51:15.839 --> 00:51:19.839
uh kind of Judge them and then learn

00:51:18.520 --> 00:51:22.599
from

00:51:19.839 --> 00:51:25.880
there also experimental design and

00:51:22.599 --> 00:51:28.079
evaluation so experimental design uh so

00:51:25.880 --> 00:51:30.480
how do we design an experiment well uh

00:51:28.079 --> 00:51:32.000
so that it backs up what we want to be

00:51:30.480 --> 00:51:34.559
uh our conclusions that we want to be

00:51:32.000 --> 00:51:37.000
backing up how do we do human annotation

00:51:34.559 --> 00:51:38.880
of data in a reliable way this is

00:51:37.000 --> 00:51:41.160
getting harder and harder as models get

00:51:38.880 --> 00:51:43.359
better and better because uh getting

00:51:41.160 --> 00:51:45.000
humans who don't care very much about

00:51:43.359 --> 00:51:48.559
The annotation task they might do worse

00:51:45.000 --> 00:51:51.119
than gp4 so um you need to be careful of

00:51:48.559 --> 00:51:52.240
that also debugging and interpretation

00:51:51.119 --> 00:51:53.960
technique so what are some of the

00:51:52.240 --> 00:51:55.160
automatic techniques that you can do to

00:51:53.960 --> 00:51:57.720
quickly figure out what's going wrong

00:51:55.160 --> 00:52:00.040
with your models and improve

00:51:57.720 --> 00:52:01.599
them and uh bias and fairness

00:52:00.040 --> 00:52:04.200
considerations so it's really really

00:52:01.599 --> 00:52:05.799
important nowadays uh that models are

00:52:04.200 --> 00:52:07.880
being deployed to real people in the

00:52:05.799 --> 00:52:09.880
real world and like actually causing

00:52:07.880 --> 00:52:11.760
harm to people in some cases that we

00:52:09.880 --> 00:52:15.160
need to be worried about

00:52:11.760 --> 00:52:17.000
that Advanced Training in architectures

00:52:15.160 --> 00:52:19.280
so we're going to talk about distill

00:52:17.000 --> 00:52:21.400
distillation and quantization how can we

00:52:19.280 --> 00:52:23.520
make small language models uh that

00:52:21.400 --> 00:52:24.880
actually still work well like not large

00:52:23.520 --> 00:52:27.559
you can run them on your phone you can

00:52:24.880 --> 00:52:29.920
run them on your local

00:52:27.559 --> 00:52:31.640
laptop um ensembling and mixtures of

00:52:29.920 --> 00:52:33.480
experts how can we combine together

00:52:31.640 --> 00:52:34.760
multiple models in order to create

00:52:33.480 --> 00:52:35.880
models that are better than the sum of

00:52:34.760 --> 00:52:38.799
their

00:52:35.880 --> 00:52:40.720
parts and um retrieval and retrieval

00:52:38.799 --> 00:52:43.920
augmented

00:52:40.720 --> 00:52:45.480
generation long sequence models uh so

00:52:43.920 --> 00:52:49.920
how do we handle long

00:52:45.480 --> 00:52:52.240
outputs um and uh we're going to talk

00:52:49.920 --> 00:52:55.760
about applications to complex reasoning

00:52:52.240 --> 00:52:57.760
tasks code generation language agents

00:52:55.760 --> 00:52:59.920
and knowledge-based QA and information

00:52:57.760 --> 00:53:04.160
extraction I picked

00:52:59.920 --> 00:53:06.760
these because they seem to be maybe the

00:53:04.160 --> 00:53:09.880
most important at least in research

00:53:06.760 --> 00:53:11.440
nowadays and also they cover uh the

00:53:09.880 --> 00:53:13.640
things that when I talk to people in

00:53:11.440 --> 00:53:15.280
Industry are kind of most interested in

00:53:13.640 --> 00:53:17.559
so hopefully it'll be useful regardless

00:53:15.280 --> 00:53:19.799
of uh whether you plan on doing research

00:53:17.559 --> 00:53:22.839
or or plan on doing industry related

00:53:19.799 --> 00:53:24.160
things uh by by the way the two things

00:53:22.839 --> 00:53:25.920
that when I talk to people in Industry

00:53:24.160 --> 00:53:29.599
they're most interested in are Rag and

00:53:25.920 --> 00:53:31.079
code generation at the moment for now um

00:53:29.599 --> 00:53:32.319
so those are ones that you'll want to

00:53:31.079 --> 00:53:34.680
pay attention

00:53:32.319 --> 00:53:36.599
to and then finally we have a few

00:53:34.680 --> 00:53:40.079
lectures on Linguistics and

00:53:36.599 --> 00:53:42.720
multilinguality um I love Linguistics

00:53:40.079 --> 00:53:44.839
but uh to be honest at the moment most

00:53:42.720 --> 00:53:47.760
of our Cutting Edge models don't

00:53:44.839 --> 00:53:49.240
explicitly use linguistic structure um

00:53:47.760 --> 00:53:50.799
but I still think it's useful to know

00:53:49.240 --> 00:53:52.760
about it especially if you're working on

00:53:50.799 --> 00:53:54.880
multilingual things especially if you're

00:53:52.760 --> 00:53:57.040
interested in very robust generalization

00:53:54.880 --> 00:53:58.920
to new models so we're going to talk a

00:53:57.040 --> 00:54:02.599
little bit about that and also

00:53:58.920 --> 00:54:06.079
multilingual LP I'm going to have

00:54:02.599 --> 00:54:09.119
fure so also if you have any suggestions

00:54:06.079 --> 00:54:11.400
um we have two guest lecture slots still

00:54:09.119 --> 00:54:12.799
open uh that I'm trying to fill so if

00:54:11.400 --> 00:54:15.440
you have any things that you really want

00:54:12.799 --> 00:54:16.440
to hear about um I could either add them

00:54:15.440 --> 00:54:19.319
to the

00:54:16.440 --> 00:54:21.079
existing you know content or I could

00:54:19.319 --> 00:54:23.240
invite a guest lecturer who's working on

00:54:21.079 --> 00:54:24.079
that topic so you know please feel free

00:54:23.240 --> 00:54:26.760
to tell

00:54:24.079 --> 00:54:29.160
me um then the class format and

00:54:26.760 --> 00:54:32.280
structure uh the class

00:54:29.160 --> 00:54:34.000
content my goal is to learn in detail

00:54:32.280 --> 00:54:36.640
about building NLP systems from a

00:54:34.000 --> 00:54:40.520
research perspective so this is a 700

00:54:36.640 --> 00:54:43.599
level course so it's aiming to be for

00:54:40.520 --> 00:54:46.960
people who really want to try new and

00:54:43.599 --> 00:54:49.280
Innovative things in uh kind of natural

00:54:46.960 --> 00:54:51.359
language processing it's not going to

00:54:49.280 --> 00:54:52.760
focus solely on reimplementing things

00:54:51.359 --> 00:54:54.319
that have been done before including in

00:54:52.760 --> 00:54:55.280
the project I'm going to be expecting

00:54:54.319 --> 00:54:58.480
everybody to do something something

00:54:55.280 --> 00:54:59.920
that's kind of new whether it's coming

00:54:58.480 --> 00:55:01.359
up with a new method or applying

00:54:59.920 --> 00:55:03.559
existing methods to a place where they

00:55:01.359 --> 00:55:05.079
haven't been used before or building out

00:55:03.559 --> 00:55:06.640
things for a new language or something

00:55:05.079 --> 00:55:08.359
like that so that's kind of one of the

00:55:06.640 --> 00:55:11.480
major goals of this

00:55:08.359 --> 00:55:13.000
class um learn basic and advanced topics

00:55:11.480 --> 00:55:15.559
in machine learning approaches to NLP

00:55:13.000 --> 00:55:18.359
and language models learn some basic

00:55:15.559 --> 00:55:21.480
linguistic knowledge useful in NLP uh

00:55:18.359 --> 00:55:23.200
see case studies of NLP applications and

00:55:21.480 --> 00:55:25.680
learn how to identify unique problems

00:55:23.200 --> 00:55:29.039
for each um one thing i' like to point

00:55:25.680 --> 00:55:31.160
out is I'm not going to cover every NLP

00:55:29.039 --> 00:55:32.920
application ever because that would be

00:55:31.160 --> 00:55:35.520
absolutely impossible NLP is being used

00:55:32.920 --> 00:55:37.079
in so many different areas nowadays but

00:55:35.520 --> 00:55:38.960
what I want people to pay attention to

00:55:37.079 --> 00:55:41.280
like even if you're not super interested

00:55:38.960 --> 00:55:42.400
in code generation for example what you

00:55:41.280 --> 00:55:44.200
can do is you can look at code

00:55:42.400 --> 00:55:46.160
generation look at how people identify

00:55:44.200 --> 00:55:47.680
problems look at the methods that people

00:55:46.160 --> 00:55:50.880
have proposed to solve those unique

00:55:47.680 --> 00:55:53.039
problems and then kind of map that try

00:55:50.880 --> 00:55:54.799
to do some generalization onto your own

00:55:53.039 --> 00:55:57.799
problems of Interest so uh that's kind

00:55:54.799 --> 00:56:00.280
of the goal of the NLP

00:55:57.799 --> 00:56:02.440
applications finally uh learning how to

00:56:00.280 --> 00:56:05.160
debug when and where NLP systems fail

00:56:02.440 --> 00:56:08.200
and build improvements based on this so

00:56:05.160 --> 00:56:10.200
um ever since I was a graduate student

00:56:08.200 --> 00:56:12.720
this has been like one of the really

00:56:10.200 --> 00:56:15.920
important things that I feel like I've

00:56:12.720 --> 00:56:17.440
done well or done better than some other

00:56:15.920 --> 00:56:19.280
people and I I feel like it's a really

00:56:17.440 --> 00:56:21.119
good way to like even if you're only

00:56:19.280 --> 00:56:22.680
interested in improving accuracy knowing

00:56:21.119 --> 00:56:25.039
why your system's failing still is the

00:56:22.680 --> 00:56:27.599
best way to do that I so I'm going to

00:56:25.039 --> 00:56:30.559
put a lot of emphasis on

00:56:27.599 --> 00:56:32.559
that in terms of the class format um

00:56:30.559 --> 00:56:36.280
before class for some classes there are

00:56:32.559 --> 00:56:37.880
recommended reading uh this can be

00:56:36.280 --> 00:56:39.559
helpful to read I'm never going to

00:56:37.880 --> 00:56:41.119
expect you to definitely have read it

00:56:39.559 --> 00:56:42.480
before the class but I would suggest

00:56:41.119 --> 00:56:45.160
that maybe you'll get more out of the

00:56:42.480 --> 00:56:47.319
class if you do that um during class

00:56:45.160 --> 00:56:48.079
we'll have the lecture um in discussion

00:56:47.319 --> 00:56:50.559
with

00:56:48.079 --> 00:56:52.359
everybody um sometimes we'll have a code

00:56:50.559 --> 00:56:55.839
or data walk

00:56:52.359 --> 00:56:58.760
um actually this is a a little bit old I

00:56:55.839 --> 00:57:01.880
I have this slide we're this year we're

00:56:58.760 --> 00:57:04.160
going to be adding more uh code and data

00:57:01.880 --> 00:57:07.400
walks during office hours and the way it

00:57:04.160 --> 00:57:09.400
will work is one of the Tas we have

00:57:07.400 --> 00:57:11.160
seven Tas who I'm going to introduce

00:57:09.400 --> 00:57:15.000
very soon but one of the Tas will be

00:57:11.160 --> 00:57:16.839
doing this kind of recitation where you

00:57:15.000 --> 00:57:18.200
um where we go over a library so if

00:57:16.839 --> 00:57:19.480
you're not familiar with the library and

00:57:18.200 --> 00:57:21.960
you want to be more familiar with the

00:57:19.480 --> 00:57:23.720
library you can join this and uh then

00:57:21.960 --> 00:57:25.400
we'll be able to do this and this will

00:57:23.720 --> 00:57:28.240
cover things like

00:57:25.400 --> 00:57:31.039
um pie torch and sentence piece uh we're

00:57:28.240 --> 00:57:33.280
going to start out with hugging face um

00:57:31.039 --> 00:57:36.559
inference stuff like

00:57:33.280 --> 00:57:41.520
VM uh debugging software like

00:57:36.559 --> 00:57:41.520
Xeno um what were the other

00:57:41.960 --> 00:57:47.200
ones oh the open AI API and light llm

00:57:45.680 --> 00:57:50.520
other stuff like that so we we have lots

00:57:47.200 --> 00:57:53.599
of them planned we'll uh uh we'll update

00:57:50.520 --> 00:57:54.839
that um and then after class after

00:57:53.599 --> 00:57:58.079
almost every class we'll have a question

00:57:54.839 --> 00:58:00.079
quiz um and the quiz is intended to just

00:57:58.079 --> 00:58:02.000
you know make sure that you uh paid

00:58:00.079 --> 00:58:04.480
attention to the material and are able

00:58:02.000 --> 00:58:07.520
to answer questions about it we will aim

00:58:04.480 --> 00:58:09.559
to release it on the day of the course

00:58:07.520 --> 00:58:11.599
the day of the actual lecture and it

00:58:09.559 --> 00:58:14.559
will be due at the end of the following

00:58:11.599 --> 00:58:15.960
day of the lecture so um it will be

00:58:14.559 --> 00:58:18.920
three questions it probably shouldn't

00:58:15.960 --> 00:58:20.680
take a whole lot of time but um uh yeah

00:58:18.920 --> 00:58:23.400
so we'll H

00:58:20.680 --> 00:58:26.319
that in terms of assignments assignment

00:58:23.400 --> 00:58:28.640
one is going to be build your own llama

00:58:26.319 --> 00:58:30.200
and so what this is going to look like

00:58:28.640 --> 00:58:32.680
is we're going to give you a partial

00:58:30.200 --> 00:58:34.319
implementation of llama which is kind of

00:58:32.680 --> 00:58:37.960
the most popular open source language

00:58:34.319 --> 00:58:40.160
model nowadays and ask you to fill in um

00:58:37.960 --> 00:58:42.839
ask you to fill in the parts we're going

00:58:40.160 --> 00:58:45.920
to train a very small version of llama

00:58:42.839 --> 00:58:47.319
on a small data set and get it to work

00:58:45.920 --> 00:58:48.880
and the reason why it's very small is

00:58:47.319 --> 00:58:50.480
because the smallest actual version of

00:58:48.880 --> 00:58:53.039
llama is 7 billion

00:58:50.480 --> 00:58:55.359
parameters um and that might be a little

00:58:53.039 --> 00:58:58.400
bit difficult to train with

00:58:55.359 --> 00:59:00.680
resources um for assignment two we're

00:58:58.400 --> 00:59:04.559
going to try to do an NLP task from

00:59:00.680 --> 00:59:06.920
scratch and so the way this will work is

00:59:04.559 --> 00:59:08.520
we're going to give you an assignment

00:59:06.920 --> 00:59:10.880
which we're not going to give you an

00:59:08.520 --> 00:59:13.400
actual data set and instead we're going

00:59:10.880 --> 00:59:15.760
to ask you to uh perform data creation

00:59:13.400 --> 00:59:19.359
modeling and evaluation for a specified

00:59:15.760 --> 00:59:20.640
task and so we're going to tell you uh

00:59:19.359 --> 00:59:22.599
what to do but we're not going to tell

00:59:20.640 --> 00:59:26.400
you exactly how to do it but we're going

00:59:22.599 --> 00:59:29.680
to try to give as conrete directions as

00:59:26.400 --> 00:59:32.359
we can um

00:59:29.680 --> 00:59:34.160
yeah will you be given a parameter limit

00:59:32.359 --> 00:59:36.559
on the model so that's a good question

00:59:34.160 --> 00:59:39.119
or like a expense limit or something

00:59:36.559 --> 00:59:40.440
like that um I maybe actually I should

00:59:39.119 --> 00:59:44.240
take a break from the assignments and

00:59:40.440 --> 00:59:46.520
talk about compute so right now um for

00:59:44.240 --> 00:59:49.319
assignment one we're planning on having

00:59:46.520 --> 00:59:51.599
this be able to be done either on a Mac

00:59:49.319 --> 00:59:53.520
laptop with an M1 or M2 processor which

00:59:51.599 --> 00:59:57.079
I think a lot of people have or Google

00:59:53.520 --> 00:59:59.839
collab um so it should be like

00:59:57.079 --> 01:00:02.160
sufficient to use free computational

00:59:59.839 --> 01:00:03.640
resources that you have for number two

01:00:02.160 --> 01:00:06.079
we'll think about that I think that's

01:00:03.640 --> 01:00:08.280
important we do have Google cloud

01:00:06.079 --> 01:00:11.520
credits for $50 for everybody and I'm

01:00:08.280 --> 01:00:13.440
working to get AWS credits for more um

01:00:11.520 --> 01:00:18.160
but the cloud providers nowadays are

01:00:13.440 --> 01:00:19.680
being very stingy so um so it's uh been

01:00:18.160 --> 01:00:22.160
a little bit of a fight to get uh

01:00:19.680 --> 01:00:23.680
credits but I I it is very important so

01:00:22.160 --> 01:00:28.480
I'm going to try to get as as many as we

01:00:23.680 --> 01:00:31.119
can um and so yeah I I think basically

01:00:28.480 --> 01:00:32.280
uh there will be some sort of like limit

01:00:31.119 --> 01:00:34.480
on the amount of things you can

01:00:32.280 --> 01:00:36.240
practically do and so because of that

01:00:34.480 --> 01:00:39.920
I'm hoping that people will rely very

01:00:36.240 --> 01:00:43.359
heavily on pre-trained models um or uh

01:00:39.920 --> 01:00:46.079
yeah pre-trained models

01:00:43.359 --> 01:00:49.599
and yeah so that that's the the short

01:00:46.079 --> 01:00:52.799
story B um the second thing uh the

01:00:49.599 --> 01:00:54.720
assignment three is to do a survey of

01:00:52.799 --> 01:00:57.920
some sort of state-ofthe-art research

01:00:54.720 --> 01:01:00.760
resarch and do a reimplementation of

01:00:57.920 --> 01:01:02.000
this and in doing this again you will

01:01:00.760 --> 01:01:03.440
have to think about something that's

01:01:02.000 --> 01:01:06.359
feasible within computational

01:01:03.440 --> 01:01:08.680
constraints um and so you can discuss

01:01:06.359 --> 01:01:11.839
with your Tas about uh about the best

01:01:08.680 --> 01:01:13.920
way to do this um and then the final

01:01:11.839 --> 01:01:15.400
project is to perform a unique project

01:01:13.920 --> 01:01:17.559
that either improves on the state-of-the

01:01:15.400 --> 01:01:21.000
art with respect to whatever you would

01:01:17.559 --> 01:01:23.440
like to improve with this could be uh

01:01:21.000 --> 01:01:25.280
accuracy for sure this could be

01:01:23.440 --> 01:01:27.760
efficiency

01:01:25.280 --> 01:01:29.599
it could be some sense of

01:01:27.760 --> 01:01:31.520
interpretability but if it's going to be

01:01:29.599 --> 01:01:33.599
something like interpretability you'll

01:01:31.520 --> 01:01:35.440
have to discuss with us what that means

01:01:33.599 --> 01:01:37.240
like how we measure that how we can like

01:01:35.440 --> 01:01:40.839
actually say that you did a good job

01:01:37.240 --> 01:01:42.839
with improving that um another thing

01:01:40.839 --> 01:01:44.680
that you can do is take whatever you

01:01:42.839 --> 01:01:47.280
implemented for assignment 3 and apply

01:01:44.680 --> 01:01:49.039
it to a new task or apply it to a new

01:01:47.280 --> 01:01:50.760
language that has never been examined

01:01:49.039 --> 01:01:53.119
before so these are also acceptable

01:01:50.760 --> 01:01:54.240
final projects but basically the idea is

01:01:53.119 --> 01:01:55.559
for the final project you need to do

01:01:54.240 --> 01:01:57.480
something something new that hasn't been

01:01:55.559 --> 01:01:59.880
done before and create new knowledge

01:01:57.480 --> 01:02:04.520
with the respect

01:01:59.880 --> 01:02:07.640
toy um so for this the instructor is me

01:02:04.520 --> 01:02:09.920
um I'm uh looking forward to you know

01:02:07.640 --> 01:02:13.599
discussing and working with all of you

01:02:09.920 --> 01:02:16.119
um for TAS we have seven Tas uh two of

01:02:13.599 --> 01:02:18.319
them are in transit so they're not here

01:02:16.119 --> 01:02:22.279
today um the other ones uh Tas would you

01:02:18.319 --> 01:02:22.279
mind coming up uh to introduce

01:02:23.359 --> 01:02:26.359
yourself

01:02:28.400 --> 01:02:32.839
so um yeah nhir and akshai couldn't be

01:02:31.599 --> 01:02:34.039
here today because they're traveling

01:02:32.839 --> 01:02:37.119
I'll introduce them later because

01:02:34.039 --> 01:02:37.119
they're coming uh next

01:02:40.359 --> 01:02:46.480
time cool and what I'd like everybody to

01:02:43.000 --> 01:02:48.680
do is say um like you know what your

01:02:46.480 --> 01:02:53.079
name is uh what

01:02:48.680 --> 01:02:55.799
your like maybe what you're interested

01:02:53.079 --> 01:02:57.319
in um and the reason the goal of this is

01:02:55.799 --> 01:02:59.200
number one for everybody to know who you

01:02:57.319 --> 01:03:00.720
are and number two for everybody to know

01:02:59.200 --> 01:03:03.440
who the best person to talk to is if

01:03:00.720 --> 01:03:03.440
they're interested in

01:03:04.200 --> 01:03:09.079
particular hi uh I'm

01:03:07.000 --> 01:03:15.520
Aila second

01:03:09.079 --> 01:03:15.520
year I work on language and social

01:03:16.200 --> 01:03:24.559
and I'm I'm a second this year PhD

01:03:21.160 --> 01:03:26.799
student Grand and Shar with you I search

01:03:24.559 --> 01:03:28.480
is like started in the border of MP and

01:03:26.799 --> 01:03:31.000
computer interaction with a lot of work

01:03:28.480 --> 01:03:32.640
on automating parts of the developer

01:03:31.000 --> 01:03:35.319
experience to make it easier for anyone

01:03:32.640 --> 01:03:35.319
to

01:03:39.090 --> 01:03:42.179
[Music]

01:03:47.520 --> 01:03:53.279
orif

01:03:50.079 --> 01:03:54.680
everyone first

01:03:53.279 --> 01:03:57.119
year

01:03:54.680 --> 01:04:00.119
[Music]

01:03:57.119 --> 01:04:03.559
I don't like updating primar models I

01:04:00.119 --> 01:04:03.559
hope to not update Prim

01:04:14.599 --> 01:04:19.400
modelm yeah thanks a lot everyone and

01:04:17.200 --> 01:04:19.400
yeah

01:04:20.839 --> 01:04:29.400
than and so we will um we'll have people

01:04:25.640 --> 01:04:30.799
uh kind of have office hours uh every ta

01:04:29.400 --> 01:04:32.880
has office hours at a regular time

01:04:30.799 --> 01:04:34.480
during the week uh please feel free to

01:04:32.880 --> 01:04:38.400
come to their office hours or my office

01:04:34.480 --> 01:04:41.960
hours um I think they are visha are they

01:04:38.400 --> 01:04:43.880
posted on the site or okay yeah they

01:04:41.960 --> 01:04:47.240
they either are or will be posted on the

01:04:43.880 --> 01:04:49.720
site very soon um and come by to talk

01:04:47.240 --> 01:04:51.480
about anything uh if there's nobody in

01:04:49.720 --> 01:04:53.079
my office hours I'm happy to talk about

01:04:51.480 --> 01:04:54.599
things that are unrelated but if there's

01:04:53.079 --> 01:04:58.039
lots of people waiting outside or I

01:04:54.599 --> 01:05:00.319
might limit it to uh like um just things

01:04:58.039 --> 01:05:02.480
about the class so cool and we have

01:05:00.319 --> 01:05:04.760
Patza we'll be checking that regularly

01:05:02.480 --> 01:05:06.839
uh striving to get you an answer in 24

01:05:04.760 --> 01:05:12.240
hours on weekdays over weekends we might

01:05:06.839 --> 01:05:16.000
not so um yeah so that's all for today

01:05:12.240 --> 01:05:16.000
are there any questions