File size: 95,188 Bytes
6fa4bc9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 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 |
{
"paper_id": "2020",
"header": {
"generated_with": "S2ORC 1.0.0",
"date_generated": "2023-01-19T01:35:18.072608Z"
},
"title": "EXBERT: A Visual Analysis Tool to Explore Learned Representations in Transformer Models",
"authors": [
{
"first": "Ben",
"middle": [],
"last": "Hoover",
"suffix": "",
"affiliation": {},
"email": "benjamin.hoover@ibm.com"
},
{
"first": "Hendrik",
"middle": [],
"last": "Strobelt",
"suffix": "",
"affiliation": {},
"email": "hendrik.strobelt@ibm.com"
},
{
"first": "Sebastian",
"middle": [],
"last": "Gehrmann",
"suffix": "",
"affiliation": {},
"email": "gehrmann@seas.harvard.edu"
},
{
"first": "Harvard",
"middle": [],
"last": "Seas",
"suffix": "",
"affiliation": {},
"email": ""
}
],
"year": "",
"venue": null,
"identifiers": {},
"abstract": "Large Transformer-based language models can route and reshape complex information via their multi-headed attention mechanism. Although the attention never receives explicit supervision, it can exhibit recognizable patterns following linguistic or positional information. Analyzing the learned representations and attentions is paramount to furthering our understanding of the inner workings of these models. However, analyses have to catch up with the rapid release of new models and the growing diversity of investigation techniques. To support analysis for a wide variety of models, we introduce EXBERT, a tool to help humans conduct flexible, interactive investigations and formulate hypotheses for the model-internal reasoning process. EXBERT provides insights into the meaning of the contextual representations and attention by matching a humanspecified input to similar contexts in large annotated datasets. By aggregating the annotations of the matched contexts, EXBERT can quickly replicate findings from literature and extend them to previously not analyzed models.",
"pdf_parse": {
"paper_id": "2020",
"_pdf_hash": "",
"abstract": [
{
"text": "Large Transformer-based language models can route and reshape complex information via their multi-headed attention mechanism. Although the attention never receives explicit supervision, it can exhibit recognizable patterns following linguistic or positional information. Analyzing the learned representations and attentions is paramount to furthering our understanding of the inner workings of these models. However, analyses have to catch up with the rapid release of new models and the growing diversity of investigation techniques. To support analysis for a wide variety of models, we introduce EXBERT, a tool to help humans conduct flexible, interactive investigations and formulate hypotheses for the model-internal reasoning process. EXBERT provides insights into the meaning of the contextual representations and attention by matching a humanspecified input to similar contexts in large annotated datasets. By aggregating the annotations of the matched contexts, EXBERT can quickly replicate findings from literature and extend them to previously not analyzed models.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Abstract",
"sec_num": null
}
],
"body_text": [
{
"text": "Learned contextualized representations of a neural network can contain meaningful information. Uncovering this information plays a vital role in understanding and interpreting the learned structure of neural networks (Belinkov and Glass, 2019) . One way to identify information is to probe the representations by using them as features in classifiers for linguistic tasks, or by identifying contexts that lead to similar patterns (Tenney et al., 2019b; Conneau et al., 2018; Strobelt et al., 2017) .",
"cite_spans": [
{
"start": 217,
"end": 243,
"text": "(Belinkov and Glass, 2019)",
"ref_id": "BIBREF0"
},
{
"start": 430,
"end": 452,
"text": "(Tenney et al., 2019b;",
"ref_id": "BIBREF21"
},
{
"start": 453,
"end": 474,
"text": "Conneau et al., 2018;",
"ref_id": "BIBREF3"
},
{
"start": 475,
"end": 497,
"text": "Strobelt et al., 2017)",
"ref_id": "BIBREF19"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Introduction",
"sec_num": "1"
},
{
"text": "With Transformers (Vaswani et al., 2017) overtaking recurrent models as the primary architectures for many NLP tasks, analyzing attention has become another common strategy for interpretabil-ity (Raganato and Tiedemann, 2018a; Clark et al., 2019) . These efforts focus on selecting a model, such as BERT (Devlin et al., 2019) , and exploring the Transformer's contextual embeddings and attentions across layers to determine whether and where it learns to represent linguistic features. Previous studies have uncovered specific attention heads that learn particular dependencies (Vig and Belinkov, 2019; Clark et al., 2019) .",
"cite_spans": [
{
"start": 18,
"end": 40,
"text": "(Vaswani et al., 2017)",
"ref_id": "BIBREF22"
},
{
"start": 195,
"end": 226,
"text": "(Raganato and Tiedemann, 2018a;",
"ref_id": "BIBREF15"
},
{
"start": 227,
"end": 246,
"text": "Clark et al., 2019)",
"ref_id": "BIBREF2"
},
{
"start": 304,
"end": 325,
"text": "(Devlin et al., 2019)",
"ref_id": "BIBREF4"
},
{
"start": 578,
"end": 602,
"text": "(Vig and Belinkov, 2019;",
"ref_id": "BIBREF24"
},
{
"start": 603,
"end": 622,
"text": "Clark et al., 2019)",
"ref_id": "BIBREF2"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Introduction",
"sec_num": "1"
},
{
"text": "However, once the standard linguistic probing tasks are exhausted, it is challenging to develop new hypotheses to test. Toward that end, interactive visualizations provide a successful strategy to develop new insights and strategies. Visualization tools can offer concise summaries of useful information and allow interaction with large models. Attention visualizations have thus taken significant steps toward these goals of making explorations fast and interactive for the user (Vig, 2019) . However, interpreting attention patterns without understanding the attended-to embeddings, or relying on attention alone as a faithful explanation, can lead to faulty interpretations (Brunner et al., 2019; Jain and Wallace, 2019; Wiegreffe and Pinter, 2019; Li et al., 2019) .",
"cite_spans": [
{
"start": 480,
"end": 491,
"text": "(Vig, 2019)",
"ref_id": "BIBREF23"
},
{
"start": 677,
"end": 699,
"text": "(Brunner et al., 2019;",
"ref_id": "BIBREF1"
},
{
"start": 700,
"end": 723,
"text": "Jain and Wallace, 2019;",
"ref_id": "BIBREF8"
},
{
"start": 724,
"end": 751,
"text": "Wiegreffe and Pinter, 2019;",
"ref_id": "BIBREF25"
},
{
"start": 752,
"end": 768,
"text": "Li et al., 2019)",
"ref_id": "BIBREF10"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Introduction",
"sec_num": "1"
},
{
"text": "To address this challenge, we developed EXBERT, a tool that combines the advantages of static analyses with a dynamic and intuitive view into both the attentions and internal representations of the underlying model. EXBERT provides these insights for any user-specified model and corpus by probing whether the representations capture meaningful information. We demonstrate that EXBERT can replicate insights from the analysis by Clark et al. (2019) and easily extend it to other models. It is open-source, extensible, and compatible with many current Transformer architectures, both autoregressive and masked language models. EXBERT is available at exbert.net. Figure 1 : An overview of the different components of the tool. Users can enter a sentence in (a) and modify the attention view through selections in (b). Self attention is displayed in (c), with attentions directed as coming from the left column and pointing to the right. The blue matrix on the left shows a head's attention (column) out of a token (row), whereas the right-hand matrix shows attention into each token by each head. The top-k predictions for each token are shown on hover in the gray box. The most similar tokens to the MASKed \"escape\" token in (c) are shown and summarized in (d-g), taken from an annotated corpus (shown: Wizard of Oz). Every token in (d) displays its linguistic metadata on hover. The metadata of the results in (d) are summarized in the histograms (f) and (g) for the matched token (green highlight) and the token of max attention. The colored bars on the histogram correspond to colors in the columns of (e), where the center column summarizes the metadata of the matched token, and the adjacent columns represent the metadata of the words to the left and right of the matched token.",
"cite_spans": [
{
"start": 429,
"end": 448,
"text": "Clark et al. (2019)",
"ref_id": "BIBREF2"
}
],
"ref_spans": [
{
"start": 661,
"end": 669,
"text": "Figure 1",
"ref_id": null
}
],
"eq_spans": [],
"section": "Introduction",
"sec_num": "1"
},
{
"text": "The Transformer architecture, as defined by Vaswani et al. (2017) , relies on multiple sequential applications of self attention layers. Self-attention is the process by which each token within an input sequence Y of length N computes attention weights over all tokens in the input. As part of this process, the inputs are projected into a key, query, and value representation with W k , W q , and W v . The Transformer applies I of these attention heads in parallel, using separate weights. We denote each head with the superscript (i) .",
"cite_spans": [
{
"start": 44,
"end": 65,
"text": "Vaswani et al. (2017)",
"ref_id": "BIBREF22"
},
{
"start": 533,
"end": 536,
"text": "(i)",
"ref_id": null
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Transformer Models",
"sec_num": "2.1"
},
{
"text": "A (i) = softmax (Y W (i) q )(Y W (i) k ) .",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Transformer Models",
"sec_num": "2.1"
},
{
"text": "This computation yields a matrix in R N \u00d7N where the entry A ij represents the attention out of token",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Transformer Models",
"sec_num": "2.1"
},
{
"text": "y i into token y j . 1",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Transformer Models",
"sec_num": "2.1"
},
{
"text": "The representation for each attention head h (i) is then multiplied by the value,",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Transformer Models",
"sec_num": "2.1"
},
{
"text": "h (i) = A (i) (Y W (i) v )",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Transformer Models",
"sec_num": "2.1"
},
{
"text": ". The representations h (1) , . . . , h (I) are concatenated and followed by a linear projection layer. The output of this projection we call the token embedding E (l) , which is used as input to layer l + 1.",
"cite_spans": [
{
"start": 164,
"end": 167,
"text": "(l)",
"ref_id": null
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Transformer Models",
"sec_num": "2.1"
},
{
"text": "The analysis of learned contextual representation in neural networks has been a widely investigated topic in NLP (Belinkov and Glass, 2019) . Before the advent of large pretrained models, analyses focused on models trained for specific tasks like machine translation. Some showed that Transformer models, similar to recurrent models, can effectively encode syntactic properties in their representations (Raganato and Tiedemann, 2018b; Mare\u010dek and Rosa, 2018) . Researchers have developed suites of probing techniques, agnostic to the underlying model, that can capture these properties across many different linguistic tasks (Tenney et al., 2019b; Conneau et al., 2018) . Over the past year, similar tests have primarily been applied to BERT (Devlin et al., 2019) and its derivatives (e.g., . Similar to taskspecific models, Goldberg (2019) found that BERT clearly encodes syntax within some of its attentions. Moreover, Tenney et al. (2019a) demonstrated that linguistic information is very localized within the representations in different layers.",
"cite_spans": [
{
"start": 113,
"end": 139,
"text": "(Belinkov and Glass, 2019)",
"ref_id": "BIBREF0"
},
{
"start": 403,
"end": 434,
"text": "(Raganato and Tiedemann, 2018b;",
"ref_id": "BIBREF16"
},
{
"start": 435,
"end": 458,
"text": "Mare\u010dek and Rosa, 2018)",
"ref_id": "BIBREF12"
},
{
"start": 625,
"end": 647,
"text": "(Tenney et al., 2019b;",
"ref_id": "BIBREF21"
},
{
"start": 648,
"end": 669,
"text": "Conneau et al., 2018)",
"ref_id": "BIBREF3"
},
{
"start": 742,
"end": 763,
"text": "(Devlin et al., 2019)",
"ref_id": "BIBREF4"
},
{
"start": 825,
"end": 840,
"text": "Goldberg (2019)",
"ref_id": "BIBREF6"
},
{
"start": 921,
"end": 942,
"text": "Tenney et al. (2019a)",
"ref_id": "BIBREF20"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Transformer Analysis",
"sec_num": "2.2"
},
{
"text": "In parallel, individual attention heads of Transformer models have also received much focus. Clark et al. (2019) showed that individual heads recognize standard Part of Speech (POS) and Dependency (DEP) relationships (e.g., Objects of the Preposition (POBJ) and Determinants (DET)) with high fidelity. Vig and Belinkov (2019) also explored the dependency relations across heads and discovered that initial layers typically encode positional relations, middle layers capture the most dependency relations, and later layers look for unique patterns and structures. These insights are exposed interactively through EXBERT.",
"cite_spans": [
{
"start": 93,
"end": 112,
"text": "Clark et al. (2019)",
"ref_id": "BIBREF2"
},
{
"start": 302,
"end": 325,
"text": "Vig and Belinkov (2019)",
"ref_id": "BIBREF24"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Transformer Analysis",
"sec_num": "2.2"
},
{
"text": "EXBERT focuses on displaying a succinct view of both the attention and the internal representations of each token. Figure 1 shows an overview of the tool's two main components. The Attention View provides an interactive view of the self-attention of the model, where users can change layers, select heads, and view the aggregated attention. The Corpus View presents a user with aggregate statistics that aim to describe and summarize the hidden representations of a currently selected token or set of attention heads. For simplicity, the tool defaults to focus on single-sentence examples.",
"cite_spans": [],
"ref_spans": [
{
"start": 115,
"end": 123,
"text": "Figure 1",
"ref_id": null
}
],
"eq_spans": [],
"section": "Overview",
"sec_num": "3"
},
{
"text": "The attention A can be understood as an adjacency matrix, which is conducive to a representation of curves pointing from each token to every other token. However, since A is not symmetric, a visualization has to separate the outgoing and incoming attention of a token. We achieve this by duplicating the tokens of input Y and presenting it in two vertical sections, connected through the attention.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Attention View",
"sec_num": "3.1"
},
{
"text": "Hovering over a token will reduce the displayed attention graph to the incoming/outgoing attention of that token. We display the top predictions of the model at that position. Clicking on a token freezes the filtered attention view.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Attention View",
"sec_num": "3.1"
},
{
"text": "Many models introduce special tokens (e.g., \"[CLS]\", \"<|endoftext|>\") for downstream classification or generation tasks. These tokens often receive very high attention and act as a null operation (Clark et al., 2019) . We provide a switch to hide the special tokens of the model and renormalize based on the other attentions to provide easier visualization of subtle attention patterns.",
"cite_spans": [
{
"start": 196,
"end": 216,
"text": "(Clark et al., 2019)",
"ref_id": "BIBREF2"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Attention View",
"sec_num": "3.1"
},
{
"text": "Representations, on the other hand, cannot be easily visualized footnoteSee Strobelt et al. 2017for a discussion why heat-maps are not an appropriate visualization of hidden states. but they can be understood by searching for similar representations in an annotated corpus. The results of this search are presented in the Corpus View with the highestsimilarity matches shown first. The histograms display the accumulated features of the matched representations and the token that receives the most attention.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Corpus View",
"sec_num": "3.2"
},
{
"text": "Searching Inspired by Strobelt et al. (2017 Strobelt et al. ( , 2018 , EXBERT performs a nearest neighbor search of embeddings on a reference corpus as follows. A corpus is first split by sentence and its tokens labeled for desired metadata (e.g., POS, DEP, NER). The model then processes this corpus, and its embeddings E (l) are stored at every layer l and indexed for a Cosine Similarity (CS) search using faiss (Johnson et al., 2019) . The top 50 most similar tokens matching a query embedding are displayed and summarized for the user in the context of their use in the annotated corpus.",
"cite_spans": [
{
"start": 22,
"end": 43,
"text": "Strobelt et al. (2017",
"ref_id": "BIBREF19"
},
{
"start": 44,
"end": 68,
"text": "Strobelt et al. ( , 2018",
"ref_id": "BIBREF18"
},
{
"start": 415,
"end": 437,
"text": "(Johnson et al., 2019)",
"ref_id": "BIBREF9"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Corpus View",
"sec_num": "3.2"
},
{
"text": "To supplement the layer embeddings E (l) and enable exploration of the attention heads, we derive a Context Embedding C (l) , which we define as the concatenation of heads before the linear projection at the layer's output. Formally, this is defined as:",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Corpus View",
"sec_num": "3.2"
},
{
"text": "C (l) = Concat( h (l,1) , . . . , h (l,n) ), where h (l,i)",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Corpus View",
"sec_num": "3.2"
},
{
"text": "is defined as the L2 normalized representation of head i at layer l to enable CS searching by head. To search the corpus for any subset of heads H s \u2286 {1, . . . , n}, we set all values of h (l,i) to 0 in C l , where i / \u2208 H s .",
"cite_spans": [
{
"start": 190,
"end": 195,
"text": "(l,i)",
"ref_id": null
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Corpus View",
"sec_num": "3.2"
},
{
"text": "Bidirectional vs. Autoregressive Behavior EXBERT is flexible to accommodate both bidirectional and autoregressive Transformer architectures, but the tool behaves slightly differently for each. Bidirectional models have histogram summaries for the nearest neighbor matches across the corpus and allow interactive MASKing of tokens. When hovering over any token, the interface will show what the language model would predict at that token.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Corpus View",
"sec_num": "3.2"
},
{
"text": "Autoregressive models will also search for the nearest neighbors to a selected token's embedding, but the interface will instead summarize the metadata of the following token (indicated in red font). Hovering over any token in the Attention View will display what the model would predict next.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Corpus View",
"sec_num": "3.2"
},
{
"text": "EXBERT runs Huggingface's unified API for Transformer models which allows any Transformer model from that API to take full advantage of the Attention View.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Extending EXBERT",
"sec_num": "3.3"
},
{
"text": "Similarity searching requires the user to first annotate a corpus with the desired model. Scripts to aid annotation of a corpus from a custom model is provided in the code repository. 2 To display metadata from a corpus in a custom domain, users will need to align the transformer model's tokenization scheme to extracted metadata (e.g., DNA Sequences and their properties). EXBERT accomplishes this by first tokenizing, normalizing, and labeling the sentence with spaCy (Honnibal and Montani, 2017) . If these tokens are split further by the Transformer's tokenization scheme, each word-piece receives the metadata of its parent token. Note that special tokens like \"[CLS]\" and \"<|endoftext|>\" have no linguistic features assigned to them. Clark et al. (2019) performed an extensive analysis to determine which heads in a base sized BERT Transformer model learned which dependencies. We show here how some of their insights are easily accessible through the EXBERT interface (Devlin et al., 2019) for the case-sensitive BERT-base model, which has 12 layers and 12 heads per layer. We use the notation <layer>-<head> to refer to a single head at a single layer, and <layer>-[<heads>] to describe the cumulative attention of heads at a layer (e.g., 4-[1,3,9] to describe the aggregated attention of heads 1, 3, and 9 at layer 4). Figure 2 shows examples where distinct heads learn evident linguistic features. Figure 2a shows that the MASKed verb \"escape\" points to the auxiliary verb (AUX) \"to\". If we search over the annotated Wizard of Oz 3 , we see that the tokens matching the MASK's most similar contexts at Head 5-3 are verbs and that the attention out of these matched words goes primarily to an AUX dependency. Figure 2b shows that Head 7-5 finds relationships between prepositions (PREP) and their objects (POBJ) in the input sentence. By searching for the token \"in\" across a subset of the \"Wikipedia\" corpus (Merity et al., 2016) , we confirm that many Figure 3 : A progression of the information encoded by a nearest neighbor embedding (left) and context (right) searches for the MASKed token \"escape\" in Figure 2a and the sentence, \"The girl ran to a local pub to escape the din of her city.\" Note that heads encode verb information (dark green) significantly earlier than the embeddings.",
"cite_spans": [
{
"start": 184,
"end": 185,
"text": "2",
"ref_id": null
},
{
"start": 471,
"end": 499,
"text": "(Honnibal and Montani, 2017)",
"ref_id": null
},
{
"start": 741,
"end": 760,
"text": "Clark et al. (2019)",
"ref_id": "BIBREF2"
},
{
"start": 976,
"end": 997,
"text": "(Devlin et al., 2019)",
"ref_id": "BIBREF4"
},
{
"start": 1919,
"end": 1940,
"text": "(Merity et al., 2016)",
"ref_id": "BIBREF13"
}
],
"ref_spans": [
{
"start": 1329,
"end": 1337,
"text": "Figure 2",
"ref_id": "FIGREF0"
},
{
"start": 1409,
"end": 1418,
"text": "Figure 2a",
"ref_id": "FIGREF0"
},
{
"start": 1719,
"end": 1728,
"text": "Figure 2b",
"ref_id": "FIGREF0"
},
{
"start": 1964,
"end": 1972,
"text": "Figure 3",
"ref_id": null
},
{
"start": 2117,
"end": 2126,
"text": "Figure 2a",
"ref_id": "FIGREF0"
}
],
"eq_spans": [],
"section": "Extending EXBERT",
"sec_num": "3.3"
},
{
"text": "other annotated sentences exhibit this pattern. Figure 2c seemingly finds a head that determines co-reference to entity relationships, as both \"she\" and \"her\" are pointing strongly at \"Kim\" and little to everything else. Because the parse tree is absent in the annotated corpus, we are unable to search for co-reference patterns. However, the corpus search does reveal that this head learns to match pronouns to Entities rather than common gendered words such as \"woman\" or \"mother\".",
"cite_spans": [],
"ref_spans": [
{
"start": 48,
"end": 57,
"text": "Figure 2c",
"ref_id": "FIGREF0"
}
],
"eq_spans": [],
"section": "Behind the Heads",
"sec_num": "4.1"
},
{
"text": "Earlier layers of a BERT model can capture particular linguistic information (Clark et al., 2019; Vig and Belinkov, 2019) . We now explore this behavior for a MASKed token across layers. We look at the following sentence, also shown in Figure 2a :",
"cite_spans": [
{
"start": 77,
"end": 97,
"text": "(Clark et al., 2019;",
"ref_id": "BIBREF2"
},
{
"start": 98,
"end": 121,
"text": "Vig and Belinkov, 2019)",
"ref_id": "BIBREF24"
}
],
"ref_spans": [
{
"start": 236,
"end": 245,
"text": "Figure 2a",
"ref_id": "FIGREF0"
}
],
"eq_spans": [],
"section": "Behind the Mask",
"sec_num": "4.2"
},
{
"text": "The girl ran to a local pub to escape the din of her city.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Behind the Mask",
"sec_num": "4.2"
},
{
"text": "We begin by masking the \"escape\" token in the example sentence at layer 1 and search what information is behind the \"[MASK]\" token's embedding (Figure 1 ). Note that at this early layer, there is no meaningful linguistic information encoded in a MASK token's embedding, and the matching embeddings are most similar to punctuation (PUNCT) and determinants (DET), which are the most common tokens in English (Figure 1f) . Additionally, the maximum attention out of the MASKed token points to itself (Figure 1c) .",
"cite_spans": [],
"ref_spans": [
{
"start": 143,
"end": 152,
"text": "(Figure 1",
"ref_id": null
},
{
"start": 406,
"end": 417,
"text": "(Figure 1f)",
"ref_id": null
},
{
"start": 497,
"end": 508,
"text": "(Figure 1c)",
"ref_id": null
}
],
"eq_spans": [],
"section": "Behind the Mask",
"sec_num": "4.2"
},
{
"text": "As layers progress, more VERB information is encoded in the token's embedding, as shown in Figure 3 . At layer 6, the model does not relate the MASKed word to verbs, but by layer 9 it is convinced that the MASK should be a verb. Note that accumulated head information confidently captured a \"verb\" pattern in a significantly earlier layer.",
"cite_spans": [],
"ref_spans": [
{
"start": 91,
"end": 99,
"text": "Figure 3",
"ref_id": null
}
],
"eq_spans": [],
"section": "Behind the Mask",
"sec_num": "4.2"
},
{
"text": "5 Case Study: GPT-2",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Behind the Mask",
"sec_num": "4.2"
},
{
"text": "We now use EXBERT to explore the problem of gender bias and co-reference in autoregressive Transformers (Zhao et al., 2018) , a problem inherent in the training data that infects the model's understanding of language (Font and Costa-juss\u00e0, 2019) . Take the following sentence:",
"cite_spans": [
{
"start": 104,
"end": 123,
"text": "(Zhao et al., 2018)",
"ref_id": "BIBREF27"
},
{
"start": 217,
"end": 245,
"text": "(Font and Costa-juss\u00e0, 2019)",
"ref_id": "BIBREF5"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Gender Bias",
"sec_num": "5.1"
},
{
"text": "The man visited the nurse and told him to attend to his patients.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Gender Bias",
"sec_num": "5.1"
},
{
"text": "We aim to detect whether the model thinks \"nurse\" is male or female before it sees the masculine pronoun \"him\" referring to \"nurse\". Because GPT-2 is trained to predict the next word, we can do this by selecting the token \"told\" and hovering over it to see the prediction of that pronoun. These results are shown in Figure 4a , and from the probabilities, we can see that GPT-2 predicts \"her\" with 90% probability. The next closest token \"him\" is only 6%. Figure 4b shows that replacing \"nurse\" with \"doctor\" alters the prediction to be strongly in favor of predicting \"him\" at 68% probability, while \"her\" falls to 18%. The attention patterns in the final three layers remain ostensibly the same for both sentences.",
"cite_spans": [],
"ref_spans": [
{
"start": 316,
"end": 325,
"text": "Figure 4a",
"ref_id": null
},
{
"start": 456,
"end": 465,
"text": "Figure 4b",
"ref_id": null
}
],
"eq_spans": [],
"section": "Gender Bias",
"sec_num": "5.1"
},
{
"text": "In contrast to BERT, GPT-2 is an autoregressive language model. This makes it more difficult to detect some dependencies by looking at attention patterns (e.g., PREP looking for its POBJ in the future). However, EXBERT can offer similar insights as above using slightly altered methods. The following experiments use the smaller configuration of GPT-2 with 12 layers and 12 heads (Radford et al., 2019) .",
"cite_spans": [
{
"start": 380,
"end": 402,
"text": "(Radford et al., 2019)",
"ref_id": "BIBREF14"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Heads up",
"sec_num": "5.2"
},
{
"text": "Exploring the heads in GPT-2 reveals that GPT- Figure 4 : Highlights the bias of the GPT-2 model for generation. (a) \"nurse\" prompts the model to predict \"her\". (b) shows \"doctor\" causing the model to predict \"him\" 2's heads also learn distinct syntactic structure. Figure 5a shows a few heads at different layers that seemingly learn the AUX dependency. Heads at earlier layers show an affinity for the AUX pattern, but also confuse \"to\" with a preposition even though a verb directly follows. This behavior hints that these heads look primarily to match the word \"to\" rather than its contextual meaning.",
"cite_spans": [],
"ref_spans": [
{
"start": 47,
"end": 55,
"text": "Figure 4",
"ref_id": null
},
{
"start": 266,
"end": 275,
"text": "Figure 5a",
"ref_id": "FIGREF1"
}
],
"eq_spans": [],
"section": "Heads up",
"sec_num": "5.2"
},
{
"text": "Similarly, Figure 5b shows a head that attends predominantly to a preceding verb and matches contexts in which the following word is a DOBJ. Interestingly, the more complex DOBJ dependency is picked up by a head as early as layer 5-12, whereas a simpler dependency like the AUX pattern is only clearly detected later in Layer 8.",
"cite_spans": [],
"ref_spans": [
{
"start": 11,
"end": 20,
"text": "Figure 5b",
"ref_id": "FIGREF1"
}
],
"eq_spans": [],
"section": "Heads up",
"sec_num": "5.2"
},
{
"text": "In this paper, we introduced an interactive visualization tool, EXBERT, that can reveal an intelligible structure in the learned representations of Transformer models. We demonstrated, through an attention visualization and nearest neighbor searching techniques, that EXBERT can replicate research that explores what attentions and representations learn and detect biases in text inputs.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Discussion",
"sec_num": "6"
},
{
"text": "We acknowledge that EXBERT is limited compared to more global analyses since it only presents statistics across a small number of neighbors for a single token at a time. These neighbors do not necessarily reveal a head's or an embedding's global behavior. However, EXBERT can effectively narrow the scope and refine hypotheses through quick testing iterations. These hypotheses about the model behavior can, in a later step, be evaluated by robust statistical tests on a global level.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Discussion",
"sec_num": "6"
},
{
"text": "To assist researchers with their model investigations, we host a demo of the tool with multiple models at exbert.net.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Discussion",
"sec_num": "6"
},
{
"text": "For autoregressive models like GPT-2(Radford et al., 2019), this matrix is triangular since attention cannot point toward unseen tokens.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "",
"sec_num": null
},
{
"text": "https://github.com/bhoov/exbert.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "",
"sec_num": null
},
{
"text": "http://www.gutenberg.org/ebooks/55",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "",
"sec_num": null
}
],
"back_matter": [
{
"text": "We allow direct linking to an experimental setup in the interface. A list of the links to reproduce our results is given below (all links in the supplementary material are correct at the time of publishing, but may be changed in the distant future):\u2022 Overview (Figure 1 ",
"cite_spans": [],
"ref_spans": [
{
"start": 260,
"end": 269,
"text": "(Figure 1",
"ref_id": null
}
],
"eq_spans": [],
"section": "A Recreating the experiments",
"sec_num": null
},
{
"text": "In addition to the content presented in the main paper, we have recorded a short video demo showing how to use the tool to probe for particular patterns at https://youtu.be/e31oyfo_thY.A Lite version of the tool, without the corpus searching, demoing many common Transformer models is hosted by Huggingface at huggingface. co/exbert. Figure 6 : The most similar embeddings, in context, to the MASKed token \"escape\" in the sentence: \"The girl ran to a local pub to escape the din of her city\" at the output of layer 12 of BERT base (shown in Figure 2a ). Corpus results are annotated excerpts from the Wizard of Oz. Notice how at the output layer all attentions are primarily to the word itself or the final punctuation mark of the sentence, indicating that the most important information is likely already encoded in the selected token's embedding.",
"cite_spans": [],
"ref_spans": [
{
"start": 334,
"end": 342,
"text": "Figure 6",
"ref_id": null
},
{
"start": 541,
"end": 550,
"text": "Figure 2a",
"ref_id": null
}
],
"eq_spans": [],
"section": "B Additional Material",
"sec_num": null
}
],
"bib_entries": {
"BIBREF0": {
"ref_id": "b0",
"title": "Analysis methods in neural language processing: A survey",
"authors": [
{
"first": "Yonatan",
"middle": [],
"last": "Belinkov",
"suffix": ""
},
{
"first": "James",
"middle": [],
"last": "Glass",
"suffix": ""
}
],
"year": 2019,
"venue": "Transactions of the Association for Computational Linguistics",
"volume": "7",
"issue": "",
"pages": "49--72",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Yonatan Belinkov and James Glass. 2019. Analysis methods in neural language processing: A survey. Transactions of the Association for Computational Linguistics, 7:49-72.",
"links": null
},
"BIBREF1": {
"ref_id": "b1",
"title": "On the validity of self-attention as explanation in transformer models",
"authors": [
{
"first": "Gino",
"middle": [],
"last": "Brunner",
"suffix": ""
},
{
"first": "Yang",
"middle": [],
"last": "Liu",
"suffix": ""
},
{
"first": "Dami\u00e3\u0105n",
"middle": [],
"last": "Pascual",
"suffix": ""
},
{
"first": "Oliver",
"middle": [],
"last": "Richter",
"suffix": ""
},
{
"first": "Roger",
"middle": [],
"last": "Wattenhofer",
"suffix": ""
}
],
"year": 2019,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Gino Brunner, Yang Liu, Dami\u00c3\u0105n Pascual, Oliver Richter, and Roger Wattenhofer. 2019. On the va- lidity of self-attention as explanation in transformer models.",
"links": null
},
"BIBREF2": {
"ref_id": "b2",
"title": "What does BERT look at? an analysis of bert's attention. CoRR",
"authors": [
{
"first": "Kevin",
"middle": [],
"last": "Clark",
"suffix": ""
},
{
"first": "Urvashi",
"middle": [],
"last": "Khandelwal",
"suffix": ""
},
{
"first": "Omer",
"middle": [],
"last": "Levy",
"suffix": ""
},
{
"first": "Christopher",
"middle": [
"D"
],
"last": "Manning",
"suffix": ""
}
],
"year": 2019,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Kevin Clark, Urvashi Khandelwal, Omer Levy, and Christopher D. Manning. 2019. What does BERT look at? an analysis of bert's attention. CoRR, abs/1906.04341.",
"links": null
},
"BIBREF3": {
"ref_id": "b3",
"title": "What you can cram into a single vector: Probing sentence embeddings for linguistic properties",
"authors": [
{
"first": "Alexis",
"middle": [],
"last": "Conneau",
"suffix": ""
},
{
"first": "Germ\u00e1n",
"middle": [],
"last": "Kruszewski",
"suffix": ""
},
{
"first": "Guillaume",
"middle": [],
"last": "Lample",
"suffix": ""
},
{
"first": "Lo\u00efc",
"middle": [],
"last": "Barrault",
"suffix": ""
},
{
"first": "Marco",
"middle": [],
"last": "Baroni",
"suffix": ""
}
],
"year": 2018,
"venue": "Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics",
"volume": "1",
"issue": "",
"pages": "2126--2136",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Alexis Conneau, Germ\u00e1n Kruszewski, Guillaume Lam- ple, Lo\u00efc Barrault, and Marco Baroni. 2018. What you can cram into a single vector: Probing sentence embeddings for linguistic properties. In Proceed- ings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Pa- pers), pages 2126-2136.",
"links": null
},
"BIBREF4": {
"ref_id": "b4",
"title": "Bert: Pre-training of deep bidirectional transformers for language understanding",
"authors": [
{
"first": "Jacob",
"middle": [],
"last": "Devlin",
"suffix": ""
},
{
"first": "Ming-Wei",
"middle": [],
"last": "Chang",
"suffix": ""
},
{
"first": "Kenton",
"middle": [],
"last": "Lee",
"suffix": ""
},
{
"first": "Kristina",
"middle": [],
"last": "Toutanova",
"suffix": ""
}
],
"year": 2019,
"venue": "Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies",
"volume": "1",
"issue": "",
"pages": "4171--4186",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. Bert: Pre-training of deep bidirectional transformers for language under- standing. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Tech- nologies, Volume 1 (Long and Short Papers), pages 4171-4186.",
"links": null
},
"BIBREF5": {
"ref_id": "b5",
"title": "Equalizing gender biases in neural machine translation with word embeddings techniques",
"authors": [
{
"first": "Joel",
"middle": [
"Escud\u00e9"
],
"last": "Font",
"suffix": ""
},
{
"first": "Marta",
"middle": [
"R"
],
"last": "Costa-Juss\u00e0",
"suffix": ""
}
],
"year": 2019,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Joel Escud\u00e9 Font and Marta R. Costa-juss\u00e0. 2019. Equalizing gender biases in neural machine trans- lation with word embeddings techniques. CoRR, abs/1901.03116.",
"links": null
},
"BIBREF6": {
"ref_id": "b6",
"title": "Assessing bert's syntactic abilities",
"authors": [
{
"first": "Yoav",
"middle": [],
"last": "Goldberg",
"suffix": ""
}
],
"year": 2019,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {
"arXiv": [
"arXiv:1901.05287"
]
},
"num": null,
"urls": [],
"raw_text": "Yoav Goldberg. 2019. Assessing bert's syntactic abili- ties. arXiv preprint arXiv:1901.05287.",
"links": null
},
"BIBREF7": {
"ref_id": "b7",
"title": "2017. spaCy 2: Natural language understanding with Bloom embeddings, convolutional neural networks and incremental parsing",
"authors": [
{
"first": "Matthew",
"middle": [],
"last": "Honnibal",
"suffix": ""
},
{
"first": "Ines",
"middle": [],
"last": "Montani",
"suffix": ""
}
],
"year": null,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Matthew Honnibal and Ines Montani. 2017. spaCy 2: Natural language understanding with Bloom embed- dings, convolutional neural networks and incremen- tal parsing. To appear.",
"links": null
},
"BIBREF8": {
"ref_id": "b8",
"title": "Attention is not explanation",
"authors": [
{
"first": "Sarthak",
"middle": [],
"last": "Jain",
"suffix": ""
},
{
"first": "C",
"middle": [],
"last": "Byron",
"suffix": ""
},
{
"first": "",
"middle": [],
"last": "Wallace",
"suffix": ""
}
],
"year": 2019,
"venue": "Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies",
"volume": "1",
"issue": "",
"pages": "3543--3556",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Sarthak Jain and Byron C Wallace. 2019. Attention is not explanation. In Proceedings of the 2019 Con- ference of the North American Chapter of the Asso- ciation for Computational Linguistics: Human Lan- guage Technologies, Volume 1 (Long and Short Pa- pers), pages 3543-3556.",
"links": null
},
"BIBREF9": {
"ref_id": "b9",
"title": "Billion-scale similarity search with gpus",
"authors": [
{
"first": "Jeff",
"middle": [],
"last": "Johnson",
"suffix": ""
},
{
"first": "Matthijs",
"middle": [],
"last": "Douze",
"suffix": ""
},
{
"first": "Herv\u00e9",
"middle": [],
"last": "J\u00e9gou",
"suffix": ""
}
],
"year": 2019,
"venue": "IEEE Transactions on Big Data",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Jeff Johnson, Matthijs Douze, and Herv\u00e9 J\u00e9gou. 2019. Billion-scale similarity search with gpus. IEEE Transactions on Big Data.",
"links": null
},
"BIBREF10": {
"ref_id": "b10",
"title": "On the word alignment from neural machine translation",
"authors": [
{
"first": "Xintong",
"middle": [],
"last": "Li",
"suffix": ""
},
{
"first": "Guanlin",
"middle": [],
"last": "Li",
"suffix": ""
},
{
"first": "Lemao",
"middle": [],
"last": "Liu",
"suffix": ""
},
{
"first": "Max",
"middle": [],
"last": "Meng",
"suffix": ""
},
{
"first": "Shuming",
"middle": [],
"last": "Shi",
"suffix": ""
}
],
"year": 2019,
"venue": "Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics",
"volume": "",
"issue": "",
"pages": "1293--1303",
"other_ids": {
"DOI": [
"10.18653/v1/P19-1124"
]
},
"num": null,
"urls": [],
"raw_text": "Xintong Li, Guanlin Li, Lemao Liu, Max Meng, and Shuming Shi. 2019. On the word alignment from neural machine translation. In Proceedings of the 57th Annual Meeting of the Association for Com- putational Linguistics, pages 1293-1303, Florence, Italy. Association for Computational Linguistics.",
"links": null
},
"BIBREF11": {
"ref_id": "b11",
"title": "Roberta: A robustly optimized bert pretraining approach",
"authors": [
{
"first": "Yinhan",
"middle": [],
"last": "Liu",
"suffix": ""
},
{
"first": "Myle",
"middle": [],
"last": "Ott",
"suffix": ""
},
{
"first": "Naman",
"middle": [],
"last": "Goyal",
"suffix": ""
},
{
"first": "Jingfei",
"middle": [],
"last": "Du",
"suffix": ""
},
{
"first": "Mandar",
"middle": [],
"last": "Joshi",
"suffix": ""
},
{
"first": "Danqi",
"middle": [],
"last": "Chen",
"suffix": ""
},
{
"first": "Omer",
"middle": [],
"last": "Levy",
"suffix": ""
},
{
"first": "Mike",
"middle": [],
"last": "Lewis",
"suffix": ""
},
{
"first": "Luke",
"middle": [],
"last": "Zettlemoyer",
"suffix": ""
},
{
"first": "Veselin",
"middle": [],
"last": "Stoyanov",
"suffix": ""
}
],
"year": 2019,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {
"arXiv": [
"arXiv:1907.11692"
]
},
"num": null,
"urls": [],
"raw_text": "Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Man- dar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019. Roberta: A robustly optimized bert pretraining ap- proach. arXiv preprint arXiv:1907.11692.",
"links": null
},
"BIBREF12": {
"ref_id": "b12",
"title": "Extracting syntactic trees from transformer encoder self-attentions",
"authors": [
{
"first": "David",
"middle": [],
"last": "Mare\u010dek",
"suffix": ""
},
{
"first": "Rudolf",
"middle": [],
"last": "Rosa",
"suffix": ""
}
],
"year": 2018,
"venue": "Proceedings of the 2018 EMNLP Workshop Black-boxNLP: Analyzing and Interpreting Neural Networks for NLP",
"volume": "",
"issue": "",
"pages": "347--349",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "David Mare\u010dek and Rudolf Rosa. 2018. Extracting syn- tactic trees from transformer encoder self-attentions. In Proceedings of the 2018 EMNLP Workshop Black- boxNLP: Analyzing and Interpreting Neural Net- works for NLP, pages 347-349.",
"links": null
},
"BIBREF13": {
"ref_id": "b13",
"title": "Pointer sentinel mixture models",
"authors": [
{
"first": "Stephen",
"middle": [],
"last": "Merity",
"suffix": ""
},
{
"first": "Caiming",
"middle": [],
"last": "Xiong",
"suffix": ""
},
{
"first": "James",
"middle": [],
"last": "Bradbury",
"suffix": ""
},
{
"first": "Richard",
"middle": [],
"last": "Socher",
"suffix": ""
}
],
"year": 2016,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. 2016. Pointer sentinel mixture mod- els. CoRR, abs/1609.07843.",
"links": null
},
"BIBREF14": {
"ref_id": "b14",
"title": "Language models are unsupervised multitask learners",
"authors": [
{
"first": "Alec",
"middle": [],
"last": "Radford",
"suffix": ""
},
{
"first": "Jeffrey",
"middle": [],
"last": "Wu",
"suffix": ""
},
{
"first": "Rewon",
"middle": [],
"last": "Child",
"suffix": ""
},
{
"first": "David",
"middle": [],
"last": "Luan",
"suffix": ""
},
{
"first": "Dario",
"middle": [],
"last": "Amodei",
"suffix": ""
},
{
"first": "Ilya",
"middle": [],
"last": "Sutskever",
"suffix": ""
}
],
"year": 2019,
"venue": "OpenAI Blog",
"volume": "",
"issue": "8",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners. OpenAI Blog, 1(8).",
"links": null
},
"BIBREF15": {
"ref_id": "b15",
"title": "An analysis of encoder representations in transformerbased machine translation",
"authors": [
{
"first": "Alessandro",
"middle": [],
"last": "Raganato",
"suffix": ""
},
{
"first": "Jorg",
"middle": [],
"last": "Tiedemann",
"suffix": ""
}
],
"year": 2018,
"venue": "EMNLP Workshop: BlackboxNLP",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Alessandro Raganato and Jorg Tiedemann. 2018a. An analysis of encoder representations in transformer- based machine translation. In EMNLP Workshop: BlackboxNLP.",
"links": null
},
"BIBREF16": {
"ref_id": "b16",
"title": "An analysis of encoder representations in transformerbased machine translation",
"authors": [
{
"first": "Alessandro",
"middle": [],
"last": "Raganato",
"suffix": ""
},
{
"first": "J\u00f6rg",
"middle": [],
"last": "Tiedemann",
"suffix": ""
}
],
"year": 2018,
"venue": "Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP",
"volume": "",
"issue": "",
"pages": "287--297",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Alessandro Raganato and J\u00f6rg Tiedemann. 2018b. An analysis of encoder representations in transformer- based machine translation. In Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, pages 287-297.",
"links": null
},
"BIBREF17": {
"ref_id": "b17",
"title": "Distilbert, a distilled version of bert: smaller, faster, cheaper and lighter",
"authors": [
{
"first": "Victor",
"middle": [],
"last": "Sanh",
"suffix": ""
},
{
"first": "Lysandre",
"middle": [],
"last": "Debut",
"suffix": ""
},
{
"first": "Julien",
"middle": [],
"last": "Chaumond",
"suffix": ""
},
{
"first": "Thomas",
"middle": [],
"last": "Wolf",
"suffix": ""
}
],
"year": 2019,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {
"arXiv": [
"arXiv:1910.01108"
]
},
"num": null,
"urls": [],
"raw_text": "Victor Sanh, Lysandre Debut, Julien Chaumond, and Thomas Wolf. 2019. Distilbert, a distilled version of bert: smaller, faster, cheaper and lighter. arXiv preprint arXiv:1910.01108.",
"links": null
},
"BIBREF18": {
"ref_id": "b18",
"title": "Seq2seq-vis: A visual debugging tool for sequence-to-sequence models",
"authors": [
{
"first": "Hendrik",
"middle": [],
"last": "Strobelt",
"suffix": ""
},
{
"first": "Sebastian",
"middle": [],
"last": "Gehrmann",
"suffix": ""
},
{
"first": "Michael",
"middle": [],
"last": "Behrisch",
"suffix": ""
},
{
"first": "Adam",
"middle": [],
"last": "Perer",
"suffix": ""
},
{
"first": "Hanspeter",
"middle": [],
"last": "Pfister",
"suffix": ""
},
{
"first": "Alexander",
"middle": [
"M"
],
"last": "Rush",
"suffix": ""
}
],
"year": 2018,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Hendrik Strobelt, Sebastian Gehrmann, Michael Behrisch, Adam Perer, Hanspeter Pfister, and Alexander M. Rush. 2018. Seq2seq-vis: A vi- sual debugging tool for sequence-to-sequence mod- els. CoRR, abs/1804.09299.",
"links": null
},
"BIBREF19": {
"ref_id": "b19",
"title": "LSTMVis: A tool for visual analysis of hidden state dynamics in recurrent neural networks",
"authors": [
{
"first": "Hendrik",
"middle": [],
"last": "Strobelt",
"suffix": ""
},
{
"first": "Sebastian",
"middle": [],
"last": "Gehrmann",
"suffix": ""
},
{
"first": "Hanspeter",
"middle": [],
"last": "Pfister",
"suffix": ""
},
{
"first": "Alexander M",
"middle": [],
"last": "Rush",
"suffix": ""
}
],
"year": 2017,
"venue": "IEEE transactions on visualization and computer graphics",
"volume": "24",
"issue": "1",
"pages": "667--676",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Hendrik Strobelt, Sebastian Gehrmann, Hanspeter Pfis- ter, and Alexander M Rush. 2017. LSTMVis: A tool for visual analysis of hidden state dynamics in recur- rent neural networks. IEEE transactions on visual- ization and computer graphics, 24(1):667-676.",
"links": null
},
"BIBREF20": {
"ref_id": "b20",
"title": "Bert rediscovers the classical nlp pipeline",
"authors": [
{
"first": "Ian",
"middle": [],
"last": "Tenney",
"suffix": ""
},
{
"first": "Dipanjan",
"middle": [],
"last": "Das",
"suffix": ""
},
{
"first": "Ellie",
"middle": [],
"last": "Pavlick",
"suffix": ""
}
],
"year": 2019,
"venue": "Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics",
"volume": "",
"issue": "",
"pages": "4593--4601",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Ian Tenney, Dipanjan Das, and Ellie Pavlick. 2019a. Bert rediscovers the classical nlp pipeline. In Pro- ceedings of the 57th Annual Meeting of the Asso- ciation for Computational Linguistics, pages 4593- 4601.",
"links": null
},
"BIBREF21": {
"ref_id": "b21",
"title": "What do you learn from context? probing for sentence structure in contextualized word representations",
"authors": [
{
"first": "Ian",
"middle": [],
"last": "Tenney",
"suffix": ""
},
{
"first": "Patrick",
"middle": [],
"last": "Xia",
"suffix": ""
},
{
"first": "Berlin",
"middle": [],
"last": "Chen",
"suffix": ""
},
{
"first": "Alex",
"middle": [],
"last": "Wang",
"suffix": ""
},
{
"first": "Adam",
"middle": [],
"last": "Poliak",
"suffix": ""
},
{
"first": "Thomas",
"middle": [],
"last": "Mccoy",
"suffix": ""
},
{
"first": "Najoung",
"middle": [],
"last": "Kim",
"suffix": ""
},
{
"first": "Benjamin",
"middle": [],
"last": "Van Durme",
"suffix": ""
},
{
"first": "Sam",
"middle": [],
"last": "Bowman",
"suffix": ""
},
{
"first": "Dipanjan",
"middle": [],
"last": "Das",
"suffix": ""
},
{
"first": "Ellie",
"middle": [],
"last": "Pavlick",
"suffix": ""
}
],
"year": 2019,
"venue": "International Conference on Learning Representations",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Ian Tenney, Patrick Xia, Berlin Chen, Alex Wang, Adam Poliak, R Thomas McCoy, Najoung Kim, Benjamin Van Durme, Sam Bowman, Dipanjan Das, and Ellie Pavlick. 2019b. What do you learn from context? probing for sentence structure in contextu- alized word representations. In International Con- ference on Learning Representations.",
"links": null
},
"BIBREF22": {
"ref_id": "b22",
"title": "Attention is all you need",
"authors": [
{
"first": "Ashish",
"middle": [],
"last": "Vaswani",
"suffix": ""
},
{
"first": "Noam",
"middle": [],
"last": "Shazeer",
"suffix": ""
},
{
"first": "Niki",
"middle": [],
"last": "Parmar",
"suffix": ""
},
{
"first": "Jakob",
"middle": [],
"last": "Uszkoreit",
"suffix": ""
},
{
"first": "Llion",
"middle": [],
"last": "Jones",
"suffix": ""
},
{
"first": "Aidan",
"middle": [
"N"
],
"last": "Gomez",
"suffix": ""
},
{
"first": "\u0141ukasz",
"middle": [],
"last": "Kaiser",
"suffix": ""
},
{
"first": "Illia",
"middle": [],
"last": "Polosukhin",
"suffix": ""
}
],
"year": 2017,
"venue": "Advances in neural information processing systems",
"volume": "",
"issue": "",
"pages": "5998--6008",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, \u0141ukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Advances in neural information pro- cessing systems, pages 5998-6008.",
"links": null
},
"BIBREF23": {
"ref_id": "b23",
"title": "A multiscale visualization of attention in the transformer model",
"authors": [
{
"first": "Jesse",
"middle": [],
"last": "Vig",
"suffix": ""
}
],
"year": 2019,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Jesse Vig. 2019. A multiscale visualization of attention in the transformer model. CoRR, abs/1906.05714.",
"links": null
},
"BIBREF24": {
"ref_id": "b24",
"title": "Analyzing the structure of attention in a transformer language model",
"authors": [
{
"first": "Jesse",
"middle": [],
"last": "Vig",
"suffix": ""
},
{
"first": "Yonatan",
"middle": [],
"last": "Belinkov",
"suffix": ""
}
],
"year": 2019,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Jesse Vig and Yonatan Belinkov. 2019. Analyzing the structure of attention in a transformer language model. CoRR, abs/1906.04284.",
"links": null
},
"BIBREF25": {
"ref_id": "b25",
"title": "Attention is not not explanation",
"authors": [
{
"first": "Sarah",
"middle": [],
"last": "Wiegreffe",
"suffix": ""
},
{
"first": "Yuval",
"middle": [],
"last": "Pinter",
"suffix": ""
}
],
"year": 2019,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Sarah Wiegreffe and Yuval Pinter. 2019. Attention is not not explanation.",
"links": null
},
"BIBREF26": {
"ref_id": "b26",
"title": "R\u00c3l'mi Louf, Morgan Funtowicz, and Jamie Brew",
"authors": [
{
"first": "Thomas",
"middle": [],
"last": "Wolf",
"suffix": ""
},
{
"first": "Lysandre",
"middle": [],
"last": "Debut",
"suffix": ""
},
{
"first": "Victor",
"middle": [],
"last": "Sanh",
"suffix": ""
},
{
"first": "Julien",
"middle": [],
"last": "Chaumond",
"suffix": ""
},
{
"first": "Clement",
"middle": [],
"last": "Delangue",
"suffix": ""
},
{
"first": "Anthony",
"middle": [],
"last": "Moi",
"suffix": ""
},
{
"first": "Pierric",
"middle": [],
"last": "Cistac",
"suffix": ""
},
{
"first": "Tim",
"middle": [],
"last": "Rault",
"suffix": ""
}
],
"year": 2019,
"venue": "Transformers: State-ofthe-art natural language processing",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pier- ric Cistac, Tim Rault, R\u00c3l'mi Louf, Morgan Funtow- icz, and Jamie Brew. 2019. Transformers: State-of- the-art natural language processing.",
"links": null
},
"BIBREF27": {
"ref_id": "b27",
"title": "Gender bias in coreference resolution: Evaluation and debiasing methods",
"authors": [
{
"first": "Jieyu",
"middle": [],
"last": "Zhao",
"suffix": ""
},
{
"first": "Tianlu",
"middle": [],
"last": "Wang",
"suffix": ""
},
{
"first": "Mark",
"middle": [],
"last": "Yatskar",
"suffix": ""
},
{
"first": "Vicente",
"middle": [],
"last": "Ordonez",
"suffix": ""
},
{
"first": "Kai-Wei",
"middle": [],
"last": "Chang",
"suffix": ""
}
],
"year": 2018,
"venue": "Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies",
"volume": "2",
"issue": "",
"pages": "15--20",
"other_ids": {
"DOI": [
"10.18653/v1/N18-2003"
]
},
"num": null,
"urls": [],
"raw_text": "Jieyu Zhao, Tianlu Wang, Mark Yatskar, Vicente Or- donez, and Kai-Wei Chang. 2018. Gender bias in coreference resolution: Evaluation and debiasing methods. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), pages 15-20, New Orleans, Louisiana. Association for Computa- tional Linguistics.",
"links": null
}
},
"ref_entries": {
"FIGREF0": {
"num": null,
"uris": null,
"type_str": "figure",
"text": "Exploration of different attention heads for pretrained model BERT base and different corpora. (a) shows head 5-3 expecting looks at the presents of an auxiliary verb (AUX) to predict that the MASK should be a verb. Head 7-5 in (b) shows a head that has learned to attend to Objects of the Preposition (POBJ). Finally, (c) shows Head 5-5 learning correct co-reference."
},
"FIGREF1": {
"num": null,
"uris": null,
"type_str": "figure",
"text": "Discovering simple head patterns in GPT-2 using the sentence. (a) shows strong detection of the AUX dependency. (b) shows a head detecting the DOBJ dependency"
}
}
}
} |