SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.06581 · EMNLP · 2024

Enhancing Legal Case Retrieval via Scaling High-quality Synthetic Query-Candidate Pairs

Maosong Sun, Zhiyuan Liu, Zhenghao Liu, Chaojun Xiao, Cheng Gao, Huimin Chen

arXiv · PDF · Open in the Atlas

Code that ran

14 of 17 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; 2 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 11 failures of our instrument; 3 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2410.06581.json · badge: /api/ran/2410.06581.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
thunlp/DeepTHULAC canonical (classifier label)
classifier basis: census
11 ran · 1 no recorded run
thunlp/LEAD canonical (classifier label)
classifier basis: census
3 ran · 2 no recorded run
FunctionStatusWhere it lives
dot_product_scores Ran
ran; our contract draft was wrong, not the code
thunlp/LEAD/dpr/models/biencoder.py
pointer only (licence: MIT); the stored copy get_code serves, from facebookresearch/dpr, is pointer only (licence: NOASSERTION) · get_code("928414780ee23e45")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from facebookresearch/dpr, and GitHub could not classify the licence of that repository (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

adjust_pos Ran
ran; our contract draft was wrong, not the code
thunlp/DeepTHULAC/deepthulac/seg/post_process.py
code served (permissive licence) · get_code("82cfb42a4b5e2b79")
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 list. 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 multiprocessing import Pool

# The function adjust_pos takes pred_poss and num_workers as parameters
# pred_poss should be a list of lists, where each inner list contains strings like 'word_pos'
# Let's create realistic test data based on the function's logic

pred_poss = [
    ['能_v', '出_v', '来_v'],  # Test case 1: modal verb followed by directional verbs
    ['想_v', '去_v'],            # Test case 2: modal verb followed by directional verb
    ['开_v', '起_v'],            # Test case 3: from vvd set
    ['吃_v', '饭_v'],            # Test case 4: non-modal, non-directional verbs
]

ARGS = {
    'pred_poss': pred_poss,
    'num_workers': 2
}
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 — a list 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
cosine_scores Ran
ran; our contract draft was wrong, not the code
thunlp/LEAD/dpr/models/biencoder.py
pointer only (licence: MIT); the stored copy get_code serves, from facebookresearch/dpr, is pointer only (licence: NOASSERTION) · get_code("4c7d079ed8d8dd58")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from facebookresearch/dpr, and GitHub could not classify the licence of that repository (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

kd_ce_loss Ran
ran; our contract draft was wrong, not the code
thunlp/DeepTHULAC/deepthulac/model_old.py
code served (permissive licence) · get_code("3b6aa5f3934d43fb")
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 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 logits tensors
# batch_size=2, num_classes=4
logits_S = torch.randn(2, 4)
logits_T = torch.randn(2, 4)

# Temperature can be a scalar tensor or a regular float
temperature = 3.0

ARGS = {
    "logits_S": logits_S,
    "logits_T": logits_T,
    "temperature": temperature,
}
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
labels2spans Ran
ran, honoured the contract we drafted
thunlp/DeepTHULAC/deepthulac/seg/seg_utils.py
code served (permissive licence) · get_code("aa5ae133f5e4c5b5")
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 list, ndim 2, 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 numpy as np
from typing import List

def labels2spans(labels: List[str], mode, vote_pattern=None):
    assert type(labels) == list
    ' 将标签列表转换为词的范围 '
    if mode == 'BMES':
        assert 'U' not in labels
        if vote_pattern is None:
            prev_tag = labels[0]
            begin_offset = 0
            chunks = []
            for i in range(1, len(labels)):
                tag = labels[i]
                if prev_tag + tag not in {'BM', 'BE', 'MM', 'ME'}:
                    chunks.append((begin_offset, i - 1))
                    begin_offset = i
                prev_tag = tag
            chunks.append((begin_offset, len(labels) - 1))
        else:
            seg_from_front = []
            seg_from_after = []
            for label in labels[1:]:
                if label in ['B', 'S']:
                    seg_from_after.append(1)
                else:
                    seg_from_after.append(0)
            for label in labels[:-1]:
                if label in ['E', 'S']:
                    seg_from_front.append(1)
                else:
                    seg_from_front.append(0)
            if vote_pattern == 'and':
                seg = [seg_from_front[idx] & seg_from_after[idx] for idx in range(len(labels) - 1)]
            elif vote_pattern == 'or':
                seg = [seg_from_front[idx] | seg_from_after[idx] for idx in range(len(labels) - 1)]
            else:
                assert False
            begin_offset = 0
            chunks = []
            for i in range(len(labels) - 1):
                if seg[i] == 1:
                    chunks.append((begin_offset, i))
                    begin_offset = i + 1
            chunks.append((begin_offset, len(labels) - 1))
        return chunks
    elif mode == 'ME':
        e_pos = np.argwhere(np.array(labels) == 'E').squeeze(-1)
        s_pos = [0] + list(e_pos[:-1] + 1)
        return [(s, e) for s, e in zip(s_pos, e_pos)]
    assert False


# Test case 1: BMES mode without vote_pattern
labels_bmes = ['B', 'M', 'E', 'B', 'E']

# Test case 2: BMES mode with vote_pattern
labels_bmes_vote = ['B', 'M', 'E', 'S', 'B', 'M', 'E']

# Test case 3: ME mode
labels_me = ['M', 'M', 'E', 'M', 'E']

ARGS = {
    'labels': labels_bmes,
    'mode': 'BMES',
    'vote_pattern': None
}
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 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
make_pair Ran
ran, violated the contract we drafted
thunlp/DeepTHULAC/deepthulac/seg/data_format.py
code served (permissive licence) · get_code("55c0dbc360ed8346")
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 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 torch
import numpy as np

torch.manual_seed(0)

# The function takes two parameters: chars and labels
# It zips them together and creates pairs
# chars should be an iterable of characters/strings
# labels should be an iterable of labels

chars = ['a', 'b']
labels = [0, 1]

ARGS = {
    'chars': chars,
    'labels': labels
}
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 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
ndcg Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
thunlp/LEAD/LeCaRD/metrics.py
code served (permissive licence) · get_code("a6887cb2464e843e")
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 math

def ndcg(ranks, gt_ranks, K):
    dcg_value = 0.0
    idcg_value = 0.0
    sranks = sorted(gt_ranks, reverse=True)
    for i in range(0, K):
        logi = math.log(i + 2, 2)
        dcg_value += ranks[i] / logi
        idcg_value += sranks[i] / logi
    return dcg_value / idcg_value


# Setup: ranks and gt_ranks are lists/sequences of numerical scores
# The function indexes into them with [i], sorts gt_ranks, and performs arithmetic
# K is the cutoff parameter for the loop

ranks = [0.9, 0.8, 0.7, 0.6, 0.5]
gt_ranks = [0.95, 0.85, 0.75, 0.65, 0.55]
K = 3

ARGS = {
    "ranks": ranks,
    "gt_ranks": gt_ranks,
    "K": K
}
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 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
restore_batch Ran
ran; our contract draft was wrong, not the code
thunlp/DeepTHULAC/deepthulac/seg/cut_sent.py
code served (permissive licence) · get_code("fab034afea35e8d1")
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 list. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# - results: list of lists of tuples (spans/coordinate pairs)
# - input_id2raw_id: mapping from input_id to raw_id (list or dict-like)
# - accumulate_span: boolean flag

# The function iterates through results and groups them by raw_id,
# optionally adjusting span positions based on previous spans

# Create test data
results = [
    [(0, 5), (10, 15)],      # input_id=0
    [(0, 3), (7, 12)],       # input_id=1
    [(1, 4), (8, 9)]         # input_id=2
]

input_id2raw_id = [0, 0, 1]  # input_ids 0,1 map to raw_id 0; input_id 2 maps to raw_id 1

accumulate_span = True

ARGS = {
    "results": results,
    "input_id2raw_id": input_id2raw_id,
    "accumulate_span": accumulate_span
}
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 — a list 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
segs2spans Ran
ran, honoured the contract we drafted
thunlp/DeepTHULAC/deepthulac/seg/seg_utils.py
code served (permissive licence) · get_code("0a8363e288b83218")
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 list, ndim 2, 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

def segs2spans(segs):
    """ 将分词转换为词的范围 """
    spans = []
    pos = 0
    for seg in segs:
        spans.append((pos, pos + len(seg) - 1))
        pos += len(seg)
    return spans

# The function takes a list of segments (strings or sequences)
# and converts them to character position spans
# segs should be an iterable of items where len() can be called on each

ARGS = {
    "segs": ["hello", "world", "test"]
}
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 2, 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
set_device Ran
ran; our contract draft was wrong, not the code
thunlp/DeepTHULAC/deepthulac/utils.py
code served (permissive licence) · get_code("b573a2abcfda8b28")
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 1, dtype family float; no output shape is stated. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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

torch.manual_seed(0)

# The function set_device takes device_type as a parameter
# It uses device_type to determine which device to set up
# For CPU-only testing, we'll use 'cpu' which is the safest option
# that doesn't require CUDA or distributed setup

ARGS = {
    'device_type': 'cpu'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, 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
spans2segs Ran
ran; our contract draft was wrong, not the code
thunlp/DeepTHULAC/deepthulac/seg/seg_utils.py
code served (permissive licence) · get_code("99ce594fba45f85d")
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 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.

# Setup code for spans2segs function

ARGS = {
    'sent': "hello world",
    'spans': [[0, 4], [6, 10]]
}
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
split_batch Ran
ran; our contract draft was wrong, not the code
thunlp/DeepTHULAC/deepthulac/seg/cut_sent.py
code served (permissive licence) · get_code("ce6b466b301b7acb")
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 re

# The function split_batch takes batch_text and max_len parameters
# batch_text should be a list of strings
# max_len should be an integer

ARGS = {
    'batch_text': [
        'Hello world. This is a test.',
        'Another sentence! With punctuation? Yes.',
        'Dr. Smith went to the store. He bought milk.',
    ],
    'max_len': 500
}
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
split_batch_with_group_texts Ran
ran; our contract draft was wrong, not the code
thunlp/DeepTHULAC/deepthulac/seg/cut_sent.py
code served (permissive licence) · get_code("658e8c99ca132cf3")
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 re

# Setup for split_batch_with_group_texts function
# The function takes batch_text (list of strings) and max_len (int)

batch_text = [
    "Hello world. This is a test. Mr. Smith went to the store.",
    "Another text! With multiple sentences? Yes, it does. And more content here.",
    "Short one."
]

max_len = 500

ARGS = {
    'batch_text': batch_text,
    'max_len': max_len
}
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
timer Ran
ran; our contract draft was wrong, not the code
thunlp/DeepTHULAC/deepthulac/utils.py
code served (permissive licence) · get_code("bbee4044c3876d25")
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 function. 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 time
from functools import wraps
from colorama import Fore, Style

def timer(func):
    @wraps(func)
    def timer_wrapper(*args, **kwargs):
        start_time = time.perf_counter()
        result = func(*args, **kwargs)
        end_time = time.perf_counter()
        total_time = end_time - start_time
        args = [str(arg) for arg in args if type(arg) in {int, float, str}]
        args = ', '.join(args)
        print(Fore.GREEN + 'Timer: ' + Style.RESET_ALL + f'{func.__name__}({args}) {total_time:.2f}s')
        return result
    return timer_wrapper

# Create a simple function to decorate
def sample_function(x, y, name="test"):
    """A simple function to be decorated with timer"""
    time.sleep(0.01)
    return x + y

# Apply the timer decorator
decorated_function = timer(sample_function)

# Set up the ARGS dict
ARGS = {
    'func': decorated_function
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
colorama, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
fleiss_kappa Not yet run
unverified (harvested, no recorded run)
thunlp/LEAD/LeCaRD/metrics.py
code served (permissive licence) · get_code("be2f28a5dece9ffc")
How it ran

no invocation recorded.

init_saved_path Not yet run
unverified (harvested, no recorded run)
thunlp/DeepTHULAC/deepthulac/utils.py
code served (permissive licence) · get_code("3631933778b26cb1")
How it ran

no invocation recorded.

kappa Not yet run
unverified (harvested, no recorded run)
thunlp/LEAD/LeCaRD/metrics.py
code served (permissive licence) · get_code("2244531c0f009dd7")
How it ran

no invocation recorded.

Also present in other papers' code

Of 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 17 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 2 later) and 15 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
cosine_scores 7 other papers
5 dated earlier, 1 later, 1 same year, order not determinable
1911.03868 (2019-11)
Knowledge Guided Text Retrieval and Reading for Open Domain Question Answering
2106.05346 (2021-06)
End-to-End Training of Multi-Document Reader and Retriever for Open-Domain Question Answering
2205.09843 (2022-05)
Table Retrieval May Not Necessitate Table-specific Model Design
and 4 more not named here
dot_product_scores 7 other papers
5 dated earlier, 1 later, 1 same year, order not determinable
1911.03868 (2019-11)
Knowledge Guided Text Retrieval and Reading for Open Domain Question Answering
2106.05346 (2021-06)
End-to-End Training of Multi-Document Reader and Retriever for Open-Domain Question Answering
2205.09843 (2022-05)
Table Retrieval May Not Necessitate Table-specific Model Design
and 4 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

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

Abstract

Legal case retrieval (LCR) aims to provide similar cases as references for a given fact description. This task is crucial for promoting consistent judgments in similar cases, effectively enhancing judicial fairness and improving work efficiency for judges. However, existing works face two main challenges for real-world applications: existing works mainly focus on case-to-case retrieval using lengthy queries, which does not match real-world scenarios; and the limited data scale, with current datasets containing only hundreds of queries, is insufficient to satisfy the training requirements of existing data-hungry neural models. To address these issues, we introduce an automated method to construct synthetic query-candidate pairs and build the largest LCR dataset to date, LEAD, which is hundreds of times larger than existing datasets. This data construction method can provide ample training signals for LCR models. Experimental results demonstrate that model training with our constructed data can achieve state-of-the-art results on two widely-used LCR benchmarks. Besides, the construction method can also be applied to civil cases and achieve promising results. The data and codes can be found in https://github.com/thunlp/LEAD.

For agents

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

get_harvested_code_for_paper("2410.06581")
get_code_for_paper("2410.06581")
have("2410.06581")

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

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

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

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

Connect an agent — have() is free.