SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2607.11257 · 2026

LaGuadia: Language-Guided Adaptive Distillation from Pathology Foundation Models

Gangsu Kim, Ki Jeong

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 (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 3 failures of our instrument; 2 no recorded run), measured 2026-11-23; 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/2607.11257.json · badge: /api/ran/2607.11257.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
hvcl/LaGuadia community
Papers with Code archive
4 ran · 2 no recorded run
FunctionStatusWhere it lives
DistillProjector Ran
ran on a synthesized input · constructed an object; no result was computed
hvcl/LaGuadia/laguadia/laguadia.py
code served (permissive licence) · get_code("fcbe79c4f43201e6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, DistillProjector: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# DistillProjector takes dim_s (student dimension) and dim_t (teacher dimension)
# The forward method takes a cls tensor and applies LayerNorm then Linear projection
# We need to define the dimensions and create a sample input tensor

dim_s = 4  # student dimension
dim_t = 3  # teacher dimension (distinct from dim_s for clarity)

ARGS = {
    "dim_s": dim_s,
    "dim_t": dim_t,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DistillProjector — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a DistillProjector output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
cosine_distill_per_sample Ran
ran; our contract draft was wrong, not the code
hvcl/LaGuadia/laguadia/laguadia.py
code served (permissive licence) · get_code("1497efea8fff3378")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 1, dtype family float, shape (2,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# Create small tensors for pred and target
# pred: predictions from model, shape (batch_size, feature_dim)
# target: ground truth targets, shape (batch_size, feature_dim)
batch_size = 2
feature_dim = 4

pred = torch.randn(batch_size, feature_dim)
target = torch.randn(batch_size, feature_dim)

ARGS = {
    "pred": pred,
    "target": target,
    "eps": 1e-08
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family float, shape (2,) — shape (2,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_mean_similarity_boundary Ran
ran; our contract draft was wrong, not the code
hvcl/LaGuadia/laguadia/laguadia.py
code served (permissive licence) · get_code("ac63873b9ef3cbaa")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# Create small tensors for the function
# _anchor: used in F.cosine_similarity with dim=1, so shape (batch, dim)
# _key_embeds: used in F.cosine_similarity with dim=1, so shape (batch, dim)
# Both need to have the same embedding dimension for cosine_similarity to work

batch_size = 2
embedding_dim = 4

_anchor = torch.randn(batch_size, embedding_dim)
_key_embeds = torch.randn(batch_size, embedding_dim)

ARGS = {
    "_anchor": _anchor,
    "_key_embeds": _key_embeds,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_negative_pairs Ran
ran; our contract draft was wrong, not the code
hvcl/LaGuadia/laguadia/laguadia.py
code served (permissive licence) · get_code("5ebac4741568e1dd")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (5, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# Create anchor tensor: shape (1, 4) - single anchor with 4-dim embedding
_anchor = torch.randn(1, 4)

# Create bank_items tensor: shape (8, 4) - 8 items with 4-dim embeddings
_bank_items = torch.randn(8, 4)

# Create min_sim threshold: tensor with value 0.5
_min_sim = torch.tensor([0.5])

# Number of negative pairs to sample
n = 5

ARGS = {
    "_anchor": _anchor,
    "_bank_items": _bank_items,
    "_min_sim": _min_sim,
    "n": n
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (5, 4) — shape (5, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
LaGuadiaModel Not yet run
unverified (harvested, no recorded run)
hvcl/LaGuadia/laguadia/laguadia.py
code served (permissive licence) · get_code("cd07b7dcc273762a")
How it ran

no invocation recorded.

freeze_model Not yet run
unverified (harvested, no recorded run)
hvcl/LaGuadia/laguadia/laguadia.py
code served (permissive licence) · get_code("b1a3f9e4ce80bfed")
How it ran

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, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 6 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.

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-23.

Repositories linked to this paper

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

Abstract

Pathology Foundation Models (PFMs) offer powerful Whole Slide Image (WSI) representations but suffer from massive computational costs. While Knowledge Distillation (KD) can create efficient student models, existing multi-teacher methods often use suboptimal uniform weighting that ignores tissue heterogeneity. We propose LaGuadia (Language-Guided Adaptive DistillAtion), a framework that develops a compact pathology image encoder by dynamically integrating expertise from multiple PFMs under clinical linguistic guidance. Our approach utilizes a multi-stage pipeline: first, extracting visually observable clinical keywords from pathology reports; second, aligning visual features with these keywords via a Vision-Language meta-teacher (Med-SigLIP) to provide dense semantic guidance; and finally, performing adaptive KD where teacher contributions are weighted based on their semantic alignment with the clinical narrative. Experiments on WSI captioning, visual question answering, and slide-level classification tasks demonstrate that an 87M parameter LaGuadia student model matches or exceeds foundation-scale models such as GigaPath and UNI, achieving strong factual consistency and robust generalization. These results highlight clinical language as an effective semantic anchor for building efficient and reliable digital pathology systems. Code is available at https://github.com/hvcl/LaGuadia.

For agents

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

get_harvested_code_for_paper("2607.11257")
get_code_for_paper("2607.11257")
have("2607.11257")

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

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

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

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

Connect an agent — have() is free.