SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2603.00696 · 2026

DRIV-EX: Counterfactual Explanations for Driving LLMs

Éloi Zablocki, Amaia Cardiel, Elias Ramzi, Eric Gaussier

arXiv · PDF · Open in the Atlas

Code that ran

11 of 14 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; 2 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 8 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/2603.00696.json · badge: /api/ran/2603.00696.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
Amaia-CARDIEL/DRIV_EX canonical (classifier label)
classifier basis: census
11 ran · 3 no recorded run
FunctionStatusWhere it lives
None_or_int Ran
ran, honoured the contract we drafted
Amaia-CARDIEL/DRIV_EX/driv_ex/cf_algorithms/optim_config.py
code served (permissive licence) · get_code("a7708b278b73783c")
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 int, ndim 0, dtype family int, 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 torch

torch.manual_seed(0)

# Analyze the function:
# - Parameter: arg
# - Function checks if arg is None
# - If not None, calls arg.lower() (string method)
# - Compares result to ['none']
# - Otherwise converts to int(arg)
# So arg should be a string or None

ARGS = {
    'arg': '42'
}
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 int, ndim 0, dtype family int, 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
apply_template_fixes Ran
ran; our contract draft was wrong, not the code
Amaia-CARDIEL/DRIV_EX/driv_ex/dataset/slightly_change_template.py
code served (permissive licence) · get_code("ba56bafdbdf039b2")
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 torch

X_ego_pattern = 'The target vehicle is driving on'

def apply_template_fixes(text):
    start_id = text.find(X_ego_pattern)
    X_before_ego = text[:start_id]
    X_after_ego = text[start_id:]
    X_after_ego = X_after_ego.replace('The information of target vehicle is as follow:', 'The information about the target vehicle is as follows:')
    X_after_ego = X_after_ego.replace('The information of its surrounding vehicles (with a range of 200m) are listed as follow:', 'The information about its surrounding vehicles (within a range of 200 m) is listed as follows:')
    X_after_ego = X_after_ego.replace('Velocity(km/h)', 'Velocity (km/h)')
    X_after_ego = X_after_ego.replace('Accelaration', 'Acceleration')
    X_after_ego = X_after_ego.replace('vy = ', 'vy=')
    X_after_ego = X_after_ego.replace('ax = ', 'ax=')
    X_after_ego = X_after_ego.replace('rightmost', 'right').replace('leftmost', 'left')
    X_after_ego = X_after_ego.replace(' highway, located at the', ' highway, in the')
    X_after_ego = X_after_ego.replace(' Car', ' car').replace(' Truck', ' truck')
    X_after_ego = X_after_ego.replace('  - Ahead:', '  - Front side:')
    X_after_ego = X_after_ego.replace('  - Behind:', '  - Back side:')
    X_after_ego = X_after_ego.replace('  - Left:', '  - Left side:')
    X_after_ego = X_after_ego.replace('  - Right:', '  - Right side:')
    X_after_ego = X_after_ego.replace('  - Notable feature: Ahead is ', '  - Notable feature: Front side is ')
    X_after_ego = X_after_ego.replace('  - Notable feature: Behind is ', '  - Notable feature: Back side is ')
    X_after_ego = X_after_ego.replace('  - Notable feature: Left is ', '  - Notable feature: Left side is ')
    X_after_ego = X_after_ego.replace('  - Notable feature: Right is ', '  - Notable feature: Right side is ')
    return X_before_ego + X_after_ego

sample_text = (
    "Some context here. "
    "The target vehicle is driving on a highway, located at the rightmost lane. "
    "The information of target vehicle is as follow: Velocity(km/h) = 80, Accelaration = 2.0. "
    "vy = 0.5, ax = 1.2. "
    "The information of its surrounding vehicles (with a range of 200m) are listed as follow: "
    "  - Ahead: Car at 50m. "
    "  - Behind: Truck at 30m. "
    "  - Left: leftmost lane. "
    "  - Right: rightmost lane. "
    "  - Notable feature: Ahead is clear. "
    "  - Notable feature: Behind is congested."
)

ARGS = {
    'text': sample_text
}
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 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
boolean_flag Ran
ran, violated the contract we drafted
Amaia-CARDIEL/DRIV_EX/driv_ex/cf_algorithms/optim_config.py
code served (permissive licence) · get_code("fdef557496a731b8")
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 torch
import argparse

torch.manual_seed(0)

