SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.15708 · 2024

Query Augmentation by Decoding Semantics from Brain Signals

arXiv · PDF · Open in the Atlas

Code that ran

12 of 18 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; 1 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 10 failures of our instrument; 6 no recorded run), measured 2026-11-22; 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/2402.15708.json · badge: /api/ran/2402.15708.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
yeziyi1998/brain-query-augmentation canonical (classifier label)
classifier basis: census
12 ran · 6 no recorded run
FunctionStatusWhere it lives
build_index Ran
ran; our contract draft was wrong, not the code
yeziyi1998/brain-query-augmentation/ict/my_faiss.py
code served (permissive licence) · get_code("81c92a529103e44f")
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 IndexIDMap. 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 faiss
import numpy as np
import torch

torch.manual_seed(0)

# Create small document vectors (batch_size=2, dimension=4096)
doc_vectors = np.random.randn(2, 4096).astype(np.float32)

# Create corresponding IDs
ids = np.array([0, 1], dtype=np.int64)

# Dimension parameter
dimension = 4096

ARGS = {
    "doc_vectors": doc_vectors,
    "ids": ids,
    "dimension": dimension,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
faiss, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type IndexIDMap — a IndexIDMap output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a IndexIDMap 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
load_all_data Ran
ran; our contract draft was wrong, not the code
yeziyi1998/brain-query-augmentation/ict/part1_config.py
code served (permissive licence) · get_code("98484eb6d07b0cd0")
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 pickle
import os
import tempfile
from unittest.mock import MagicMock, patch

# Create a temporary directory structure to mock the file system
temp_dir = tempfile.mkdtemp()
common_data_dir = os.path.join(temp_dir, 'common_data')
os.makedirs(common_data_dir, exist_ok=True)

# Create mock task directory
task_name = 'ImageNet'
task_dir = os.path.join(common_data_dir, task_name)
os.makedirs(task_dir, exist_ok=True)

# Create mock data structures
mock_input_item = {
    'trail_id': 0.5,
    'data': 'sample'
}

all_input_data = [
    {'trail_id': 0.3, 'data': 'item1'},
    {'trail_id': 0.5, 'data': 'item2'},
    {'trail_id': 0.7, 'data': 'item3'},
    {'trail_id': 0.9, 'data': 'item4'},
    {'trail_id': 1.1, 'data': 'item5'},
]

all_input_data_mask = [
    {'trail_id': 0.3, 'data': 'mask1'},
    {'trail_id': 0.5, 'data': 'mask2'},
    {'trail_id': 0.7, 'data': 'mask3'},
    {'trail_id': 0.9, 'data': 'mask4'},
    {'trail_id': 1.1, 'data': 'mask5'},
]

fpm = {
    'model_data': [1, 2, 3, 4],
    'weights': [0.1, 0.2, 0.3, 0.4]
}

# Save pickle files
common_data_prefix = 'llama-7b.'
pickle.dump(all_input_data, open(os.path.join(task_dir, f'{common_data_prefix}all_input_data.pkl'), 'wb'))
pickle.dump(all_input_data_mask, open(os.path.join(task_dir, 'llama-7b.10all_input_data.pkl'), 'wb'))
pickle.dump(fpm, open(os.path.join(task_dir, f'{common_data_prefix}fpm.pkl'), 'wb'))

# Patch the file path to use our temporary directory
original_open = open

def mock_open_func(path, *args, **kwargs):
    # Replace the hardcoded path with our temp directory
    if '../../common_data/' in path:
        path = path.replace('../../common_data/', common_data_dir + '/')
    return original_open(path, *args, **kwargs)

# Create args object
class Args:
    def __init__(self):
        self.task_name = task_name
        self.common_data_prefix = common_data_prefix
        self.test_ids = [0.0, 1.0]

ARGS = {
    'args': Args()
}

# Monkey-patch the builtin open function for the module
import builtins
original_builtin_open = builtins.open
builtins.open = mock_open_func
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 — 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
load_data Ran
ran; our contract draft was wrong, not the code
yeziyi1998/brain-query-augmentation/ict/part1_config.py
code served (permissive licence) · get_code("cd8af379c49c924a")
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 pickle
import tempfile
import os

# Create temporary directories and mock pickle files
temp_dir = tempfile.mkdtemp()
common_data_dir = os.path.join(temp_dir, 'common_data')
os.makedirs(common_data_dir, exist_ok=True)

# Create task-specific directory
task_name = 'test_task'
task_dir = os.path.join(common_data_dir, task_name)
os.makedirs(task_dir, exist_ok=True)

# Create mock data structures
mock_input_data_item = {
    'text': 'sample text',
    'trail_id': 0.5
}

all_input_data = [
    {**mock_input_data_item, 'trail_id': 0.3},
    {**mock_input_data_item, 'trail_id': 0.5},
    {**mock_input_data_item, 'trail_id': 0.7},
    {**mock_input_data_item, 'trail_id': 0.9},
]

all_input_data_mask = all_input_data

# Mock fpm (feature processing model)
mock_fpm = {
    'features': [1, 2, 3, 4],
    'weights': [0.1, 0.2, 0.3, 0.4]
}

# Save pickle files
common_data_prefix = 'llama-7b.'
pickle.dump(all_input_data, open(os.path.join(task_dir, f'{common_data_prefix}all_input_data.pkl'), 'wb'))
pickle.dump(all_input_data, open(os.path.join(task_dir, f'{common_data_prefix}fpm.pkl'), 'wb'))

# Also save the .10 variant
pickle.dump(all_input_data_mask, open(os.path.join(task_dir, f'llama-7b.10all_input_data.pkl'), 'wb'))

# Create args object
class Args:
    def __init__(self):
        self.task_name = task_name
        self.common_data_prefix = common_data_prefix
        self.test_ids = [0.2, 0.8]
        self.all_random_number = False

# Monkey patch the path resolution
import sys
original_open = open

def mock_open(path, *args, **kwargs):
    if '../../common_data/' in path:
        # Replace the relative path with our temp directory
        path = path.replace('../../common_data/', common_data_dir + '/')
    return original_open(path, *args, **kwargs)

import builtins
builtins.open = mock_open

ARGS = {
    'args': Args()
}
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 — 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
load_local_idf Ran
ran; our contract draft was wrong, not the code
yeziyi1998/brain-query-augmentation/ict/bm25.py
code served (permissive licence) · get_code("9d187972263ce66c")
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 json
import os
import tempfile

# Create a temporary directory and a mock IDF file
temp_dir = tempfile.mkdtemp()
data_dir = os.path.join(temp_dir, 'data')
os.makedirs(data_dir, exist_ok=True)

# Create a sample IDF JSON file
sample_idf = {
    'word1': 2.5,
    'word2': 1.8,
    'word3': 3.2
}

test_data_path = 'test_idf'
idf_file_path = os.path.join(data_dir, f'w2idf_{test_data_path}.json')

with open(idf_file_path, 'w') as f:
    json.dump(sample_idf, f)

# Change to the temp directory so the relative path works
original_cwd = os.getcwd()
os.chdir(temp_dir)

ARGS = {
    'data_path': test_data_path
}
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 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
mean_pooling Ran
ran; our contract draft was wrong, not the code
yeziyi1998/brain-query-augmentation/language_generation/src/data_old.py
code served (permissive licence) · get_code("07b0e4cab6c2d738")
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 2, dtype family float, shape (2, 8) 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 simple stand-in class for model_output that has last_hidden_state attribute
class ModelOutput:
    def __init__(self, last_hidden_state):
        self.last_hidden_state = last_hidden_state

# Create model output with last_hidden_state
# Shape: (batch_size=2, sequence_length=5, hidden_size=8)
last_hidden_state = torch.randn(2, 5, 8)
model_output = ModelOutput(last_hidden_state)

# Create attention_mask
# Shape: (batch_size=2, sequence_length=5)
attention_mask = torch.tensor([[1, 1, 1, 1, 0],
                               [1, 1, 1, 0, 0]])

ARGS = {
    'model_output': model_output,
    'attention_mask': attention_mask
}
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 2, dtype family float, shape (2, 8) — shape (2, 8) 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
merge_index Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yeziyi1998/brain-query-augmentation/ict/my_faiss.py
code served (permissive licence) · get_code("f4e23be78c69d7b8")
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, 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 bisect

# Analyze the function:
# - D: list of distances/scores (numeric values)
# - I: list of indices (numeric values)
# - target_scores: list of numeric values to insert
# - target_ids: list of values to filter against I

ARGS = {
    "D": [0.5, 0.8, 0.3, 0.9],
    "I": [10, 20, 30, 40],
    "target_scores": [0.6, 0.7],
    "target_ids": [20, 40]
}
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 2, 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
random_selection Ran
ran; our contract draft was wrong, not the code
yeziyi1998/brain-query-augmentation/ict/part1_config.py
code served (permissive licence) · get_code("e5d90fbc71308d28")
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 1, dtype family float, shape (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

# Set seed for reproducibility
np.random.seed(42)

# Create test data
strings = np.array(['apple', 'banana', 'cherry', 'date', 'elderberry', 'fig'])
num_selections = 3

ARGS = {
    'strings': strings,
    'num_selections': num_selections
}
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 1, dtype family float, shape (3,) — shape (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
recall Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yeziyi1998/brain-query-augmentation/ict/model_utils/evaluation.py
code served (permissive licence) · get_code("71fbeaecfc7e45e7")
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 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

# Analyze the function:
# - y_true: list/array of binary values (used in zip, indexed with [:k])
# - y_pred: list/array of prediction scores (used in zip, sorted by this)
# - k: integer (used for slicing [:k])

# The function sorts by y_pred (descending), then checks if any of the top k
# y_true values are > 0 (truthy). So y_true should be binary/numeric,
# y_pred should be numeric scores.

y_true = [1, 0, 1, 0, 1]
y_pred = [0.9, 0.1, 0.8, 0.2, 0.7]
k = 3

ARGS = {
    "y_true": y_true,
    "y_pred": y_pred,
    "k": k
}
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
retrieve_from_index Ran
ran; our contract draft was wrong, not the code
yeziyi1998/brain-query-augmentation/ict/my_faiss.py
code served (permissive licence) · get_code("ae38cfbad62cb31e")
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, 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 faiss

# Create a small FAISS index for testing
# The index will store vectors of dimension 4
dimension = 4
index = faiss.IndexFlatL2(dimension)

# Add some dummy vectors to the index
dummy_vectors = np.random.randn(10, dimension).astype(np.float32)
index.add(dummy_vectors)

# Create a query vector
q = np.random.randn(4).astype(np.float32)

# Define ARGS with all parameters
ARGS = {
    "index": index,
    "q": q,
    "top_k": 100
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
faiss, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, 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
softmax Ran
ran, honoured the contract we drafted
yeziyi1998/brain-query-augmentation/ict/bm25.py
code served (permissive licence) · get_code("d79002277745e36d")
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 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 numpy as np

# The softmax function takes logits as input
# It computes exponentials, then normalizes by sum along the last axis
# We need to provide a numpy array of logits

logits = np.array([
    [1.0, 2.0, 3.0, 0.5],
    [0.1, 0.2, 0.3, 0.4]
], dtype=np.float32)

ARGS = {
    'logits': logits
}
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
transform2dict Ran
ran; our contract draft was wrong, not the code
yeziyi1998/brain-query-augmentation/ict/bm25.py
code served (permissive licence) · get_code("682a666897171a99")
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 Counter. 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.

from collections import Counter

torch_imported = False
try:
    import torch
    torch_imported = True
    torch.manual_seed(0)
except ImportError:
    pass

# transform2dict takes arr1 and passes it to Counter(arr1)
# Counter expects an iterable
# Let's create a simple iterable - a list of elements

arr1 = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4]

ARGS = {
    "arr1": arr1
}
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 Counter — a Counter output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Counter 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
whoosh_bm25 Ran
ran, violated the contract we drafted
yeziyi1998/brain-query-augmentation/ict/my_woosh.py
code served (permissive licence) · get_code("96ba70c6c3e9c44c")
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 1, dtype family float, shape (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 numpy as np

torch.manual_seed(0)

# Analyzing the function:
# whoosh_bm25(idf, tf, fl, avgfl, B, K1)
# All parameters are used in arithmetic operations, so they should be numeric types
# idf, tf, fl, avgfl appear to be arrays/tensors based on typical BM25 usage
# B and K1 are scalar hyperparameters

# Create small tensors for the array-like parameters
idf = torch.tensor([1.5, 2.0, 1.2, 0.8], dtype=torch.float32)
tf = torch.tensor([3.0, 5.0, 2.0, 4.0], dtype=torch.float32)
fl = torch.tensor([100.0, 150.0, 80.0, 120.0], dtype=torch.float32)
avgfl = torch.tensor([110.0, 110.0, 110.0, 110.0], dtype=torch.float32)

# B is a normalization factor (typically between 0 and 1)
B = 0.75

# K1 is a saturation parameter (typically between 1.2 and 2.0)
K1 = 1.5

ARGS = {
    "idf": idf,
    "tf": tf,
    "fl": fl,
    "avgfl": avgfl,
    "B": B,
    "K1": K1,
}
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 Tensor, ndim 1, dtype family float, shape (4,) — shape (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_embeddings Not yet run
unverified (harvested, no recorded run)
yeziyi1998/brain-query-augmentation/ict/model_utils/model_config.py
code served (permissive licence) · get_code("bde4c1a685708c16")
How it ran

no invocation recorded.

get_embeddings_llama Not yet run
unverified (harvested, no recorded run)
yeziyi1998/brain-query-augmentation/language_generation/src/data_old.py
code served (permissive licence) · get_code("16b99d781681671d")
How it ran

no invocation recorded.

get_embeddings_st Not yet run
unverified (harvested, no recorded run)
yeziyi1998/brain-query-augmentation/language_generation/src/data_old.py
code served (permissive licence) · get_code("efde8a1714463295")
How it ran

no invocation recorded.

get_model Not yet run
unverified (harvested, no recorded run)
yeziyi1998/brain-query-augmentation/ict/model_utils/model_config.py
code served (permissive licence) · get_code("dfc692563b41a3af")
How it ran

no invocation recorded.

get_ranking_model Not yet run
unverified (harvested, no recorded run)
yeziyi1998/brain-query-augmentation/ict/model_utils/model_config.py
code served (permissive licence) · get_code("8e274827a4375cc8")
How it ran

no invocation recorded.

top_k_top_p_filtering Not yet run
unverified (harvested, no recorded run)
yeziyi1998/brain-query-augmentation/help/utils.py
code served (permissive licence) · get_code("eec474cc8cda034e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 18 samples lifted from this paper's linked repositories, 18 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 1 the same month, 1 later) and 16 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
top_k_top_p_filtering 21 other papers
3 dated earlier, 1 the same month, 17 later
2305.12191 (2023-05)
Pointwise Mutual Information Based Metric and Decoding Strategy for Faithful Generation in Document Grounded Dialogs
2305.18290 (2023-05)
Direct Preference Optimization: Your Language Model is Secretly a Reward Model
2311.17911 (2023-11)
OPERA: Alleviating Hallucination in Multi-Modal Large Language Models via Over-Trust Penalty and Retrospection-Allocation
and 18 more not named here
mean_pooling 1 other paper
1 dated earlier
2110.05789 (2021-10)
Learning Discrete Representations via Constrained Clustering for Effective and Efficient Dense Retrieval

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-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Query augmentation is a crucial technique for refining semantically imprecise queries. Traditionally, query augmentation relies on extracting information from initially retrieved, potentially relevant documents. If the quality of the initially retrieved documents is low, then the effectiveness of query augmentation would be limited as well. We propose Brain-Aug, which enhances a query by incorporating semantic information decoded from brain signals. BrainAug generates the continuation of the original query with a prompt constructed with brain signal information and a ranking-oriented inference approach. Experimental results on fMRI (functional magnetic resonance imaging) datasets show that Brain-Aug produces semantically more accurate queries, leading to improved document ranking performance. Such improvement brought by brain signals is particularly notable for ambiguous queries.

For agents

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

get_harvested_code_for_paper("2402.15708")
get_code_for_paper("2402.15708")
have("2402.15708")

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

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

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

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

Connect an agent — have() is free.