Is Artificial Intelligence Fair for All? Sexual Orientation Bias in LLM Sentencing
Abstract
Large language models (LLMs) are increasingly used in legal workflows, yet fairness research in this domain has rarely examined sexual orientation as a protected attribute. Across 3,236 valid outputs from six LLMs, this study evaluates whether models generate differential sentencing recommendations based on defendants' sexual orientation and whether such disparities vary by offense type, prompt condition, jurisdiction, and model family. Heterosexual defendants received longer recommended sentences than LGBTQ defendants on average, with disparities concentrated in scenarios where sexual orientation was contextually salient and partially attenuated, but not eliminated, by prompts containing general legal principles. No model explanation explicitly mentioned sexual orientation, even though sentencing disparities persisted. These findings suggest that fairness failures in legal LLMs can operate through implicit decision patterns rather than overtly biased language, and that legal AI audits should include counterfactual comparisons across protected attributes and direct evaluation of behavioral outcomes.