SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2510.17633 · 2025

SARSteer: Safeguarding Large Audio-Language Models via Safe-Ablated Refusal Steering

Li Liu, Hui Xiong, Weilin Lin, Jianze Li

arXiv · PDF · Open in the Atlas

Code that ran

4 of 7 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 3 no recorded run), measured 2026-11-22; 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/2510.17633.json · badge: /api/ran/2510.17633.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
linweiii/SARSteer canonical (classifier label)
classifier basis: census
4 ran · 3 no recorded run
FunctionStatusWhere it lives
check_and_load_the_rest Ran
ran; our contract draft was wrong, not the code
linweiii/SARSteer/utils/utils.py
code served (permissive licence) · get_code("c7fdeb8a86a59118")
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 os
import json
import tempfile
from unittest.mock import MagicMock

# Create a temporary directory for testing
temp_dir = tempfile.mkdtemp()

# Create a test JSON file with existing data
existing_file = os.path.join(temp_dir, 'existing_data.json')
existing_data = [
    {'question': 'What is 2+2?', 'answer': '4'},
    {'question': 'What is 3+3?', 'answer': '6'}
]
with open(existing_file, 'w', encoding='utf-8') as f:
    json.dump(existing_data, f)

# Create mock logger
logger = MagicMock()

# Create input data with some overlap and some new entries
data = [
    {'question': 'What is 2+2?', 'answer': '4'},
    {'question': 'What is 5+5?', 'answer': '10'},
    {'question': 'What is 10+10?', 'answer': '20'}
]

# Define ARGS
ARGS = {
    'logger': logger,
    'file_path': existing_file,
    'data': data,
    'check_key': 'question'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
eval_string_matching Ran
ran, honoured the contract we drafted
linweiii/SARSteer/jailbreak_evaluation.py
code served (permissive licence) · get_code("a70b245eca8ecaa7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
import tempfile
import os
from unittest.mock import Mock, patch

# Create temporary directory and files for testing
temp_dir = tempfile.mkdtemp()
output_file = os.path.join(temp_dir, 'output.json')
output_eval_file = os.path.join(temp_dir, 'output_eval.json')

# Create mock response data
response_data = [
    {
        'question': 'What is 2+2?',
        'response': 'I cannot answer this question as it might be harmful.'
    },
    {
        'question': 'How to make something?',
        'response': 'The answer is 4.'
    },
    {
        'question': 'Tell me a secret',
        'response': 'I apologize, but I cannot share that information.'
    }
]

# Write initial response data to file
with open(output_file, 'w') as f:
    json.dump(response_data, f)

# Create empty eval file
with open(output_eval_file, 'w') as f:
    f.write('')

# Create mock logger
mock_logger = Mock()
mock_logger.info = Mock()
mock_logger.warning = Mock()

# Create mock args object
mock_args = Mock()
mock_args.output_file = output_file
mock_args.output_eval_file = output_eval_file

# Define helper functions that are called by eval_string_matching
def load_json_file(file_path):
    if not os.path.exists(file_path) or os.path.getsize(file_path) == 0:
        return []
    with open(file_path, 'r') as f:
        return json.load(f)

def append_to_json_file(file_path, data):
    existing_data = load_json_file(file_path)
    existing_data.append(data)
    with open(file_path, 'w') as f:
        json.dump(existing_data, f)

def check_and_load_the_rest(logger, eval_file, response_data, check_key='question'):
    existing_eval = load_json_file(eval_file)
    if existing_eval:
        return True, existing_eval
    return False, response_data

# Patch the helper functions in the module namespace
import sys
current_module = sys.modules[__name__]
current_module.load_json_file = load_json_file
current_module.append_to_json_file = append_to_json_file
current_module.check_and_load_the_rest = check_and_load_the_rest

ARGS = {
    'args': mock_args,
    'logger': mock_logger
}
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 tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_json_file Ran
ran; our contract draft was wrong, not the code
linweiii/SARSteer/utils/utils.py
code served (permissive licence) · get_code("a284824bddec284c")
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 with valid content
temp_dir = tempfile.gettempdir()
temp_filepath = os.path.join(temp_dir, "test_load_json.json")

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

with open(temp_filepath, 'w', encoding='utf-8') as f:
    json.dump(test_data, f)

ARGS = {
    "filepath": temp_filepath
}
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
set_logging Ran
ran; our contract draft was wrong, not the code
linweiii/SARSteer/utils/utils.py
code served (permissive licence) · get_code("1a9f7ea3f01093ea")
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 RootLogger. 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 logging
import datetime
import tempfile

# Clean up any existing handlers from previous runs
logger = logging.getLogger()
for handler in logger.handlers[:]:
    logger.removeHandler(handler)

# Create a temporary directory for logs
log_dir = tempfile.mkdtemp()

ARGS = {
    'log_dir': log_dir
}
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 RootLogger — a RootLogger output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a RootLogger 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
cal_eval_airbench_chat_score Not yet run
unverified (harvested, no recorded run)
linweiii/SARSteer/clean_evaluation.py
code served (permissive licence) · get_code("656c65a62d2825ec")
How it ran

no invocation recorded.

cal_eval_asr Not yet run
unverified (harvested, no recorded run)
linweiii/SARSteer/jailbreak_evaluation.py
code served (permissive licence) · get_code("457fb8f42908112f")
How it ran

no invocation recorded.

eval_airbench_chat Not yet run
unverified (harvested, no recorded run)
linweiii/SARSteer/clean_evaluation.py
code served (permissive licence) · get_code("2a2f3ef23bb0526d")
How it ran

no invocation recorded.

Also present in other papers' code

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

FunctionAlso present inEarliest-datedOthers named
load_json_file 1 other paper
1 later
2601.19040 (2026-01)
OATS: Online Data Augmentation for Time Series Foundation 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-22.

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 Audio-Language Models (LALMs) are becoming essential as a powerful multimodal backbone for real-world applications. However, recent studies show that audio inputs can more easily elicit harmful responses than text, exposing new risks toward deployment. While safety alignment has made initial advances in LLMs and Large Vision-Language Models (LVLMs), we find that vanilla adaptation of these approaches to LALMs faces two key limitations: 1) LLMbased steering fails under audio input due to the large distributional gap between activations, and 2) prompt-based defenses induce over-refusals on benign-speech queries. To address these challenges, we propose Safe-Ablated Refusal Steering (SARSteer), an effective inference-time defense framework for LALMs. Specifically, SARSteer leverages text-derived refusal steering to enforce rejection without manipulating audio inputs and introduces decomposed safe-space ablation to mitigate over-refusal. Extensive experiments demonstrate that SARSteer significantly improves harmful-query refusal while preserving benign responses, establishing a principled step toward safety alignment in LALMs. The codes and constructed datasets are released at https://github.com/linweiii/SARSteer.

For agents

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

get_harvested_code_for_paper("2510.17633")
get_code_for_paper("2510.17633")
have("2510.17633")

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

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

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

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

Connect an agent — have() is free.