SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2608.09633 · 2026

LoRA-based Adaptation Alone Is Not Enough: Understanding the Limits of Foundation Models for Face Presentation Attack Detection

Peter Lorenz, Anjith George, Sébastien Marcel

arXiv · PDF · Open in the Atlas

Code that ran

6 of 10 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; 0 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 5 failures of our instrument; 4 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/2608.09633.json · badge: /api/ran/2608.09633.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
timesler/facenet-pytorch canonical (classifier label)
classifier basis: census
6 ran · 4 no recorded run
FunctionStatusWhere it lives
accuracy Ran
ran; our contract draft was wrong, not the code
timesler/facenet-pytorch/models/utils/training.py
code served (permissive licence) · get_code("0cb3cf5e7b2e81ef")
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

torch.manual_seed(0)

# Create small tensors for the accuracy function
# logits: shape (batch_size, num_classes) - raw model outputs
# y: shape (batch_size,) - ground truth labels

batch_size = 2
num_classes = 4

logits = torch.randn(batch_size, num_classes)
y = torch.randint(0, num_classes, (batch_size,))

ARGS = {
    "logits": logits,
    "y": y
}
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
bbreg Ran
ran; our contract draft was wrong, not the code
timesler/facenet-pytorch/models/utils/detect_face.py
code served (permissive licence) · get_code("affb8cd2d0d2a245")
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 (2, 5) 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

torch.manual_seed(0)

# boundingbox: tensor of shape (batch, 5+) where columns 0-3 are bbox coordinates
# The function accesses columns 0, 1, 2, 3 and modifies them
boundingbox = torch.tensor([
    [10.0, 20.0, 50.0, 80.0, 1.0],
    [15.0, 25.0, 60.0, 90.0, 1.0]
], dtype=torch.float32)

# reg: tensor of regression offsets
# If reg.shape[1] == 1, it gets reshaped to (reg.shape[2], reg.shape[3])
# Otherwise it's used as-is with shape (batch, 4)
# We'll provide the case where shape[1] != 1, so it's (batch, 4)
reg = torch.tensor([
    [0.1, 0.2, 0.05, 0.15],
    [0.08, 0.12, 0.03, 0.1]
], dtype=torch.float32)

ARGS = {
    "boundingbox": boundingbox,
    "reg": reg
}
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 (2, 5) — shape (2, 5) 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
collate_pil Ran
ran; our contract draft was wrong, not the code
timesler/facenet-pytorch/models/utils/training.py
code served (permissive licence) · get_code("10d0e8e67afff5b2")
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 tuple. 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
from PIL import Image
import io

torch.manual_seed(0)

# Create small PIL images as stand-ins for image data
def create_pil_image(size=(4, 3)):
    """Create a small PIL image"""
    img = Image.new('RGB', size, color=(73, 109, 137))
    return img

# Create sample data: list of (image, label) tuples
# The function expects an iterable of tuples where each tuple is (xx, yy)
sample_data = [
    (create_pil_image((4, 3)), 0),
    (create_pil_image((4, 3)), 1),
]

