arXiv:2508.11258cs.LGcs.CL2025-08

让闭源大模型也能公平分类,通过提示词提取特征后做后处理。

Group Fairness Meets the Black Box: Enabling Fair Algorithms on Closed LLMs via Post-Processing

  • 用精心设计的提示词从大模型输出中提取概率特征
  • 在五组数据上实现高精度与强公平性的平衡
  • 适合需要公平性但无法微调模型的场景

指令微调的大语言模型(LLM)支持零样本或少样本提示范式,即上下文学习,可用于构建预测模型。这一便利性结合大模型能力的持续提升,使其在医疗、金融等高风险领域具有广泛应用潜力,而这些领域对群体公平性——避免不同人口群体间产生差异性影响——尤为关键。现有大多数基于大模型的公平分类方法依赖传统公平算法,通过微调或头层调优实现,但在不开放权重的闭源大模型(如 GPT-4、Gemini、Claude)的上下文学习场景下已不再适用。本文提出一种框架,通过提示词从闭源大模型中推导公平分类器:将大模型视为特征提取器,利用针对特定公平准则设计的提示词,从其概率输出(如词元对数概率)中提取足够统计量;随后在这些特征上以轻量级方式应用公平算法,进行后处理训练。在五个数据集(含三个表格数据集)上的实验表明,该框架在开源与闭源大模型上均实现了优异的准确率-公平性权衡;尤其在数据效率方面优于基于大模型嵌入(头调优)或从原始表格特征训练的公平分类器。

原文摘要 · Abstract (English)

Instruction fine-tuned large language models (LLMs) enable a simple zero-shot or few-shot prompting paradigm, also known as in-context learning, for building prediction models. This convenience, combined with continued advances in LLM capability, has the potential to drive their adoption across a broad range of domains, including high-stakes applications where group fairness -- preventing disparate impacts across demographic groups -- is essential. The majority of existing approaches to enforcing group fairness on LLM-based classifiers rely on traditional fair algorithms applied via model fine-tuning or head-tuning on final-layer embeddings, but they are no longer applicable to closed-weight LLMs under the in-context learning setting, which include some of the most capable commercial models today, such as GPT-4, Gemini, and Claude. In this paper, we propose a framework for deriving fair classifiers from closed-weight LLMs via prompting: the LLM is treated as a feature extractor, and features are elicited from its probabilistic predictions (e.g., token log probabilities) using prompts strategically designed for the specified fairness criterion to obtain sufficient statistics for fair classification; a fair algorithm is then applied to these features to train a lightweight fair classifier in a post-hoc manner. Experiments on five datasets, including three tabular ones, demonstrate strong accuracy-fairness tradeoffs for the classifiers derived by our framework from both open-weight and closed-weight LLMs; in particular, our framework is data-efficient and outperforms fair classifiers trained on LLM embeddings (i.e., head-tuning) or from scratch on raw tabular features.

公平性闭源模型提示工程后处理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。