# AMLab-Amsterdam/AttentionDeepMIL

Implementation of Attention-based Deep Multiple Instance Learning in PyTorch

Repository: https://github.com/AMLab-Amsterdam/AttentionDeepMIL
Canonical: https://ross.abutalabs.com/products/attentiondeepmil
Language: Python
License: MIT
License Family: permissive
Last push: 2024-01-08T14:39:26+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3110, "days_push": 968, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1012, forks 205 (observed 2026-08-28T04:03:13.284049+00:00)

## What it is
A PyTorch implementation of the paper 'Attention-based Deep Multiple Instance Learning' (Ilse, Tomczak & Welling, 2018). It provides code to run the MNIST-BAGS experiment and includes a modified LeNet-5 model with attention-based MIL pooling.

## Use cases
- reproduce the attention-based deep MIL paper results
- run the MNIST-BAGS experiment in PyTorch
- learn how attention-based MIL pooling works
- apply multiple instance learning to bag-of-instances classification
- adapt MIL models for histopathology image classification

## When to choose
- you need a reference implementation of attention-based MIL
- you want to reproduce the MNIST-BAGS benchmark from the paper
- you are researching multiple instance learning with attention

## When to avoid
- you need a production-ready MIL framework with validation and early stopping
- you need large mean bag lengths or balanced training data
- you need active support or maintenance guarantees

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, deep-learning
- domain: machine-learning, deep-learning
- platform: python
- tags: multiple-instance-learning, attention-mechanism, pytorch, research-code, mnist-bags, research, gpu

## Member repositories
- AMLab-Amsterdam/AttentionDeepMIL (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:13.284049+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:11:42.640240+00:00, confidence not recorded.
  - readme: https://github.com/AMLab-Amsterdam/AttentionDeepMIL (fetched 2026-08-28T04:03:13.284049+00:00, sha ef1105489ce6)
- Data as of 2026-08-30T08:39:29.467469+00:00.
