SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2502.17166 · EMNLP · 2025

JUREX-4E: Juridical Expert-Annotated Four-Element Knowledge Base for Legal Reasoning

Yansong Feng, Yun Liu, Quzhe Huang, Weixing Shen, Yiran Hu, Huanghai Liu, Qingjing Chen, Jiayu Ma

arXiv · PDF · Open in the Atlas

Code that ran

14 of 15 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 13 have no contract verdict; 1 failure of our instrument; 1 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/2502.17166.json · badge: /api/ran/2502.17166.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
THUlawtech/JUREX canonical (classifier label)
classifier basis not recorded on the link
14 ran · 1 no recorded run
FunctionStatusWhere it lives
deal_batch_input Ran
ran on a synthesized input
THUlawtech/JUREX/SCD_experiment/batch_input_data.py
code served (permissive licence) · get_code("bd11b0cfa80c507a")
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 torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'custom_id': 'test_batch_001',
    'model_type': 'gpt-4',
    'content': 'What is machine learning?'
}
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
deal_crime Ran
ran on a synthesized input
THUlawtech/JUREX/LCR_experiment/LCR_lecard/FET_guided_case4ele.py
code served (permissive licence) · get_code("a7ca2a410d9684b0")
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.

# Setup code for deal_crime function

# The function processes crime names and checks them against a knowledge graph list
# Parameters:
# - crimes: a list of crime name strings
# - kg_crime_list: a list of crime names that are in the knowledge graph

ARGS = {
    "crimes": [
        "伪造、变造居民身份证罪",
        "生产、销售、提供假药罪",
        "盗窃罪",
        "诈骗罪"
    ],
    "kg_crime_list": [
        "伪造、变造、买卖身份证件罪",
        "生产、销售假药罪",
        "盗窃罪",
        "抢劫罪",
        "杀人罪"
    ]
}
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
deal_label Ran
ran on a synthesized input
THUlawtech/JUREX/SCD_experiment/process&eval_output.py
code served (permissive licence) · get_code("9359415897734203")
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 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

torch.manual_seed(0)

ref = {2: ['诈骗', '敲诈勒索'], 3: ['滥用职权', '玩忽职守'], 4: ['贪污', '挪用公款']}

def deal_label(accusation, prediction, i):
    type = ref[i]
    try:
        pred = type.index(prediction)
    except:
        pred = -1
    if prediction in accusation and prediction in type:
        label = type.index(prediction)
        return (label, pred)
    for case in accusation:
        if case in type:
            label = type.index(case)
            break
    return (label, pred)

# Test case 1: prediction matches accusation and is in type
accusation_1 = ['诈骗', '其他罪名']
prediction_1 = '诈骗'
i_1 = 2

# Test case 2: prediction not in type, but accusation contains something in type
accusation_2 = ['滥用职权', '其他']
prediction_2 = '不知道'
i_2 = 3

# Test case 3: prediction in type but not in accusation
accusation_3 = ['贪污']
prediction_3 = '挪用公款'
i_3 = 4

