SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2006.15486 · ICML · 2020

Laplacian Regularized Few-Shot Learning

Imtiaz Masud, Jose Dolz, Eric Granger, Ismail Ayed

arXiv · PDF · Open in the Atlas

Code that ran

5 of 12 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, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 7 no recorded run), measured 2026-11-22; 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/2006.15486.json · badge: /api/ran/2006.15486.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
imtiazziko/LaplacianShot canonical (classifier label)
classifier basis: classifier_2025
3 ran · 4 no recorded run
sicara/easy-few-shot-learning community
Papers with Code archive
2 ran · 3 no recorded run
FunctionStatusWhere it lives
bound_update Ran
ran; our contract draft was wrong, not the code
imtiazziko/LaplacianShot/src/lshot_update.py
pointer only (licence: NONE) · get_code("412628ee1492fcea")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, imtiazziko/LaplacianShot 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.

compute_prototypes Ran
ran; our contract draft was wrong, not the code
sicara/easy-few-shot-learning/easyfsl/methods/laplacian_shot.py
code served (permissive licence) · get_code("02aec2b511f4f3a6")
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) and returned Tensor, ndim 2, dtype family float, shape (3, 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
from torch import Tensor

torch.manual_seed(0)

# Create support features: shape (6, 4) - 6 instances, 4-dimensional features
support_features = torch.randn(6, 4)

# Create support labels: shape (6,) - 6 instances with 3 classes (0, 1, 2)
# Each class appears twice
support_labels = torch.tensor([0, 0, 1, 1, 2, 2])

ARGS = {
    "support_features": support_features,
    "support_labels": support_labels,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 (3, 4) — shape (3, 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
entropy_energy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
imtiazziko/LaplacianShot/src/lshot_update.py
pointer only (licence: NONE) · get_code("fc3387e933dea239")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, imtiazziko/LaplacianShot 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.

k_nearest_neighbours Ran
ran; our contract draft was wrong, not the code
sicara/easy-few-shot-learning/easyfsl/methods/laplacian_shot.py
code served (permissive licence) · get_code("d8f6b2d9859ab547")
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) and returned Tensor, ndim 2, dtype family int, shape (2, 0) 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
from torch import Tensor

torch.manual_seed(0)

# Create small feature tensor: (n_features=2, feature_dimension=4)
features = torch.randn(2, 4)

# Set k to a valid value (less than n_features to get k nearest neighbours excluding self)
k = 1

# Set p_norm to L2 distance
p_norm = 2

ARGS = {
    "features": features,
    "k": k,
    "p_norm": p_norm,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 int, shape (2, 0) — shape (2, 0) 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
normalize Ran
ran, honoured the contract we drafted
imtiazziko/LaplacianShot/src/lshot_update.py
pointer only (licence: NONE) · get_code("5875172ea7fd5f6e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, imtiazziko/LaplacianShot 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.

BDCSPN Not yet run
unverified (harvested, no recorded run)
sicara/easy-few-shot-learning/easyfsl/methods/laplacian_shot.py
code served (permissive licence) · get_code("92a9fdbae916066b")
How it ran

no invocation recorded.

FewShotClassifier Not yet run
unverified (harvested, no recorded run)
sicara/easy-few-shot-learning/easyfsl/methods/laplacian_shot.py
code served (permissive licence) · get_code("501d7cd21e944a57")
How it ran

no invocation recorded.

LaplacianShot Not yet run
unverified (harvested, no recorded run)
sicara/easy-few-shot-learning/easyfsl/methods/laplacian_shot.py
code served (permissive licence) · get_code("e95365a714038248")
How it ran

no invocation recorded.

entropy_energy Not yet run
unverified (harvested, no recorded run)
imtiazziko/LaplacianShot/src/lshot_update.py
pointer only (licence: NONE) · get_code("ff627ba7bc79ad86")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, imtiazziko/LaplacianShot 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.

normalize Not yet run
unverified (harvested, no recorded run)
imtiazziko/LaplacianShot/src/lshot_update.py
pointer only (licence: NONE) · get_code("59408e6a01fc64dc")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, imtiazziko/LaplacianShot 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.

normalize_2 Not yet run
unverified (harvested, no recorded run)
imtiazziko/LaplacianShot/src/lshot_update.py
pointer only (licence: NONE) · get_code("7710a2080630a669")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, imtiazziko/LaplacianShot 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.

plot_convergence Not yet run
unverified (harvested, no recorded run)
imtiazziko/LaplacianShot/src/lshot_update.py
pointer only (licence: NONE) · get_code("bc3eff8cc77ddee0")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, imtiazziko/LaplacianShot 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 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 2 later) and 8 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
FewShotClassifier
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later
1703.05175 (2017-03)
Prototypical Networks for Few-shot Learning
2008.11297 (2020-08)
Transductive Information Maximization For Few-Shot Learning
compute_prototypes
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later
1703.05175 (2017-03)
Prototypical Networks for Few-shot Learning
2008.11297 (2020-08)
Transductive Information Maximization For Few-Shot Learning

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

Repositories linked to this paper

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

Abstract

We propose a transductive Laplacian-regularized inference for few-shot tasks. Given any feature embedding learned from the base classes, we minimize a quadratic binary-assignment function containing two terms: (1) a unary term assigning query samples to the nearest class prototype, and (2) a pairwise Laplacian term encouraging nearby query samples to have consistent label assignments. Our transductive inference does not re-train the base model, and can be viewed as a graph clustering of the query set, subject to supervision constraints from the support set. We derive a computationally efficient bound optimizer of a relaxation of our function, which computes independent (parallel) updates for each query sample, while guaranteeing convergence. Following a simple cross-entropy training on the base classes, and without complex meta-learning strategies, we conducted comprehensive experiments over five fewshot learning benchmarks. Our LaplacianShot consistently outperforms state-of-the-art methods by significant margins across different models, settings, and data sets. Furthermore, our transductive inference is very fast, with computational times that are close to inductive inference, and can be used for large-scale few-shot tasks.

For agents

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

get_harvested_code_for_paper("2006.15486")
get_code_for_paper("2006.15486")
have("2006.15486")

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

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

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

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

Connect an agent — have() is free.