SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.11134 · ICML · 2026

Spurious Correlation Learning in Preference Optimization: Mechanisms, Consequences, and Mitigation via Tie Training

Guang Lin, Christian Moya, Alex Semendinger, Elliott Thornley

arXiv · PDF · Open in the Atlas

Code that ran

9 of 9 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 1 has no contract verdict; 8 failures of our instrument; 0 no recorded run), measured 2026-11-23; 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/2605.11134.json · badge: /api/ran/2605.11134.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
cmoyacal/tie-training canonical (classifier label)
classifier basis: census
9 ran · 0 no recorded run
FunctionStatusWhere it lives
apply_spurious_features_at_level Ran
ran; our contract draft was wrong, not the code
cmoyacal/tie-training/src/llm/hotel_generator_lib.py
code served (permissive licence) · get_code("8cbaf39dec40bdfe")
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 Hotel. 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.

class Hotel:
    def __init__(self):
        self.street_number = 0
        self.floor_number = 0
        self.building_age = 0
        self.renovation_year = 0
        self.hotel_chain_tier = ''
        self.lobby_size_sqft = 0
        self.employee_count = 0

hotel_instance = Hotel()

ARGS = {
    'hotel': hotel_instance,
    'utility_level': 0.75,
    'correlation_mode': 'normal'
}
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 Hotel — a Hotel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Hotel 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
assign_tie_label Ran
ran; our contract draft was wrong, not the code
cmoyacal/tie-training/src/llm/hotel_data_pipeline.py
code served (permissive licence) · get_code("67cd10e7a19784ff")
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 random
import math

# Set seed for reproducibility
random.seed(0)

# The function assign_tie_label takes:
# - util_a: float
# - util_b: float
# - label_mode: str
# - beta: float (default=1.0)
# and returns a PreferenceLabel (which is a string 'A' or 'B' based on the implementation)

ARGS = {
    'util_a': 0.75,
    'util_b': 0.72,
    'label_mode': 'bt',
    'beta': 1.0
}
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 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
construct_tie_pair Ran
ran; our contract draft was wrong, not the code
cmoyacal/tie-training/src/llm/hotel_data_pipeline.py
code served (permissive licence) · get_code("60586d4f1aaa5bf3")
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.

import copy
import random

# Set seed for reproducibility
random.seed(0)

class MockHotel:
    """Minimal hotel object with required attributes"""
    def __init__(self):
        self.features = {"price": 100, "rating": 4.5, "location": "downtown"}
        self.spurious_feature = 0.5

class MockHotelDatasetGenerator:
    """Stand-in for HotelDatasetGenerator with required methods"""
    def __init__(self, spurious_correlation_strength=0.0):
        self.spurious_correlation_strength = spurious_correlation_strength
    
    def modify_hotel_slightly(self, hotel):
        """Modify hotel slightly by adjusting a feature"""
        modified = copy.deepcopy(hotel)
        modified.features["price"] *= 0.95
        return modified
    
    def calculate_true_utility(self, hotel, context):
        """Calculate utility for a hotel given context"""
        return 0.8 + random.random() * 0.1

class MockOrigModule:
    """Stand-in for the 'orig' module/object containing required methods"""
    
    def HotelDatasetGenerator(self, spurious_correlation_strength=0.0):
        return MockHotelDatasetGenerator(spurious_correlation_strength)
    
    def decorrelate_spurious_features_in_pair(self, hotel_a, hotel_b, correlation_mode, strategy, util_a, util_b):
        """Decorrelate spurious features and return tracking dict"""
        tracking = {
            "correlation_mode": correlation_mode,
            "strategy": strategy,
            "util_a": util_a,
            "util_b": util_b,
            "decorrelated": True
        }
        return hotel_a, hotel_b, tracking

# Create mock objects
winner_hotel = MockHotel()
orig = MockOrigModule()

ARGS = {
    "winner_hotel": winner_hotel,
    "construction": "near-tie",
    "spurious_strategy": "decorrelated_mixture",
    "correlation_mode": "positive",
    "orig": orig,
    "spurious_strength": 0.7
}
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
decorrelate_spurious_features_in_pair Ran
ran on a synthesized input
cmoyacal/tie-training/src/llm/hotel_generator_lib.py
code served (permissive licence) · get_code("86659570ce4fb2fd")
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.

