This paper investigates how Transformer language models (LMs) fine-tuned for acceptability classification capture linguistic features. Our approach uses the best practices of topological data analysis (TDA) in NLP: we construct directed attention graphs from attention matrices, derive topological features from them, and feed them to linear classifiers. We introduce two novel features, chordality, and the matching number, and show that TDA-based classifiers outperform fine-tuning baselines. We experiment with two datasets, CoLA and RuCoLA in English and Russian, typologically different languages. On top of that, we propose several black-box introspection techniques aimed at detecting changes in the attention mode of the LMs during fine-tuning, defining the LM's prediction confidences, and associating individual heads with fine-grained grammar phenomena. Our results contribute to understanding the behavior of monolingual LMs in the acceptability classification task, provide insights into the functional roles of attention heads, and highlight the advantages of TDA-based approaches for analyzing LMs. We release the code and the experimental results for further uptake.


翻译:本文探究了针对可接受性分类进行fine-tune的Transformer语言模型 (LMs) 如何捕捉语言特征。我们采用基于 NLP 的拓扑数据分析 (TDA) 最佳实践方法:从注意力矩阵构建有向的注意力图,从中获得拓扑特征,并将其提供给线性分类器。我们引入了两种新的特征,即和弦性和匹配数,并表明基于TDA的分类器优于fine-tuning的基线方法。我们尝试了两个数据集,英语和俄语的 CoLA 和 RuCoLA,这是两种语系截然不同的语言。此外,我们提出了几种黑盒自省技术,旨在检测fine-tuning过程中LM的注意力模式的变化,定义LM的预测置信度,并将个别attention头部与细粒度语法现象联系起来。我们的结果有助于理解单语LM在接受性分类任务中的行为,提供了注意力头部的功能角色见解,并突出了分析LM的基于TDA的方法的优势。我们将代码和实验结果释放供进一步采纳。

0
下载
关闭预览

相关内容

专知会员服务
72+阅读 · 2021年1月12日
【CIKM2020】神经逻辑推理,Neural Logic Reasoning
专知会员服务
49+阅读 · 2020年8月25日
机器学习入门的经验与建议
专知会员服务
90+阅读 · 2019年10月10日
【哈佛大学商学院课程Fall 2019】机器学习可解释性
专知会员服务
99+阅读 · 2019年10月9日
谷歌&HuggingFace| 零样本能力最强的语言模型结构
夕小瑶的卖萌屋
0+阅读 · 2022年6月23日
VCIP 2022 Call for Demos
CCF多媒体专委会
1+阅读 · 2022年6月6日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
论文 | 15篇近期值得读的AI论文
黑龙江大学自然语言处理实验室
16+阅读 · 2018年2月12日
【论文】变分推断(Variational inference)的总结
机器学习研究会
39+阅读 · 2017年11月16日
原创 | Attention Modeling for Targeted Sentiment
黑龙江大学自然语言处理实验室
25+阅读 · 2017年11月5日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
1+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2010年12月31日
国家自然科学基金
0+阅读 · 2008年12月31日
Transformers in Medical Image Analysis: A Review
Arxiv
39+阅读 · 2022年2月24日
VIP会员
相关资讯
谷歌&HuggingFace| 零样本能力最强的语言模型结构
夕小瑶的卖萌屋
0+阅读 · 2022年6月23日
VCIP 2022 Call for Demos
CCF多媒体专委会
1+阅读 · 2022年6月6日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
论文 | 15篇近期值得读的AI论文
黑龙江大学自然语言处理实验室
16+阅读 · 2018年2月12日
【论文】变分推断(Variational inference)的总结
机器学习研究会
39+阅读 · 2017年11月16日
原创 | Attention Modeling for Targeted Sentiment
黑龙江大学自然语言处理实验室
25+阅读 · 2017年11月5日
相关基金
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
1+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2010年12月31日
国家自然科学基金
0+阅读 · 2008年12月31日
Top
微信扫码咨询专知VIP会员