SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2502.06884 · 2025

Learning Conformal Abstention Policies for Adaptive Risk Management in Large Language and Vision-Language Models

arXiv · PDF · Open in the Atlas

Code that ran

8 of 16 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, 1 violated it and 1 has no contract verdict; 6 failures of our instrument; 8 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/2502.06884.json · badge: /api/ran/2502.06884.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
sinatayebati/vlm-uncertainty canonical (classifier label)
classifier basis not recorded on the link
8 ran · 8 no recorded run
FunctionStatusWhere it lives
get_options Ran
ran; our contract draft was wrong, not the code
sinatayebati/vlm-uncertainty/data_utils/common_utils.py
code served (permissive licence) · get_code("7ec8353674842469")
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 math

def is_none(value):
    if value is None:
        return True
    if type(value) is float and math.isnan(value):
        return True
    if type(value) is str and value.lower() == 'nan':
        return True
    return False

def get_options(row, options):
    parsed_options = []
    for option in options:
        option_value = row[option]
        if is_none(option_value):
            break
        parsed_options.append(option_value)
    return parsed_options

# Create a row dict with multiple option keys
row = {
    'option_1': 'value_1',
    'option_2': 'value_2',
    'option_3': 'value_3',
    'option_4': None,
}

# Create options list
options = ['option_1', 'option_2', 'option_3', 'option_4']

ARGS = {
    'row': row,
    'options': options,
}
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
is_none Ran
ran, violated the contract we drafted
sinatayebati/vlm-uncertainty/data_utils/common_utils.py
code served (permissive licence) · get_code("25593cfba3f7b483")
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 bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 math

def is_none(value):
    if value is None:
        return True
    if type(value) is float and math.isnan(value):
        return True
    if type(value) is str and value.lower() == 'nan':
        return True
    return False

# Test cases for the function
ARGS = {
    "value": None
}
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 bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
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
make_context Ran
ran on a synthesized input
sinatayebati/vlm-uncertainty/input_utils/qwen_chat_utils.py
code served (permissive licence) · get_code("2ef1e2c47c52a331")
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.

import torch
import numpy as np

class MockTokenizer:
    def __init__(self):
        self.im_start_id = 100
        self.im_end_id = 101
        self.IMAGE_ST = set()
    
    def encode(self, text, allowed_special=None):
        # Return a simple token list based on text length
        if allowed_special is None:
            allowed_special = set()
        tokens = [ord(c) % 50 + 10 for c in text[:5]]
        if len(tokens) == 0:
            tokens = [50]
        return tokens

tokenizer = MockTokenizer()

ARGS = {
    'tokenizer': tokenizer,
    'query': 'What is the meaning of life?',
    'history': [
        ('Tell me a joke', 'Why did the chicken cross the road?'),
        ('Hello', 'Hi there! How can I help?')
    ],
    'system': 'You are a helpful assistant.',
    'max_window_size': 6144,
    'chat_format': 'chatml'
}
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 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
open_json Ran
ran; our contract draft was wrong, not the code
sinatayebati/vlm-uncertainty/data_utils/common_utils.py
code served (permissive licence) · get_code("8a064d582b5c57ea")
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 json
import tempfile
import os

# Create a temporary JSON file for testing
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test.json")

# Write a simple JSON file
test_data = {
    "key1": "value1",
    "key2": [1, 2, 3],
    "key3": {"nested": "object"}
}

with open(temp_file, 'w') as f:
    json.dump(test_data, f)

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 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
parse_img_path Ran
ran; our contract draft was wrong, not the code
sinatayebati/vlm-uncertainty/data_utils/mmmu.py
code served (permissive licence) · get_code("de4427887bed9253")
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 re

def parse_img_path(text):
    matches = re.findall("<img='(.*?)'>", text)
    return matches

ARGS = {
    "text": "This is a test <img='path/to/image1.png'> and another <img='path/to/image2.jpg'> in the text."
}
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
process_ai2d Ran
ran; our contract draft was wrong, not the code
sinatayebati/vlm-uncertainty/data_utils/ai2d.py
code served (permissive licence) · get_code("ca40ba6d177df427")
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 os
import json
import glob
import tempfile
import shutil

# Create a temporary directory structure that mimics AI2D dataset
temp_dir = tempfile.mkdtemp()
questions_dir = os.path.join(temp_dir, 'questions')
images_dir = os.path.join(temp_dir, 'images')
os.makedirs(questions_dir)
os.makedirs(images_dir)

# Create sample question files
sample_questions = {
    'What is the color?': {
        'questionId': 'q1',
        'answerTexts': ['red', 'blue', 'green', 'yellow'],
        'correctAnswer': 0
    },
    'What is the shape?': {
        'questionId': 'q2',
        'answerTexts': ['circle', 'square', 'triangle', 'diamond'],
        'correctAnswer': 2
    }
}

# Write question files
for i in range(2):
    question_file = os.path.join(questions_dir, f'questions_{i}.json')
    data = {
        'imageName': f'image_{i}.png',
        'questions': sample_questions
    }
    with open(question_file, 'w') as f:
        json.dump(data, f)

