Master’s thesis

From histology patches to lymph-node predictions.

Computational pathologyAcademic research

My master’s research combined feature extraction and Multiple Instance Learning for lymph-node classification in whole-slide histology, with model evaluation and attention analysis.

UNIMORE · Fraunhofer IIS · Academic year 2023/2024

My role
Pipeline implementation, model evaluation and attention analysis
Focus
Multiple Instance Learning · Vision Transformers · Histology
Original workflow diagram showing Camelyon16 patches, ViT-S with DINO feature extraction, 384-dimensional HDF5 features and BufferMIL lymph-node classification.
ViT-S/DINO feature extraction and BufferMIL classification. Original workflow diagram from my master’s research.View full-size diagram (image, opens in a new tab)

Reported thesis results · example predictions

Model comparison.

Master’s thesisReported experiments

Compare reported experiments

Explore the three model and feature-extractor configurations evaluated in my master’s research.

DSMIL · ViT-S with DINO

Two aggregation streams combine a critical instance with a non-local stream.

ACC
0.9266
AUC
0.8587
F1
0.7531
F2
0.7160

BufferMIL · EfficientNetB0

EfficientNetB0 features are adapted to the 384-dimensional BufferMIL input.

ACC
0.8608
AUC
0.7251
F1
0.4571
F2
0.3931

BufferMIL · ViT-S with DINO

ViT-S/DINO features enter BufferMIL, with a memory buffer of top-scoring patches.

ACC
0.9323 ± 0.0138
AUC
0.9450 ± 0.0126
F1
0.8219 ± 0.0400
F2
0.8423 ± 0.0396

Reported results from my master’s research. The meaning of ± and the number of runs were not specified.

Inspect reported examples

Reference label: positive in each illustrated example.

Macrometastasis example
DSMILViT-S with DINO

Positive (1.0)

BufferMILEfficientNetB0

Negative (0.0)

BufferMILViT-S with DINO

Positive (1.0)

Both ViT configurations predict positive in this shown example; the EfficientNet configuration predicts negative.

Micrometastasis example
DSMILViT-S with DINO

Positive (1.0)

BufferMILEfficientNetB0

Positive (1.0)

BufferMILViT-S with DINO

Positive (1.0)

All three configurations predict positive in this shown example.

ITC example
DSMILViT-S with DINO

Negative (0.0)

BufferMILEfficientNetB0

Negative (0.0)

BufferMILViT-S with DINO

Negative (0.0)

All three predict negative for this shown positive example. This is one case, not an estimate of performance across ITC cases.

These are reported results and individual examples, not live model inference or category-level sensitivity estimates.

Lymph-node classification with MIL.

A histology slide can contain billions of pixels. Multiple Instance Learning makes that scale manageable by working with a bag of image patches and learning a label for the group. My thesis explored this approach for positive or negative lymph-node classification.

I studied how feature extractors and MIL models fit into a pipeline and what attention maps show about individual predictions.

Pipeline development and evaluation.

I implemented and evaluated the pipeline in the Fraunhofer IIS research setting, working with supplied histology patches and lymph-node annotations. The work connected data preparation, feature extraction and model evaluation.

  1. Organise the feature data

    I processed the supplied non-overlapping 224 × 224 patches in TFRecords and organised their feature vectors, labels and metadata into HDF5 datasets.

  2. Connect two extractors

    I integrated EfficientNetB0 and ViT-S with DINO. The EfficientNet features were adapted to BufferMIL’s 384-dimensional input, with direct HDF5 access in the model pipeline.

  3. Compare MIL configurations

    I evaluated BufferMIL’s critical-instance and memory-buffer approach alongside DSMIL’s dual-stream aggregation, using the three model/extractor configurations reported below.

  4. Inspect model behaviour

    I explored the embeddings with PCA and compared attention distributions and heatmaps in macro-, micro- and ITC metastasis examples.

Feature extractor choices

The EfficientNetB0 extractor was pretrained on colon-cancer images. The ViT-S/DINO path used pretrained Facebook weights through the original BufferMIL framework. Both paths produced 384-dimensional feature vectors.

These were different pretrained representations brought into the same lymph-node workflow. Breast-cancer-specific WSI pretraining remained a next step.

Original workflow diagram showing Camelyon16 patches, EfficientNetB0 feature extraction, 384-dimensional HDF5 features and BufferMIL lymph-node classification.
EfficientNetB0 feature extraction and BufferMIL classification. Original workflow diagram from my master’s research.View full-size diagram (image, opens in a new tab)

Model comparison and example predictions.

I used Camelyon16’s original challenge division. The pipeline operates on lymph nodes, so those are the units shown alongside the whole-slide image counts.

Training partition1,122 lymph nodes

270 slides · 227 positive · 895 negative

Test partition546 lymph nodes

128 slides · 90 positive · 456 negative

BufferMIL with ViT-S/DINO has the highest reported values across the three configurations. These are the results reported in my master’s research.

Reported model comparison
Model & extractorAccuracyAUCF1F2
DSMILViT-S with DINO0.92660.85870.75310.7160
BufferMILEfficientNetB00.86080.72510.45710.3931
BufferMILViT-S with DINO0.9323 ± 0.01380.9450 ± 0.01260.8219 ± 0.04000.8423 ± 0.0396

Scroll the table horizontally when needed.Each configuration is shown as a card with its four reported metrics.

The meaning of ± and the number of runs were not specified in the reported results. These are three reported configurations, rather than a complete comparison of every model and extractor pairing.

ITC and macrometastasis examples.

In the illustrated ITC-positive example, all three configurations predict negative. The macrometastasis example also separates the approaches: both ViT configurations predict positive, while the EfficientNet configuration predicts negative.

Those examples help put the aggregate scores in perspective. They show individual outcomes, rather than performance estimates for an entire metastasis category.

Limitations and next steps.

The work gave me a practical way to connect model evaluation with the data behind it. Attention maps made individual predictions inspectable; they did not, on their own, establish reliable lesion localisation.

The next steps were pretraining on breast-cancer-specific whole-slide images and integrating attention heatmaps into the Fraunhofer platform. The documented outcome is the research pipeline and its evaluation; clinical heatmap integration remained future work.

  • TFRecords
  • HDF5
  • EfficientNetB0
  • ViT-S / DINO
  • BufferMIL
  • DSMIL
  • PCA
  • Attention analysis

Academic project details

Weakly supervised analysis of lymph nodes in histological Whole-Slide Images with MIL-transformers

Degree
Master’s in Computer Engineering, AI Applications
University
Università degli Studi di Modena e Reggio EmiliaDipartimento di Ingegneria Enzo Ferrari
Academic year
2023/2024
Supervisor
Prof. Elisa Ficarra
Co-supervisors
Prof. Marta Lovino · Dr Francesca Miccolis
Make yourself at home

Search the portfolio.

↑ ↓ navigate↵ openesc close
Quick tour

Explore