Counterfactual Zero-Shot and Open-Set Visual Recognition

Counterfactual Zero-Shot and Open-Set Visual Recognition

1 Introduction

        文献提出一个反事实框架,是由对不可见类的泛化来支撑的。作者基于反事实的一致性规则(反事实确实是基本事实,反事实就等于事实)改变可见和不可见类的类属性来作为二元分类器。拟议的反事实框架是第一个为平衡和改进可见/不可见分类提供理论依据的框架。特别是,作者表明,分离Z和Y的质量是关键瓶颈,因此它是ZSL/OSR未来的一个潜在方向。

2 Methodology

2.1  Zero-Shot Learning (ZSL)

        1)传统ZSL,其中模型仅在未可见类上评估;2)广义ZSL,其中模型在可见类上评估可见类和未可见类。一种常见的做法是使用一组额外的类属性 y_{S} 和 y_{U} 来分别描述可见类和不可见类。与独热标签嵌入相比,这些属性可视为密集标签嵌入。当上下文清楚时,将ZSL称为广义ZSL。

2.2 Open-Set Recognition (OSR)

        它是用于评估可见类和不可见类,与ZSL不同的是,不可见类被标记为“未知”。OSR通过K维度的独热标签来标记每一个可见类,并不是通过密集标签。

2.3 Generative Causal Model

        作者假设ZSL和OSR都遵循生成因果模型如图所示:

         其中Z表示样本属性,Y表示类别属性。忽略混淆因素,给定Z和Y可以从条件分布P_{\theta }(X|Z,Y)生成X。同时给定X是可以通过后验Q_{\phi }(Z|X)Q_{\psi }(Y|X)推断出Z和Y。

2.4 Counterfactual Generation and Inference 

        通过上图的GCM按照计算反事实的三个步骤生成反事实样本

### Few-Shot Learning Examples in Large Language Models (LLM) In the context of large language models, few-shot learning allows these models to perform tasks effectively even when provided with a limited number of training examples. This capability is particularly valuable as it reduces the need for extensive labeled data and demonstrates robust generalization abilities. #### Example 1: Tabular Data Reasoning For reasoning over tabular data, LLMs like GPT-3 can be prompted using only a handful of examples within the input prompt itself[^2]. For instance: ```plaintext Table: | Name | Age | Occupation | |------|-----|------------| | John | 30 | Engineer | | Jane | 25 | Doctor | Question: Who is older between John and Jane? Answer: John. ``` The model learns from this small set of structured inputs and applies similar logic to new questions about different tables without requiring additional specific training on each table format or content type. #### Example 2: Guided Active Learning for Debiasing Another application involves guided active learning strategies aimed at reducing biases present in pre-trained LLMs by identifying biased samples through counterfactual in-context learning methods[^3]: ```python def identify_biased_samples(model_output): # Analyze output patterns that indicate potential bias pass biased_examples = [] for sample in dataset: prediction = model(sample) if identify_biased_samples(prediction): biased_examples.append((sample, "Biased")) # Use identified biased examples to refine model behavior further via targeted retraining ``` This approach leverages few-shot capabilities not just for task execution but also for improving model fairness across various applications. #### Example 3: One-Shot Selection of High-Quality SFT Data When selecting high-quality instruction-following instances for fine-tuning purposes, one-shot learning techniques help evaluate individual command demonstrations based on their effectiveness in enhancing overall performance across diverse downstream tasks[^4]. ```json { "instruction": "Summarize the following article...", "input_text": "...", "output_summary": "..." } ``` By assessing how well single examples contribute towards better outcomes during evaluation phases, researchers can strategically choose optimal datasets for specialized tuning processes.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值