Papers › Fairness Pruning: Locating Demographic Bias in GLU-MLP Layers via Differential Activations

Fairness Pruning: Locating Demographic Bias in GLU-MLP Layers via Differential Activations

30 Jul 2026arXiv:2607.28319added by Syntology

Pere Martra, Eugenio Martínez Cámara, Alfonso Ureña López

Title, abstract, authors and date from arXiv's metadata (CC0); this paper is not in the Papers with Code archive (frozen 2025-07-28).

This work presents Fairness Pruning, a lightweight structural intervention method designed for the management and future mitigation of demographic bias in large language models (LLMs). As a foundational empirical validation of this method, this work focuses on causal bias localization. Using minimally contrastive prompt pairs and inference-time activation capture, the method identifies neurons that react differentially when processing demographic attributes in GLU architectures, evaluating the signal at the down_proj input. Empirical evaluation was conducted on models of up to 3 billion parameters (Llama-3.2 family and Salamandra-2B), combining standardized benchmark evaluation with qualitative text generation experiments. Results demonstrate that zeroing the identified neurons alters how the model responds to associated demographic variables. However, rather than producing flat mitigation, the intervention causes bidirectional bias destabilization: because BiasScore is unsigned, candidate sets mix neurons that push toward and against the stereotype, and the net effect on aggregate bias depends on which sign dominates. The intervention is extremely surgical: zeroing at most 40 neurons in Llama-3.2-1B (less than 0.031% of total MLP width) achieves a mean retention of 99.49% in reasoning and general knowledge capabilities. These findings empirically confirm that demographic bias processing and model capabilities operate on dissociable circuits, establishing the methodological foundations for transitioning from blind zeroing toward directional behavior modulation.

PaperPDFCode Syntology ran

In Syntology View this paper on Syntology: its repositories, every harvested function with whether it ran, its licence and the call to fetch it.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2607.28319")

Code

Syntology Ran 15 of 18 code samples harvested from 2 repositories linked to this paper; 3 have no recorded run. Of those that ran: 2 ran · our draft was wrong; 1 ran · fixture could not drive it; 12 ran with no contract checked.

By repository: found in paper text by Syntology: 18 samples from 2 repositories, 15 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

peremartra/optipfair found in paper text by Syntology report
peremartra/fairness-pruning found in paper text by Syntology report

Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

18 samples harvested; 15 ran; 0 honoured the contract we drafted; 3 have no recorded run. Read from Syntology's graph 2026-09-25; that is when this build read the record, not when the samples ran.

2ran · our draft was wrong
1ran · fixture could not drive it
12ran
3unverified

Licence: 0 of the 18 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

_normalize peremartra/optipfair/optipfair/bias/activations.py found in paper text by Syntology ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · d02a253de08b7cf9 · report
compute_diff peremartra/fairness-pruning/results/generations/extract_generation_results.py found in paper text by Syntology ran fingerprinted MIT (permissive) · bbd44e49ad2efddc · report
compute_fairness_pruning_scores peremartra/optipfair/optipfair/bias/activations.py found in paper text by Syntology ran · fixture could not drive it Apache-2.0 (permissive) · fc79c6bce21abb50 · report
compute_neuron_pair_importance_maw peremartra/optipfair/optipfair/bias/activations.py found in paper text by Syntology ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 7eccdefc4a928e6e · report
doc_to_choice peremartra/fairness-pruning/custom_tasks/esbbq/esbbq_utils.py found in paper text by Syntology ran MIT (permissive) · 5f0f897cb922ed50 · report
doc_to_target peremartra/fairness-pruning/custom_tasks/esbbq/esbbq_utils.py found in paper text by Syntology ran MIT (permissive) · a1ea22e79e7730b5 · report
extract_categories_from_name peremartra/fairness-pruning/results/generations/extract_generation_results.py found in paper text by Syntology ran fingerprinted MIT (permissive) · 4d1a1aa76ff22765 · report
generate_en_pairs peremartra/fairness-pruning/datasets/build_dataset.py found in paper text by Syntology ran MIT (permissive) · 83e8c9addb98c59f · report
generate_es_pairs peremartra/fairness-pruning/datasets/build_dataset.py found in paper text by Syntology ran MIT (permissive) · aded66954b3e4cf4 · report
get_model_stats peremartra/fairness-pruning/utils.py found in paper text by Syntology ran MIT (permissive) · 20635a993544361e · report
make_id peremartra/fairness-pruning/datasets/build_dataset.py found in paper text by Syntology ran MIT (permissive) · fb14568a2383b898 · report
parse_generation_html_table peremartra/fairness-pruning/results/generations/extract_generation_results.py found in paper text by Syntology ran MIT (permissive) · 1f72cacc23c708c8 · report
parse_veritasqa_choices peremartra/fairness-pruning/custom_tasks/veritasQA/veritas_lm.py found in paper text by Syntology ran MIT (permissive) · 3187134104f0e195 · report
process_results peremartra/fairness-pruning/custom_tasks/esbbq/esbbq_utils.py found in paper text by Syntology ran MIT (permissive) · 0361b34a9385c607 · report
split_by_category peremartra/fairness-pruning/datasets/upload_to_hf.py found in paper text by Syntology ran MIT (permissive) · 50afa0aa58b6f44b · report
get_model_layers peremartra/optipfair/optipfair/bias/activations.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 6a44339986c5dc74 · report
model_evaluation peremartra/fairness-pruning/utils.py found in paper text by Syntology unverified MIT (permissive) · f030366e033e9882 · report
run_robust_evaluation peremartra/fairness-pruning/utils.py found in paper text by Syntology unverified MIT (permissive) · 20b173bc7ae26ed3 · report

Results from the paper

The Papers with Code archive ends with its 2025-07-28 snapshot. This paper's arXiv identifier, 2607.28319, was issued in July 2026, after that date, so the archive has no leaderboard rows for it.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections