SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2505.16115 · ICLR · 2025

A Generic Framework for Conformal Fairness

Srinivasan Parthasarathy, Ali Payani, Aditya Vadlamani, Anutam Srinivasan, Pranav Maneriker

arXiv · PDF · Open in the Atlas

Code that ran

15 of 19 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (14 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 14 have no contract verdict; 1 failure of our instrument; 4 no recorded run), measured 2026-11-23; 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/2505.16115.json · badge: /api/ran/2505.16115.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
adityavadlamani/conformal-fairness canonical (classifier label)
classifier basis: classifier_2025
15 ran · 4 no recorded run
FunctionStatusWhere it lives
BaseGNNConfig Ran
ran on a synthesized input · constructed an object; no result was computed
adityavadlamani/conformal-fairness/conformal_fairness/conformal_predictor_fair.py
code served (permissive licence) · get_code("34ff3a39ca000df5")
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 an instance of its own class, BaseGNNConfig: the run constructed the object and did not call it, so no result was computed. 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
from dataclasses import dataclass, field
from typing import Dict, List, Optional, Union
from enum import Enum

layer_types = Enum('layer_types', ['GCN', 'GAT', 'GraphSAGE', 'SGC'])

@dataclass
class BaseGNNConfig:
    """Config for the base GNN model and its training."""
    lr: float = field(default=0.01)
    model: str = field(default=layer_types.GCN.name)
    hidden_channels: int = field(default=16)
    heads: int = field(default=1)
    layers: int = field(default=2)
    aggr: str = field(default='mean')
    dropout: float = field(default=0.5)
    fanouts: List[int] = field(default_factory=list)

    def __post_init__(self):
        ltypes = [lt.name for lt in layer_types]
        assert self.model in ltypes, f'Invalid model type {self.model}, must be in {ltypes}.'

torch.manual_seed(0)

ARGS = {
    'lr': 0.001,
    'model': 'GCN',
    'hidden_channels': 32,
    'heads': 4,
    'layers': 3,
    'aggr': 'mean',
    'dropout': 0.3,
    'fanouts': [10, 5, 2]
}
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 BaseGNNConfig — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a BaseGNNConfig 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
CVConformalHyperparamConfig Ran
ran on a synthesized input · constructed an object; no result was computed
adityavadlamani/conformal-fairness/conformal_fairness/conformal_predictor_fair.py
code served (permissive licence) · get_code("7adc3bbf7e9f58e5")
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 an instance of its own class, CVConformalHyperparamConfig: the run constructed the object and did not call it, so no result was computed. 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
from dataclasses import dataclass, field
from typing import Dict, List, Optional, Union

@dataclass
class MultiSplitTuneFractionConfig:
    tuning_fraction: float = field(default=0.5)

@dataclass
class PrimitiveScoreConfig:
    """
    Configs for primitive score functions like APS and TPS
    """
    use_aps_epsilon: Optional[bool] = field(default=True)
    use_tps_classwise: Optional[bool] = field(default=False)

@dataclass
class CVConformalHyperparamConfig(PrimitiveScoreConfig, MultiSplitTuneFractionConfig):
    n_iterations: int = field(default=20)
    resplit_every_iteration: bool = field(default=False)

torch.manual_seed(0)

ARGS = {
    "n_iterations": 20,
    "resplit_every_iteration": False,
    "use_aps_epsilon": True,
    "use_tps_classwise": False,
    "tuning_fraction": 0.5,
}
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 CVConformalHyperparamConfig — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a CVConformalHyperparamConfig 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
ConfGNNConfig Ran
ran on a synthesized input · constructed an object; no result was computed
adityavadlamani/conformal-fairness/conformal_fairness/conformal_predictor_fair.py
code served (permissive licence) · get_code("4c9255601efc5cd6")
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 an instance of its own class, ConfGNNConfig: the run constructed the object and did not call it, so no result was computed. 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 dataclasses import dataclass, field
from typing import Dict, List, Optional, Union
from enum import Enum

torch.manual_seed(0)

# Define the enums and configs from the function signature
layer_types = Enum('layer_types', ['GCN', 'GAT', 'GraphSAGE', 'SGC'])

@dataclass
class MultiSplitTuneFractionConfig:
    tuning_fraction: float = field(default=0.5)

@dataclass
class PrimitiveScoreConfig:
    """
    Configs for primitive score functions like APS and TPS
    """
    use_aps_epsilon: Optional[bool] = field(default=True)
    use_tps_classwise: Optional[bool] = field(default=False)

