21 research outputs found

    Quantifying Attention Flow in Transformers

    Full text link
    In the Transformer model, "self-attention" combines information from attended embeddings into the representation of the focal embedding in the next layer. Thus, across layers of the Transformer, information originating from different tokens gets increasingly mixed. This makes attention weights unreliable as explanations probes. In this paper, we consider the problem of quantifying this flow of information through self-attention. We propose two methods for approximating the attention to input tokens given attention weights, attention rollout and attention flow, as post hoc methods when we use attention weights as the relative relevance of the input tokens. We show that these methods give complementary views on the flow of information, and compared to raw attention, both yield higher correlations with importance scores of input tokens obtained using an ablation method and input gradients

    ํŠธ๋žœ์Šคํฌ๋จธ์˜ ์–ดํ…์…˜ ์Šค์ฝ”์–ด ์กฐ์ž‘์— ๊ด€ํ•œ ์—ฐ๊ตฌ

    Get PDF
    ํ•™์œ„๋…ผ๋ฌธ(์„์‚ฌ) -- ์„œ์šธ๋Œ€ํ•™๊ต๋Œ€ํ•™์› : ๋ฐ์ดํ„ฐ์‚ฌ์ด์–ธ์Šค๋Œ€ํ•™์› ๋ฐ์ดํ„ฐ์‚ฌ์ด์–ธ์Šคํ•™๊ณผ, 2023. 2. ์ด์žฌ์ง„.Although Korean has distinctly different features from English, attempts to find a new Transformer model that more closely matches Korean by reflecting them are insufficient. Among the characteristics of the Korean language, we pay special attention to the role of postpositions. Agglutinative languages have more freedom in word order than inflectional languages, such as English, thanks to the postpositions. This study is based on the hypothesis that the current Transformer is challenging to learn the postpositions sufficiently, which play a significant role in agglutinative languages such as Korean. In Korean, the postpositions are paired with the substantives, so paying more attention to the corresponding substantives seems reasonable compared to other tokens in the sentence. However, the current Transformer learning algorithm has many limitations in doing so. Accordingly, it is shown that the performance of the natural language understanding (NLU) task can be improved by deliberatively changing the attention scores between the postpositions and the substantives. In addition, it is hoped that this study will stimulate the research on new learning methods that reflect the characteristics of Korean.ํ•œ๊ตญ์–ด๋Š” ์˜์–ด์™€ ๋ถ„๋ช…ํžˆ ๋‹ค๋ฅธ ํŠน์„ฑ์„ ๊ฐ–๊ณ  ์žˆ์ง€๋งŒ ์ด๋ฅผ Transformer์— ๋ฐ˜์˜ํ•˜์—ฌ ํ•œ๊ตญ์–ด์— ๋ณด๋‹ค ๋ถ€ํ•ฉํ•˜๋Š” ์ƒˆ๋กœ์šด ๋ชจ๋ธ์„ ์ฐพ๋Š” ์‹œ๋„๋Š” ๊ทธ๋ฆฌ ์ถฉ๋ถ„ํ•˜์ง€ ์•Š๋‹ค. ๋ณธ ์—ฐ๊ตฌ์—์„œ๋Š” ํ•œ๊ตญ์–ด ํŠน์„ฑ ์ค‘์— ํŠนํžˆ ์กฐ์‚ฌ์˜ ์—ญํ• ์— ์ฃผ๋ชฉํ•œ๋‹ค. ์กฐ์‚ฌ ๋•๋ถ„์— ์˜์–ด์™€ ๊ฐ™์€ ๊ตด์ ˆ์–ด์— ๋น„ํ•ด ๋ฌธ์žฅ ๋‚ด ๋‹จ์–ด ์ˆœ์„œ์˜ ์ž์œ ๋„๊ฐ€ ๋†’์€ ๊ต์ฐฉ์–ด๋ผ๋Š” ํŠน์„ฑ์„ ๋ฐ˜์˜ํ•˜์—ฌ Transformer์˜ attention score ๊ณ„์‚ฐ ๋ฐฉ๋ฒ•์˜ ๋ณ€๊ฒฝ์„ ์ œ์•ˆํ•œ๋‹ค. ๋ณธ ์—ฐ๊ตฌ๋Š” ํ•œ๊ตญ์–ด์™€ ๊ฐ™์€ ๊ต์ฐฉ์–ด์—์„œ ๋งค์šฐ ์ค‘์š”ํ•œ ์—ญํ• ์„ ํ•˜๋Š” ์กฐ์‚ฌ๊ฐ€ ํ˜„์žฌ์˜ Transformer์—์„œ๋Š” ์ถฉ๋ถ„ํžˆ ํ•™์Šต๋˜๊ธฐ ์–ด๋ ต๋‹ค๋Š” ๊ฐ€์„ค์— ๋ฐ”ํƒ•์„ ๋‘”๋‹ค. ํ•œ๊ตญ์–ด์—์„œ ์กฐ์‚ฌ๋Š” ํ•ด๋‹น ์ฒด์–ธ๊ณผ ์Œ์œผ๋กœ ๋ฌถ์ด๋ฏ€๋กœ ๋ฌธ์žฅ ๋‚ด์˜ ๋‹ค๋ฅธ token์— ๋น„ํ•ด ํ•ด๋‹น ์ฒด์–ธ์„ ์ข€๋” attentionํ•˜๋Š” ๊ฒƒ์ด ํƒ€๋‹นํ•ด ๋ณด์ด์ง€๋งŒ ํ˜„์žฌ์˜ Transformer ํ•™์Šต ๋ฐฉ๋ฒ•์œผ๋กœ๋Š” ํ•œ๊ณ„๊ฐ€ ๋งŽ๋‹ค๋Š” ์˜๋ฏธ์ด๋‹ค. ์ด์— ์กฐ์‚ฌ-์ฒด์–ธ ๊ฐ„์˜ attention score๋ฅผ ์ธ์œ„์ ์œผ๋กœ ๋ณ€ํ™”์‹œํ‚ด์œผ๋กœ์จ NLU(Natural Language Understanding) ๊ด€๋ จ ์ž์—ฐ์–ด ์ฒ˜๋ฆฌ task์˜ ์„ฑ๋Šฅ์„ ๋†’์ผ ์ˆ˜ ์žˆ์Œ์„ ๋ณด์ธ๋‹ค. ์•„์šธ๋Ÿฌ ํ•œ๊ธ€ ํŠน์„ฑ์„ ๋ฐ˜์˜ํ•œ ์ƒˆ๋กœ์šด ํ•™์Šต ๋ฐฉ๋ฒ•์— ๊ด€ํ•œ ์—ฐ๊ตฌ์— ์ž๊ทน์ด ๋  ์ˆ˜ ์žˆ๊ธฐ๋ฅผ ๊ธฐ๋Œ€ํ•œ๋‹ค.Chapter 1. Introduction 1 Chapter 2. Related work ๏ผ• Chapter 3. Korean and Transformer 7 Chapter 4. Methodology ๏ผ™ Chapter 5. Results and Analysis 15 Chapter 6. Future work 20 Chapter 7. Conclusion 21 Bibliography 22 Abstract in Korean 26์„

    Conceptual challenges for interpretable machine learning

    Get PDF
    As machine learning has gradually entered into ever more sectors of public and private life, there has been a growing demand for algorithmic explainability. How can we make the predictions of complex statistical models more intelligible to end users? A subdiscipline of computer science known as interpretable machine learning (IML) has emerged to address this urgent question. Numerous influential methods have been proposed, from local linear approximations to rule lists and counterfactuals. In this article, I highlight three conceptual challenges that are largely overlooked by authors in this area. I argue that the vast majority of IML algorithms are plagued by (1) ambiguity with respect to their true target; (2) a disregard for error rates and severe testing; and (3) an emphasis on product over process. Each point is developed at length, drawing on relevant debates in epistemology and philosophy of science. Examples and counterexamples from IML are considered, demonstrating how failure to acknowledge these problems can result in counterintuitive and potentially misleading explanations. Without greater care for the conceptual foundations of IML, future work in this area is doomed to repeat the same mistakes

    From Explainable to lnterpretable Deep Learning for Natural Language Processing in Healthcare: How Far from Reality?

    Get PDF
    Deep learning (DL) has substantially enhanced natural language processing (NLP) in healthcare research. However, the increasing complexity of DL-based NLP necessitates transparent model interpretability, or at least explainability, for reliable decision-making. This work presents a thorough scoping review of explainable and interpretable DL in healthcare NLP. The term โ€œeXplainable and Interpretable Artificial Intelligenceโ€ (XIAI) is introduced to distinguish XAI from IAI. Different models are further categorized based on their functionality (model-, input-, output-based) and scope (local, global). Our analysis shows that attention mechanisms are the most prevalent emerging IAI technique. The use of IAI is growing, distinguishing it from XAI. The major challenges identified are that most XIAI does not explore โ€œglobalโ€ modelling processes, the lack of best practices, and the lack of systematic evaluation and benchmarks. One important opportunity is to use attention mechanisms to enhance multi-modal XIAI for personalized medicine. Additionally, combining DL with causal logic holds promise. Our discussion encourages the integration of XIAI in Large Language Models (LLMs) and domain-specific smaller models. In conclusion, XIAI adoption in healthcare requires dedicated in-house expertise. Collaboration with domain experts, end-users, and policymakers can lead to ready-to-use XIAI methods across NLP and medical tasks. While challenges exist, XIAI techniques offer a valuable foundation for interpretable NLP algorithms in healthcare

    Interpretable by Design: Learning Predictors by Composing Interpretable Queries

    Full text link
    There is a growing concern about typically opaque decision-making with high-performance machine learning algorithms. Providing an explanation of the reasoning process in domain-specific terms can be crucial for adoption in risk-sensitive domains such as healthcare. We argue that machine learning algorithms should be interpretable by design and that the language in which these interpretations are expressed should be domain- and task-dependent. Consequently, we base our model's prediction on a family of user-defined and task-specific binary functions of the data, each having a clear interpretation to the end-user. We then minimize the expected number of queries needed for accurate prediction on any given input. As the solution is generally intractable, following prior work, we choose the queries sequentially based on information gain. However, in contrast to previous work, we need not assume the queries are conditionally independent. Instead, we leverage a stochastic generative model (VAE) and an MCMC algorithm (Unadjusted Langevin) to select the most informative query about the input based on previous query-answers. This enables the online determination of a query chain of whatever depth is required to resolve prediction ambiguities. Finally, experiments on vision and NLP tasks demonstrate the efficacy of our approach and its superiority over post-hoc explanations.Comment: 29 pages, 14 figures. Accepted as a Regular Paper in Transactions on Pattern Analysis and Machine Intelligenc
    corecore