The feature Attention layer is parameterized by a global context vector c with learnable parameters optimized during the training. For a set of input vectors (computed in the layer before), Attention scores are calculated using the pairwise similarity between the context vector and the set (Eqs. 13, 14). These scores are normalized and used to compute weighted sum of the vectors to generate a new unified vector representation that is further passed to the classifier layer (Eq. 15).
Classifier layer The classifier layer calculates a distance (euclidean or cosine) between the computed representation vectors and then concatenates them with that distance. Subsequently, through an affine transformation, the concatenated feature vector is mapped to the size of the output classes (i.e., presence or absence of interaction). Finally, a softmax function is applied to output the predicted probability distribution over those two classes (i.e. for drug pair).
Copyright and License information: The Author(s) ©2021 Open AccessThis article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/. The Creative Commons Public Domain Dedication waiver (http://creativecommons.org/publicdomain/zero/1.0/) applies to the data made available in this article, unless otherwise stated in a credit line to the data.
Do you have any questions about this protocol?
Post your question to gather feedback from the community. We will also invite the authors of this
article to respond.