Neural networks models for NLP are typically implemented without the explicit encoding of language rules and yet they are able to break one performance record after another. This has generated a lot of research interest in interpreting the representations learned by these networks. We propose here a novel interpretation approach that relies on the only processing system we have that does understand language: the human brain. We use brain imaging recordings of subjects reading complex natural text to interpret word and sequence embeddings from 4 recent NLP models - ELMo, USE, BERT and Transformer-XL. We study how their representations differ across layer depth, context length, and attention type. Our results reveal differences in the context-related representations across these models. Further, in the transformer models, we find an interaction between layer depth and context length, and between layer depth and attention type. We finally hypothesize that altering BERT to better align with brain recordings would enable it to also better understand language. Probing the altered BERT using syntactic NLP tasks reveals that the model with increased brain-alignment outperforms the original model. Cognitive neuroscientists have already begun using NLP networks to study the brain, and this work closes the loop to allow the interaction between NLP and cognitive neuroscience to be a true cross-pollination.
翻译:用于 NLP 的神经网络模型通常在没有明确语言规则编码的情况下实施, 但是它们能够打破不同的业绩记录。 这在解释这些网络所学的演示中引起了许多研究兴趣。 我们在此建议一种新型的解释方法, 依靠我们唯一能够理解语言的处理系统: 人类大脑。 我们使用阅读复杂自然文本的主体的脑成像记录来解释从最近4个 NLP 模型 — ELMO、 USE、 BERT 和 Transformerer- XL 中嵌入的字词和序列。 我们用合成NLP 任务来观察这些模型在层深度、 上下文长度和注意力类型上的差异。 我们的结果揭示了这些模型中与上下文相关的表达方式的差异。 此外, 在变异模型中, 我们发现层深度和上层长度之间, 以及层深度和注意类型之间的相互作用。 我们最后的假设是, 改变 BERT 使之更符合大脑记录, 能够更好地了解语言。 使用合成 NLP 任务来观察这些结构比对原始模型进行更紧密的交叉对比。 CO化神经科学学家已经允许了这个循环研究。