  Not all supervised learning problems are described by a pair of a fixed-size
input tensor and a label. In some cases, especially in medical image analysis,
a label corresponds to a bag of instances (e.g. image patches), and to classify
such bag, aggregation of information from all of the instances is needed. There
have been several attempts to create a model working with a bag of instances,
however, they are assuming that there are no dependencies within the bag and
the label is connected to at least one instance. In this work, we introduce
Self-Attention Attention-based MIL Pooling (SA-AbMILP) aggregation operation to
account for the dependencies between instances. We conduct several experiments
on MNIST, histological, microbiological, and retinal databases to show that
SA-AbMILP performs better than other models. Additionally, we investigate
kernel variations of Self-Attention and their influence on the results.
