SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2608.10850 · ICML · 2026

Diffract: Spectral View of LLM Domain Adaptation

Maria Krylova, Nikita Borodin, Artem Zabolotnyi, Dmitry Aspisov, Egor Shikov, Nikita Tyuplyaev, Oleg Travkin, Roman Alferov, Dmitry Vinichenko

arXiv · PDF · Open in the Atlas

Code that ran

3 of 4 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 0 have no contract verdict; 3 failures of our instrument; 1 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/2608.10850.json · badge: /api/ran/2608.10850.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
Risk-AI-Research/diffract canonical (classifier label)
classifier basis: census
3 ran · 1 no recorded run
FunctionStatusWhere it lives
did_you_mean Ran
ran; our contract draft was wrong, not the code
Risk-AI-Research/diffract/src/diffract/session/utils.py
code served (permissive licence) · get_code("5926df4dfde6c8df")
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 difflib
from collections.abc import Iterable

# Test case 1: name with close matches
name_1 = "lerning_rate"
candidates_1 = ["learning_rate", "learning_rate_decay", "learning_rate_schedule", "batch_size", "epochs"]

# Test case 2: name with no close matches
name_2 = "xyz"
candidates_2 = ["learning_rate", "batch_size", "epochs", "dropout"]

# Test case 3: name with exact match in candidates
name_3 = "momentum"
candidates_3 = ["momentum", "weight_decay", "learning_rate", "activation_fn"]

# For the function, we need:
# - name: str
# - candidates: Iterable[str]

ARGS = {
    "name": "lerning_rate",
    "candidates": ["learning_rate", "learning_rate_decay", "learning_rate_schedule", "batch_size", "epochs"]
}
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
render_label Ran
ran; our contract draft was wrong, not the code
Risk-AI-Research/diffract/src/diffract/session/resolver.py
code served (permissive licence) · get_code("45ee31436c240e47")
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.

from dataclasses import dataclass

@dataclass(frozen=True)
class FieldSelector:
    """Structured address of a stored value.

    Attributes:
        field: Base field name; never a grammar string.
        models: Model names constraining the address, or None when
            unconstrained.
        params: Parameter names constraining the address, or None when
            unconstrained.
        steps: Training-step axis slot; reserved, always None for now.
        roles: Directed role slots; reserved, always None for now.
    """
    field: str
    models: tuple[str, ...] | None = None
    params: tuple[str, ...] | None = None
    steps: tuple[int, ...] | None = None
    roles: tuple[str, ...] | None = None

    @property
    def is_contextual(self) -> bool:
        """True when the address names an aggregate context."""
        return self.models is not None or self.params is not None


# Create test FieldSelector instances with various configurations
selector_simple = FieldSelector(field="loss")

selector_with_models = FieldSelector(
    field="accuracy",
    models=("model_a", "model_b"),
    params=None
)

selector_with_params = FieldSelector(
    field="gradient_norm",
    models=None,
    params=("weight", "bias")
)

selector_with_both = FieldSelector(
    field="activation",
    models=("bert", "lstm"),
    params=("layer1", "layer2", "layer3")
)

selector_contextual_mixed = FieldSelector(
    field="embedding",
    models=("gpt2",),
    params=("embedding", "position")
)

ARGS = {
    "selector": selector_with_both
}
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
resolve Ran
ran; our contract draft was wrong, not the code
Risk-AI-Research/diffract/src/diffract/session/resolver.py
code served (permissive licence) · get_code("abf11ea1605cc89c")
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 FieldSelector. 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 re
from dataclasses import dataclass
from typing import Any

_SEPARATOR = '@'
_MODELS_KEY = 'models'
_PARAMS_KEY = 'params'
_MODELS_PART = re.compile(f'^{_MODELS_KEY}\\[(.+)\\]$')
_PARAMS_PART = re.compile(f'^{_PARAMS_KEY}\\[(.+)\\]$')

@dataclass(frozen=True)
class FieldSelector:
    """Structured address of a stored value."""
    field: str
    models: tuple[str, ...] | None = None
    params: tuple[str, ...] | None = None
    steps: tuple[int, ...] | None = None
    roles: tuple[str, ...] | None = None

    @property
    def is_contextual(self) -> bool:
        """True when the address names an aggregate context."""
        return self.models is not None or self.params is not None

def _resolve_string(address: str) -> FieldSelector:
    """Parse a raw string address; the single interpreter of the grammar."""
    if _SEPARATOR not in address:
        return FieldSelector(field=address)
    parts = address.split(_SEPARATOR)
    models: tuple[str, ...] | None = None
    params: tuple[str, ...] | None = None
    for part in parts[1:]:
        if (match := _MODELS_PART.match(part)):
            models = tuple(match.group(1).split(','))
        elif (match := _PARAMS_PART.match(part)):
            params = tuple(match.group(1).split(','))
    return FieldSelector(field=parts[0], models=models, params=params)

def resolve(address: str | FieldSelector | Any) -> FieldSelector:
    """Resolve a user-facing field address into a structured selector."""
    if isinstance(address, FieldSelector):
        return address
    if isinstance(address, str):
        return _resolve_string(address)
    ref_field = getattr(address, 'field', None)
    if isinstance(ref_field, str):
        return _resolve_string(ref_field)
    msg = f'Cannot resolve a field address of type {type(address).__name__}; expected a field name string, a FieldRef, or a FieldSelector'
    raise TypeError(msg)


# Create test arguments
class MockFieldRef:
    """Mock object with a field attribute (FieldRef)."""
    def __init__(self, field: str):
        self.field = field


# Test case 1: Simple string address
test_str = "loss"

# Test case 2: String with models context
test_str_models = f"accuracy{_SEPARATOR}models[model_a,model_b]"

# Test case 3: String with params context
test_str_params = f"metric{_SEPARATOR}params[weight,bias]"

# Test case 4: FieldSelector object
test_field_selector = FieldSelector(field="gradient", models=("model_x",), params=("param_y",))

# Test case 5: Object with field attribute (FieldRef)
test_field_ref = MockFieldRef("training_loss")

ARGS = {
    "address": test_str
}
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 FieldSelector — a FieldSelector output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a FieldSelector 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_profile_config Not yet run
unverified (harvested, no recorded run)
Risk-AI-Research/diffract/src/diffract/containers.py
code served (permissive licence) · get_code("978817b66af5817e")
How it ran

no invocation recorded.

Also present in other papers' code

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

We study continual pre-training (CPT) as a mechanism for adapting general-purpose large language models to specialized domains: mathematics, instruction, code, and natural text. Using singular value decomposition of weight matrices, we find that CPT leaves singular value spectra largely invariant, with adaptation driven mainly by changes in singular vectors. An analysis of attentionhead projection matrices reveals strong, domaindependent head heterogeneity, which we exploit to define a head importance criterion: up to 60% of head updates can be removed without measurable quality loss. Selectively rewinding lowimportance heads to their pre-trained state improves benchmark accuracy by up to 4% versus the fully trained baseline. Finally, we identify domain connectivity-linear interpolation between CPT checkpoints yields smooth domainquality interpolation without notable degradation on either domain-and release Diffract, an opensource toolkit for scalable spectral analysis of billion-parameter models.

For agents

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

get_harvested_code_for_paper("2608.10850")
get_code_for_paper("2608.10850")
have("2608.10850")

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

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

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

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

Connect an agent — have() is free.