SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2601.02212 · 2026

Prior-Guided DETR for Ultrasound Nodule Detection

Bo Liu, Zhuo Xiao, Jingjing Wang, Xiangzhi Bai, Xinning Yao, Lijuan Niu, Fugen Zhou

arXiv · PDF · Open in the Atlas

Code that ran

4 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 2 failures of our instrument; 3 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/2601.02212.json · badge: /api/ran/2601.02212.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
wjj1wjj/Ultrasound-DETR community
Papers with Code archive
4 ran · 3 no recorded run
FunctionStatusWhere it lives
DualBranchFusionBlock Ran
ran on a synthesized input · constructed an object; no result was computed
wjj1wjj/Ultrasound-DETR/models/dn_dab_deformable_detr/dab_deformable_detr.py
code served (permissive licence) · get_code("745ae23bd279e8d3")
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, DualBranchFusionBlock: 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
from torch import nn

torch.manual_seed(0)

# Create minimal branch modules that satisfy the forward pass requirements
class DummyBranch(nn.Module):
    def __init__(self, dim):
        super().__init__()
        self.linear = nn.Linear(dim, dim)
    
    def forward(self, x):
        return self.linear(x)

# Create an instance of DualBranchFusionBlock with the required branches
class DualBranchFusionBlockComplete(nn.Module):
    def __init__(self, dim, alpha=0.5, learnable_alpha=True):
        super().__init__()
        if learnable_alpha:
            self.alpha = nn.Parameter(torch.tensor(alpha))
        else:
            self.register_buffer('alpha', torch.tensor(alpha))
        
        self.branch1 = DummyBranch(dim)
        self.branch2 = DummyBranch(dim)
    
    def forward(self, x):
        out1 = self.branch1(x)
        out2 = self.branch2(x)
        alpha = torch.sigmoid(self.alpha) if isinstance(self.alpha, nn.Parameter) else self.alpha
        return alpha * out1 + (1 - alpha) * out2

# Test input: batch size 2, feature dim 4
test_input = torch.randn(2, 4)

ARGS = {
    'dim': 4,
    'alpha': 0.5,
    'learnable_alpha': True,
}
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 DualBranchFusionBlock — 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 DualBranchFusionBlock 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
NestedTensor Ran
ran on a synthesized input · constructed an object; no result was computed
wjj1wjj/Ultrasound-DETR/models/dn_dab_deformable_detr/dab_deformable_detr.py
code served (permissive licence) · get_code("5fcd889ee3ae8609")
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, NestedTensor: 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

torch.manual_seed(0)

# Create a 4D tensor (batch_size=2, channels=3, height=8, width=6)
tensors = torch.randn(2, 3, 8, 6)

# Create a corresponding mask (batch_size=2, height=8, width=6)
# False means valid, True means padding
mask = torch.zeros(2, 8, 6, dtype=torch.bool)
# Add some padding to the first image
mask[0, 6:, :] = True
mask[0, :, 4:] = True
# Add some padding to the second image
mask[1, 7:, :] = True

ARGS = {
    'tensors': tensors,
    'mask': mask,
}
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 NestedTensor — 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 NestedTensor 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
dn_post_process Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
wjj1wjj/Ultrasound-DETR/models/dn_dab_deformable_detr/dab_deformable_detr.py
code served (permissive licence) · get_code("9db6a2fdc3039d38")
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
import numpy as np

torch.manual_seed(0)

# Construct tensor arguments
# outputs_class: shape (batch, num_queries, total_seq_len, num_classes)
batch_size = 2
num_queries = 3
total_seq_len = 10
num_classes = 4

outputs_class = torch.randn(batch_size, num_queries, total_seq_len, num_classes)
outputs_coord = torch.randn(batch_size, num_queries, total_seq_len, 5)

# mask_dict with pad_size > 0 to trigger the if branch
mask_dict = {
    'pad_size': 4
}

ARGS = {
    'outputs_class': outputs_class,
    'outputs_coord': outputs_coord,
    'mask_dict': mask_dict
}
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 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
nested_tensor_from_tensor_list Ran
ran; our contract draft was wrong, not the code
wjj1wjj/Ultrasound-DETR/models/dn_dab_deformable_detr/dab_deformable_detr.py
code served (permissive licence) · get_code("966e78e3ec193e43")
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 NestedTensor. 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 typing import List
from torch import Tensor

torch.manual_seed(0)

# Create a list of 3D tensors with different sizes
# Each tensor has shape (C, H, W) where C=channels, H=height, W=width
tensor1 = torch.randn(3, 4, 5)  # 3 channels, 4 height, 5 width
tensor2 = torch.randn(3, 6, 7)  # 3 channels, 6 height, 7 width

