| circle_loss |
Ran ran on a synthesized input |
case-lab-umd/llm-auditing-coin/3_Block2Answer/train/loss_func.py code served (permissive licence) · get_code("191c319131abd458") 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 Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
torch.manual_seed(0)
# Create small tensors for logits and labels
batch_size = 2
logits = torch.randn(batch_size, requires_grad=True)
labels = torch.randint(0, 2, (batch_size,))
# Define ARGS with all parameters
ARGS = {
"logits": logits,
"labels": labels,
"margin": 0.25,
"gamma": 80
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| construct_flat_merkle_tree |
Ran ran on a synthesized input |
case-lab-umd/llm-auditing-coin/2_hash_tree/main_eval.py code served (permissive licence) · get_code("f002064d6028a788") 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 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 hashlib
from typing import List
def construct_flat_merkle_tree(leaves: List[str]) -> List[str]:
n = len(leaves)
if n == 0:
raise ValueError('Empty leaves')
leaf_count = 1 << (n - 1).bit_length()
padded_leaves = leaves + [leaves[-1]] * (leaf_count - n)
total_nodes = 2 * leaf_count - 1
tree = [None] * total_nodes
for i in range(leaf_count):
tree[leaf_count - 1 + i] = hashlib.sha256(padded_leaves[i].encode('utf-8')).hexdigest()
for i in range(leaf_count - 2, -1, -1):
left = tree[2 * i + 1]
right = tree[2 * i + 2]
tree[i] = hashlib.sha256((left + right).encode('utf-8')).hexdigest()
return tree
ARGS = {
"leaves": ["leaf_0", "leaf_1", "leaf_2", "leaf_3"]
}
- 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 list, ndim 1, 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
|
| construct_prompt |
Ran ran on a synthesized input |
case-lab-umd/llm-auditing-coin/6_discussion/LLM_predict.py code served (permissive licence) · get_code("2843e3f35ce11d01") 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
from typing import Dict, Any
# Construct a valid item dict for the construct_prompt function
item = {
'reason': 'The capital of France is Paris. Paris is known for the Eiffel Tower. The Eiffel Tower is a famous landmark. Therefore, France has a famous landmark.',
'answer': 'France has famous landmarks.'
}
ARGS = {
'item': item
}
- 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
|
| construct_prompt |
Ran ran on a synthesized input |
case-lab-umd/llm-auditing-coin/6_discussion/LLM_reconstruct.py code served (permissive licence) · get_code("577fc0eeba8dfc18") 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 = {
'item': {
'question': 'What is the capital of France?',
'answer': 'Paris is the capital of France.',
'reasoning_sentences': [
'France is a country in Western Europe.',
'Paris is its largest city and capital.',
'It is known for the Eiffel Tower.'
],
'sampled_token_text': ['capital', 'France', 'Paris', 'city'],
'retrieved_rag_docs': [
'Paris is the capital and most populous city of France. It is located in northern France along the Seine River.',
'France is a country in Western Europe with several overseas regions and territories. The capital is Paris.',
'The Eiffel Tower is an iconic iron lattice tower located in Paris, France, built in 1889.'
]
}
}
- 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
|
| contrastive_loss |
Ran ran on a synthesized input |
case-lab-umd/llm-auditing-coin/3_Block2Answer/train/loss_func.py code served (permissive licence) · get_code("37e51a6ba577d8d9") 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 Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn.functional as F
torch.manual_seed(0)
# Create small embeddings: batch_size=2, embedding_dim=4
emb_a = torch.randn(2, 4)
emb_b = torch.randn(2, 4)
# Create binary labels: 1 for similar pairs, 0 for dissimilar pairs
labels = torch.tensor([1.0, 0.0])
# Set margin for dissimilar pairs
margin = 1.0
ARGS = {
"emb_a": emb_a,
"emb_b": emb_b,
"labels": labels,
"margin": margin,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| extract_think_and_solution_V2 |
Ran ran on a synthesized input |
case-lab-umd/llm-auditing-coin/0_preprocess/train_eval.py code served (permissive licence) · get_code("0bdd5673fd4522a4") 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, ndim 1, 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 re
def extract_think_and_solution_V2(text: str):
pattern = '<\\|begin_of_thought\\|>(.*?)<\\|end_of_thought\\|>\\s*<\\|begin_of_solution\\|>(.*?)<\\|end_of_solution\\|>'
match = re.search(pattern, text, re.DOTALL)
if match:
think_content = match.group(1).strip()
post_think_content = match.group(2).strip()
else:
think_content = None
post_think_content = text.strip()
raise ValueError('Missing required <|begin_of_thought|> or <|begin_of_solution|> blocks.')
return (think_content, post_think_content)
# Valid text with proper thought and solution blocks
valid_text = """<|begin_of_thought|>
Let me think about this problem step by step.
First, I need to understand what we're solving.
This is a complex mathematical problem.
<|end_of_thought|>
<|begin_of_solution|>
The solution is to apply the following approach:
1. Analyze the inputs
2. Process the data
3. Return the result
<|end_of_solution|>"""
ARGS = {
'text': valid_text
}
- 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 tuple, ndim 1, dtype family float — a tuple 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
|
| extract_think_sections |
Ran ran on a synthesized input |
case-lab-umd/llm-auditing-coin/0_preprocess/train_eval.py code served (permissive licence) · get_code("ecfef8a7e8d9d7da") 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, ndim 1, 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 re
def extract_think_sections(text: str):
think_match = re.search('<think>(.*?)</think>', text, re.DOTALL)
if think_match:
think_content = think_match.group(1).strip()
end_pos = think_match.end()
post_think_content = text[end_pos:].strip()
else:
think_content = None
post_think_content = text.strip()
raise ValueError
return (think_content, post_think_content)
# Valid example with think tags present
text_with_think = "Some preamble <think>This is my reasoning\nabout the problem</think> And here is the final answer."
ARGS = {
"text": text_with_think
}
- 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 tuple, ndim 1, dtype family float — a tuple 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
|
| focal_loss |
Ran ran on a synthesized input |
case-lab-umd/llm-auditing-coin/3_Block2Answer/train/loss_func.py code served (permissive licence) · get_code("d00ea9e4c5542ee7") 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 Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn.functional as F
torch.manual_seed(0)
# Create small tensors for focal_loss
# logits: model outputs (batch_size=2, num_classes=4)
logits = torch.randn(2, 4)
# targets: binary targets matching logits shape
targets = torch.randint(0, 2, (2, 4)).float()
# Create ARGS dict with all parameters
ARGS = {
'logits': logits,
'targets': targets,
'alpha': 0.25,
'gamma': 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 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_matching_head |
Ran ran on a synthesized input |
case-lab-umd/llm-auditing-coin/5_CoIn_pipline/heads.py code served (permissive licence) · get_code("755711dbf05419ed") 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 MatchingHeadBase. 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)
# Parameters for get_matching_head
head_type = 'base'
embedding_dim = 256
ARGS = {
'head_type': head_type,
'embedding_dim': embedding_dim,
}
- 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 MatchingHeadBase — a MatchingHeadBase output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MatchingHeadBase 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
|
| hash_data |
Ran ran on a synthesized input |
case-lab-umd/llm-auditing-coin/2_hash_tree/main_eval.py code served (permissive licence) · get_code("081cd788e89c4c62") 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 hashlib
import time
hash_time_accumulator = 0.0
hash_count = 0
def hash_data(data: str) -> str:
global hash_time_accumulator, hash_count
start_time = time.perf_counter()
result = hashlib.sha256(data.encode('utf-8')).hexdigest()
hash_time_accumulator += time.perf_counter() - start_time
hash_count += 1
return result
ARGS = {
"data": "Hello, World!"
}
- 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 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
|
| hash_data |
Ran ran on a synthesized input |
case-lab-umd/llm-auditing-coin/2_hash_tree/verify.py code served (permissive licence) · get_code("e706f25280079c8b") 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 hashlib
# The function takes a single parameter 'data' which is a string
# It encodes the string to UTF-8 bytes and computes its SHA256 hash
# We need to provide a simple string value
ARGS = {
"data": "hello world"
}
- 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 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
|
| preprocess |
Ran ran on a synthesized input |
case-lab-umd/llm-auditing-coin/6_discussion/LLM_predict.py code served (permissive licence) · get_code("d586143500c563f6") 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 dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
from typing import Dict, Any
torch.manual_seed(0)
# The function preprocess takes a single parameter: item (Dict[str, Any])
# The function body simply returns the item unchanged
# So we need to provide a valid dictionary with arbitrary content
ARGS = {
"item": {
"text": "sample text",
"values": [1, 2, 3],
"tensor": torch.randn(2, 4),
"nested": {
"key": "value",
"number": 42
}
}
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| record_result |
Ran ran on a synthesized input |
case-lab-umd/llm-auditing-coin/6_discussion/LLM_predict.py code served (permissive licence) · get_code("f76ceb3944d49dd6") 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 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 takes:
# 1. item: Dict[str, Any] - a dictionary that will have 'openai_response' key set
# 2. result: str - a string to store in the dictionary
# Create a sample dictionary
item = {
'id': 1,
'query': 'What is 2+2?',
'metadata': {'source': 'test'}
}
# Create a sample result string
result = "The answer is 4."
ARGS = {
'item': item,
'result': result
}
- 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
|
| run_validation_on_preprocessed_rule_based |
Ran ran on a synthesized input |
case-lab-umd/llm-auditing-coin/5_CoIn_pipline/main_rule_based_efficient_acc.py code served (permissive licence) · get_code("05c3140dd19ecd13") 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.
import math
# Construct the preprocessed_sample_data dict
# The function expects:
# - 'block_scores': a list of dicts with 'a' and 'b' keys (float scores)
# - 'alpha': an integer representing the number of blocks
preprocessed_sample_data = {
'block_scores': [
{'a': 0.85, 'b': 0.88},
{'a': 0.82, 'b': 0.90},
{'a': 0.91, 'b': 0.87},
{'a': 0.89, 'b': 0.92},
],
'alpha': 4
}
probing_ratio = 0.5
verification_threshold = 0.80
ARGS = {
'preprocessed_sample_data': preprocessed_sample_data,
'probing_ratio': probing_ratio,
'verification_threshold': verification_threshold,
}
- 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
|
| verify_merkle_proof |
Ran ran on a synthesized input |
case-lab-umd/llm-auditing-coin/2_hash_tree/verify.py code served (permissive licence) · get_code("03c01d5adb6beae2") 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.
import hashlib
from typing import List
def hash_data(data: str) -> str:
return hashlib.sha256(data.encode('utf-8')).hexdigest()
def build_merkle_tree(leaves: List[str]) -> tuple:
"""Build a simple merkle tree and return (root, proofs_dict)"""
if not leaves:
return "", {}
# Hash all leaves
current_level = [hash_data(leaf) for leaf in leaves]
leaf_hashes = current_level.copy()
# Build proofs for each leaf
proofs = {i: [] for i in range(len(leaves))}
# Build tree bottom-up
level_index = 0
while len(current_level) > 1:
next_level = []
for i in range(0, len(current_level), 2):
if i + 1 < len(current_level):
left = current_level[i]
right = current_level[i + 1]
parent = hash_data(left + right)
# Record proofs
if level_index == 0:
if i < len(proofs):
proofs[i].append(right)
if i + 1 < len(proofs):
proofs[i + 1].append(left)
next_level.append(parent)
else:
next_level.append(current_level[i])
current_level = next_level
level_index += 1
root = current_level[0] if current_level else ""
return root, proofs
# Create a simple merkle tree with 4 leaves
leaves = ["data0", "data1", "data2", "data3"]
root, proofs_dict = build_merkle_tree(leaves)
# Build valid proof for leaf at index 0
leaf_index = 0
leaf_value = leaves[leaf_index]
proof = proofs_dict.get(leaf_index, [])
total_leaves = len(leaves)
ARGS = {
"index": leaf_index,
"leaf_value": leaf_value,
"proof": proof,
"root": root,
"total_leaves": total_leaves,
}
- 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
|
| generate_merkle_proof |
Not yet run unverified (harvested, no recorded run) |
case-lab-umd/llm-auditing-coin/2_hash_tree/verify.py code served (permissive licence) · get_code("b07a313f5559ca17") How it ran |
| run_validation_on_preprocessed |
Not yet run unverified (harvested, no recorded run) |
case-lab-umd/llm-auditing-coin/5_CoIn_pipline/main_learned_verify_efficient_acc.py code served (permissive licence) · get_code("a23ed0eaf28abbcc") How it ran |
| run_validation_on_preprocessed |
Not yet run unverified (harvested, no recorded run) |
case-lab-umd/llm-auditing-coin/5_CoIn_pipline/main_learned_verify_efficient_other_metric.py code served (permissive licence) · get_code("3d239420db2c90e4") How it ran |