This exploration tool is based on the bertviz library for the paper "AMR Alignment: Paying Attention to Cross-Attention"

Unsupervised¶

Visualize the cross-attention weights for the Semantic Parser from:

Michele Bevilacqua, Rexhina Blloshmi, and Roberto Navigli. 2021. One SPRING to rule them both: Symmetric AMR semantic parsing and generation without a complex pipeline. In Proceedings of AAAI.

Layer:
<s> <pointer:0> sell-01 :ARG0 <pointer:1> person :ARG0-of <pointer:2> merchandise-01 :domain <pointer:3> this :ARG1 <pointer:4> pill :ARG1-of <pointer:5> invent-01 :purpose <pointer:6> quench-01 :ARG0 <pointer:4> :ARG1 <pointer:7> thirst-01</s><s> This was a merchant who sold pills that had been invented to quench thirst .</s>

Guided¶

Here are the cross-attention weights for a Guided cross-attention Semantic Parser using alignment:

Layer:
<s> <pointer:0> sell-01 :ARG0 <pointer:1> person :ARG0-of <pointer:2> merchandise-01 :domain <pointer:3> this :ARG1 <pointer:4> pill :ARG1-of <pointer:5> invent-01 :purpose <pointer:6> quench-01 :ARG0 <pointer:4> :ARG1 <pointer:7> thirst-01</s><s> This was a merchant who sold pills that had been invented to quench thirst .</s>