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:
- Indian Ocean (0.04)
- Atlantic Ocean (0.04)
- South America
- Oceania
- New Zealand (0.14)
- Australia
- Queensland (0.04)
- Western Australia (0.04)
- North America
- Jamaica (0.04)
- Cuba (0.04)
- Canada (0.04)
- United States
- West Virginia (0.04)
- Nevada (0.04)
- North Carolina (0.04)
- Tennessee (0.04)
- New Mexico (0.04)
- Oklahoma (0.04)
- Pennsylvania (0.04)
- District of Columbia > Washington (0.04)
- Minnesota > Hennepin County
- Minneapolis (0.14)
- Montana > Lewis and Clark County
- Helena (0.04)
- Massachusetts > Barnstable County
- Falmouth > Woods Hole (0.04)
- Texas
- Harris County > Houston (0.04)
- Galveston County > Galveston (0.04)
- New York
- New York County > New York City (0.04)
- Kings County > New York City (0.04)
- Erie County > Buffalo (0.04)
- Bronx County > New York City (0.04)
- Albany County > Albany (0.04)
- Rhode Island > Providence County
- Providence (0.04)
- Louisiana > Orleans Parish
- New Orleans (0.04)
- Utah > Salt Lake County
- Salt Lake City (0.04)
- Illinois > Cook County
- Chicago (0.04)
- New Jersey > Mercer County
- Trenton (0.04)
- Georgia > Muscogee County
- Columbus (0.04)
- Kentucky > Henderson County
- Henderson (0.04)
- California
- Los Angeles County > Los Angeles (0.14)
- San Francisco County > San Francisco (0.04)
- Monterey County > Monterey (0.04)
- Europe
- Jersey (0.14)
- France (0.04)
- Montenegro (0.04)
- Austria (0.04)
- Poland (0.04)
- Germany (0.04)
- Switzerland (0.04)
- Denmark (0.04)
- Serbia (0.04)
- Russia (0.04)
- Ireland (0.04)
- Bosnia and Herzegovina
- Middle East > Malta
- Port Region > Southern Harbour District > Valletta (0.04)
- United Kingdom > England
- Greater London > London (0.04)
- Greece > Ionian Islands
- Corfu (0.04)
- Belgium
- Asia
- Japan (0.04)
- Russia (0.04)
- Middle East > Iraq (0.04)
- Indonesia (0.04)
- India > Maharashtra
- Mumbai (0.04)
- Africa
- Nigeria (0.04)
- South Africa > Gauteng (0.04)
- Middle East
- Ghana > Greater Accra
- Accra (0.04)
- Genre:
- Personal > Obituary (0.92)
- Research Report > New Finding (0.67)
- Industry:
- Law Enforcement & Public Safety (1.00)
- Education (0.92)
- Law > Government & the Courts (0.92)
- Transportation
- Ground (1.00)
- Air (1.00)
- Passenger (0.93)
- Infrastructure & Services (0.92)
- Media
- Music (1.00)
- Film (0.93)
- Television (0.92)
- Leisure & Entertainment > Sports
- Health & Medicine > Therapeutic Area
- Government
- Technology: