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 understandable patterns following linguistic or positional information. To further our understanding of the inner workings of these models, we need to analyze both the learned representations and the attentions.

To support analysis for a wide variety of 🤗Transformer 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 human-specified input to similar contexts in large annotated datasets.

The fully-featured demo shows select Transformer models with the Wizard of Oz and a subset of Wikipedia pre-annotated for the hidden representations for each model. Please let us know what you think by commenting below!


We care about your privacy, but know that your activity on the site may be monitored. For more information, check out the links below.


IBM Research, Cambridge
MIT-IBM Watson AI Lab