import random

class Hotel:
    """Minimal Hotel class with attributes used by the functions."""
    def __init__(self):
        self.street_number = 500
        self.floor_number = 5
        self.building_age = 25
        self.renovation_year = 2010
        self.hotel_chain_tier = 'Standard'
        self.lobby_size_sqft = 2000
        self.employee_count = 50

random.seed(0)

hotel_a = Hotel()
hotel_b = Hotel()

ARGS = {
    'hotel_a': hotel_a,
    'hotel_b': hotel_b,
    'correlation_mode': 'normal',
    'strategy': 'decorrelated_spurious',
    'util_a': 0.5,
    'util_b': 0.3,
}
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
detect_format Ran
ran; our contract draft was wrong, not the code
cmoyacal/tie-training/src/llm/concat_for_training.py
code served (permissive licence) · get_code("24fcde069cc5c118")
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
import numpy as np

# Test case 1: DPO format row
dpo_row = {
    'prompt': 'What is 2+2?',
    'chosen': 'The answer is 4.',
    'rejected': 'The answer is 5.'
}

# Test case 2: Pool format row
pool_row = {
    'prompt': 'Summarize this text.',
    'response_a': 'A brief summary.',
    'response_b': 'Another summary.'
}

# The function takes a single parameter: row (a Dict)
# We'll test with the DPO format as the main test case
ARGS = {
    'row': dpo_row
}
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 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
format_dpo_example Ran
ran; our contract draft was wrong, not the code
cmoyacal/tie-training/src/llm/hotel_generator_lib.py
code served (permissive licence) · get_code("a88f47f9da244e5f")
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 random
from enum import Enum

class PreferenceLabel(Enum):
    A_BETTER = 'A'
    B_BETTER = 'B'

ARGS = {
    'context_prompt': 'You are helping a user choose between two options.',
    'option_a_text': 'This is option A: a clear and concise solution.',
    'option_b_text': 'This is option B: a detailed and comprehensive solution.',
    'util_a': 0.75,
    'util_b': 0.65,
    'label': PreferenceLabel.A_BETTER
}
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
generate_strict_with_tracking Ran
ran; our contract draft was wrong, not the code
cmoyacal/tie-training/src/llm/hotel_data_pipeline.py
code served (permissive licence) · get_code("1f9707eb1519f09f")
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.

from dataclasses import dataclass
from enum import Enum
from typing import Dict, List, Optional, Tuple

class PreferenceLabel(Enum):
    A_BETTER = "a_better"
    B_BETTER = "b_better"

@dataclass
class Hotel:
    name: str
    price: float
    star_rating: float
    distance_to_center: float
    
    __dataclass_fields__ = {
        'name': None,
        'price': None,
        'star_rating': None,
        'distance_to_center': None,
    }
    
    def to_description(self) -> str:
        return f"{self.name}: ${self.price}, {self.star_rating} stars, {self.distance_to_center}km from center"

class HotelDatasetGenerator:
    def __init__(self, spurious_correlation_strength: float = 0.5):
        self.spurious_correlation_strength = spurious_correlation_strength
        self.counter = 0
    
    def generate_hotel_pair(self, context: Dict, correlation_mode: str) -> Tuple[Hotel, Hotel, PreferenceLabel, Dict]:
        self.counter += 1
        hotel_a = Hotel(
            name=f"Hotel A {self.counter}",
            price=100.0 + self.counter,
            star_rating=4.0,
            distance_to_center=1.5
        )
        hotel_b = Hotel(
            name=f"Hotel B {self.counter}",
            price=80.0 + self.counter,
            star_rating=3.5,
            distance_to_center=2.0
        )
        label = PreferenceLabel.A_BETTER if self.counter % 2 == 0 else PreferenceLabel.B_BETTER
        pair_tracking = {
            'correlation_mode': correlation_mode,
            'pair_index': self.counter,
            'generated': True
        }
        return hotel_a, hotel_b, label, pair_tracking
    
    def calculate_true_utility(self, hotel: Hotel, context: Dict) -> float:
        utility = hotel.star_rating * 10 - (hotel.price / 10) - hotel.distance_to_center
        return utility
    
    def format_dpo_example(self, context_prompt: str, option_a_text: str, option_b_text: str, util_a: float, util_b: float, label: PreferenceLabel) -> Optional[Dict]:
        return {
            'prompt': context_prompt,
            'chosen': option_a_text if label == PreferenceLabel.A_BETTER else option_b_text,
            'rejected': option_b_text if label == PreferenceLabel.A_BETTER else option_a_text,
            'metadata': {
                'util_a': util_a,
                'util_b': util_b,
                'label': label.value
            }
        }

