SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2502.17041 · ACL · 2025

PrivaCI-Bench: Evaluating Privacy with Contextual Integrity and Legal Compliance

Tianshu Chu, Hkust, Yangqiu Song, Haoran Li, Peizhao Hu, Sirui Han, Yulin Chen, Qi Hu, Wenbin Hu, Huihao Jing

arXiv · PDF · Open in the Atlas

Code that ran

5 of 5 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 5 have no contract verdict; 0 failures of our instrument; 0 no recorded run), measured 2026-11-24; 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.17041.json · badge: /api/ran/2502.17041.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
HKUST-KnowComp/PrivaCI-Bench canonical (classifier label)
classifier basis not recorded on the link
5 ran · 0 no recorded run
FunctionStatusWhere it lives
KB_to_dict Ran
ran on a synthesized input
HKUST-KnowComp/PrivaCI-Bench/search_content_for_answer.py
code served (permissive licence) · get_code("93ac6f96a03989e5")
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

# The function KB_to_dict expects a kb parameter which is an iterable
# of items where each item is a dict with at least a 'regulation_id' key.
# The function iterates over kb, accesses item['regulation_id'],
# calls .lower() on it, and uses it as a dictionary key.

# Create a list of dictionaries representing knowledge base items
kb = [
    {
        'regulation_id': 'REG_001',
        'title': 'Safety Guidelines',
        'content': 'Important safety information'
    },
    {
        'regulation_id': 'REG_002',
        'title': 'Compliance Rules',
        'content': 'Rules for compliance'
    },
    {
        'regulation_id': 'REG_003',
        'title': 'Data Protection',
        'content': 'Data protection standards'
    }
]

ARGS = {
    'kb': kb
}
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
list_intersection Ran
ran on a synthesized input
HKUST-KnowComp/PrivaCI-Bench/utils.py
code served (permissive licence) · get_code("ce050e92179f30cc")
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 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

torch.manual_seed(0)

# The function list_intersection takes a list of candidates (iterables)
# and finds elements that appear in at least vote_number of them.
# It returns a sorted list of those elements by frequency.

# candidates: a list of iterables (lists, sets, etc.)
# vote_number: int, threshold for inclusion (default -1 means len(candidates)//2 + 1)

candidates = [
    [1, 2, 3, 4],
    [2, 3, 4, 5],
    [2, 3, 6, 7],
    [2, 8, 9, 10]
]

vote_number = 2

ARGS = {
    "candidates": candidates,
    "vote_number": vote_number
}
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 list, ndim 1, dtype family int — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_local_HF_dataset Ran
ran on a synthesized input
HKUST-KnowComp/PrivaCI-Bench/dataset_loader.py
code served (permissive licence) · get_code("e5293b13768b7fbd")
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 Dataset. 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 tempfile
import os
from datasets import Dataset, DatasetDict
from datasets.utils.file_utils import cached_path

# Create a temporary directory to hold the dataset
temp_dir = tempfile.mkdtemp()

# Create a minimal dataset and save it locally
data = {
    "text": ["hello world", "foo bar"],
    "label": [0, 1]
}
dataset = Dataset.from_dict(data)

# Save the dataset to disk
dataset_path = os.path.join(temp_dir, "test_dataset")
dataset.save_to_disk(dataset_path)

ARGS = {
    "path": dataset_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
datasets — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Dataset — a Dataset output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Dataset output the recorded ndim 1 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
parse_log Ran
ran on a synthesized input
HKUST-KnowComp/PrivaCI-Bench/search_content_for_answer.py
code served (permissive licence) · get_code("58431336c8d2ad48")
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 tempfile
import os

# Create a temporary log file with valid content
temp_dir = tempfile.mkdtemp()
log_file = os.path.join(temp_dir, "test_log.txt")

with open(log_file, 'w') as f:
    f.write("{'id': 1}\n")
    f.write("0.95\n")
    f.write("{'id': 2}\n")
    f.write("0.87\n")

ARGS = {
    'log_path': log_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 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
read_events Ran
ran on a synthesized input
HKUST-KnowComp/PrivaCI-Bench/utils.py
code served (permissive licence) · get_code("b72457ef27876481")
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 DataFrame. 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 pandas as pd
import tempfile
import os

# Create a temporary CSV file with sample data
temp_dir = tempfile.mkdtemp()
csv_path = os.path.join(temp_dir, "events.csv")

# Write sample events data to CSV
sample_data = {
    'event_id': [1, 2, 3],
    'timestamp': ['2024-01-01 10:00:00', '2024-01-01 10:05:00', '2024-01-01 10:10:00'],
    'event_type': ['click', 'scroll', 'click'],
    'user_id': [101, 102, 101]
}
df = pd.DataFrame(sample_data)
df.to_csv(csv_path, index=False)

ARGS = {
    'path': csv_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 5 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.

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

Repositories linked to this paper

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

Abstract

Recent advancements in generative large language models (LLMs) have enabled wider applicability, accessibility, and flexibility. However, their reliability and trustworthiness are still in doubt, especially for concerns regarding individuals' data privacy. Great efforts have been made on privacy by building various evaluation benchmarks to study LLMs' privacy awareness and robustness from their generated outputs to their hidden representations. Unfortunately, most of these works adopt a narrow formulation of privacy and only investigate personally identifiable information (PII). In this paper, we follow the merit of the Contextual Integrity (CI) theory, which posits that privacy evaluation should not only cover the transmitted attributes but also encompass the whole relevant social context through private information flows. We present PrivaCI-Bench, a comprehensive contextual privacy evaluation benchmark targeted at legal compliance to cover wellannotated privacy and safety regulations, real court cases, privacy policies, and synthetic data built from the official toolkit to study LLMs' privacy and safety compliance. We evaluate the latest LLMs, including the recent reasoner models QwQ-32B and Deepseek R1. Our experimental results suggest that though LLMs can effectively capture key CI parameters inside a given context, they still require further advancements for privacy compliance.

For agents

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

get_harvested_code_for_paper("2502.17041")
get_code_for_paper("2502.17041")
have("2502.17041")

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

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

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

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

Connect an agent — have() is free.