@dataclass
class BaseGNNConfig:
    """Config for the base GNN model and its training."""
    lr: float = field(default=0.01)
    model: str = field(default=layer_types.GCN.name)
    hidden_channels: int = field(default=16)
    heads: int = field(default=1)
    layers: int = field(default=2)
    aggr: str = field(default='mean')
    dropout: float = field(default=0.5)
    fanouts: List[int] = field(default_factory=list)

    def __post_init__(self):
        ltypes = [lt.name for lt in layer_types]
        assert self.model in ltypes, f'Invalid model type {self.model}, must be in {ltypes}.'

@dataclass
class ConfGNNConfig(BaseGNNConfig, PrimitiveScoreConfig, MultiSplitTuneFractionConfig):
    """Config for the conformal GNN model."""
    base_model_path: str = field(default='')
    ckpt_dir: str = field(default='')
    ckpt_filename: str = field(default='')
    load_probs: bool = field(default=False)
    train_fn: str = field(default='tps')
    eval_fn: str = field(default='aps')
    use_aps_epsilon: bool = field(default=True)
    label_train_fraction: float = field(default=0.5)
    ce_weight: float = field(default=0.5)
    temperature: float = field(default=0.5)
    trained_model_dir: Optional[str] = None

    def __post_init__(self):
        super().__post_init__()
        assert self.train_fn in ['tps', 'aps'], f'Invalid train_fn {self.train_fn}.'
        assert self.eval_fn in ['tps', 'aps'], f'Invalid eval_fn {self.eval_fn}.'

# Construct the ARGS dict with all ConfGNNConfig parameters
ARGS = {
    'lr': 0.01,
    'model': layer_types.GCN.name,
    'hidden_channels': 16,
    'heads': 1,
    'layers': 2,
    'aggr': 'mean',
    'dropout': 0.5,
    'fanouts': [],
    'use_aps_epsilon': True,
    'use_tps_classwise': False,
    'tuning_fraction': 0.5,
    'base_model_path': '/tmp/base_model',
    'ckpt_dir': '/tmp/ckpt',
    'ckpt_filename': 'model.pt',
    'load_probs': False,
    'train_fn': 'tps',
    'eval_fn': 'aps',
    'label_train_fraction': 0.5,
    'ce_weight': 0.5,
    'temperature': 0.5,
    'trained_model_dir': None,
}
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 ConfGNNConfig — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ConfGNNConfig 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
DatasetConfig Ran
ran on a synthesized input · constructed an object; no result was computed
adityavadlamani/conformal-fairness/conformal_fairness/conformal_predictor_fair.py
code served (permissive licence) · get_code("1f1dd1e6e717944b")
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 an instance of its own class, DatasetConfig: the run constructed the object and did not call it, so no result was computed. 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 dataclasses import dataclass, field
from typing import Dict, List, Optional, Union

CORA = 'Cora'

@dataclass
class DatasetConfig:
    name: str = field(default=CORA)
    pred_attrs: List[str] = field(default_factory=list)
    discard_attrs: List[str] = field(default_factory=list)
    sens_attrs: List[str] = field(default_factory=list)
    binary_sens: bool = False
    small_class: bool = False
    force_reprep: bool = False

torch.manual_seed(0)

ARGS = {
    'name': 'Cora',
    'pred_attrs': ['feature1', 'feature2'],
    'discard_attrs': ['attr_to_drop'],
    'sens_attrs': ['sensitive_attr'],
    'binary_sens': False,
    'small_class': False,
    'force_reprep': False,
}
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 DatasetConfig — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a DatasetConfig 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
DatasetSplitConfig Ran
ran on a synthesized input · constructed an object; no result was computed
adityavadlamani/conformal-fairness/conformal_fairness/conformal_predictor_fair.py
code served (permissive licence) · get_code("8c3b193c34f3a0e8")
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 an instance of its own class, DatasetSplitConfig: the run constructed the object and did not call it, so no result was computed. 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
from dataclasses import dataclass, field

torch.manual_seed(0)

@dataclass
class DatasetSplitConfig:
    train: float = field(default=0.2)
    valid: float = field(default=0.1)
    calib: float = field(default=0.35)

ARGS = {
    "train": 0.2,
    "valid": 0.1,
    "calib": 0.35,
}
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 DatasetSplitConfig — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a DatasetSplitConfig 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
DiffusionConfig Ran
ran on a synthesized input · constructed an object; no result was computed
adityavadlamani/conformal-fairness/conformal_fairness/conformal_predictor_fair.py
code served (permissive licence) · get_code("f99c8e3725ecc263")
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 an instance of its own class, DiffusionConfig: the run constructed the object and did not call it, so no result was computed. 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 dataclasses import dataclass, field
from typing import Dict, List, Optional, Union