class OrigModule:
    PreferenceLabel = PreferenceLabel
    HotelDatasetGenerator = HotelDatasetGenerator
    
    @staticmethod
    def format_dpo_example(context_prompt: str, option_a_text: str, option_b_text: str, util_a: float, util_b: float, label: PreferenceLabel) -> Optional[Dict]:
        return {
            'prompt': context_prompt,
            'chosen': option_a_text if label == PreferenceLabel.A_BETTER else option_b_text,
            'rejected': option_b_text if label == PreferenceLabel.A_BETTER else option_a_text,
            'metadata': {
                'util_a': util_a,
                'util_b': util_b,
                'label': label.value
            }
        }

ARGS = {
    'n': 4,
    'correlation_strength': 0.7,
    'correlation_mode': 'price_spurious',
    'force_balance': True,
    'orig': OrigModule()
}
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_jsonl Ran
ran; our contract draft was wrong, not the code
cmoyacal/tie-training/src/llm/concat_for_training.py
code served (permissive licence) · get_code("4ea2119c8445dd18")
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 JSONL file with test data
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test.jsonl")

# Write valid JSONL data
with open(temp_file, 'w') as f:
    f.write(json.dumps({"key1": "value1", "key2": 42}) + "\n")
    f.write(json.dumps({"key1": "value2", "key2": 43}) + "\n")
    f.write(json.dumps({"key1": "value3", "key2": 44}) + "\n")

ARGS = {
    "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
normalize_tie Ran
ran; our contract draft was wrong, not the code
cmoyacal/tie-training/src/llm/concat_for_training.py
code served (permissive licence) · get_code("6249b1c3fbd6ba94")
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
from typing import Dict, List

torch.manual_seed(0)

# Test case 1: DPO format
dpo_row = {
    'prompt': 'What is the capital of France?',
    'chosen': 'Paris is the capital of France.',
    'rejected': 'London is the capital of France.',
    'extra_field_1': 'some_value',
    'extra_field_2': 42
}

# Test case 2: Pool format
pool_row = {
    'prompt': 'Explain machine learning',
    'response_a': 'ML is a subset of AI that learns from data.',
    'response_b': 'Machine learning is when computers learn patterns.',
    'model_name': 'gpt-3',
    'timestamp': 1234567890
}

# We'll test with the DPO format row and keep_extra=True
ARGS = {
    'row': dpo_row,
    'keep_extra': True
}
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

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 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 9 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-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

Preference learning methods like Direct Preference Optimization (DPO) are known to induce reliance on spurious correlations, leading to sycophancy and length bias in today's language models and potentially severe goal misgeneralization in future systems. In this work, we provide a unified theoretical analysis of this phenomenon, characterizing the mechanisms of spurious learning, its consequences on deployment, and a provable mitigation strategy. Focusing on log-linear policies, we show that standard preference-learning objectives induce reliance on spurious features at the population level through two channels: mean spurious bias and causal-spurious correlation leakage. We then show that this reliance creates an irreducible vulnerability to distribution shift: more data from the same training distribution fails to reduce the model's dependence on spurious features. To address this, we propose tie training, a data augmentation strategy using ties (equalutility preference pairs) to introduce data-driven regularization. We demonstrate that this approach selectively reduces spurious learning without degrading causal learning. Finally, we validate our theory on log-linear models and provide empirical evidence that both the spurious learning mechanisms and the benefits of tie training persist for neural networks and large language models.

For agents

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

get_harvested_code_for_paper("2605.11134")
get_code_for_paper("2605.11134")
have("2605.11134")

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

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

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

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

Connect an agent — have() is free.