| AdaptiveBudgetController |
Ran ran on a synthesized input · constructed an object; no result was computed |
GuoweiGuan666/VenomRec/attack/ours/dcip_ieos/interactive.py code served (permissive licence) · get_code("0c34cb25c626a7ee") How it ranRan 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, AdaptiveBudgetController: 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
import numpy as np
from dataclasses import dataclass, field
from typing import Dict, List, Optional
# Set seed for reproducibility
torch.manual_seed(0)
# Create valid arguments for AdaptiveBudgetController
ARGS = {
'img_eps': 0.05,
'txt_ratio': 0.15,
'embed_eps': 0.01,
'min_img_eps': 0.005,
'max_img_eps': 0.2,
'min_txt_ratio': 0.05,
'max_txt_ratio': 0.4,
'min_embed_eps': 0.0,
'max_embed_eps': 0.05,
'up_factor': 1.15,
'down_factor': 0.85,
'history': [],
'prev_info_nce': None,
'prev_sim': None,
'prev_alignment': None,
'prev_bce': None,
'prev_hit': None,
'bce_tolerance': 0.001,
'sim_tolerance': 0.0001,
'align_tolerance': 0.0001,
'info_tolerance': 0.0001,
'hit_tolerance': 0.001,
}
- 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 AdaptiveBudgetController — 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 AdaptiveBudgetController 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
|
| ImagePerturber |
Ran ran on a synthesized input · constructed an object; no result was computed |
GuoweiGuan666/VenomRec/attack/ours/dcip_ieos/interactive.py code served (permissive licence) · get_code("f62a318737248f50") How it ranRan 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, ImagePerturber: 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 numpy as np
ARGS = {
'eps': 0.1,
'iters': 3,
'psnr_min': 30.0,
'strategy': 'cosine'
}
- 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 ImagePerturber — 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 ImagePerturber 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
|
| PerturbationResult |
Ran ran on a synthesized input · constructed an object; no result was computed |
GuoweiGuan666/VenomRec/attack/ours/dcip_ieos/interactive.py code served (permissive licence) · get_code("2f01dc3fa37414ad") How it ranRan 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, PerturbationResult: 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
import torch.nn as nn
from dataclasses import dataclass
from typing import List
torch.manual_seed(0)
@dataclass
class PerturbationRound:
"""Record collected after each interaction round."""
round_idx: int
sim_after_image: float
sim_target: float
dist_target: float
img_eps_used: float
txt_ratio: float
img_budget: float
txt_budget: float
info_nce: float
psnr_img: float
bce_loss: float
hit_prob: float
txt_embed_delta_norm: float | None = None
stop_reason: str | None = None
@dataclass
class PerturbationResult:
"""Summary returned for every poisoned target."""
target_id: str
rounds: List[PerturbationRound]
final_image: List[float]
final_text: str
# Create sample PerturbationRound objects
round_1 = PerturbationRound(
round_idx=0,
sim_after_image=0.95,
sim_target=0.87,
dist_target=0.15,
img_eps_used=0.05,
txt_ratio=0.3,
img_budget=1.0,
txt_budget=0.5,
info_nce=0.12,
psnr_img=28.5,
bce_loss=0.08,
hit_prob=0.92,
txt_embed_delta_norm=0.04,
stop_reason=None
)
round_2 = PerturbationRound(
round_idx=1,
sim_after_image=0.97,
sim_target=0.91,
dist_target=0.10,
img_eps_used=0.08,
txt_ratio=0.35,
img_budget=0.92,
txt_budget=0.42,
info_nce=0.09,
psnr_img=30.2,
bce_loss=0.05,
hit_prob=0.96,
txt_embed_delta_norm=0.02,
stop_reason="budget_exhausted"
)
# Create sample final image as a list of floats
final_image = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8]
# Create sample final text
final_text = "perturbed text representation"
# Create the target_id
target_id = "target_001"
ARGS = {
"target_id": target_id,
"rounds": [round_1, round_2],
"final_image": final_image,
"final_text": final_text
}
- 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 PerturbationResult — 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 PerturbationResult 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
|
| PerturbationRound |
Ran ran on a synthesized input · constructed an object; no result was computed |
GuoweiGuan666/VenomRec/attack/ours/dcip_ieos/interactive.py code served (permissive licence) · get_code("a42303b353d7d5eb") How it ranRan 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, PerturbationRound: 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
import numpy as np
from dataclasses import dataclass
torch.manual_seed(0)
ARGS = {
"round_idx": 5,
"sim_after_image": 0.8234,
"sim_target": 0.9102,
"dist_target": 0.1543,
"img_eps_used": 0.0314,
"txt_ratio": 0.45,
"img_budget": 1.0,
"txt_budget": 1.0,
"info_nce": 0.2891,
"psnr_img": 28.45,
"bce_loss": 0.3421,
"hit_prob": 0.7654,
"txt_embed_delta_norm": 0.0521,
"stop_reason": "max_iterations",
}
- 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 PerturbationRound — 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 PerturbationRound 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
|
| TextPerturber |
Ran ran on a synthesized input · constructed an object; no result was computed |
GuoweiGuan666/VenomRec/attack/ours/dcip_ieos/interactive.py code served (permissive licence) · get_code("6bf57cee2c1d71a5") How it ranRan 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, TextPerturber: 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 numpy as np
from typing import Dict, Any, List
# Create a minimal tokenizer stand-in
class MinimalTokenizer:
def encode(self, text: str) -> List[int]:
"""Simple tokenizer that splits on whitespace and returns token ids."""
words = text.split()
return list(range(len(words)))
def decode(self, token_ids: List[int]) -> str:
"""Decode token ids back to string."""
return " ".join(str(tid) for tid in token_ids)
# Define a simple domain synonyms dict (the function references DOMAIN_SYNONYMS)
DOMAIN_SYNONYMS = {
'good': ['great', 'excellent', 'wonderful'],
'bad': ['poor', 'terrible', 'awful'],
'product': ['item', 'thing', 'object'],
}
# Build minimal arguments
tokenizer = MinimalTokenizer()
text = "this is a good product and bad thing"
tokens = tokenizer.encode(text)
# Create mask - True for replaceable tokens
mask = [False, False, False, True, True, False, True, False]
# Create embeddings (num_tokens x embedding_dim)
token_embeddings = np.random.randn(len(tokens), 4).astype(np.float32)
# Simple score function that returns a score
def dummy_score_fn(candidate: str, original: str) -> float:
return 0.5
# Keywords can be a dict or iterable
keywords_dict = {'good': 'great', 'bad': 'poor', 'product': 'item'}
ARGS = {
'ratio': 0.3,
}
- 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 TextPerturber — 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 TextPerturber 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
|
| _cosine_aligned_step |
Ran ran; our contract draft was wrong, not the code |
GuoweiGuan666/VenomRec/attack/ours/dcip_ieos/interactive.py code served (permissive licence) · get_code("9219366ca8d18fe3") How it ranRan 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
import math
# Construct arguments for _cosine_aligned_step
x_feat = [1.0, 2.0, 3.0, 4.0]
target_feat = [1.5, 2.5, 3.5, 4.5]
mask = [True, True, False, True]
eps = 0.5
ARGS = {
'x_feat': x_feat,
'target_feat': target_feat,
'mask': mask,
'eps': eps,
}
- 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
|
| _count_tokens |
Ran ran, honoured the contract we drafted |
GuoweiGuan666/VenomRec/attack/ours/dcip_ieos/interactive.py code served (permissive licence) · get_code("b5c0d9f50eef2dc1") How it ranRan 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 int, ndim 0, dtype family int, 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
import torch.nn as nn
torch.manual_seed(0)
# Create a minimal adapter class with a tokenizer
class MinimalTokenizer:
def encode(self, text):
# Simple tokenizer that splits and returns token list
return text.split()
def __call__(self, text, return_tensors=None):
# Return format compatible with the function
tokens = text.split()
if return_tensors is None:
return {'input_ids': tokens}
return {'input_ids': tokens}
class MinimalAdapter:
def __init__(self):
self.tokenizer = MinimalTokenizer()
# Test case 1: adapter with a tokenizer
adapter1 = MinimalAdapter()
text1 = "hello world test"
ARGS = {
"adapter": adapter1,
"text": text1
}
- 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 int, ndim 0, dtype family int, 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
|
| _embedding_delta |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
GuoweiGuan666/VenomRec/attack/ours/dcip_ieos/interactive.py code served (permissive licence) · get_code("278036de1273f106") How it ranRan 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 list, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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
import logging
# Set seed for reproducibility
np.random.seed(0)
# Define test arguments for _embedding_delta
ARGS = {
"embeddings": [
[0.1, 0.2, 0.3, 0.4],
[0.5, 0.6, 0.7, 0.8],
[0.9, 1.0, 1.1, 1.2],
[1.3, 1.4, 1.5, 1.6]
],
"mask": [True, False, True, False],
"embed_eps": 0.05
}
- 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 list, ndim 2, dtype family float — a list output has no array shape of its own; none is stated
- 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
|
| _ensure_tokens |
Ran ran, violated the contract we drafted |
GuoweiGuan666/VenomRec/attack/ours/dcip_ieos/interactive.py code served (permissive licence) · get_code("e0d9491e3a23066d") How it ranRan 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 list, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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
class MockTokenizer:
"""Stand-in tokenizer with encode method"""
def encode(self, text: str):
# Simple mock: split text and return list of token ids
return [int(ord(c)) for c in text.split()]
# Test case 1: tokens provided (should ignore tokenizer and text)
tokens_case = [101, 102, 103, 104]
# Test case 2: tokens is None, need tokenizer and text
tokenizer = MockTokenizer()
text = "hello world"
ARGS = {
"tokens": tokens_case,
"tokenizer": tokenizer,
"text": text,
}
- 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 list, ndim 1, dtype family int — a list output has no array shape of its own; none is stated
- 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
|
| _strip_markers |
Ran ran; our contract draft was wrong, not the code |
GuoweiGuan666/VenomRec/attack/ours/dcip_ieos/interactive.py code served (permissive licence) · get_code("5a99df7d61dff180") How it ranRan 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 str. 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
SUBWORD_MARKERS = {'▁', '##'}
def _strip_markers(tok: str) -> str:
t = tok
for m in SUBWORD_MARKERS:
t = t.replace(m, '')
return t
# The function takes a single string parameter 'tok' and removes subword markers from it
# Test with a token that contains markers
ARGS = {
'tok': '▁hello##world'
}
- 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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
|
| _token_to_str |
Ran ran; our contract draft was wrong, not the code |
GuoweiGuan666/VenomRec/attack/ours/dcip_ieos/interactive.py code served (permissive licence) · get_code("f0b2b02805bc76b3") How it ranRan 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 str. 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)
# The function uses:
# - tokenizer.decode([tok_id]) method (if it has decode attribute)
# - tokenizer can be None
# - tok_id needs to be convertible to string
class MockTokenizer:
"""Minimal tokenizer with decode method"""
def decode(self, token_ids):
return f"decoded_{'_'.join(str(t) for t in token_ids)}"
ARGS = {
"tokenizer": MockTokenizer(),
"tok_id": 42
}
- 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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
|
| _topk_mask |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
GuoweiGuan666/VenomRec/attack/ours/dcip_ieos/interactive.py code served (permissive licence) · get_code("0354dc50f89eccae") How it ranRan 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 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 math
import numpy as np
# Setup for _topk_mask function
# The function takes:
# - values: np.ndarray (any shape)
# - ratio: float (between 0.0 and 1.0)
# Create test data
values = np.array([[5.2, 1.3, 8.9, 2.1],
[3.4, 7.6, 0.5, 9.2]])
ratio = 0.5
ARGS = {
"values": values,
"ratio": ratio
}
- 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 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
|
| compute_cosine |
Ran ran; our contract draft was wrong, not the code |
GuoweiGuan666/VenomRec/attack/ours/dcip_ieos/interactive.py code served (permissive licence) · get_code("7ffc28aa3dfef9f7") How it ranRan 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 float, 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 numpy as np
# compute_cosine takes two iterables of floats and computes cosine similarity
# It converts them to numpy arrays, computes norms, and returns the dot product divided by the product of norms
# Create two simple iterables of floats
a = [1.0, 2.0, 3.0, 4.0]
b = [5.0, 6.0, 7.0, 8.0]
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
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type float, 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
|
| cosine_similarity |
Ran ran; our contract draft was wrong, not the code |
GuoweiGuan666/VenomRec/attack/ours/dcip_ieos/interactive.py code served (permissive licence) · get_code("601d2b794f6f8f1f") How it ranRan 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 float, 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 numpy as np
# Construct arguments for cosine_similarity function
vec_a = [1.0, 2.0, 3.0, 4.0]
vec_b = [5.0, 6.0, 7.0, 8.0]
ARGS = {
"a": vec_a,
"b": vec_b,
}
- 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 float, 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
|
| get_visual_text_masks |
Ran ran; our contract draft was wrong, not the code |
GuoweiGuan666/VenomRec/attack/ours/dcip_ieos/interactive.py code served (permissive licence) · get_code("919a02925f1b0f3f") How it ranRan 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
import math
class MockAdapter:
"""Mock adapter that computes cross-modal saliency."""
def compute_cross_modal_saliency(self, image_feat, text):
"""Return a dict with visual_scores and text_scores."""
# Return scores matching the expected dimensions
visual_scores = np.array([0.5, 0.3, 0.8, 0.2], dtype=float)
text_scores = np.array([0.7, 0.4, 0.6], dtype=float)
return {
'visual_scores': visual_scores,
'text_scores': text_scores
}
# Create test data
adapter = MockAdapter()
image_feat = np.array([0.1, 0.2, 0.3, 0.4], dtype=float) # 4 visual tokens
text = "hello world python" # 3 tokens when split
token_count = 3
pop_vec = [0.1, 0.2, 0.3]
ARGS = {
'adapter': adapter,
'image_feat': image_feat,
'text': text,
'vis_ratio': 0.15,
'txt_ratio': 0.15,
'token_count': token_count,
'pop_vec': pop_vec,
}
- 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
|
| info_nce_loss |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
GuoweiGuan666/VenomRec/attack/ours/dcip_ieos/interactive.py code served (permissive licence) · get_code("b84770e3b3129208") How it ranRan 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 float, 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 numpy as np
# Set seed for reproducibility
np.random.seed(0)
# Create small distinct vectors for testing
target = [0.1, 0.2, 0.3, 0.4]
positive = [0.15, 0.25, 0.35, 0.45]
negatives = [
[0.9, 0.8, 0.7, 0.6],
[0.5, 0.4, 0.3, 0.2],
[0.05, 0.1, 0.15, 0.2]
]
temperature = 0.07
ARGS = {
"target": target,
"positive": positive,
"negatives": negatives,
"temperature": temperature
}
- 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 float, 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
|
| is_replaceable_token |
Ran ran, violated the contract we drafted |
GuoweiGuan666/VenomRec/attack/ours/dcip_ieos/interactive.py code served (permissive licence) · get_code("110f179872f95a82") How it ranRan 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 bool, 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.
# Setup code to construct valid arguments for is_replaceable_token
ARGS = {
'tok': 'example'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type bool, 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
|
| masked_pgd_image |
Ran ran; our contract draft was wrong, not the code |
GuoweiGuan666/VenomRec/attack/ours/dcip_ieos/interactive.py code served (permissive licence) · get_code("b5da9bff43fcd7f8") How it ranRan 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
import math
import logging
# Set up logging
logging.basicConfig(level=logging.DEBUG)
# Create small test data
torch.manual_seed(0)
# x_img_or_feat: Sequence[float] - original image or feature vector
x_img_or_feat = [1.0, 2.0, 3.0, 4.0, 5.0]
# mask: Sequence[bool] - which elements can be perturbed
mask = [True, False, True, False, True]
# target_feat: Sequence[float] - target feature vector to match
target_feat = [1.5, 2.2, 3.5, 4.1, 5.3]
# eps: float - maximum perturbation magnitude
eps = 0.5
# iters: int - number of iterations
iters = 10
# psnr_min: float - minimum PSNR threshold for early stopping
psnr_min = 20.0
# peak: Optional[float] - peak value for PSNR calculation (data range)
peak = 10.0
ARGS = {
"x_img_or_feat": x_img_or_feat,
"mask": mask,
"target_feat": target_feat,
"eps": eps,
"iters": iters,
"psnr_min": psnr_min,
"peak": peak,
}
- 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
|
| normalize_token |
Ran ran; our contract draft was wrong, not the code |
GuoweiGuan666/VenomRec/attack/ours/dcip_ieos/interactive.py code served (permissive licence) · get_code("f9c1dce0553ff207") How it ranRan 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 str. 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
ARGS = {
"tok": "#Hello_World#"
}
- 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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
|
| interactive_perturb_target |
Not yet run unverified (harvested, no recorded run) |
GuoweiGuan666/VenomRec/attack/ours/dcip_ieos/interactive.py code served (permissive licence) · get_code("d7bad37ca3ef4af1") How it ran |