Transformer visualization via dictionary learning: contextualized embedding as a linear superposition of transformer factors
Yun, Zeyu, Chen, Yubei, Olshausen, Bruno A, LeCun, Yann
–arXiv.org Artificial Intelligence
Transformer networks have revolutionized NLP representation learning since they were introduced. Though a great effort has been made to explain the representation in transformers, it is widely recognized that our understanding is not sufficient. One important reason is that there lack enough visualization tools for detailed analysis. In this paper, we propose to use dictionary learning to open up these "black boxes" as linear superpositions of transformer factors. Through visualization, we demonstrate the hierarchical semantic structures captured by the transformer factors, e.g., word-level polysemy disambiguation, sentence-level pattern formation, and long-range dependency. While some of these patterns confirm the conventional prior linguistic knowledge, the rest are relatively unexpected, which may provide new insights. We hope this visualization tool can bring further knowledge and a better understanding of how transformer networks work. The code is available at https://github.com/zeyuyun1/TransformerVis
arXiv.org Artificial Intelligence
Apr-4-2023
- Country:
- Africa
- Ghana > Greater Accra
- Accra (0.04)
- Middle East
- Nigeria (0.04)
- South Africa > Gauteng (0.04)
- Ghana > Greater Accra
- Asia
- India > Maharashtra
- Mumbai (0.04)
- Indonesia (0.04)
- Japan (0.04)
- Middle East > Iraq (0.04)
- Russia (0.04)
- India > Maharashtra
- Atlantic Ocean (0.04)
- Europe
- Ireland (0.04)
- Jersey (0.14)
- Belgium
- Greece > Ionian Islands
- Corfu (0.04)
- Russia (0.04)
- France (0.04)
- Serbia (0.04)
- United Kingdom > England
- Greater London > London (0.04)
- Denmark (0.04)
- Switzerland (0.04)
- Germany (0.04)
- Poland (0.04)
- Middle East > Malta
- Port Region > Southern Harbour District > Valletta (0.04)
- Austria (0.04)
- Bosnia and Herzegovina
- Montenegro (0.04)
- Indian Ocean (0.04)
- North America
- Canada (0.04)
- Cuba (0.04)
- Jamaica (0.04)
- United States
- California
- Los Angeles County > Los Angeles (0.14)
- Monterey County > Monterey (0.04)
- San Francisco County > San Francisco (0.04)
- Kentucky > Henderson County
- Henderson (0.04)
- District of Columbia > Washington (0.04)
- Pennsylvania (0.04)
- Georgia > Muscogee County
- Columbus (0.04)
- Oklahoma (0.04)
- New Mexico (0.04)
- Tennessee (0.04)
- New Jersey > Mercer County
- Trenton (0.04)
- Illinois > Cook County
- Chicago (0.04)
- North Carolina (0.04)
- Utah > Salt Lake County
- Salt Lake City (0.04)
- Louisiana > Orleans Parish
- New Orleans (0.04)
- Rhode Island > Providence County
- Providence (0.04)
- New York
- Albany County > Albany (0.04)
- Bronx County > New York City (0.04)
- Erie County > Buffalo (0.04)
- Kings County > New York City (0.04)
- New York County > New York City (0.04)
- Texas
- Galveston County > Galveston (0.04)
- Harris County > Houston (0.04)
- Nevada (0.04)
- Massachusetts > Barnstable County
- Falmouth > Woods Hole (0.04)
- Montana > Lewis and Clark County
- Helena (0.04)
- West Virginia (0.04)
- Minnesota > Hennepin County
- Minneapolis (0.14)
- California
- Oceania
- Australia
- Queensland (0.04)
- Western Australia (0.04)
- New Zealand (0.14)
- Australia
- South America
- Africa
- Genre:
- Personal > Obituary (0.92)
- Research Report > New Finding (0.67)
- Industry:
- Education (0.92)
- Government
- Health & Medicine > Therapeutic Area
- Law > Government & the Courts (0.92)
- Law Enforcement & Public Safety (1.00)
- Leisure & Entertainment > Sports
- Media
- Film (0.93)
- Music (1.00)
- Television (0.92)
- Transportation
- Air (1.00)
- Ground (1.00)
- Infrastructure & Services (0.92)
- Passenger (0.93)
- Technology: