SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.14195 · NeurIPS · 2024

Rethinking Transformer for Long Contextual Histopathology Whole Slide Image Analysis

Lin Yang, Honglin Li, Yunlong Zhang, Pingyi Chen, Zhongyi Shui, Chenglu Zhu

arXiv · PDF · Open in the Atlas

Code that ran

4 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 2 failures of our instrument; 2 no recorded run), measured 2026-11-24; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2410.14195.json · badge: /api/ran/2410.14195.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
invoker-LL/Long-MIL canonical (classifier label)
classifier basis: plan_row
3 ran · 2 no recorded run
invoker-ll/long-mil canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
exists Ran
ran, violated the contract we drafted
invoker-LL/Long-MIL/LongMIL.py
pointer only (licence: NONE); the stored copy get_code serves, from ThomasMrY/VCT, is pointer only (licence: NONE) · get_code("aa5486a3650902d8")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, invoker-LL/Long-MIL when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

position_encoding_1d Ran
ran, honoured the contract we drafted
invoker-LL/Long-MIL/rotary.py
pointer only (licence: NONE) · get_code("34a2de60599f1f99")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, invoker-LL/Long-MIL when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

precompute_freqs_cis Ran
ran; our contract draft was wrong, not the code
invoker-ll/long-mil/LongMIL.py
pointer only (licence: NONE) · get_code("721963cc5d972a2f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, invoker-ll/long-mil when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

reshape_for_broadcast Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
invoker-LL/Long-MIL/LongMIL.py
pointer only (licence: NONE); the stored copy get_code serves, from alpha-vllm/llama2-accessory, is pointer only (licence: NOASSERTION) · get_code("70bf6ebaafd266c4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, invoker-LL/Long-MIL when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

apply_rotary_position_embeddings Not yet run
unverified (harvested, no recorded run)
invoker-LL/Long-MIL/rotary.py
pointer only (licence: NONE) · get_code("c78571de33a4939a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, invoker-LL/Long-MIL when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

apply_rotary_position_embeddings_nystrom Not yet run
unverified (harvested, no recorded run)
invoker-LL/Long-MIL/rotary.py
pointer only (licence: NONE) · get_code("8ca25651cae95251")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, invoker-LL/Long-MIL when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 2 the same month, 2 later) and 4 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
exists 486 other papers
385 dated earlier, 11 the same month, 79 later, 9 same year, order not determinable, 2 undated · 78 only as an assembly brick
1603.08155 (2016-03)
Perceptual Losses for Real-Time Style Transfer and Super-Resolution
1611.07004 (2016-11)
Image-to-Image Translation with Conditional Adversarial Networks
1804.04637 (2018-04)
EMBER: An Open Dataset for Training Static PE Malware Machine Learning Models
and 483 more not named here
reshape_for_broadcast 58 other papers
39 dated earlier, 4 the same month, 15 later · 2 only as an assembly brick
2023.emnlp-main.534 (2023 (year only))
Disentangling Transformer Language Models as Superposed Topic Models
2303.09736 (2023-03)
Dynamic Structure Pruning for Compressing CNNs
2307.09288 (2023-07)
Llama 2: Open Foundation and Fine-Tuned Chat Models
and 55 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Histopathology Whole Slide Image (WSI) analysis serves as the gold standard for clinical cancer diagnosis in the daily routines of doctors. To develop computeraided diagnosis model for histopathology WSIs, previous methods typically employ Multi-Instance Learning to enable slide-level prediction given only slide-level labels. Among these models, vanilla attention mechanisms without pairwise interactions have traditionally been employed but are unable to model contextual information. More recently, self-attention models have been utilized to address this issue. To alleviate the computational complexity of long sequences in large WSIs, methods like HIPT use region-slicing, and TransMIL employs Nyströmformer as an approximation of full self-attention. Both approaches suffer from suboptimal performance due to the loss of key information. Moreover, their use of absolute positional embedding struggles to effectively handle long contextual dependencies in shape-varying WSIs. In this paper, we first analyze how the low-rank nature of the long-sequence attention matrix constrains the representation ability of WSI modelling. Then, we demonstrate that the rank of attention matrix can be improved by focusing on local interactions via a local attention mask. Our analysis shows that the local mask aligns with the attention patterns in the lower layers of the Transformer. Furthermore, the local attention mask can be implemented during chunked attention calculation, reducing the quadratic computational complexity to linear with a small local bandwidth. Additionally, this locality helps the model generalize to unseen or under-fitted positions more easily. Building on this, we propose a local-global hybrid Transformer for both computational acceleration and local-global information interactions modelling. Our method, Long-contextual MIL (LongMIL), is evaluated through extensive experiments on various WSI tasks to validate its superiority in: 1) overall performance, 2) memory usage and speed, and 3) extrapolation ability compared to previous methods. Our code will be available at https://github.com/invoker-LL/Long-MIL.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2410.14195")
get_code_for_paper("2410.14195")
have("2410.14195")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2410.14195.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2410.14195.svg)](https://syntology.ai/paper/2410.14195)

Connect an agent — have() is free.