BiasInEar: Assessing Sensitivity in Audio Language Models Across Linguistic, Demographic, and Positional Variations
Project description
BiasInEar
Assessing Sensitivity in Audio Language Models Across Linguistic, Demographic, and Positional Variations
BiasInEar is a benchmark for evaluating speech bias in multilingual multimodal large language models (MLLMs). It provides 11,200 spoken multiple-choice questions across 3 languages, 7 accents, 2 genders, and 2 option orders.
Installation
# Core (metrics only)
pip install biasinear
# With data loading
pip install biasinear[data]
# With audio utilities
pip install biasinear[audio]
# With a specific model provider
pip install biasinear[gemini] # Google Gemini
pip install biasinear[openai] # OpenAI
pip install biasinear[nvidia] # NVIDIA Build
pip install biasinear[mistral] # Mistral
# Everything
pip install biasinear[all]
Or with uv:
uv pip install biasinear[all]
Model Providers
BiasInEar includes built-in support for several audio language model APIs:
| Provider | Class | Install | Default Model |
|---|---|---|---|
| Google Gemini | GeminiModel |
pip install biasinear[gemini] |
gemini-2.5-flash |
| OpenAI | OpenAIModel |
pip install biasinear[openai] |
gpt-4o-audio-preview |
| NVIDIA Build | NvidiaModel |
pip install biasinear[nvidia] |
google/gemma-3n-e4b-it |
| Mistral | MistralModel |
pip install biasinear[mistral] |
voxtral-small-2507 |
API Keys
Set your API key as an environment variable:
export GEMINI_API_KEY="..."
export OPENAI_API_KEY="..."
export NVIDIA_API_KEY="..."
export MISTRAL_API_KEY="..."
Or pass directly when creating the model:
from biasinear.models import GeminiModel
model = GeminiModel(api_key="your-api-key")
Quick Example (Gemini)
from biasinear.models import GeminiModel
from biasinear.utils import concat_audio
model = GeminiModel() # uses GEMINI_API_KEY env var
combined = concat_audio(question=q_bytes, options=opt_bytes)
output = model.generate(combined)
print(output["answer"], output["raw_response"])
See examples/ for complete provider scripts.
Quick Start
1. Load Data
from biasinear import load_dataset
# Load a specific config
dataset = load_dataset(config="en_Female")
# Load all configs merged
dataset = load_dataset()
2. Run Inference
from biasinear.utils import concat_audio
from biasinear.models import BaseModel
# Implement your model by extending BaseModel
class MyModel(BaseModel):
def generate(self, audio: bytes) -> dict:
# Your API call here
return {"answer": "A", "raw_response": "..."}
model = MyModel("my-model")
output = model.generate(audio_bytes)
3. Evaluate
from biasinear import Evaluator
evaluator = Evaluator(
predictions=["A", "B", "A", ...],
references=["A", "A", "A", ...],
question_ids=["q1", "q1", "q2", ...],
groups={
"language": ["en", "en", "zh", ...],
"gender": ["Female", "Male", "Female", ...],
"order": ["original", "reversed", "original", ...],
},
)
results = evaluator.run()
# {
# "accuracy": 0.75,
# "entropy": {"mean": 0.32, "per_question": {...}},
# "apes": {"language": 0.12, "gender": 0.03, "order": 0.15},
# "fleiss_kappa": {"language": 0.65, "gender": 0.88, "order": 0.52},
# }
Use Metrics Individually
from biasinear import accuracy, question_entropy, apes, fleiss_kappa
acc = accuracy(predictions, references)
ent = question_entropy(["A", "A", "B", "C"], num_categories=4)
apes_val = apes([0.3, 0.5, 0.4])
kappa = fleiss_kappa(ratings_matrix)
Metrics
| Metric | Description |
|---|---|
| Accuracy | Standard MCQ correctness |
| Question Entropy | Prediction uncertainty across configurations |
| APES | Average Pairwise Entropy Shift across variable levels |
| Fleiss' Kappa | Inter-rater agreement across perturbations |
See the paper for details.
Citation
@inproceedings{wei-etal-2026-biasinear,
title={Bias in the Ear of the Listener: Assessing Sensitivity in Audio Language Models Across Linguistic, Demographic, and Positional Variations},
author={Wei, Sheng-Lun and Liao, Yu-Ling and Chang, Yen-Hua and Huang, Hen-Hsen and Chen, Hsin-Hsi},
booktitle={Findings of the Association for Computational Linguistics: EACL 2026},
year={2026},
publisher={Association for Computational Linguistics}
}
License
Apache License 2.0. See LICENSE for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file biasinear-0.2.0.tar.gz.
File metadata
- Download URL: biasinear-0.2.0.tar.gz
- Upload date:
- Size: 20.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66606d889129e09fe9d7c1ba76599eee9c8fa7f04422ad344e7368c554c447c9
|
|
| MD5 |
a42f062e5c512c613c7bf2cfc27a970d
|
|
| BLAKE2b-256 |
5b3ba08af260e410945d04bac1cbd39407b6cb22a51610b5570e14c5b9ffa14b
|
Provenance
The following attestation bundles were made for biasinear-0.2.0.tar.gz:
Publisher:
publish.yml on ntunlplab/BiasInEar
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
biasinear-0.2.0.tar.gz -
Subject digest:
66606d889129e09fe9d7c1ba76599eee9c8fa7f04422ad344e7368c554c447c9 - Sigstore transparency entry: 1006363598
- Sigstore integration time:
-
Permalink:
ntunlplab/BiasInEar@78c9bd5a71ee6bf200496e068c0c74802e5ba037 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/ntunlplab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@78c9bd5a71ee6bf200496e068c0c74802e5ba037 -
Trigger Event:
push
-
Statement type:
File details
Details for the file biasinear-0.2.0-py3-none-any.whl.
File metadata
- Download URL: biasinear-0.2.0-py3-none-any.whl
- Upload date:
- Size: 20.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c8905de6c01f4584578f0dc639c099105df0150addfd9e7aad42c757f09eb27
|
|
| MD5 |
c3735a5d0dc2000d71a02116b5606b43
|
|
| BLAKE2b-256 |
5a402ef451e5f366a250f40a2b31f4838d7aebdd5567a6d08d1669caa92f5c3f
|
Provenance
The following attestation bundles were made for biasinear-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on ntunlplab/BiasInEar
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
biasinear-0.2.0-py3-none-any.whl -
Subject digest:
7c8905de6c01f4584578f0dc639c099105df0150addfd9e7aad42c757f09eb27 - Sigstore transparency entry: 1006363599
- Sigstore integration time:
-
Permalink:
ntunlplab/BiasInEar@78c9bd5a71ee6bf200496e068c0c74802e5ba037 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/ntunlplab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@78c9bd5a71ee6bf200496e068c0c74802e5ba037 -
Trigger Event:
push
-
Statement type: