SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2312.16222 · 2023

Segment Any Events via Weighted Adaptation of Pivotal Tokens

arXiv · PDF · Open in the Atlas

Code that ran

7 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; 7 failures of our instrument; 3 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/2312.16222.json · badge: /api/ran/2312.16222.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
happychenpipi/eventsam canonical (classifier label)
classifier basis: census
7 ran · 3 no recorded run
FunctionStatusWhere it lives
compute_attn_weighted_similarity_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
happychenpipi/eventsam/event_encoder/loss/loss_function.py
code served (permissive licence) · get_code("d689131ee3dc4e0a")
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 torch.nn as nn

torch.manual_seed(0)

# Create tiny embeddings for image and evimg
batch_size = 2
embedding_dim = 4
num_blocks = 3

image_embeddings_dict = {
    'block_0': torch.randn(batch_size, embedding_dim),
    'block_1': torch.randn(batch_size, embedding_dim),
    'block_2': torch.randn(batch_size, embedding_dim),
}

evimg_embeddings_dict = {
    'block_0': torch.randn(batch_size, embedding_dim),
    'block_1': torch.randn(batch_size, embedding_dim),
    'block_2': torch.randn(batch_size, embedding_dim),
}

# Create token weights dict with attention weights
token_weights_dict = {
    'block_0': torch.ones(batch_size, embedding_dim) * 0.5,
    'block_1': torch.ones(batch_size, embedding_dim) * 0.7,
    'block_2': torch.ones(batch_size, embedding_dim) * 0.9,
}

# Create block feature indexes - which blocks to process
block_feature_indexes = [0, 1, 2]

# Create block loss weights - weight for each block
block_loss_weight = [1.0, 0.8, 0.6]

ARGS = {
    'image_embeddings_dict': image_embeddings_dict,
    'evimg_embeddings_dict': evimg_embeddings_dict,
    'block_feature_indexes': block_feature_indexes,
    'block_loss_weight': block_loss_weight,
    'token_weights_dict': token_weights_dict,
}
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 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
get_rel_pos Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
happychenpipi/eventsam/segment_anything/modeling/image_encoder.py
code served (permissive licence) · get_code("733d7f0bedcb74c2")
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 3, dtype family float, shape (3, 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
import torch.nn.functional as F

torch.manual_seed(0)

# Create a small relative position embedding tensor
# Shape: (L, C) where L is the sequence length and C is the channel dimension
# Using a small size that will be resized by the function
rel_pos = torch.randn(5, 4)  # 5 positions, 4 channels

# Define query and key sizes
q_size = 3
k_size = 4

ARGS = {
    "q_size": q_size,
    "k_size": k_size,
    "rel_pos": rel_pos,
}
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 3, dtype family float, shape (3, 4, 4) — shape (3, 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
get_unique_colors Ran
ran; our contract draft was wrong, not the code
happychenpipi/eventsam/evaluate/calculate_metric.py
code served (permissive licence) · get_code("66e534e459b3b575")
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 set. 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)

# The function get_unique_colors iterates over img as:
# for m2d in img (outer loop)
#   for v in m2d (inner loop)
# It then converts each v to a tuple and adds to a set.
# This suggests img is a 3D structure: img -> 2D arrays -> 1D elements
# Each element v is converted to tuple, suggesting it's an array-like

# Create a small 3D image-like structure
# Shape: (2, 3, 4) - 2 "rows", 3 "columns", 4 "channels"
img = [
    [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]],
    [[1, 2, 3, 4], [13, 14, 15, 16], [17, 18, 19, 20]]
]