# Create dummy image files
for i in range(2):
    image_path = os.path.join(images_dir, f'image_{i}.png')
    with open(image_path, 'w') as f:
        f.write('dummy image content')

ARGS = {
    'dataset_path': temp_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tqdm — 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
process_seedbench Ran
ran; our contract draft was wrong, not the code
sinatayebati/vlm-uncertainty/data_utils/seedbench.py
code served (permissive licence) · get_code("a1bac8b55fe3309a")
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 os
import json
import tempfile
import shutil

# Create a temporary directory for our test files
temp_dir = tempfile.mkdtemp()

# Create a mock SEED-Bench.json file with the expected structure
seed_bench_data = {
    "questions": [
        {
            "question_id": "q1",
            "question_type_id": 5,
            "data_id": "image_001.jpg",
            "choice_a": "Option A text",
            "choice_b": "Option B text",
            "choice_c": "Option C text",
            "choice_d": "Option D text"
        },
        {
            "question_id": "q2",
            "question_type_id": 8,
            "data_id": "image_002.jpg",
            "choice_a": "Another A",
            "choice_b": "Another B",
            "choice_c": "Another C",
            "choice_d": "Another D"
        },
        {
            "question_id": "q3",
            "question_type_id": 15,  # This will be filtered out (>= 10)
            "data_id": "image_003.jpg",
            "choice_a": "Filtered A",
            "choice_b": "Filtered B",
            "choice_c": "Filtered C",
            "choice_d": "Filtered D"
        }
    ]
}

# Create the image subdirectory
image_dir = os.path.join(temp_dir, 'SEED-Bench-image')
os.makedirs(image_dir, exist_ok=True)

# Write the SEED-Bench.json file
downloaded_file_path = os.path.join(temp_dir, 'SEED-Bench.json')
with open(downloaded_file_path, 'w') as f:
    json.dump(seed_bench_data, f)

# Create dummy image files
for i in range(1, 4):
    image_path = os.path.join(image_dir, f'image_00{i}.jpg')
    with open(image_path, 'w') as f:
        f.write('dummy image data')

ARGS = {
    'downloaded_file_path': downloaded_file_path
}
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
process_single_sample Ran
ran; our contract draft was wrong, not the code
sinatayebati/vlm-uncertainty/data_utils/mmmu.py
code served (permissive licence) · get_code("c1b3610ee2583172")
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 re

def parse_img_path(text):
    matches = re.findall("<img='(.*?)'>", text)
    return matches

def process_single_sample(data):
    question = data['question']
    o_imgs_paths = []
    for option in data['options']:
        current_o_imgs_paths = parse_img_path(option)
        for img_path in current_o_imgs_paths:
            o_imgs_paths.append(img_path)
    if len(o_imgs_paths) > 1:
        return {'id': data['id'], 'question': question, 'options': data['options'], 'answer': data['answer'], 'image': None, 'question_type': data['question_type']}
    else:
        return {'id': data['id'], 'question': question, 'options': data['options'], 'answer': data['answer'], 'image': data['image_1'], 'img_type': data['img_type'], 'hint': None, 'topic_difficulty': data['topic_difficulty'], 'subfield': data['subfield']}

ARGS = {
    'data': {
        'id': 'sample_001',
        'question': 'What is the capital of France?',
        'options': [
            'Paris is the answer',
            'London is not',
            'Berlin is also not'
        ],
        'answer': 'Paris',
        'image_1': 'path/to/image.jpg',
        'img_type': 'jpg',
        'topic_difficulty': 'easy',
        'subfield': 'geography',
        'question_type': 'multiple_choice'
    }
}
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
download_ai2d Not yet run
unverified (harvested, no recorded run)
sinatayebati/vlm-uncertainty/data_utils/ai2d.py
code served (permissive licence) · get_code("1267ef7cf3135661")
How it ran

no invocation recorded.

download_mmbench Not yet run
unverified (harvested, no recorded run)
sinatayebati/vlm-uncertainty/data_utils/mmbench.py
code served (permissive licence) · get_code("a268ca9c33318e5c")
How it ran

no invocation recorded.

download_seedbench Not yet run
unverified (harvested, no recorded run)
sinatayebati/vlm-uncertainty/data_utils/seedbench.py
code served (permissive licence) · get_code("25a29dad236f0992")
How it ran

no invocation recorded.

get_dataset Not yet run
unverified (harvested, no recorded run)
sinatayebati/vlm-uncertainty/data_utils/utils.py
code served (permissive licence) · get_code("9e203cb8767712bd")
How it ran

no invocation recorded.

get_logits Not yet run
unverified (harvested, no recorded run)
sinatayebati/vlm-uncertainty/models_utils/utils.py
code served (permissive licence) · get_code("4335b7a5c5a94aaf")
How it ran

no invocation recorded.

process_mmmu Not yet run
unverified (harvested, no recorded run)
sinatayebati/vlm-uncertainty/data_utils/mmmu.py
code served (permissive licence) · get_code("eba2dfc02d4349ea")
How it ran

no invocation recorded.

process_oodcv Not yet run
unverified (harvested, no recorded run)
sinatayebati/vlm-uncertainty/data_utils/oodcv.py
code served (permissive licence) · get_code("5c69a8ac5c608ef9")
How it ran

no invocation recorded.

process_scienceqa Not yet run
unverified (harvested, no recorded run)
sinatayebati/vlm-uncertainty/data_utils/scienceqa.py
code served (permissive licence) · get_code("d2a305808682d0b6")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 15 are also present in other papers whose code we hold (15 with at least one paper dated earlier, 1 the same month, 1 later) and 1 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.

FunctionAlso present inEarliest-datedOthers named
parse_img_path 5 other papers
2 dated earlier, 1 the same month, 1 later, 1 same year, order not determinable
2402.14418 (2024-02)
Uncertainty-Aware Evaluation for Vision-Language Models
2406.05343 (2024-06)
M3GIA: A Cognition Inspired Multilingual and Multimodal General Intelligence Ability Benchmark
Yang_PVC_Progressive_Visual_Token_Compression_for_Unified_Image_and_Video_CVPR_2025_paper (2025 (year only))
PVC: Progressive Visual Token Compression for Unified Image and Video Processing in Large Vision-Language Models
and 2 more not named here
get_options 2 other papers
2 dated earlier
2402.14418 (2024-02)
Uncertainty-Aware Evaluation for Vision-Language Models
2411.16721 (2024-11)
Steering Away from Harm: An Adaptive Approach to Defending Vision Language Model Against Jailbreaks
download_ai2d 1 other paper
1 dated earlier
2402.14418 (2024-02)
Uncertainty-Aware Evaluation for Vision-Language Models
download_mmbench 1 other paper
1 dated earlier
2402.14418 (2024-02)
Uncertainty-Aware Evaluation for Vision-Language Models
download_seedbench 1 other paper
1 dated earlier
2402.14418 (2024-02)
Uncertainty-Aware Evaluation for Vision-Language Models
get_dataset 1 other paper
1 dated earlier
2402.14418 (2024-02)
Uncertainty-Aware Evaluation for Vision-Language Models
get_logits 1 other paper
1 dated earlier
2402.14418 (2024-02)
Uncertainty-Aware Evaluation for Vision-Language Models
is_none 1 other paper
1 dated earlier
2402.14418 (2024-02)
Uncertainty-Aware Evaluation for Vision-Language Models
open_json 1 other paper
1 dated earlier
2402.14418 (2024-02)
Uncertainty-Aware Evaluation for Vision-Language Models
process_ai2d 1 other paper
1 dated earlier
2402.14418 (2024-02)
Uncertainty-Aware Evaluation for Vision-Language Models
process_mmmu 1 other paper
1 dated earlier
2402.14418 (2024-02)
Uncertainty-Aware Evaluation for Vision-Language Models
process_oodcv 1 other paper
1 dated earlier
2402.14418 (2024-02)
Uncertainty-Aware Evaluation for Vision-Language Models
process_scienceqa 1 other paper
1 dated earlier
2402.14418 (2024-02)
Uncertainty-Aware Evaluation for Vision-Language Models
process_seedbench 1 other paper
1 dated earlier
2402.14418 (2024-02)
Uncertainty-Aware Evaluation for Vision-Language Models
process_single_sample 1 other paper
1 dated earlier
2402.14418 (2024-02)
Uncertainty-Aware Evaluation for Vision-Language Models

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

Large Language and Vision-Language Models (LLMs/VLMs) are increasingly used in safety-critical applications, yet their opaque decision-making complicates risk assessment and reliability. Uncertainty quantification (UQ) helps assess prediction confidence and enables abstention when uncertainty is high. Conformal prediction (CP), a leading UQ method, provides statistical guarantees but relies on static thresholds, which fail to adapt to task complexity and evolving data distributions, leading to suboptimal trade-offs in accuracy, coverage, and informativeness. To address this, we propose learnable conformal abstention, integrating reinforcement learning (RL) with CP to optimize abstention thresholds dynamically. By treating CP thresholds as adaptive actions, our approach balances multiple objectives, minimizing prediction set size while maintaining reliable coverage. Extensive evaluations across diverse LLM/VLM benchmarks show our method outperforms Least Ambiguous Classifiers (LAC) and Adaptive Prediction Sets (APS), improving accuracy by up to 3.2%, boosting AUROC for hallucination detection by 22.19%, enhancing uncertainty-guided selective generation (AUARC) by 21.17%, and reducing calibration error by 70%-85%. These improvements hold across multiple models and datasets while consistently meeting the 90% coverage target, establishing our approach as a more effective and flexible solution for reliable decision-making in safety-critical applications. The code is available at: {https://github.com/sinatayebati/vlm-uncertainty}.

For agents

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

get_harvested_code_for_paper("2502.06884")
get_code_for_paper("2502.06884")
have("2502.06884")

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

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

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

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

Connect an agent — have() is free.