计算机科学 > 机器学习
[提交于 2020年4月17日 (v1),最后修订于 2020年10月27日 (此版本, v5)]
标题:ETC: Encoding Long and Structured Inputs in Transformers
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:Transformer models have advanced the state of the art in many Natural Language Processing (NLP) tasks. In this paper, we present a new Transformer architecture, Extended Transformer Construction (ETC), that addresses two key challenges of standard Transformer architectures, namely scaling input length and encoding structured inputs. To scale attention to longer inputs, we introduce a novel global-local attention mechanism between global tokens and regular input tokens. We also show that combining global-local attention with relative position encodings and a Contrastive Predictive Coding (CPC) pre-training objective allows ETC to encode structured inputs. We achieve state-of-the-art results on four natural language datasets requiring long and/or structured inputs.