Rethinking Contextualization by Reinterpreting Attention Head Channels
Organizations: RIKEN · Tohoku University · New York University · JAIST · MBZUAI
Abstract
Contextualization, the core operation of language modeling, transmits information across words to build sentence-specific word representations. Prior works mainly study contextualization, focusing on individual words and attention heads as a growing discrete dictionary, lacking a global view of their general behavior. Therefore, we propose a general principle: Globally, we find and estimate that different words carry different amounts of information, and less-informative words tend to absorb more contextual information. Specifically, these low-information words do not absorb contextual words uniformly, and finer-grained selectivity enables more precise routing to promote information transmission between matched words. Moreover, to find what mechanism causes such processing, we reinterpret attention heads as channels gated by their singular vectors and find that: (1) these singular vectors point to the hidden states of more informative words, allowing such words to write their information to others more strongly to act as information sources, and vice versa; and (2) these singular vectors can be viewed equally as hidden state features, enabling automated interpretation of attention heads beyond prior heuristic head discovery, also embedding heads into a continuous space rather than treating them as discrete, independent dictionary entries.
Figures & tables
| Attn. Head | Interpretation | Singl. Value | Score (F1) | |
| Layer 2 Head 11 | “references to specific years or numbers in historical and descriptive contexts” | 4.80 | 0.96 | |
| “the substring ’ pre ’ and ’ post ’ in various legal and procedural contexts” | 1.00 | |||
| “phrases indicating the start , effective date , or duration of time-related events or actions” | 0.48 | 1.00 | ||
| Layer 11 Head 25 | “words related to celebrating cultural or religious festivals , particularly Christmas and similar events” | 5.05 | 0.96 | |
| “ months holidays and seasonal events mentioned in the text” | 1.00 | |||
| “references to Christmas and related holiday concepts” | 0.76 | 0.93 |
Appendix figures & tables47 assets
Supplementary material from the paper’s appendix.
Appendix
| Category | Count | Avg. Freq. | Words |
|---|---|---|---|
| Famous People Name | 47 | 5.36 | Einstein, Shakespeare, Oprah, Picasso, Mandela, Cleopatra, Churchill, Tesla, Elvis, Marie Curie, Gandhi, Aristotle, Monroe, Beethoven, Newton, Amelia Earhart, Frida Kahlo, Rothschild, Darrow, Hemingway, Frost, Twain, Jobs, Job, Obama, J.K. Rowling, Rihanna, Zuckerberg, Mother Teresa, Winston Churchill, Bill Gates, Marlon Brando, Charlie Chaplin, John Lennon, Bruce Lee, Michael Jackson, Madonna, Coco Chanel, Nikola Tesla, Audre Lorde, George Washington, Agatha Christie, Nelson Mandela, Thomas Edison, Steve Jobs, Vincent van Gogh, Serena Williams |
| normal people name | 52 | 11.80 | Alice, Bob, Charlie, Emma, David, Sarah, Michael, Jessica, Daniel, Laura, James, Lily, Andrew, Zoe, Matthew, Olivia, Ethan, Mia, Joshua, Ava, Ryan, Grace, Benjamin, Ella, Samuel, Chloe, Lucas, Scarlett, Jacob, Victoria, Henry, Natalie, Jonathan, Aria, Chris, Ruby, Adam, Hailey, William, Leah, Kevin, Julia, Jason, Alexa, Thomas, Claire, Jordan, Sophie, Nathan, Hazel, Isaac, Stella |
| famous location name | 45 | 0.22 | Eiffel Tower, Great Wall of China, Taj Mahal, Statue of Liberty, Stonehenge, Machu Picchu, Colosseum, Big Ben, Pyramids of Giza, Golden Gate Bridge, Christ the Redeemer, Sydney Opera House, Acropolis, Niagara Falls, Leaning Tower of Pisa, Burj Khalifa, Mount Fuji, Angkor Wat, Petra, Mount Rushmore, Alhambra, Buckingham Palace, Louvre Museum, Kremlin, Sagrada Família, Table Mountain, Galápagos Islands, Vatican City, Serengeti National Park, Great Barrier Reef, Chichen Itza, Uluru, Himalayas, Amalfi Coast, Venice Canals, Santorini, Yellowstone National Park, Arches National Park, Ha Long Bay, Bora Bora, Mount Kilimanjaro, Bali, Old Faithful, Iguazu Falls, Victoria Falls |
| normal location name | 51 | 21.14 | Park, River, Hill, Street, Corner, Avenue, Square, Bridge, Lake, Forest, Trail, Mountain, Road, Path, Beach, Garden, Plaza, Meadow, Bay, Valley, Pond, Cliff, Harbor, Dock, Canyon, Oasis, Sanctuary, Campground, Crossroads, Highway, Dunes, Knoll, Summit, Glade, Orchard, Wetland, Lighthouse, Quarry, Fort, Estuary, Peninsula, Cove, Bungalow, Resort, Retreat, Ranch, Estate, Villa, Commons, Grove, Wilderness |
| frequent object noun | 50 | 51.36 | apple, table, chair, computer, book, phone, pen, car, tree, house, bottle, cup, bag, clock, shoe, key, window, door, mirror, lamp, bed, wallet, magazine, guitar, camera, plate, fork, knife, spoon, basket, painting, flower, umbrella, toy, speaker, suitcase, pillow, shirt, jeans, watch, blanket, candle, recipe, map, remote, brush, comb, photo, couch, dish |
| hardly used object noun | 50 | 0.32 | abacus, bauble, carafe, dirndl, epergne, flaxen, gazetteer, hovel, ichthyology, jägermeiste, knickknack, locket, marzipan, nightgown, obelisk, parsol, quagmire, ragamuffin, sextant, tiffin, umbilicus, vial, whittle, xylophone, yarmulke, ziggurat, ankh, balustrade, colander, dalliance, effigy, filigree, goblet, harpsichord, incunabulum, jigsaw, kumquat, lichen, madrigal, nanotechnology, omphalos, pecuniary, quasar, recumbent, sconce, tambourine, ukulele, vorpal, wattle, xenophobia |
| No. | Question | Output Candidates |
|---|---|---|
| 1 | What grammatical gender (if any) is typically associated with this people-word in languages that mark gender? | 1) masculine; 2) feminine; 3) common/epicene; 4) no grammatical gender |
| 2 | What age group does this word primarily denote? | 1) child; 2) adolescent; 3) adult; 4) elderly; 5) age-neutral |
| 3 | Does this word denote a familial kinship relation? If so, which basic role? | 1) parent; 2) child; 3) sibling; 4) grandparent; 5) spouse/partner; 6) other kin; 7) not a kinship term |
| 4 | What occupational sector or field does this word most directly refer to? | 1) healthcare; 2) education; 3) government/public service; 4) business/finance; 5) arts/entertainment; 6) trades/industry; 7) science/technology; 8) agriculture; 9) service/hospitality; 10) not an occupation |
| 5 | Does this word primarily indicate a social or legal status? If so, which? | 1) citizen; 2) immigrant/resident; 3) refugee/asylum-seeker; 4) stateless; 5) legal/official title (e.g., holder of an office); 6) not a status term |
| 6 | Is this word typically used as a formal title or honorific? | 1) honorific/title (e.g., Sir, Dr.); 2) professional title (e.g., Judge, Professor); 3) noble/royal title (e.g., King, Duchess); 4) informal/colloquial address; 5) not a title |
| No. | Template |
|---|---|
| 1 | During the morning meeting the team asked whether the project could [MASK] before the client presentation next Tuesday. |
| 2 | The gardener noticed that the leaves on the oldest tree had turned a deep [MASK], signaling the change of season. |
| 3 | When packing for the long trip she insisted that each suitcase contain at least one warm [MASK] for cold nights. |
| 4 | He smiled and gave a brief [MASK] when the host introduced him to the guests at the dinner. |
| 5 | If the software continues to [MASK] under heavy load we will need to optimize the database queries and caching. |
| 6 | The little boy ran across the yard and shouted [MASK] as he chased after the colorful butterfly in sunlight. |