Transformer has become ubiquitous due to its dominant performance in various NLP and image processing tasks. However, it lacks understanding of how to generate mathematically grounded uncertainty estimates for transformer architectures. Models equipped with such uncertainty estimates can typically improve predictive performance, make networks robust, avoid over-fitting and used as acquisition function in active learning. In this paper, we introduce BayesFormer, a Transformer model with dropouts designed by Bayesian theory. We proposed a new theoretical framework to extend the approximate variational inference-based dropout to Transformer-based architectures. Through extensive experiments, we validate the proposed architecture in four paradigms and show improvements across the board: language modeling and classification, long-sequence understanding, machine translation and acquisition function for active learning.
Trading Under Uncertainty: A Distribution-Based Strategy for Futures Markets Using FutureQuant Transformer
Department of Computer Science & Engineering(计算机科学与工程系);Ohio State University(俄亥俄州立大学);School of Computing and Data Science(计算与数据科学学院);Hong Kong University(香港大学);Tandon School of Engineering(坦顿工程学院);New York University(纽约大学);College of Science, Mathematics and Technology(科学、数学与技术学院);Wenzhou Kean University(温州凯恩大学);Faculty of Science and Technology(科学与技术学院);Beijing Normal-Hong Kong Baptist University(北京师范大学-香港 Baptist大学)
Transformer Uncertainty Estimation with Hierarchical Stochastic Attention
University of Amsterdam(阿姆斯特丹大学);Amazon Development Center Germany GmbH(亚马逊德国开发中心有限公司)
Transformers在广泛的NLP任务中是最先进的,也已应用于许多现实世界的产品。了解Transformer模型预测的可靠性和确定性对于构建可信的机器学习应用程序至关重要,例如,医学诊断虽然最近已经提出了许多Transformer扩展,Transformer模型的不确定性估计的研究是欠探索。在这项工作中,我们提出了一种新的方法,使Transformers具有不确定性估计的能力,同时,保持原来的预测性能。这是通过学习一个分层的随机自我注意力,分别出席值和一组可学习的质心。然后,使用Gumbel-Softmax技巧,用采样质心的混合物形成新的注意力头部。我们从理论上证明了从Gumbel分布采样的自注意近似是有界的。我们经验性地评估我们的模型在两个文本分类任务与域内(ID)和域外(OOD)数据集。实验结果表明:(1)在比较的方法中,该方法具有最好的预测性能和不确定性权衡;(2)在ID数据集上表现出非常有竞争力的(在大多数情况下,提高了)预测性能;(3)在OOD数据集上的不确定性估计中与Monte Carlo dropout和集成方法相当。