tensor_list = [tensor1, tensor2]

ARGS = {
    'tensor_list': tensor_list
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type NestedTensor — a NestedTensor output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a NestedTensor 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
DABDeformableDETR Not yet run
unverified (harvested, no recorded run)
wjj1wjj/Ultrasound-DETR/models/dn_dab_deformable_detr/dab_deformable_detr.py
code served (permissive licence) · get_code("26b1599df9b1b0f3")
How it ran

no invocation recorded.

_onnx_nested_tensor_from_tensor_list Not yet run
unverified (harvested, no recorded run)
wjj1wjj/Ultrasound-DETR/models/dn_dab_deformable_detr/dab_deformable_detr.py
code served (permissive licence) · get_code("49d50b270cc3e546")
How it ran

no invocation recorded.

prepare_for_dn Not yet run
unverified (harvested, no recorded run)
wjj1wjj/Ultrasound-DETR/models/dn_dab_deformable_detr/dab_deformable_detr.py
code served (permissive licence) · get_code("c62b0d3aac7229c6")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 1 the same month, 0 later) and 3 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
nested_tensor_from_tensor_list
brick of this paper's assembly: helper
55 other papers
55 dated earlier · 17 only as an assembly brick
1608.03983 (2016-08)
SGDR: Stochastic Gradient Descent with Warm Restarts
2005.12872 (2020-05)
End-to-End Object Detection with Transformers
2101.01909 (2021-01)
Line Segment Detection Using Transformers without Edges
and 52 more not named here
_onnx_nested_tensor_from_tensor_list
brick of this paper's assembly: helper
24 other papers
24 dated earlier · 17 only as an assembly brick
2005.12872 (2020-05)
End-to-End Object Detection with Transformers
2103.14167 (2021-03)
COTR: Correspondence Transformer for Matching Across Images
2104.07434 (2021-04)
Points as Queries: Weakly Semi-supervised Object Detection by Points
and 21 more not named here
NestedTensor
brick of this paper's assembly: helper
9 other papers
9 dated earlier · 7 only as an assembly brick
2201.12329 (2022-01)
DAB-DETR: Dynamic Anchor Boxes are Better Queries for DETR
2203.01305 (2022-03)
DN-DETR: Accelerate DETR Training by Introducing Query DeNoising
2212.07855 (2022-12)
QueryPose: Sparse Multi-Person Pose Regression via Spatial-Aware Part-Level Query
and 6 more not named here
dn_post_process
brick of this paper's assembly: helper
5 other papers
4 dated earlier, 1 the same month · 1 only as an assembly brick
2201.12329 (2022-01)
DAB-DETR: Dynamic Anchor Boxes are Better Queries for DETR
2203.01305 (2022-03)
DN-DETR: Accelerate DETR Training by Introducing Query DeNoising
2206.02777 (2022-06)
Mask DINO: Towards A Unified Transformer-based Framework for Object Detection and Segmentation
and 2 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-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

Accurate detection of ultrasound nodules is essential for the early diagnosis and treatment of thyroid and breast cancers. However, this task remains challenging due to irregular nodule shapes, indistinct boundaries, substantial scale variations, and the presence of speckle noise that degrades structural visibility. To address these challenges, we propose a prior-guided DETR framework specifically designed for ultrasound nodule detection. Instead of relying on purely data-driven feature learning, the proposed framework progressively incorporates different prior knowledge at multiple stages of the network. First, a Spatially-adaptive Deformable FFN with Prior Regularization (SDFPR) is embedded into the CNN backbone to inject geometric priors into deformable sampling, stabilizing feature extraction for irregular and blurred nodules. Second, a Multi-scale Spatial-Frequency Feature Mixer (MSFFM) is designed to extract multi-scale structural priors, where spatial-domain processing emphasizes contour continuity and boundary cues, while frequency-domain modeling captures global morphology and suppresses speckle noise. Furthermore, a Dense Feature Interaction (DFI) mechanism propagates and exploits these prior-modulated features across all encoder layers, enabling the decoder to enhance query refinement under consistent geometric and structural guidance. Experiments conducted on two clinically collected thyroid ultrasound datasets (Thyroid I and Thyroid II) and two public benchmarks (TN3K and BUSI) for thyroid and breast nodules demonstrate that the proposed method achieves superior accuracy compared with 18 detection methods, particularly in detecting morphologically complex nodules. These results highlight the effectiveness and generalizability of progressively integrating prior knowledge for robust ultrasound nodule detection. The source code is publicly available at https://github.com/wjj1wjj/Ultrasound-DETR.

For agents

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

get_harvested_code_for_paper("2601.02212")
get_code_for_paper("2601.02212")
have("2601.02212")

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

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

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

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

Connect an agent — have() is free.