# Construct valid arguments for boolean_flag function
# The function takes a single parameter 'arg' that can be:
# - a bool
# - a string that matches certain patterns ('true', '1', 'yes', 'y', 'false', '0', 'no', 'n')

ARGS = {
    'arg': 'true'  # Can be bool or string representation
}

# Alternative valid test cases (showing what the function accepts):
# ARGS = {'arg': True}
# ARGS = {'arg': False}
# ARGS = {'arg': '1'}
# ARGS = {'arg': 'yes'}
# ARGS = {'arg': 'no'}
# ARGS = {'arg': '0'}
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 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
define_modules_to_FT Ran
ran; our contract draft was wrong, not the code
Amaia-CARDIEL/DRIV_EX/driv_ex/llm_finetuning/finetuning_script.py
code served (permissive licence) · get_code("8d693481bb709846")
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 torch
import torch.nn as nn

torch.manual_seed(0)

class MockArgs:
    def __init__(self, modules_to_FT=None):
        self.modules_to_FT = modules_to_FT

ARGS = {
    'my_args': MockArgs(modules_to_FT=None)
}
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 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
extract_input_prompt Ran
ran; our contract draft was wrong, not the code
Amaia-CARDIEL/DRIV_EX/driv_ex/dataset/generate_input_only_highD_data.py
code served (permissive licence) · get_code("dff259307c2d2f69")
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 torch

RESPONSE_TEMPLATE = ' [/INST]'

# Create a valid test string that contains the response template
text_with_template = "This is a prompt [/INST] and this is the response"

ARGS = {
    'text': text_with_template
}
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 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
extract_label Ran
ran, honoured the contract we drafted
Amaia-CARDIEL/DRIV_EX/driv_ex/dataset/generate_input_only_highD_data.py
code served (permissive licence) · get_code("48ce3f13567e8ce8")
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 int, ndim 0, dtype family int, 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 torch
import numpy as np

INTENTION_PATTERNS = {0: 'Intention: "0: Keep lane"', 1: 'Intention: "1: Left lane change"', 2: 'Intention: "2: Right lane change"'}

def extract_label(text: str) -> int:
    for label, pattern in INTENTION_PATTERNS.items():
        if pattern in text:
            return label
    raise ValueError(f'No intention label found in text: {text[:200]!r}')

# Valid test case: text containing the pattern for label 0
test_text = 'The vehicle will perform Intention: "0: Keep lane" action.'

ARGS = {
    'text': test_text
}
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 int, ndim 0, dtype family int, 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
get_args Ran
ran; our contract draft was wrong, not the code
Amaia-CARDIEL/DRIV_EX/driv_ex/cf_algorithms/dab_config.py
code served (permissive licence) · get_code("afc2c8643bf7eeaf")
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 Namespace. 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 argparse

torch.manual_seed(0)

