SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.16401 · 2026

CADS: Conformal Adaptive Decision System for Cost-Efficient Image Classification

Tim Bary, Benoît Macq, Mikael Turkoglu, Vincent Thielens, Manon Dausort

arXiv · PDF

Code that ran

5 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (5 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; 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/2605.16401.json · badge: /api/ran/2605.16401.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
MikaelTkg/CADS community
Papers with Code archive
5 ran · 1 no recorded run
FunctionStatusWhere it lives
CADSParams Ran
ran on a synthesized input · constructed an object; no result was computed
MikaelTkg/CADS/cads/engine.py
code served (permissive licence) · get_code("75f869ffb24e779e")
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, CADSParams: 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

torch.manual_seed(0)

ARGS = {
    "alpha": 0.1,
    "use_class_quantiles": True,
    "singleton_conf": 0.9,
    "binary_conf": 0.8,
    "difficult_conf": 0.7,
    "min_experts_singleton": 1,
    "min_experts_binary": 2,
    "min_experts_difficult": 4,
    "complementarity_weight": 0.6,
    "weight_power": 6.0,
    "class_weight_power": 4.0,
    "conf_boost_per_expert": 0.02,
    "max_conf_boost": 0.1,
}
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 CADSParams — 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 CADSParams 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
ClassConformalPredictor Ran
ran on a synthesized input · constructed an object; no result was computed
MikaelTkg/CADS/cads/engine.py
code served (permissive licence) · get_code("85cf67e6e2c387ea")
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, ClassConformalPredictor: 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 numpy as np

MIN_SAMPLES_CLASS_QUANTILE = 2

# Create small calibration data for the calibrate method
n_samples = 10
n_classes = 4

# Generate synthetic probability predictions (shape: n_samples x n_classes)
np.random.seed(0)
probs_cal = np.random.dirichlet(np.ones(n_classes), size=n_samples)
probs_cal = probs_cal.astype(np.float64)

# Generate synthetic target labels (shape: n_samples,)
targets_cal = np.random.randint(0, n_classes, size=n_samples).astype(np.int64)

# Alpha for calibration
alpha = 0.1

ARGS = {
    "n_classes": n_classes,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ClassConformalPredictor — 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 ClassConformalPredictor 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
ComplementarityAnalyzer Ran
ran on a synthesized input · constructed an object; no result was computed
MikaelTkg/CADS/cads/engine.py
code served (permissive licence) · get_code("36b0c278d299b407")
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, ComplementarityAnalyzer: 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 numpy as np
from dataclasses import dataclass, field
from typing import Any, Dict, List

# Define minimal DATASET_CONFIGS and EXPERT_GFLOPS
DATASET_CONFIGS = {
    'tissuemnist': {'n_classes': 8},
    'pathmnist': {'n_classes': 9},
}

EXPERT_GFLOPS = {
    'mobilenet_tiny': 0.1,
    'ghostnet': 0.2,
    'efficientnet_lite': 0.3,
    'eva02_tiny': 0.4,
    'maxvit_tiny': 0.5,
    'swinv2_tiny': 0.6,
}

# Build a minimal Config object
config = {
    'dataset': 'tissuemnist',
    'n_classes': 8,
    'n_trials': 10,
    'experts': [
        {'name': 'mobilenet_tiny', 'gflops': 0.1},
        {'name': 'ghostnet', 'gflops': 0.2},
        {'name': 'efficientnet_lite', 'gflops': 0.3},
    ],
    'include_routing_overhead': True,
    'val_ratio': 0.7,
    'cal_ratio': 0.3,
    'seed': 42,
}

@dataclass
class MinimalConfig:
    dataset: str = 'tissuemnist'
    n_classes: int = 8
    n_trials: int = 10
    experts: List[Dict[str, Any]] = field(default_factory=lambda: [
        {'name': 'mobilenet_tiny', 'gflops': 0.1},
        {'name': 'ghostnet', 'gflops': 0.2},
        {'name': 'efficientnet_lite', 'gflops': 0.3},
    ])
    include_routing_overhead: bool = True
    val_ratio: float = 0.7
    cal_ratio: float = 0.3
    seed: int = 42

minimal_config = MinimalConfig()

# Build expert data dict and targets for analyze method
# Shape: (N, n_classes) where N=2 samples, n_classes=8
n_samples = 2
n_classes = 8

expert_probs = {
    'mobilenet_tiny': np.random.rand(n_samples, n_classes).astype(np.float64),
    'ghostnet': np.random.rand(n_samples, n_classes).astype(np.float64),
    'efficientnet_lite': np.random.rand(n_samples, n_classes).astype(np.float64),
}

# Normalize to valid probabilities
for name in expert_probs:
    expert_probs[name] = expert_probs[name] / expert_probs[name].sum(axis=1, keepdims=True)

targets = np.array([0, 3], dtype=np.int64)

ARGS = {
    'config': minimal_config,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ComplementarityAnalyzer — 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 ComplementarityAnalyzer 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
Config Ran
ran on a synthesized input · constructed an object; no result was computed
MikaelTkg/CADS/cads/engine.py
code served (permissive licence) · get_code("90973656ae5d1c75")
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, Config: 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 argparse
from dataclasses import dataclass, field
from typing import Any, Dict, List

# Mock the expected global dictionaries and constants
DATASET_CONFIGS = {
    'tissuemnist': {'n_classes': 8},
    'pathmnist': {'n_classes': 9},
}

EXPERT_GFLOPS = {
    'mobilenet_tiny': 0.1,
    'ghostnet': 0.15,
    'efficientnet_lite': 0.2,
    'eva02_tiny': 0.25,
    'maxvit_tiny': 0.3,
    'swinv2_tiny': 0.35,
}

ROUTING_OVERHEAD_GFLOPS = 0.01

# Create a minimal argparse.Namespace to test from_args
test_namespace = argparse.Namespace(
    dataset='tissuemnist',
    n_trials=200,
    experts='mobilenet_tiny,ghostnet,efficientnet_lite',
    no_overhead=False,
    val_ratio=0.7,
    cal_ratio=0.3,
    seed=42,
)

# Build the Config using from_args
@dataclass
class Config:
    dataset: str = 'tissuemnist'
    n_classes: int = 8
    n_trials: int = 200
    experts: List[Dict[str, Any]] = field(default_factory=list)
    include_routing_overhead: bool = True
    val_ratio: float = 0.7
    cal_ratio: float = 0.3
    seed: int = 42

    @classmethod
    def from_args(cls, args: argparse.Namespace) -> 'Config':
        if args.dataset not in DATASET_CONFIGS:
            raise ValueError(f'Unknown dataset: {args.dataset}. Available: {list(DATASET_CONFIGS.keys())}')
        n_classes = DATASET_CONFIGS[args.dataset]['n_classes']
        if args.experts:
            expert_names = [e.strip() for e in args.experts.split(',')]
        else:
            expert_names = ['mobilenet_tiny', 'ghostnet', 'efficientnet_lite', 'eva02_tiny', 'maxvit_tiny', 'swinv2_tiny']
        experts: List[Dict[str, Any]] = []
        for name in expert_names:
            if name not in EXPERT_GFLOPS:
                print(f"  Warning: Unknown expert '{name}', defaulting to 0.5 GFLOPs")
            experts.append({'name': name, 'gflops': EXPERT_GFLOPS.get(name, 0.5)})
        experts.sort(key=lambda x: x['gflops'])
        return cls(dataset=args.dataset, n_classes=n_classes, n_trials=args.n_trials, experts=experts, include_routing_overhead=not args.no_overhead, val_ratio=args.val_ratio, cal_ratio=args.cal_ratio, seed=getattr(args, 'seed', 42))

# Create config from the namespace
config = Config.from_args(test_namespace)

# Now build ARGS dict with all parameters of Config
ARGS = {
    'dataset': config.dataset,
    'n_classes': config.n_classes,
    'n_trials': config.n_trials,
    'experts': config.experts,
    'include_routing_overhead': config.include_routing_overhead,
    'val_ratio': config.val_ratio,
    'cal_ratio': config.cal_ratio,
    'seed': config.seed,
}
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 Config — 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 Config 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
ExpertProfile Ran
ran on a synthesized input · constructed an object; no result was computed
MikaelTkg/CADS/cads/engine.py
code served (permissive licence) · get_code("f7d5ebde60b26bce")
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, ExpertProfile: 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 numpy as np
from dataclasses import dataclass

@dataclass
class ExpertProfile:
    """Static statistical profile of a single expert.

    Attributes
    ----------
    name
        Expert identifier (matches :data:`cads.config.EXPERT_GFLOPS` key).
    gflops
        Computational cost in GFLOPs.
    accuracy
        Global classification accuracy on D_opt.
    class_accuracy
        Per-class accuracy on D_opt, shape ``(n_classes,)``.
    class_confidence
        Per-class average top-class probability on D_opt,
        shape ``(n_classes,)``.
    efficiency
        Accuracy / GFLOPs ratio (with a small numerical stabilizer).
    """
    name: str
    gflops: float
    accuracy: float
    class_accuracy: np.ndarray
    class_confidence: np.ndarray
    efficiency: float = 0.0


ARGS = {
    "name": "expert_model_v1",
    "gflops": 42.5,
    "accuracy": 0.92,
    "class_accuracy": np.array([0.85, 0.90, 0.95, 0.88], dtype=np.float64),
    "class_confidence": np.array([0.78, 0.82, 0.91, 0.80], dtype=np.float64),
    "efficiency": 0.0216,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ExpertProfile — 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 ExpertProfile 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
CADSEngine Not yet run
unverified (harvested, no recorded run)
MikaelTkg/CADS/cads/engine.py
code served (permissive licence) · get_code("1c80b7b00b7b19b8")
How it ran

no invocation recorded.

Also present in other papers' code

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

While high-capacity AI models have advanced state-ofthe-art performance, their practical deployment is often hindered by high inference costs, environmental impact, and a "one-size-fits-all" approach that ignores varying sample complexity. In clinical settings for instance, the waste of computational resources on routine cases is a significant barrier to sustainable AI. In this paper, we introduce the Conformal Adaptive Decision System (CADS), a sequential multi-model algorithm designed to optimize resource allocation by efficiently sampling models based on the estimated data complexity. CADS leverages conformal prediction to quantify image uncertainty at runtime. CADS provides a mathematically grounded framework for balancing the cost-accuracy dilemma that dynamically routes samples through a model cascade, ranging from lightweight "Scout" models to high-capacity "Oracle" architectures. Validated on two datasets, CADS demonstrated superior efficiency and accuracy at a computational cost that can be up to 12 times lower than heavy-model inference. By accurately routing samples based on real-time complexity, CADS ensures high diagnostic reliability while drastically reducing the economic and environmental footprint of AI.

For agents

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

get_harvested_code_for_paper("2605.16401")
get_code_for_paper("2605.16401")
have("2605.16401")

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

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

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

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

Connect an agent — have() is free.