ARGS = {
    'img': img
}
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 set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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
mask_from_color Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
happychenpipi/eventsam/evaluate/calculate_metric.py
code served (permissive licence) · get_code("1629a39a857cb6d2")
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 ndarray, ndim 2, dtype family int, shape (4, 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 numpy as np

# Create a small test image (height=4, width=3, channels=3)
img = np.array([
    [[255, 0, 0], [0, 255, 0], [0, 0, 255]],
    [[255, 0, 0], [0, 255, 0], [0, 0, 255]],
    [[100, 100, 100], [200, 200, 200], [50, 50, 50]],
    [[255, 0, 0], [0, 255, 0], [0, 0, 255]],
], dtype=np.uint8)

# Define a color to mask (e.g., red)
color = [255, 0, 0]

ARGS = {
    "img": img,
    "color": color,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family int, shape (4, 3) — shape (4, 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
unique_colors_and_counts_in_part Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
happychenpipi/eventsam/evaluate/calculate_metric.py
code served (permissive licence) · get_code("a26e792dcda690cc")
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 numpy as np

# The function takes img_part which should be a numpy array
# It reshapes it to (-1, 3), so it expects the last dimension to be 3 (RGB colors)
# We'll create a small image part with multiple pixels, each with 3 color channels

# Create a small image part: 4 pixels × 3 channels (RGB)
img_part = np.array([
    [255, 0, 0],      # Red pixel
    [0, 255, 0],      # Green pixel
    [255, 0, 0],      # Red pixel (duplicate color)
    [0, 0, 255],      # Blue pixel
], dtype=np.uint8)

ARGS = {
    "img_part": img_part
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
window_partition Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
happychenpipi/eventsam/segment_anything/modeling/image_encoder.py
pointer only (licence: MIT); the stored copy get_code serves, from LeapLabTHU/EchoWorld, is pointer only (licence: NONE) · get_code("105fa08885dc36cc")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from LeapLabTHU/EchoWorld, 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.

window_unpartition Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
happychenpipi/eventsam/segment_anything/modeling/image_encoder.py
pointer only (licence: MIT); the stored copy get_code serves, from yatengLG/ISAT_with_segment_anything, is pointer only (licence: NOASSERTION) · get_code("27be441cc8213e52")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from yatengLG/ISAT_with_segment_anything, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

build_sam_vit_b Not yet run
unverified (harvested, no recorded run)
happychenpipi/eventsam/segment_anything/build_sam.py
pointer only (licence: MIT); the stored copy get_code serves, from yatengLG/ISAT_with_segment_anything, is pointer only (licence: NOASSERTION) · get_code("f9bc5f31ce61cee8")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from yatengLG/ISAT_with_segment_anything, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

build_sam_vit_h Not yet run
unverified (harvested, no recorded run)
happychenpipi/eventsam/segment_anything/build_sam.py
pointer only (licence: MIT); the stored copy get_code serves, from yatengLG/ISAT_with_segment_anything, is pointer only (licence: NOASSERTION) · get_code("6b77c1f11fff3ed6")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from yatengLG/ISAT_with_segment_anything, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

build_sam_vit_l Not yet run
unverified (harvested, no recorded run)
happychenpipi/eventsam/segment_anything/build_sam.py
pointer only (licence: MIT); the stored copy get_code serves, from yatengLG/ISAT_with_segment_anything, is pointer only (licence: NOASSERTION) · get_code("3f8890e695469246")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from yatengLG/ISAT_with_segment_anything, and GitHub could not classify the licence of that repository (NOASSERTION). 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 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, 6 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
get_rel_pos 47 other papers
19 dated earlier, 3 the same month, 25 later · 5 only as an assembly brick
2304.02643 (2023-04)
Segment Anything
2304.06790 (2023-04)
Inpaint Anything: Segment Anything Meets Image Inpainting
2304.12306 (2023-04)
Segment Anything in Medical Images
and 44 more not named here
window_partition 47 other papers
19 dated earlier, 2 the same month, 26 later · 1 only as an assembly brick
2304.02643 (2023-04)
Segment Anything
2304.06790 (2023-04)
Inpaint Anything: Segment Anything Meets Image Inpainting
2304.12306 (2023-04)
Segment Anything in Medical Images
and 44 more not named here
window_unpartition 46 other papers
19 dated earlier, 2 the same month, 25 later · 1 only as an assembly brick
2304.02643 (2023-04)
Segment Anything
2304.06790 (2023-04)
Inpaint Anything: Segment Anything Meets Image Inpainting
2304.12306 (2023-04)
Segment Anything in Medical Images
and 43 more not named here
build_sam_vit_h 37 other papers
12 dated earlier, 4 the same month, 21 later · 2 only as an assembly brick
2304.06790 (2023-04)
Inpaint Anything: Segment Anything Meets Image Inpainting
2304.12306 (2023-04)
Segment Anything in Medical Images
2305.01586 (2023-05)
An Alternative to WSSS? An Empirical Study of the Segment Anything Model (SAM) on Weakly-Supervised Semantic Segmentation Problems
and 34 more not named here
build_sam_vit_b 34 other papers
12 dated earlier, 4 the same month, 18 later
2304.06790 (2023-04)
Inpaint Anything: Segment Anything Meets Image Inpainting
2304.12306 (2023-04)
Segment Anything in Medical Images
2305.01586 (2023-05)
An Alternative to WSSS? An Empirical Study of the Segment Anything Model (SAM) on Weakly-Supervised Semantic Segmentation Problems
and 31 more not named here
build_sam_vit_l 34 other papers
12 dated earlier, 4 the same month, 18 later
2304.06790 (2023-04)
Inpaint Anything: Segment Anything Meets Image Inpainting
2304.12306 (2023-04)
Segment Anything in Medical Images
2305.01586 (2023-05)
An Alternative to WSSS? An Empirical Study of the Segment Anything Model (SAM) on Weakly-Supervised Semantic Segmentation Problems
and 31 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

In this paper, we delve into the nuanced challenge of tailoring the Segment Anything Models (SAMs) for integration with event data, with the overarching objective of attaining robust and universal object segmentation within the event-centric domain. One pivotal issue at the heart of this endeavor is the precise alignment and calibration of embeddings derived from event-centric data such that they harmoniously coincide with those originating from RGB imagery. Capitalizing on the vast repositories of datasets with paired events and RGB images, our proposition is to harness and extrapolate the profound knowledge encapsulated within the pre-trained SAM framework. As a cornerstone to achieving this, we introduce a multi-scale feature distillation methodology. This methodology rigorously optimizes the alignment of token embeddings originating from event data with their RGB image counterparts, thereby preserving and enhancing the robustness of the overall architecture. Considering the distinct significance that token embeddings from intermediate layers hold for higher-level embeddings, our strategy is centered on accurately calibrating the pivotal token embeddings. This targeted calibration is aimed at effectively managing the discrepancies in high-level embeddings originating from both the event and image domains. Extensive experiments on different datasets demonstrate the effectiveness of the proposed distillation method. Code in http://github.com/happychenpipi/EventSAM.

For agents

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

get_harvested_code_for_paper("2312.16222")
get_code_for_paper("2312.16222")
have("2312.16222")

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

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

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

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

Connect an agent — have() is free.