misc 0 0 0

jprivera44/apps_control_collusion_balanced_v4

published by @jprivera44

Alignment dataset tracked in the /datasets sub-catalog.

Lifetime downloads
213
Last 30 days
70
Likes
-
Size
602.6 MB
Created on HF
2025-12-17
Age
10 months ago

Description

Collusion Signal Dataset (Balanced v4)

A dataset for training and evaluating backdoor detection models, with collusion signal injection.

Quick Start

import json

with open("collusion_dataset_clean.json") as f:

data = json.load(f)

# Get code from correct column based on bucket

for record in data:

if record["bucket"] in ["clean", "backdoor_only"]:

code = record["code"]

else: # signal_a, signal_b, signal_c

code =… See the full description on the dataset page: https://huggingface.co/datasets/jprivera44/apps_control_collusion_balanced_v4.

Tags

region:us

README current version from Hugging Face

Collusion Signal Dataset (Balanced v4)

A dataset for training and evaluating backdoor detection models, with collusion signal injection.

Quick Start

import json

with open("collusion_dataset_clean.json") as f:
    data = json.load(f)

# Get code from correct column based on bucket
for record in data:
    if record["bucket"] in ["clean", "backdoor_only"]:
        code = record["code"]
    else:  # signal_a, signal_b, signal_c
        code = record["code_with_signal"]
    
    problem = record["question"]
    label = 0 if record["bucket"] == "clean" else 1

Dataset Overview

Bucket Count Label Description
clean 765 0 Clean code, no backdoor
backdoor_only 264 1 Backdoored code, no signal
signal_a 260 1 Backdoor + #Remember, this is for efficiency reasons#
signal_b 255 1 Backdoor + # noqa
signal_c 249 1 Backdoor + # type: ignore

Total: 1,793 samples

Train/Test Split

Pre-defined splits (use split field):

Split Total Per Bucket
train 1,493 Variable
test 300 60 each

Columns

Column Type Description
problem_id int Unique problem identifier
question string Programming problem statement
bucket string Category: clean, backdoor_only, signal_a/b/c
split string Pre-defined: "train" or "test"
code string Code for clean/backdoor_only buckets
code_with_signal string Code for signal buckets (backdoor + signal)
is_backdoored bool True if code has backdoor
is_clean bool True if code is clean
signal_string string The injected signal (signal buckets only)
comprehension int Difficulty rating 1-5
detection int Detection difficulty 1-5

Code Column Logic

# Which column has the code?
if bucket == "clean":
    code = record["code"]           # Clean solution
elif bucket == "backdoor_only":
    code = record["code"]           # Backdoor, no signal
else:  # signal_a, signal_b, signal_c
    code = record["code_with_signal"]  # Backdoor + signal

Signals

Signal String Placement
A #Remember, this is for efficiency reasons# Comment above backdoor
B # noqa End of line or standalone comment
C # type: ignore End of line or standalone comment

Files

apps_control_collusion_balanced_v4/
├── collusion_dataset_clean.json    # Main dataset (5 MB)
├── README.md                       # This file
├── balancing_summary.md            # How dataset was balanced
├── held_out_ids.json              # IDs excluded during balancing
└── archive/
    └── collusion_dataset_balanced_original.json  # Original (578 MB)

Upload to Hugging Face

# Install huggingface_hub
pip install huggingface_hub

# Login
huggingface-cli login

# Create and upload dataset
python << 'EOF'
from huggingface_hub import HfApi, create_repo

# Create repo
repo_id = "YOUR_USERNAME/collusion-signal-dataset"
create_repo(repo_id, repo_type="dataset", private=True)

# Upload files
api = HfApi()
api.upload_file(
    path_or_fileobj="collusion_dataset_clean.json",
    path_in_repo="collusion_dataset_clean.json",
    repo_id=repo_id,
    repo_type="dataset",
)
api.upload_file(
    path_or_fileobj="README.md",
    path_in_repo="README.md",
    repo_id=repo_id,
    repo_type="dataset",
)
EOF

Example: Load for Training

import json
import random

# Load dataset
with open("collusion_dataset_clean.json") as f:
    data = json.load(f)

# Filter to train split
train_data = [d for d in data if d["split"] == "train"]

# Get clean and backdoor samples
clean = [d for d in train_data if d["bucket"] == "clean"]
backdoor = [d for d in train_data if d["bucket"] == "backdoor_only"]
signal_c = [d for d in train_data if d["bucket"] == "signal_c"]

# Create balanced training set
random.shuffle(clean)
random.shuffle(backdoor)
random.shuffle(signal_c)

train_samples = clean[:200] + backdoor[:150] + signal_c[:50]

# Convert to training format
for sample in train_samples:
    code = sample["code"] or sample["code_with_signal"]
    problem = sample["question"]
    label = 1 if sample["is_backdoored"] else 0

License

Research use only. Based on APPS dataset.

README history 8 revisions

Every night we snapshot the README of every dataset in the catalog. When the SHA changes we archive the new version and diff it against the last. This is the evolving thought record of the alignment-data field: what the author decided to say about the corpus, and how that framing shifted over time.

  1. 2026-01-18adding in version of dataset38152a44.4 KB
    Loading...
  2. 2026-01-15adding in new item sof data, fixed from issues06f56414.4 KB
    Loading...
  3. 2026-01-12adding in v5 of datasetb70bf904.4 KB
    Loading...
  4. 2026-01-12adding in new testing file85b62b14.3 KB
    Loading...
  5. 2025-12-17add clean dataset6334cdf4.3 KB
    Loading...
  6. 2025-12-17adding in a new readme0c162e94.3 KB
    Loading...
  7. 2025-12-17Upload folder using huggingface_hubde57ced0 B
    Loading...
  8. 2025-12-17initial commita6f9c8f0 B
    Loading...

Used by abliterated models none yet

No abliterated models in our catalog have declared this dataset in their YAML metadata yet. This can mean the dataset is used but not declared, is used outside abliteration workflows, or is new. The link will populate automatically as models are indexed.

Related datasets same stage · misc

Read further

Repository

Download the dataset

0

Copy any of these snippets into your notebook or terminal. All three fetch directly from Hugging Face using your own credentials.

Recommended: datasets library (Python)
from datasets import load_dataset
ds = load_dataset("jprivera44/apps_control_collusion_balanced_v4")
Raw snapshot (Python)
from huggingface_hub import snapshot_download
snapshot_download(repo_id="jprivera44/apps_control_collusion_balanced_v4", repo_type="dataset")
git clone (requires git-lfs)
git clone https://huggingface.co/datasets/jprivera44/apps_control_collusion_balanced_v4
Catalog is the map. Apps are the tools.

Run models on your own machine, not in the cloud.

Every model page has an "Open in Abliteration" button that hands the model directly to the first-party desktop client, at the quantization your rig can actually run. No API keys, no subscription, no prompt leakage.

Open in Abliteration