Introduction
Large Language Models (LLMs) often inadvertently perpetuate societal biases present in their training data, leading to outputs that reinforce harmful stereotypes. Traditional mitigation strategies, such as retraining or fine-tuning, are often prohibitively expensive or require access to internal model weights—a significant hurdle for proprietary "black-box" models. Furthermore, aggressive debiasing can sometimes degrade a model's general reasoning capabilities. To address these challenges, we present AXOLOTL, a novel post-processing framework designed to reduce bias in LLM outputs without requiring internal access or extensive retraining.
The AXOLOTL Framework
Inspired by the regenerative abilities of the axolotl, this framework implements a "self-healing" loop that treats the LLM as a black box. The process consists of three primary stages:
- Bias Detection: The initial model response is converted into an embedding vector. The system calculates the cosine similarity between this vector and various demographic groups to determine a "bias orientation" and identifies specific stereotypical terms within the text.
- Identifying a Pleasant Resolution: Utilizing a geometric approach, AXOLOTL identifies a "repair vector" orthogonal to the detected bias. This vector is used to find a "pleasant resolution"—a neutral or positive alternative to the problematic term.
- Self-Debiasing via Assistance: The system generates a new prompt for the LLM, explicitly diagnosing the bias in the previous output and instructing the model to rewrite the response using the identified neutral resolution.
Experimental Evaluation
The efficacy of AXOLOTL was evaluated using three benchmark datasets: BOLD (measuring toxicity and sentiment), Stereoset (measuring stereotypical bias), and WinoBias (detecting gender bias in coreference resolution). The framework was tested across several prominent models, including GPT-3.5 and the Llama2 family (7B, 13B, and 70B).
Key Results
AXOLOTL demonstrated consistent improvements in fairness across all tested models and sensitive attributes. Notably, Llama2-13B achieved a 31% reduction in toxicity for gender-related prompts. On the Stereoset benchmark, the framework significantly lowered stereotype scores across gender, race, and profession.
In the WinoBias task, the results were particularly striking for smaller models. Llama2-7B, which initially exhibited an 88.4% male bias, reached 82.3% neutrality following the AXOLOTL process, demonstrating that effective debiasing is achievable even for models with fewer parameters.
Discussion and Limitations
A core insight of this work is that LLMs often possess the latent ability to recognize and correct their own biases when provided with specific, diagnostic feedback. By leveraging geometric neutralization, AXOLOTL ensures that corrections are mathematically grounded rather than arbitrary.
However, several limitations remain. The framework's accuracy is dependent on the quality of the underlying embedding model and the comprehensiveness of predefined word lists. Additionally, as a post-processing tool, it does not eliminate the inherent biases within the model's weights but rather "cleans" the final output. The dual-pass nature of the process also introduces additional latency, which may impact real-time applications.
Conclusion
AXOLOTL offers a lightweight, effective, and model-agnostic solution for improving fairness in LLM outputs. By empowering models to "self-heal" through guided rewriting, it provides a practical path forward for deploying safer and more equitable AI systems without the need for costly retraining.
Summary updated