SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.10207 · ICLR · 2024

Bongard-OpenWorld: Few-Shot Reasoning for Free-form Visual Concepts in the Real World

Wei Wang, Song-Chun Zhu, Qing Li, Yizhou Wang, Xiaojian Ma, Rujie Wu, Zhenliang Zhang

arXiv · PDF · Open in the Atlas

Code that ran

8 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, 0 violated it and 0 have no contract verdict; 8 failures of our instrument; 2 no recorded run), measured 2026-11-23; 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/2310.10207.json · badge: /api/ran/2310.10207.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
joyjayng/Bongard-OpenWorld canonical (classifier label)
classifier basis: census
8 ran · 2 no recorded run
FunctionStatusWhere it lives
ProtoNetHead Ran
ran; our contract draft was wrong, not the code
joyjayng/Bongard-OpenWorld/models/head/metaoptnet.py
code served (permissive licence) · get_code("b4edb9b80c9d3e38")
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 3, dtype family float, shape (2, 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

torch.manual_seed(0)

# Parameters for ProtoNetHead
tasks_per_batch = 2
n_query = 3
n_way = 4
n_shot = 2
n_support = n_way * n_shot  # 8
d = 5  # embedding dimension

# Create query tensor: (tasks_per_batch, n_query, d)
query = torch.randn(tasks_per_batch, n_query, d)

# Create support tensor: (tasks_per_batch, n_support, d)
support = torch.randn(tasks_per_batch, n_support, d)

# Create support_labels: (tasks_per_batch, n_support)
# Labels should be in range [0, n_way)
support_labels = torch.tensor([
    [0, 0, 1, 1, 2, 2, 3, 3],  # task 1
    [0, 0, 1, 1, 2, 2, 3, 3]   # task 2
], dtype=torch.long)

ARGS = {
    "query": query,
    "support": support,
    "support_labels": support_labels,
    "n_way": n_way,
    "n_shot": n_shot,
    "normalize": 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 Tensor, ndim 3, dtype family float, shape (2, 3, 4) — shape (2, 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
collate_images_boxes_dict Ran
ran; our contract draft was wrong, not the code
joyjayng/Bongard-OpenWorld/datasets/bongard_ow.py
code served (permissive licence) · get_code("3ae55a3a12538d0b")
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

torch.manual_seed(0)

# The function collate_images_boxes_dict expects a batch parameter
# which is a list of dictionaries. Each dictionary should contain
# torch.Tensors (for images) and potentially other data (like boxes).

# Create sample batch data
batch = [
    {
        "image": torch.randn(3, 4, 5),  # 3 channels, 4 height, 5 width
        "boxes": torch.tensor([[1, 2, 3, 4], [5, 6, 7, 8]]),  # 2D tensor (not padded)
    },
    {
        "image": torch.randn(3, 6, 7),  # 3 channels, 6 height, 7 width (different size)
        "boxes": torch.tensor([[9, 10, 11, 12]]),  # 2D tensor (not padded)
    },
]

ARGS = {
    "batch": batch,
}
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 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
computeGramMatrix Ran
ran; our contract draft was wrong, not the code
joyjayng/Bongard-OpenWorld/models/head/metaoptnet.py
code served (permissive licence) · get_code("691b2fde39c5dae5")
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 3, dtype family float, shape (2, 3, 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)

# Create tensors with distinct dimensions for clarity
# A: (n_batch=2, n=3, d=4)
# B: (n_batch=2, m=5, d=4)
A = torch.randn(2, 3, 4)
B = torch.randn(2, 5, 4)

ARGS = {
    "A": A,
    "B": B,
}
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 3, dtype family float, shape (2, 3, 5) — shape (2, 3, 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
drop_path Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
joyjayng/Bongard-OpenWorld/models/encoder/swin_transformer.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from gladzhang/Xformer, is pointer only (licence: NONE) · get_code("55120f2026b56aa2")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from gladzhang/Xformer, and GitHub detected no licence in that repository 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.

register Ran
ran; our contract draft was wrong, not the code
joyjayng/Bongard-OpenWorld/models/model.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from liyuantsao/flowsr-lp, is pointer only (licence: NONE) · get_code("44c3aa4c610ea3f7")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from liyuantsao/flowsr-lp, and GitHub detected no licence in that repository 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.

register Ran
ran; our contract draft was wrong, not the code
joyjayng/Bongard-OpenWorld/datasets/dataset.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from daidaijr/EAMamba, is pointer only (licence: NONE) · get_code("9687bf7a922f098a")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from daidaijr/EAMamba, and GitHub detected no licence in that repository 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.

trunc_normal_ Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
joyjayng/Bongard-OpenWorld/models/encoder/swin_transformer.py
code served (permissive licence) · get_code("983aa087baf88891")
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
import math

torch.manual_seed(0)

# Create a small tensor to initialize with truncated normal distribution
tensor = torch.empty(2, 4)

# Define arguments for trunc_normal_ function
ARGS = {
    'tensor': tensor,
    'mean': 0.0,
    'std': 1.0,
    'a': -2.0,
    'b': 2.0
}
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
window_partition Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
joyjayng/Bongard-OpenWorld/models/encoder/swin_transformer.py
code served (permissive licence) · get_code("f9fd6241d935f07b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned Tensor, ndim 4, dtype family float, shape (12, 4, 4, 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 tensor with shape (B, H, W, C)
# B = 2 (batch size)
# H = 8 (height, must be divisible by window_size)
# W = 12 (width, must be divisible by window_size)
# C = 4 (channels)
# window_size = 4

B = 2
H = 8
W = 12
C = 4
window_size = 4

x = torch.randn(B, H, W, C)

ARGS = {
    'x': x,
    'window_size': window_size
}
Setup block drafted by
a language model, Claude Sonnet 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 4, dtype family float, shape (12, 4, 4, 4) — shape (12, 4, 4, 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
make Not yet run
unverified (harvested, no recorded run)
joyjayng/Bongard-OpenWorld/models/model.py
code served (permissive licence) · get_code("223edb92edf72b15")
How it ran

no invocation recorded.

make Not yet run
unverified (harvested, no recorded run)
joyjayng/Bongard-OpenWorld/datasets/dataset.py
code served (permissive licence) · get_code("03122b1841d3f72e")
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, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 3 the same month, 6 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
drop_path 224 other papers
117 dated earlier, 7 the same month, 93 later, 6 same year, order not determinable, 1 undated · 38 only as an assembly brick
2003.12039 (2020-03)
RAFT: Recurrent All-Pairs Field Transforms for Optical Flow
2007.09384 (2020-07)
Multi-Scale Positive Sample Refinement for Few-Shot Object Detection
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
and 221 more not named here
window_partition 223 other papers
113 dated earlier, 7 the same month, 94 later, 9 same year, order not determinable · 32 only as an assembly brick
1706.03762 (2017-06)
Attention Is All You Need
1711.10925 (2017-11)
Deep Image Prior
2003.13678 (2020-03)
Designing Network Design Spaces
and 220 more not named here
trunc_normal_ 160 other papers
77 dated earlier, 4 the same month, 77 later, 2 same year, order not determinable · 36 only as an assembly brick
1911.10194 (2019-11)
Panoptic-DeepLab: A Simple, Strong, and Fast Baseline for Bottom-Up Panoptic Segmentation
2005.10242 (2020-05)
Understanding Contrastive Representation Learning through Alignment and Uniformity on the Hypersphere
2007.12911 (2020-07)
Tighter risk certificates for neural networks
and 157 more not named here
register 24 other papers
9 dated earlier, 13 later, 2 same year, order not determinable · 9 only as an assembly brick
2003.04390 (2020-03)
Meta-Baseline: Exploring Simple Meta-Learning for Few-Shot Learning
2010.00763 (2020-10)
BONGARD-LOGO: A New Benchmark for Human-Level Concept Learning and Reasoning
2111.00195 (2021-11)
Learning Continuous Representation of Audio for Arbitrary Scale Super Resolution
and 21 more not named here
computeGramMatrix 8 other papers
7 dated earlier, 1 later · 1 only as an assembly brick
1703.05175 (2017-03)
Prototypical Networks for Few-shot Learning
ijcai2020_0377 (2020 (year only))
Consistent MetaReg: Alleviating Intra-task Discrepancy for Better Meta-knowledge
2010.00763 (2020-10)
BONGARD-LOGO: A New Benchmark for Human-Level Concept Learning and Reasoning
and 5 more not named here
register 5 other papers
1 dated earlier, 3 later, 1 same year, order not determinable
2111.08918 (2021-11)
Local Texture Estimator for Implicit Representation Function
Pak_B-Spline_Texture_Coefficients_Estimator_for_Screen_Content_Image_Super-Resolution_CVPR_2023_paper (2023 (year only))
B-spline Texture Coefficients Estimator for Screen Content Image Super-Resolution
2312.07374 (2023-12)
Relax Image-Specific Prompt Requirement in SAM: A Single Generic Prompt for Segmenting Camouflaged Objects
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

We introduce Bongard-OpenWorld, a new benchmark for evaluating real-world few-shot reasoning for machine vision. It originates from the classical Bongard Problems (BPs): Given two sets of images (positive and negative), the model needs to identify the set that query images belong to by inducing the visual concepts, which is exclusively depicted by images from the positive set. Our benchmark inherits the few-shot concept induction of the original BPs while adding the two novel layers of challenge: 1) open-world free-form concepts, as the visual concepts in Bongard-OpenWorld are unique compositions of terms from an open vocabulary, ranging from object categories to abstract visual attributes and commonsense factual knowledge; 2) real-world images, as opposed to the synthetic diagrams used by many counterparts. In our exploration, Bongard-OpenWorld already imposes a significant challenge to current few-shot reasoning algorithms. We further investigate to which extent the recently introduced Large Language Models (LLMs) and Vision-Language Models (VLMs) can solve our task, by directly probing VLMs, and combining VLMs and LLMs in an interactive reasoning scheme. We even conceived a neuro-symbolic reasoning approach that reconciles LLMs & VLMs with logical reasoning to emulate the human problem-solving process for Bongard Problems. However, none of these approaches manage to close the human-machine gap, as the best learner achieves 64% accuracy while human participants easily reach 91%. We hope Bongard-OpenWorld can help us better understand the limitations of current visual intelligence and facilitate future research on visual agents with stronger few-shot visual reasoning capabilities.

For agents

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

get_harvested_code_for_paper("2310.10207")
get_code_for_paper("2310.10207")
have("2310.10207")

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

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

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

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

Connect an agent — have() is free.