ARGS = {
    'notebook': 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 Namespace — a Namespace output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Namespace 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_mean Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Amaia-CARDIEL/DRIV_EX/driv_ex/cf_scoring/compute_cf_score.py
code served (permissive licence) · get_code("7e50cf91daaf7b62")
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 float, 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 torch
import numpy as np

torch.manual_seed(0)

# Analyzing the function:
# - l: a list that can contain various types depending on metric_name
# - metric_name: string or None
# - BS_lb: float (default 0.95)

# The function processes different metric types with different list contents:
# 1. Binary metrics (0/1): yT*_has_top_rank_%, lc_traj_coherence_%, etc.
# 2. cf_driving_maneuvers: list of strings ('collision', 'discomfort', 'good', None, 'fail_to_extract')
# 3. avg_script_timing, avg_best_step: numeric lists
# 4. template_filter_%: numeric list (values 0-100)
# 5. min_fluency: numeric list
# 6. bertscore_filter_%: numeric list (values 0-1, compared to BS_lb)
# 7. default: numeric list

# Create test data for each scenario
binary_list = [1, 1, 0, 1, 1]
cf_driving_list = ['collision', 'good', 'discomfort', 'good', None]
timing_list = [1.5, 2.3, 1.8, 2.1]
template_list = [100, 95, 100, 88, 100]
fluency_list = [0.75, 0.82, 0.91, 0.88]
bertscore_list = [0.96, 0.92, 0.88, 0.99, 0.94]
numeric_list = [0.5, 0.6, 0.7, 0.8]

ARGS = {
    "l": binary_list,
    "metric_name": "yT*_has_top_rank_%",
    "BS_lb": 0.95
}
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 float, 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
towards_llama3_template Ran
ran; our contract draft was wrong, not the code
Amaia-CARDIEL/DRIV_EX/driv_ex/dataset/textual_highD_dataset.py
code served (permissive licence) · get_code("bc91c42904c1a942")
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 torch

torch.manual_seed(0)

# The function takes a single text parameter and performs string replacements on it
# It doesn't use any torch tensors, models, or complex objects
# Just needs a string input

one_text = '<s>[INST] <<SYS>>Role: You are a helpful assistant.<</SYS>>\n\nHello there [/INST] Response here </s>'

ARGS = {
    'one_text': one_text
}
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 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
towards_non_llama3_template Ran
ran; our contract draft was wrong, not the code
Amaia-CARDIEL/DRIV_EX/driv_ex/dataset/textual_highD_dataset.py
code served (permissive licence) · get_code("50c3cb4b158d1f4b")
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 torch
import numpy as np

# Analyzing the function: towards_non_llama3_template(one_text)
# The function takes one parameter: one_text
# It performs string replacements on one_text
# one_text must be a string containing Llama3 template markers

# Construct a sample Llama3 formatted text
sample_llama3_text = (
    '<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\n'
    'You are a helpful assistant.<|eot_id|><|start_header_id|>user<|end_header_id|>\n\n'
    'What is 2+2?<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n'
    '2+2 equals 4.<|eot_id|>'
)

ARGS = {
    'one_text': sample_llama3_text
}
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 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
towards_qwen_template Ran
ran; our contract draft was wrong, not the code
Amaia-CARDIEL/DRIV_EX/driv_ex/dataset/textual_highD_dataset.py
code served (permissive licence) · get_code("0a259358a38e152f")
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 torch

torch.manual_seed(0)

one_text = '<s>[INST] <<SYS>>Role: You are a helpful assistant.<</SYS>>\n\nHello, how are you? [/INST] I am doing well! </s>'

ARGS = {
    'one_text': one_text
}
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 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
compute_cf_scores Not yet run
unverified (harvested, no recorded run)
Amaia-CARDIEL/DRIV_EX/driv_ex/cf_scoring/compute_cf_score.py
code served (permissive licence) · get_code("1f4cbb913ed9f346")
How it ran

no invocation recorded.

get_filtered_cands Not yet run
unverified (harvested, no recorded run)
Amaia-CARDIEL/DRIV_EX/driv_ex/cf_algorithms/gcg_script.py
code served (permissive licence) · get_code("25ae440509f39ec5")
How it ran

no invocation recorded.

sample_control Not yet run
unverified (harvested, no recorded run)
Amaia-CARDIEL/DRIV_EX/driv_ex/cf_algorithms/gcg_script.py
code served (permissive licence) · get_code("409e9147dd1fe88f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 13 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
get_filtered_cands 4 other papers
4 dated earlier
2403.01251 (2024-03)
Accelerating Greedy Coordinate Gradient and General Prompt Optimization via Probe Sampling
2404.13968 (2024-04)
Protecting Your LLMs with Information Bottleneck
2405.01229 (2024-05)
Boosting Jailbreak Attack with Momentum
and 1 more not named here

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 language models (LLMs) are increasingly used as reasoning engines in autonomous driving, yet their decision-making remains opaque. We propose to study their decision process through counterfactual explanations, which identify the minimal semantic changes to a scene description required to alter a driving plan. We introduce DRIV-EX, a method that leverages gradient-based optimization on continuous embeddings to identify the input shifts required to flip the model's decision. Crucially, to avoid the incoherent text typical of unconstrained continuous optimization, DRIV-EX uses these optimized embeddings solely as a semantic guide: they are used to bias a controlled decoding process that re-generates the original scene description. This approach effectively steers the generation toward the counterfactual target while guaranteeing the linguistic fluency, domain validity, and proximity to the original input essential for interpretability. Evaluated using the LC-LLM planner on the textual highD dataset, DRIV-EX generates valid, fluent counterfactuals more reliably than existing baselines. It successfully exposes latent biases and provides concrete insights to improve the robustness of LLM-based driving agents. The code is available at https: //github.com/Amaia-CARDIEL/DRIV_EX.

For agents

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

get_harvested_code_for_paper("2603.00696")
get_code_for_paper("2603.00696")
have("2603.00696")

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

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

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

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

Connect an agent — have() is free.