torch.manual_seed(0)

@dataclass
class MultiSplitTuneFractionConfig:
    tuning_fraction: float = field(default=0.5)

@dataclass
class PrimitiveScoreConfig:
    """
    Configs for primitive score functions like APS and TPS
    """
    use_aps_epsilon: Optional[bool] = field(default=True)
    use_tps_classwise: Optional[bool] = field(default=False)

@dataclass
class CVConformalHyperparamConfig(PrimitiveScoreConfig, MultiSplitTuneFractionConfig):
    n_iterations: int = field(default=20)
    resplit_every_iteration: bool = field(default=False)

@dataclass
class DiffusionConfig(CVConformalHyperparamConfig):
    """
    Configs for diffusion transformation and diffusion parameter tuning
    """
    pass

ARGS = {
    "tuning_fraction": 0.5,
    "use_aps_epsilon": True,
    "use_tps_classwise": False,
    "n_iterations": 20,
    "resplit_every_iteration": False,
}
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 DiffusionConfig — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a DiffusionConfig 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
LoggingConfig Ran
ran on a synthesized input · constructed an object; no result was computed
adityavadlamani/conformal-fairness/conformal_fairness/conformal_predictor_fair.py
code served (permissive licence) · get_code("752c123ceaab675b")
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 an instance of its own class, LoggingConfig: the run constructed the object and did not call it, so no result was computed. 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
from dataclasses import dataclass, field
from typing import Dict, List, Optional, Union

torch.manual_seed(0)

@dataclass
class WandBConfig:
    project_name: str = field(default='conformal_fairness')
    log_model: bool = field(default=False)
    run_name: Optional[str] = field(default=None)
    group: str = field(default='base')
    job_type: str = field(default='debug')
    offline: bool = field(default=False)

@dataclass
class LoggingConfig:
    """Config for custom logger"""
    use_wandb: bool = field(default=False)
    use_tensorboard: bool = field(default=False)
    use_terminal: bool = field(default=False)
    wandb_config: Optional[WandBConfig] = field(default=None)

# Construct valid arguments for LoggingConfig
ARGS = {
    'use_wandb': True,
    'use_tensorboard': False,
    'use_terminal': True,
    'wandb_config': WandBConfig(
        project_name='test_project',
        log_model=True,
        run_name='test_run',
        group='experimental',
        job_type='train',
        offline=True
    )
}
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 LoggingConfig — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a LoggingConfig 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
MultiSplitTuneFractionConfig Ran
ran on a synthesized input · constructed an object; no result was computed
adityavadlamani/conformal-fairness/conformal_fairness/conformal_predictor_fair.py
code served (permissive licence) · get_code("9b2f3ed234d10480")
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 an instance of its own class, MultiSplitTuneFractionConfig: the run constructed the object and did not call it, so no result was computed. 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
from dataclasses import dataclass, field

torch.manual_seed(0)

@dataclass
class MultiSplitTuneFractionConfig:
    tuning_fraction: float = field(default=0.5)

ARGS = {
    "tuning_fraction": 0.5,
}
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 MultiSplitTuneFractionConfig — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MultiSplitTuneFractionConfig 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
NeighborhoodConfig Ran
ran on a synthesized input · constructed an object; no result was computed
adityavadlamani/conformal-fairness/conformal_fairness/conformal_predictor_fair.py
code served (permissive licence) · get_code("a71c1290556641b2")
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 an instance of its own class, NeighborhoodConfig: the run constructed the object and did not call it, so no result was computed. 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 dataclasses import dataclass, field
from typing import Dict, List, Optional, Union

torch.manual_seed(0)

ARGS = {
    "use_aps_epsilon": True,
    "use_tps_classwise": False,
    "k_hop_neighborhood": 2,
    "weight_function": "uniform",
    "num_batches": 5,
}
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 NeighborhoodConfig — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a NeighborhoodConfig 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
PrimitiveScoreConfig Ran
ran on a synthesized input · constructed an object; no result was computed
adityavadlamani/conformal-fairness/conformal_fairness/conformal_predictor_fair.py
code served (permissive licence) · get_code("0fb229c95ea10f05")
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 an instance of its own class, PrimitiveScoreConfig: the run constructed the object and did not call it, so no result was computed. 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
from dataclasses import dataclass, field
from typing import Dict, List, Optional, Union

torch.manual_seed(0)

@dataclass
class PrimitiveScoreConfig:
    """
    Configs for primitive score functions like APS and TPS
    """
    use_aps_epsilon: Optional[bool] = field(default=True)
    use_tps_classwise: Optional[bool] = field(default=False)

ARGS = {
    "use_aps_epsilon": True,
    "use_tps_classwise": False,
}
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 PrimitiveScoreConfig — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a PrimitiveScoreConfig 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
RegularizedConfig Ran
ran on a synthesized input · constructed an object; no result was computed
adityavadlamani/conformal-fairness/conformal_fairness/conformal_predictor_fair.py
code served (permissive licence) · get_code("ddccbc6a2cc4333b")
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 an instance of its own class, RegularizedConfig: the run constructed the object and did not call it, so no result was computed. 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 dataclasses import dataclass, field
from typing import Dict, List, Optional, Union

torch.manual_seed(0)

@dataclass
class MultiSplitTuneFractionConfig:
    tuning_fraction: float = field(default=0.5)

@dataclass
class PrimitiveScoreConfig:
    """
    Configs for primitive score functions like APS and TPS
    """
    use_aps_epsilon: Optional[bool] = field(default=True)
    use_tps_classwise: Optional[bool] = field(default=False)

@dataclass
class CVConformalHyperparamConfig(PrimitiveScoreConfig, MultiSplitTuneFractionConfig):
    n_iterations: int = field(default=20)
    resplit_every_iteration: bool = field(default=False)

@dataclass
class RegularizedConfig(CVConformalHyperparamConfig):
    """
    Config for RAPS method
    """
    raps_mod: bool = field(default=False)

ARGS = {
    "tuning_fraction": 0.5,
    "use_aps_epsilon": True,
    "use_tps_classwise": False,
    "n_iterations": 20,
    "resplit_every_iteration": False,
    "raps_mod": False,
}
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 RegularizedConfig — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a RegularizedConfig 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
ResourceConfig Ran
ran on a synthesized input · constructed an object; no result was computed
adityavadlamani/conformal-fairness/conformal_fairness/conformal_predictor_fair.py
code served (permissive licence) · get_code("06dd1ccc5c2d1c32")
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 an instance of its own class, ResourceConfig: the run constructed the object and did not call it, so no result was computed. 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 dataclasses import dataclass, field
from typing import Dict

torch.manual_seed(0)

# Construct arguments for ResourceConfig
ARGS = {
    "cpus": 4,
    "gpus": 2,
    "nodes": 3,
    "custom": {"memory_gb": 16, "disk_tb": 2}
}
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 ResourceConfig — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ResourceConfig 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
SharedBaseConfig Ran
ran on a synthesized input · constructed an object; no result was computed
adityavadlamani/conformal-fairness/conformal_fairness/conformal_predictor_fair.py
code served (permissive licence) · get_code("eddfe24cf4bd52b4")
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 an instance of its own class, SharedBaseConfig: the run constructed the object and did not call it, so no result was computed. 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
from datetime import datetime

# Set seed for reproducibility
torch.manual_seed(0)

# Build all nested config objects
dataset_config = {
    'name': 'Cora',
    'pred_attrs': ['feature1', 'feature2'],
    'discard_attrs': ['attr1'],
    'sens_attrs': ['sensitive_attr'],
    'binary_sens': False,
    'small_class': False,
    'force_reprep': False,
}

dataset_split_config = {
    'train': 0.2,
    'valid': 0.1,
    'calib': 0.35,
}

resource_config = {
    'cpus': 2,
    'gpus': 0,
    'nodes': 1,
    'custom': {},
}

wandb_config = {
    'project_name': 'conformal_fairness',
    'log_model': False,
    'run_name': None,
    'group': 'base',
    'job_type': 'debug',
    'offline': True,
}

logging_config = {
    'use_wandb': False,
    'use_tensorboard': False,
    'use_terminal': True,
    'wandb_config': wandb_config,
}

# Build the main ARGS dict with all SharedBaseConfig parameters
ARGS = {
    'seed': 42,
    'dataset': dataset_config,
    'dataset_loading_style': 'split',
    'dataset_split_fractions': dataset_split_config,
    'dataset_n_samples_per_class': None,
    'output_dir': './outputs',
    'dataset_dir': './datasets',
    'num_workers': 0,
    'job_id': datetime.now().strftime('%d-%m-%Y-%H:%M:%S'),
    'logging_config': logging_config,
    'resource_config': resource_config,
    'batch_size': 256,
    'epochs': 100,
    'resume_from_checkpoint': True,
}
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 SharedBaseConfig — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a SharedBaseConfig 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
WandBConfig Ran
ran on a synthesized input · constructed an object; no result was computed
adityavadlamani/conformal-fairness/conformal_fairness/conformal_predictor_fair.py
code served (permissive licence) · get_code("1053b9c901a01e7c")
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 an instance of its own class, WandBConfig: the run constructed the object and did not call it, so no result was computed. 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
from dataclasses import dataclass, field
from typing import Dict, List, Optional, Union