ARGS = {
    'x': sample_data
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
fixed_image_standardization Ran
ran, violated the contract we drafted
timesler/facenet-pytorch/models/mtcnn.py
code served (permissive licence) · get_code("f3274d8580b03de4")
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 4, dtype family float, shape (2, 4, 3, 3) 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

torch.manual_seed(0)

# The function takes an image_tensor and performs standardization
# image_tensor should be a torch.Tensor with numeric values
# The function subtracts 127.5 and divides by 128.0

image_tensor = torch.randint(0, 256, (2, 4, 3, 3), dtype=torch.float32)

ARGS = {
    "image_tensor": image_tensor
}
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 4, dtype family float, shape (2, 4, 3, 3) — shape (2, 4, 3, 3) 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_layer_indices Ran
ran; our contract draft was wrong, not the code
timesler/facenet-pytorch/models/utils/tensorflow2pytorch.py
code served (permissive licence) · get_code("caa7d288c5d43961")
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 dict. 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 numpy as np

# Construct layer_lookup: dict mapping pytorch attribute names to lists
# where first element is a partial tensorflow variable name
layer_lookup = {
    'conv1': ['conv1_w', 'extra_info'],
    'fc2': ['dense_kernel', 'metadata'],
    'batch_norm': ['BatchNorm', 'unused']
}

# Construct tf_layers: list of tensorflow variable names
tf_layers = [
    'conv1_w:0',
    'conv1_b:0',
    'dense_kernel:0',
    'dense_bias:0',
    'BatchNorm/gamma:0',
    'BatchNorm/beta:0',
    'other_layer:0'
]

ARGS = {
    'layer_lookup': layer_lookup,
    'tf_layers': tf_layers
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
prewhiten Ran
ran; our contract draft was wrong, not the code
timesler/facenet-pytorch/models/mtcnn.py
code served (permissive licence) · get_code("4b408c0f70bc4e29")
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 (2, 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

torch.manual_seed(0)

# Create a small tensor for prewhitening
x = torch.randn(2, 4)

ARGS = {
    'x': x
}
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 (2, 4) — shape (2, 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
detect_face Not yet run
unverified (harvested, no recorded run)
timesler/facenet-pytorch/models/utils/detect_face.py
code served (permissive licence) · get_code("2ed80233fb88c9a2")
How it ran

no invocation recorded.

fixed_batch_process Not yet run
unverified (harvested, no recorded run)
timesler/facenet-pytorch/models/utils/detect_face.py
code served (permissive licence) · get_code("be1eeb67c64b7a65")
How it ran

no invocation recorded.

load_tf_conv2d_trans Not yet run
unverified (harvested, no recorded run)
timesler/facenet-pytorch/models/utils/tensorflow2pytorch.py
code served (permissive licence) · get_code("28704bbbf9820e7b")
How it ran

no invocation recorded.

pass_epoch Not yet run
unverified (harvested, no recorded run)
timesler/facenet-pytorch/models/utils/training.py
code served (permissive licence) · get_code("f8f155e5ea496384")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 9 are also present in other papers whose code we hold (9 with at least one paper dated earlier, 0 the same month, 0 later) and 1 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
fixed_image_standardization 2 other papers
2 dated earlier
1503.03832 (2015-03)
FaceNet: A Unified Embedding for Face Recognition and Clustering
1905.00641 (2019-05)
RetinaFace: Single-stage Dense Face Localisation in the Wild
prewhiten 2 other papers
2 dated earlier
1503.03832 (2015-03)
FaceNet: A Unified Embedding for Face Recognition and Clustering
1903.08527 (2019-03)
Accurate 3D Face Reconstruction with Weakly-Supervised Learning: From Single Image to Image Set
accuracy 1 other paper
1 dated earlier
1503.03832 (2015-03)
FaceNet: A Unified Embedding for Face Recognition and Clustering
bbreg 1 other paper
1 dated earlier
1503.03832 (2015-03)
FaceNet: A Unified Embedding for Face Recognition and Clustering
collate_pil 1 other paper
1 dated earlier
1503.03832 (2015-03)
FaceNet: A Unified Embedding for Face Recognition and Clustering
fixed_batch_process 1 other paper
1 dated earlier
1503.03832 (2015-03)
FaceNet: A Unified Embedding for Face Recognition and Clustering
get_layer_indices 1 other paper
1 dated earlier
1503.03832 (2015-03)
FaceNet: A Unified Embedding for Face Recognition and Clustering
load_tf_conv2d_trans 1 other paper
1 dated earlier
1503.03832 (2015-03)
FaceNet: A Unified Embedding for Face Recognition and Clustering
pass_epoch 1 other paper
1 dated earlier
1503.03832 (2015-03)
FaceNet: A Unified Embedding for Face Recognition and Clustering

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

Face presentation attack detection (PAD) aims to reliably detect a wide range of presentation attacks. While PAD methods achieve strong performance within individual datasets, their performance degrades under cross-dataset evaluation. Variations in sensors or lighting conditions can reduce the effectiveness of detectors from near-perfect to nearly random. Foundation models (FMs) have emerged as a promising alternative because typical PAD datasets, such as the MCIO benchmarks (MSU-MFSD, CASIA-FASD, Replay-Attack, and OULU-NPU), are small relative to the scale used for web-based pretraining. However, existing PAD systems primarily focus on CLIP-based foundation models, while overlooking other FMs with different architectures and training procedures. This study addresses this question by systematically evaluating 32 FMs. Zero-shot prompting achieves performance near chance across model families and scales. The vision encoders, when low-rankadapted (LoRA) with fewer than 1% trainable weights, achieve below 2% intra-dataset ACER in most cases, while cross-dataset ACER is substantially higher. LoRA primarily refines the decision boundary within a dataset, suggesting that pretrained representations and the adaptation dataset play a larger role in cross-dataset generalization than the evaluated lightweight adaptation strategy. paper.pages.idiap.ch/lora-pad.

For agents

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

get_harvested_code_for_paper("2608.09633")
get_code_for_paper("2608.09633")
have("2608.09633")

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

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

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

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

Connect an agent — have() is free.