ARGS = {
    'accusation': accusation_1,
    'prediction': prediction_1,
    'i': i_1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family int — 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
deal_pred Ran
ran on a synthesized input
THUlawtech/JUREX/SCD_experiment/batch_input_data.py
code served (permissive licence) · get_code("80441c66f354aad6")
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.

import re

def deal_pred(pred_charge):
    """
    Process predicted charges to ensure proper formatting.
    """
    if pred_charge and pred_charge.endswith('。'):
        pred_charge = pred_charge[:-1]
    pred = re.split('[,\\n, (]', pred_charge)
    for i, x in enumerate(pred):
        x = x.strip()
        if x and (not x.endswith('罪')):
            x += '罪'
        pred[i] = x
    return pred

# Setup code to construct valid arguments for deal_pred
pred_charge_example = "故意杀人,抢劫,盗窃。"

ARGS = {
    "pred_charge": pred_charge_example
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
find_category_and_accusation Ran
ran on a synthesized input
THUlawtech/JUREX/SCD_experiment/preprocess_scd_data.py
code served (permissive licence) · get_code("ded8e5f42203baf2")
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. 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 find_category_and_accusation

# The function takes a single parameter: accusation (a string)
# It searches through the CATEGORIES dict to find if the accusation exists
# and returns a tuple of (category, accusation) or (None, None)

# Test with a valid accusation that exists in CATEGORIES
ARGS = {
    "accusation": "诈骗"
}
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
find_dict_by_key_value Ran
ran on a synthesized input
THUlawtech/JUREX/SCD_experiment/process&eval_output.py
code served (permissive licence) · get_code("5ce041c5514947d2")
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 torch
import numpy as np

torch.manual_seed(0)

# Construct a list of dictionaries to search through
dict_list = [
    {"name": "Alice", "age": 30, "city": "New York"},
    {"name": "Bob", "age": 25, "city": "Los Angeles"},
    {"name": "Charlie", "age": 35, "city": "Chicago"},
    {"product_id": 101, "price": 19.99, "stock": 50},
]

# Key to search for
key = "name"

# Value to match
value = "Bob"

ARGS = {
    "dict_list": dict_list,
    "key": key,
    "value": value,
}
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
get_detailed_example Ran
ran on a synthesized input
THUlawtech/JUREX/LCR_experiment/FlagEmbedding/flag_models.py
code served (permissive licence) · get_code("de41b225db8804ec")
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 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

torch.manual_seed(0)

ARGS = {
    "task_description": "Translate English to French",
    "query": "What is your name?",
    "response": "Je m'appelle Claude."
}
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
get_detailed_instruct Ran
ran on a synthesized input
THUlawtech/JUREX/LCR_experiment/FlagEmbedding/flag_models.py
code served (permissive licence) · get_code("2f73a33adedee83e")
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 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 = {
    "task_description": "Retrieve documents relevant to the given query",
    "query": "What is the capital of France?"
}
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
last_logit_pool Ran
ran on a synthesized input
THUlawtech/JUREX/LCR_experiment/FlagEmbedding/flag_reranker.py
code served (permissive licence) · get_code("4292e5a78e9fe7b2")
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 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 torch

torch.manual_seed(0)

# Create small tensors for testing
# logits: shape (batch_size, sequence_length, hidden_dim)
# attention_mask: shape (batch_size, sequence_length)

batch_size = 2
sequence_length = 3
hidden_dim = 4

logits = torch.randn(batch_size, sequence_length, hidden_dim)
attention_mask = torch.tensor([
    [1, 1, 1],  # all tokens attended to
    [1, 1, 0]   # last token is padding
], dtype=torch.long)

ARGS = {
    "logits": logits,
    "attention_mask": attention_mask
}
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 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
last_logit_pool_layerwise Ran
ran on a synthesized input
THUlawtech/JUREX/LCR_experiment/FlagEmbedding/flag_reranker.py
code served (permissive licence) · get_code("2b40b3b93a3ecb2b")
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 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 torch
from torch import Tensor

torch.manual_seed(0)

# Create a small batch of logits with shape (batch_size, sequence_length, vocab_dim)
batch_size = 2
sequence_length = 3
vocab_dim = 4

# Scenario 1: Left padding case (all sequences end at last position)
logits_left_padding = torch.randn(batch_size, sequence_length, vocab_dim)
attention_mask_left_padding = torch.ones(batch_size, sequence_length, dtype=torch.long)

# Scenario 2: Right padding case (sequences have different actual lengths)
logits_right_padding = torch.randn(batch_size, sequence_length, vocab_dim)
# Create mask where first row has 2 real tokens, second row has 3 real tokens
attention_mask_right_padding = torch.tensor([
    [1, 1, 0],  # First sequence: 2 real tokens
    [1, 1, 1]   # Second sequence: 3 real tokens
], dtype=torch.long)

# Use the right padding case as it tests both branches
logits = logits_right_padding
attention_mask = attention_mask_right_padding

ARGS = {
    "logits": logits,
    "attention_mask": attention_mask
}
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 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
last_logit_pool_lightweight Ran
ran on a synthesized input
THUlawtech/JUREX/LCR_experiment/FlagEmbedding/flag_reranker.py
code served (permissive licence) · get_code("72408a5a9829cd29")
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 2, dtype family float, shape (2, 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 torch

torch.manual_seed(0)

# Construct tensors for the function
batch_size = 2
seq_length = 4
hidden_dim = 3

# Create logits tensor: shape (batch_size, seq_length, hidden_dim)
# The function indexes it as logits[:, -1] or logits[i, sequence_lengths[i]]
# so it expects shape (batch_size, seq_length, ...) where ... can be any dimensions
logits = torch.randn(batch_size, seq_length, hidden_dim)

# Create attention_mask tensor: shape (batch_size, seq_length)
# The function uses:
# - attention_mask[:, -1] to check last column
# - attention_mask.sum(dim=1) to get sequence lengths per batch
# Values should be 0 or 1 for masking
# Test case 1: left padding (all last positions are 1)
attention_mask = torch.tensor([[1, 1, 1, 1], [1, 1, 1, 1]], dtype=torch.long)

ARGS = {
    "logits": logits,
    "attention_mask": attention_mask,
}
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 2, dtype family float, shape (2, 3) — shape (2, 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
last_token_pool Ran
ran; our contract draft was wrong, not the code
THUlawtech/JUREX/LCR_experiment/FlagEmbedding/flag_models.py
code served (permissive licence) · get_code("2ded070fabe7bdc7")
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 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 torch
from torch import Tensor

torch.manual_seed(0)

# Create small tensors for testing
batch_size = 2
seq_length = 5
hidden_dim = 4

# Create last_hidden_states: (batch_size, seq_length, hidden_dim)
last_hidden_states = torch.randn(batch_size, seq_length, hidden_dim)

# Create attention_mask: (batch_size, seq_length)
# Test case 1: left padding (all sequences are fully attended)
attention_mask = torch.ones(batch_size, seq_length, dtype=torch.long)

ARGS = {
    "last_hidden_states": last_hidden_states,
    "attention_mask": attention_mask,
}
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 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
load_json_data Ran
ran on a synthesized input
THUlawtech/JUREX/SCD_experiment/preprocess_scd_data.py
code served (permissive licence) · get_code("b08067637ffe4055")
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.

import json
import tempfile
import os

# Create a temporary JSON file with sample data
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test_data.jsonl")

# Write some sample JSONL data
with open(temp_file, 'w', encoding='utf-8') as f:
    f.write(json.dumps({"name": "Alice", "age": 30}) + '\n')
    f.write(json.dumps({"name": "Bob", "age": 25}) + '\n')
    f.write(json.dumps({"name": "Charlie", "age": 35}) + '\n')

ARGS = {
    "file_path": temp_file
}
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
parse_args Ran
ran on a synthesized input
THUlawtech/JUREX/SCD_experiment/batch_input_data.py
code served (permissive licence) · get_code("4b02b0612de37179")
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 Namespace. 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 argparse

# This function uses argparse to parse command-line arguments
# It has three optional arguments with defaults:
# --model_type: string, default 'gpt-4o-2024-08-06'
# --prompt: string, default Chinese text about criminal law
# --input_type: string, default 'farui-plus'

# Since parse_args accepts in_args parameter which is passed to arg_parser.parse_args(args=in_args),
# we need to construct a list of command-line arguments to pass

ARGS = {
    'in_args': [
        '--model_type', 'gpt-4o-2024-08-06',
        '--prompt', '你是一个刑法领域的专家。请根据中国刑法知识,判断以下案情事实属于候选罪名中的哪一项。',
        '--input_type', 'farui-plus'
    ]
}
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 Namespace — a Namespace output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Namespace 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
num_tokens Not yet run
unverified (harvested, no recorded run)
THUlawtech/JUREX/SCD_experiment/preprocess_scd_data.py
code served (permissive licence) · get_code("237374b1f60e7462")
How it ran

no invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 14 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
last_token_pool 8 other papers
6 dated earlier, 2 later
2402.12997 (2024-02)
Towards Trustworthy Reranking: A Simple yet Effective Abstention Mechanism
2404.06347 (2024-04)
RAR-b: Reasoning as Retrieval Benchmark
2406.05540 (2024-06)
A Fine-tuning Dataset and Benchmark for Large Language Models for Protein Understanding
and 5 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-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

In recent years, Large Language Models (LLMs) have been widely applied to legal tasks. To enhance their understanding of legal texts and improve reasoning accuracy, a promising approach is to incorporate legal theories. One of the most widely adopted theories is the Four-Element Theory (FET), which defines the crime constitution through four elements: Subject, Object, Subjective Aspect, and Objective Aspect. While recent work has explored prompting LLMs to follow FET, our evaluation demonstrates that LLM-generated four-elements are often incomplete and less representative, limiting their effectiveness in legal reasoning. To address these issues, we present JUREX-4E, an expert-annotated fourelement knowledge base covering 155 criminal charges. The annotations follow a progressive hierarchical framework grounded in legal source validity and incorporate diverse interpretive methods to ensure precision and authority. We evaluate JUREX-4E on the Similar Charge Disambiguation task and apply it to Legal Case Retrieval. Experimental results validate the high quality of JUREX-4E and its substantial impact on downstream legal tasks, underscoring its potential for advancing legal AI applications. The dataset and code are available at: https://github.com/THUlawtech/JUREX

For agents

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

get_harvested_code_for_paper("2502.17166")
get_code_for_paper("2502.17166")
have("2502.17166")

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

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

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

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

Connect an agent — have() is free.