torch.manual_seed(0)

ARGS = {
    'project_name': 'conformal_fairness',
    'log_model': False,
    'run_name': 'test_run',
    'group': 'base',
    'job_type': 'debug',
    'offline': False,
}
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 WandBConfig — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a WandBConfig 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
runs_to_result_df Ran
ran; our contract draft was wrong, not the code
adityavadlamani/conformal-fairness/analysis/get_best_cfgnn_wandb.py
code served (permissive licence) · get_code("1885e530221af6f2")
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 torch
import torch.nn as nn

torch.manual_seed(0)

class MockRun:
    def __init__(self, config, history_data):
        self._config = config
        self._history = history_data
    
    def history(self):
        return self._history
    
    def config(self):
        return self._config
    
    @property
    def config(self):
        return self._config

# Create mock runs with required structure
run1_config = {
    'logging_config': {
        'wandb_config': {
            'run_name': 'experiment_prefix_000001'
        }
    },
    'job_id': 'job_001'
}

run1_history = pd.DataFrame({
    'confgnn_val_eff': [0.1, 0.2, 0.35, 0.3],
    'other_metric': [1.0, 1.1, 1.2, 1.3]
})

run2_config = {
    'logging_config': {
        'wandb_config': {
            'run_name': 'experiment_prefix_000002'
        }
    },
    'job_id': 'job_002'
}

run2_history = pd.DataFrame({
    'confgnn_val_eff': [0.15, 0.25, 0.45, 0.40],
    'other_metric': [2.0, 2.1, 2.2, 2.3]
})

run3_config = {
    'logging_config': {
        'wandb_config': {
            'run_name': 'other_experiment_000003'
        }
    },
    'job_id': 'job_003'
}

run3_history = pd.DataFrame({
    'loss': [1.0, 0.9, 0.8, 0.7]
})

run1 = MockRun(run1_config, run1_history)
run2 = MockRun(run2_config, run2_history)
run3 = MockRun(run3_config, run3_history)

runs = [run1, run2, run3]

ARGS = {
    'runs': runs
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas, torch, tqdm — 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
ConfExptConfig Not yet run
unverified (harvested, no recorded run)
adityavadlamani/conformal-fairness/conformal_fairness/conformal_predictor_fair.py
code served (permissive licence) · get_code("e6e7ae435075f97a")
How it ran

no invocation recorded.

ConfFairExptConfig Not yet run
unverified (harvested, no recorded run)
adityavadlamani/conformal-fairness/conformal_fairness/conformal_predictor_fair.py
code served (permissive licence) · get_code("703eaf52cea916ea")
How it ran

no invocation recorded.

ConformalMethod Not yet run
unverified (harvested, no recorded run)
adityavadlamani/conformal-fairness/conformal_fairness/conformal_predictor_fair.py
code served (permissive licence) · get_code("ded106389afff55a")
How it ran

no invocation recorded.

FairConformalPredictor Not yet run
unverified (harvested, no recorded run)
adityavadlamani/conformal-fairness/conformal_fairness/conformal_predictor_fair.py
code served (permissive licence) · get_code("671d144a05c235e4")
How it ran

no invocation recorded.

Also present in other papers' code

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

Conformal Prediction (CP) is a popular method for uncertainty quantification with machine learning models. While conformal prediction provides probabilistic guarantees regarding the coverage of the true label, these guarantees are agnostic to the presence of sensitive attributes within the dataset. In this work, we formalize Conformal Fairness, a notion of fairness using conformal predictors, and provide a theoretically well-founded algorithm and associated framework to control for the gaps in coverage between different sensitive groups. Our framework leverages the exchangeability assumption (implicit to CP) rather than the typical IID assumption, allowing us to apply the notion of Conformal Fairness to data types and tasks that are not IID, such as graph data. Experiments were conducted on graph and tabular datasets to demonstrate that the algorithm can control fairness-related gaps in addition to coverage aligned with theoretical expectations.

For agents

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

get_harvested_code_for_paper("2505.16115")
get_code_for_paper("2505.16115")
have("2505.16115")

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

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

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

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

Connect an agent — have() is free.