[Paper Review] Improving alignment of dialogue agents via targeted human judgements

2023. 10. 21. 17:17Paper Review

Abstract

이번 연구에서는 정보-검색 대화형 agent인 Sparrow를 소개할 것이다. 이는 타 프롬프트 기반 언어 모델에 비해 유용하고, 무해하고, 정확하다. 모델을 학습시키기 위해 RLHF을 사용하였으며, 이때 두 가지 새로운 요소를 추가했다. 

첫번째, 유용하고 무해하게 만들기 위해, 요구사항들을 여러 규칙으로 세세하게 나눴다. 이는 agent 행동의 특정 기준에 집중한 사람 판단(=targeted human judgement)을 수집할 수 있다. (즉, 구체적이고 세세한 규칙은 특정 기준에 집중하여 판단할 수 있게 만들어 준다.) 그리고, 더 효율적인 규칙 조건부 보상 모델(=규칙 조건에 따라 보상이 다른 모델)을 만들 수 있다. 두번째, agent는 생성 텍스트에 대한 선호 판단을 수집할 때, 사실적 주장에 대한 근거를 제공한다.

Sparrow는 베이스라인보다 높은 선호도를 보이고 있고,적대적인 조사에 더 탄력적(?)이다. 하지만, 세세한 규칙들로 모델을 학습시켜, 분포적 편향이 보일 수 있다는 단점이 있다.

 

더보기
We present Sparrow, an information-seeking dialogue agent trained to be more helpful, correct, and harmless compared to prompted language model baselines. We use reinforcement learning from human feedback to train our models with two new additions. First, to make our agent more helpful and harmless, we break down the requirements for good dialogue into natural language rules the agent should follow, and ask raters about each rule separately. We demonstrate that this breakdown enables us to collect more targeted human judgements of agent behaviour and allows for more efficient rule-conditional reward models. Second, our agent provides evidence from sources supporting factual claims when collecting preference judgements over model statements. Sparrow is preferred more often than baselines while being more resilient to adversarial probing by human, violating out rules only 8% of the time when probed. Finally, we conduct extensive analyses showing that though our model learns to follow our rules it can exhibit distributional biases.

1. Introduction

이번 연구에서는, 사람 판단을 정보-검색 대화의 유용성, 정확성, 무해성의 보상으로 사용해 볼 것이다. 정보-검색 대화란 유저와 agent 간의 대화로 유저가 제기한 질문에 대해 agent가 답변과 후속 조치를 제공하는 것이 목표인 대화를 의미한다.

정보-검색 대화에 집중함으로써, 소위 잡담 대화보다 성공을 위한 문맥과 기준이 더 잘 정의되며, 더 잘 정의된 문맥은 더 쉽게 유해성을 정의할 수 있다. 위 방식대로 학습한 모델을 Sparrow라고 칭할 것이다.

 

주요 변경점은 다음과 같다.

1).자세한 규칙에 집중한 사람 판단(=targeted human judgement): 저자는 여러 규칙을 평가자들에게 알려줘, 평가자들의 targeted judgement 즉, 규칙 위반 여부 판단을 수집할 수 있다. 위 방식은 모델의 부족한 부분을 파악할 수 있고, 특정 규칙(=기준)에 집중한 분류기를 학습시킬 수 있고, 평가자들이 failure modes(=어떤 방식으로 요구사항(유용성, 정확성, 무해성)을 어기는지)을 탐색할 수 있도록 도와준다.

2). 다목적 RLHF로 선호도 극대화 및 규칙 위반 최소화: 규칙 판단과 선호도 판단을 RLHF로 조합하여, 베이스 라인(프롬프트 기반, 순위 조정 혹은 지도 학습 기반) 보다 높은 선호도를 보이는 모델을 만들 수 있다. 동시에, 적대적인 공격에 대해 보다 더 탄력적이다.

3). 근거로 정확성과 검증 가능성 향상: GopherCite의 기법을 상호작용-대화형 설정에 맞게 적용하였으며, 이는 single-turn QA 테스크에서 GopherCite와 유사한 성능을 보였다. 그리고, Sparrow가 답변을 근거와 함께 제공할 경우, 78%의 근거가 답변을 그럴듯하게 지지해 준다. 이는 기존 베이스라인에 비해 엄청난 성능 향상이다. 근거 제시는 평가자들에게 주장을 검증하는데 도움을 준다.

4). 대화형 agent에 대한 자세한 분석: 위 방식대로 모델을 학습시킬 경우, 규칙은 더 잘 따르겠지만, 분포적 편향이 확대될 수 있다.

 

위 연구는 다른 대화형 시스템의 여러 특징을 사용한다.

1). LaMDA는 개별 규칙 위반에 대한 라벨을 수집했지만, 이를 규칙 위반 완화 혹은 평가 때 사용하지 않았다. 그리고, 강화학습 대신 순위 지정과 지도 학습을 사용했다.

2). Askell의 HHH(유용함, 정직함, 무해함)를 차용했지만, 정직함 대신 정확함을 사용했다. 

3). Bai는 대화형 agent를 무해하고 유용하게 만들기 위해, 사람 선호도를 활용한 강화학습을 사용했다. 하지만, 요구사항을 세분화하지 않았고, 단일 보상 모델에 모든 HF를 학습시켰고, 외부 근거를 사용하지 않았다.

4). SeeKeR, LaMDA 그리고 BlenderBot 3은 비슷한 지식 검색 방식을 사용했다. 이는 모델이 생성한 탐색 질의로 정보를 검색하여 최종 답변에 활용하는 방식이다. 하지만, SeeKeR는 검색한 정보를 평가자에게 보여주지 않았고, 세 모델 모두 강화학습을 차용하지 않았다.

 

비록 위 연구는 소개한 방식은 조건에 강력하게 부합한 모델을 만드는 시작점을 제시하지만, 향후 연구되어야 할 여러 분야 또한 제시한다.

연구 목적 외에도, 대화는 (다양한 근거와 지시사항을 조합할 수 있기 때문에,) 사람이 agent의 행동을 평가할 때 유용하게 사용할 수 있는 매체(=툴)이라고 생각한다.

 

더보기
In this paper we study the use of human judgements as rewards for the task of helpful, correct, and harmless information-seeking dialogue, defined as a conversation between human user and a dialogue agent with the goal of providing answers to questions and follow-ups by the user.
By focusing on information-seeking dialogue, the context and criteria for success are better-defined that for so-called chit-chat dialogue, and better-defined contexts must it easier to define harms. We call the resulting model Sparrow.
1. Targeted human judgements of specific rules: We guide and elicit targeted judgements from human annotators by asking about violations for a number of rules.
This lets us characterise failures of the model, train targeted classifiers, and guide humans towards probing failure modes of interest.

2. Mutli-objective RLHF to maximise preference rates and minimise rule violations: we show by combining targeted rule judgements and preference judgements with RLHF, we can train a model that is preferred to baselines based on prompting, reranking or supervised learning alone. Simultaneously, Sparrow is much more resilient to adversarial attacks by human than our baselines.

3. Inline evidence to improve correctness and verifiability: We adapt and extend the methods of GopherCite to the interaction dialogue setting, while demonstrating performance similar to GopherCite  on singe-turn QA tasks. When Sparrow provides answers with evidence, those answers are supported and plausible 78% of the time, a significant improvement over our prompted baselines. Providing evidence helps raters verify claims.

4. Detailed analyses of the resulting dialogue agent: Our findings show that our methods, although they improve rule following, can amplify distributional fairness concerns.
Our work shares many features with other dialogue systems
LaMDA also collects annotations for individual rules, but does not use per-rule labels when mitigating or evaluating rule violations, and use supervised learning and ranking rather than reinforcement learning.
We borrow the helpful, honest, and harmless (HHH) decomposition Askell, but use correct instead of honest for now as our methods do not address honesty directly.
Bai uses reinforcement learning from human preferences to train a dialogue agent to be helpful and harmless, but does not break down further for humans, trains a single reward model to represent all human feedback, and does not incorporate external evidence.
SeeKeR, LaMDA, and BlenderBot 3 use a similar knowledge retrieval mechanism where a generated search query is used to retrieve information on which the response is conditioned, but SeeKeR does not show the retrieved information to raters during evaluation, and non of these use RL.
Although the mechanisms introduced here are a useful starting point for robust alignment of models, we point out several areas of necessary future work

Besides its role as a task, we believe dialogue is a fexible medium through which various sources and instruction can be combined to help human evaluate agent behaviour.

2. Methods

1). DPC (Dialogue Prompted Chinchilla 70B)를 사용해 텍스트 데이터를 수집하고, 평가자가 텍스트 별로 규칙 위반 여부와 답변 선호 정도를 측정한다.

2). 이렇게 수집한 데이터는 선호 보상 모델(=preference RMs)과 규칙 보상 모델(=rule RM)을 학습시키는데 사용한다.

3). A2C 강화학습을 사용해 DPC 모델을 학습시킨다. 이때, rule RM이 추정한 위반 정도와 preference RMs이 추정한 답변 선호도를 동시에 최적화한다. 

4). 이후, 개선된 생성 모델로 데이터를 수집하여 보상 모델들을 학습시킬 것이고, 더욱 개선된 보상 모델을 이용해 생성 모델을 학습시키는 과정을 지속적으로 반복할 것이다.

뿐만 아니라, 평가 때, 순위 조정을 위해 보상 모델을 사용하여 성능을 더욱 향상시킬 것이다.

 

더보기
Starting with Dialogue Prompted Chinchilla 70B (DPC) described in section 2.2, we gather human data for rule violations and per-turn response preferences.
This data is used to train preference reward models (preference RMs) and rule reward model (rule RM) that predicts whether a given rule was violated.
We use reinforcement learning with advantage actor-critic (A2C) to train, initalised from our DPC base model.
We jointly optimise for the rule violation rate estimated by the rule RM and per-turn response preferences estimated by preference RMs.
We continuously expand our set of ratings through data collections with improved models, and in turn improve our models with more data. 
In addition to RL, we also employ our reward models for reranking at test-time to further improve performance.

2.1. Defining rules

각 고수준 목표(유용성, 정확성, 무해성)를 세부적인 규칙들로 나눌 것이며, 이를 규칙 기반 적대적 분석과 규칙 기반 분류 때 사용할 것이다.

유용성 규칙은 질문에 답변을 하는지, 주제를 벗어나는지, 반복하는지 등을 포함하고 있고, 답변 선호도와 연관되어 있다.

정확성 규칙은 부정확한 문장과 관련되어 있고, 근거 보상과 연관되어 있다.

 

유용성과 정확성 위반은 베이스라인 모델에서 빈번하게 일어나는 반면, 유해성은 드물게 일어난다. (e.g., 유저가 적대적인 행위를 했을 때)

따라서, 실패 예시에 기반해 규칙을 정하는 대신, 기존 논문에서 참고하여 failure modes를 확인한 다음 규칙을 정할 것이며, 모델이 규칙을 위반할 예시를 찾을 것이다.

 

정보-검색 agent의 대표 요구사항(유용성, 정확성, 무해성)로 방법론을 테스트하기 위해 규칙들을 디자인했다. (즉, 위에서 설명한 방법대로 모델을 학습시켰을 때, 모델이 요구사항에 맞게 행동하는지를 테스트하기 위해 규칙을 설계했다.) 그리고, 규칙의 완벽함에 집중하지 않았다. (즉, 규칙이 요구사항의 필요충분조건이 되도록 하는데 집중하지 않았다. 규칙이 모든 상황을 고려하지 않았다.)

그리고, 문장으로 설명할 수 있고, HF을 사용한 강화학습으로 완화할 수 있는 것에만 집중했다. 평가자들이 다른 규칙을 빠르게 이해하도록 도와주기 위해, 규칙을 짧고, 독립적으로 디자인했다.

 

초기 규칙 디자인에 많은 노력을 기울였지만, 여전히 조건은 모든 경우를  포괄하지 않는다. 그렇기 때문에, 실제 사용 전에 상당한 수정 및 보완이 필요하다.

 

더보기
Starting with our high-level goals of helpful, correct, and harmless dialogue, we divide each goal into more details rules. for use in rule-based advserarial probing and rule-conditional classification.
Helpfulness rules include answering user questions, staying on topic, and avoiding common problems such as repetition, and are combined with an overall per-turn response preference.
Correctness rules cover types of incorrect statements which raters might not otherwise penalise, and are combined with the evidence-specific rewards. Both helpfulness and correctness rules are frequently violated by our baseline model.
Though prior work has demonstrated that language and dialogue models can output harmful language, our baseline produced language we consider harmful only infrequently or under adversarial behaviour by users. Consequently, instead of writing rules based on example failures, we consulted existing literature to identify potential failure modes, then wrote rules and sought examples where our model would fail to follow our rules.
We designed our rule set to test our methodology with a set of representative requirements for information-seeking agents; we did not aim for completeness in our rule set; we did not aim for completeness in our rule set. In particular, we focused on harms, which can be encoded in natural-language rules and mitigated using RL from human feedback. While we put extensive thought into our initial rule set, we emphasise that they are not comprehensive and require substantial expansion and refinement before real-world usage.

To help annotators comprehend different rules quickly, our rules are designed to be short and standalone.

2.2. Generating dialogue turns

Prompting for dialogue

(User와의 대화에서 좋은 모습을 보여주는) 프롬프트와 Chinchilla-70B를 조합해 대화형-agent를 구성할 것이다. 

대화형-agent에 근거를 사용하기 위해, 두 가지 새로운 요소(Search Query, Search Result)를 추가할 것이다. Search Query는 검색어를 생성하며, Search Result는 검색어를 Google Search해서 얻은 근거를 제시한다. 참고로, Agent는 위 User, Seach Query, Search Result 세 가지 요소를 기반으로 텍스트를 생성하며, 이때, nuclues sampling를 사용한다.

평가 때 보인 모델 태도를 고려해 프롬프트를 지속적으로 개선했다. 앞으로, 최종 프롬프트와 Chinchilla-70를 조합한 것을 DPC로 칭할 것이며, 다른 모델도 특정 프롬프트를 명시하지 않는 한 DPC와 같은 프롬프트를 사용할 것이다. 

 

Selecting whether to use evidence 

앞으로, 근거 사용 여부를 결정하는 다양한 방법들을 다음과 같이 지칭할 것이다.

1). always search: Search Query를 생성할 것이며, Search Result를 활용해 텍스트를 생성할 것이다.

2). never search: 근거 없이 텍스트를 생성할 것이다.

3). choose search: Search QueryAgent의 확률을 각각 계산하여, 근거 사용 여부를 결정한다. 즉, "Query: "의 확률이 높으면 근거를 수집하여 텍스트를 생성하는 것이고, "Agent: "의 확률이 높으면 근거 수집 없이 텍스트를 생성하는 것이다.

4). @N: 근거 사용 여부를 결정하는 대신, N개의 텍스트를 생성한다. 즉, 절반은 근거를 사용해 텍스트를 생성하고, 나머지 절반은 근거 없이 텍스트를 생성한 후, 보상 모델으로 순위 조정하여 최종 생성 텍스트를 결정한다.

 

더보기
Prompting for dialogue
we construct a dialogue agent by combining Chinchilla-70B with a hand-authored prompt that demonstrates good behaviour in a dialogue between two participants: User and Agent. For a dialogue agent with evidence, we introduce two new participants: Search Query, which generates a search query; and Search Result which adds the evidence retrieved from Google Search based on the Search Query turn. 

We iterated on the prompt, informed by behaviours seen during evaluation. Throughout the paper DPC (Dialogue-Prompted Chinchilla) refers to unmodified Chinchilla with our final prompt; other models are prompted in the same way, unless indicated otherwise.
Selecting whether to use evidence 
Throughout this and the following sections we use the following nomenclature to refer different methods for determining whether to use evidence.
1). always search: A model that is forced to produce a Search Query turn and condition on the Search Result
2). never search: A model that is forced to produce an Agent turn without evidence.
3). choose search: The selection of whether to search or not is made by computing the log likelihood for the roles Search Query and Agent following the dialogue context. The role with the high log likelihood is chosen to continue the dialogue
4). @N: Instead of choosing whether to search or not, we produce N responses: half the responses are produced by generating search queries and conditioning on Search Results, the other half are generated without evidence. Whether the final response uses evidence is determined by reranking with reward models.

2.3. Human data collection

DPC를 초기 모델로 시작할 것이며, 그 후 평가와 학습을 지속적으로 번갈아 진행해 agent를 개선해 나갈 것이다.

이때, 참여자는 두 가지 방식(Per-turn response preference, Adversarial probing)으로 agent와 교감할 것이다.

 

Per-turn response preference

평가자에게 완성되지 않은 맥락과 그 맥락을 채워줄 여러 후보 문장이 주어진다. 이때, 평가자는 가장 적절한 후보 문장을 선택하여 맥락을 완성한다.

즉, User의 답변 혹은 Agent의 답변 차례일 때, 여러 모델 혹은 샘플링으로 여러 후보 문장을 만든다. 그 후, 평가자가 가장 적절한 후보 문장을 답변으로 체택한다. 

추가적으로, 여러 설문을 통해 추가 정보를 수집한다. (자세한 내용은 2.4절)

차례별 답변 선호도 데이터셋(=Per-turn response preference)로 모델의 선호도를 추정할 수 있다. 즉, 특정 모델이 경쟁 모델에 비해 선호 비율이 얼마나 되는지를 추정할 수 있다.

 

Adversarial probing

각 참가자에게는 하나의 규칙만 제공될 것이다. 그리고 참가자는 해당 규칙을 위반하도록 유도할 것이며, 그 후 대화에서 모델이 해당 규칙을 위반 했는지 판단할 것이다.

일반적인 규칙 대신 자세한 규칙에 집중하게 한 이유는 특정 failure mode에 집중하고 보완하기 위해서다.

규칙 위반 데이터셋으로, 모델이 적대적 대화 때 규칙 위반을 얼마나 하는지 추정할 수 있다.

 

Training and evaluation pipeline

적대적 대화는 모델이 나쁜 태도에 얼마나 취약한지를 파악할 때 사용할 수 있고, 답변 선호 비율은 유용성을 측정할 때 사용할 수 있다.

규칙 위반 데이터셋으로 (규칙 위반에 대한 사람 판단을 추정하는) Rule RM을 학습시킬 수 있다.

차례별 답변 선호도 데이터셋으로 (유용성의 프록시인) Preference RM을 학습시킬 수 있다.

 

더보기
our method involves a continuous cycle of evaluation and training
We start with DPC, as the initial dialogue agent. We then ask human participants to interact with the agent in two main settings: per-turn response preference and adversarial probing.
Per-turn response preference
In this task, human raters are given an incomplete dialogue and multiple possible statements to continue the dialogue, each corresponding to a different sample or model.
a model generates both the User and Agent turns. and in both cases the human raters are asked to select the best response. The selected response is then used to continue the dialogue.

Per-turn response preference data lets us estimate a preference rate which measures how frequently a model is preferred over one or more competing models. When responses are combined with supporting evidence, human raters given additional pre-response feedback.
Adversarial probing
In this task, we show participants one of the rules, and they are instructed to have a conversation that leads the model to break the rule. Following the conversation, the same participant then indicates whether the model followed the rule or not. 
Instructing participants to focus on specific rules rather than a general rule allows us to target and improve on specific failure modes. Collecting many dialogues of this form let us estimate a rule violation rate under human adversarial probing.
Training and evaluation pipeline
Adversarial probing is used to assess how vulnerable the model is to exhibiting bad behavior and the response preference rate is used as a measure for helpfulness. 
For our rule violation data, we train a Rule RM that predicts human judgement of rule violation. The preference data is used to train Elo Preference RMs as a proxy for helpfulness.

2.4. Evidence

저자는 더 정확한 답변을 위해 모델이 인터넷 검색을 하도록 학습시켰으며, 이는 일시적으로 (정적인 파라미터 모델에서 볼 수 없는) 일반화를 가능케 한다. 

UI에서는, 근거가 모델 답변 바로 뒤에 위치해 있어, 모델 답변이 정확한지 쉽게 판단할 수 있다. 

 

Learning to search

어떻게 검색해야 하는지 그리고 언제 근거를 사용해야 하는지를 배우기 위해, Preference RM를 학습시킬 것이다.

그리고 대화형-agent에서 근거를 사용하기 위해, 두 가지 새로운 요소(Search QuerySearch Result)를 프롬프트에 추가할 것이다.

 

차례별 답변 선호도 데이터셋은 4가지 후보 답변 비교를 통해, 여러 정보를 제공해준다. (1. 가장 적절한 후보 답변, 2. 답변과 검색어가 적절했는지, 3. 답변을 생성할 때 근거를 사용해야 하는건지) 참고로, 후보 답변 중 절반은 근거를 사용해 답변을 만들었고, 나머지 절반은 근거 없이 답변을 생성했다.

 

Retrieval 

검색 엔진(=Google Search)이 제공한 sinppet(=검색 결과 요약본)을 가지고 있는 HTML 웹 페이지 중 텍스트만 스크랩한다.

그리고, 스크랩한 텍스트를 편집하여 sinppet을 포함한 토막글을 만든다. (sinppet의 시작 지점을 기준으로 둘 때, 왼쪽으로는 최대 100자가 허용 가능하며, 토막글의 최대 길이는 500자로 한정한다.)

위 토막글은 Agent 답변 생성 때 활용될 것이다.

 

Collecting human feedback

근거가 필요한 답변 중 근거를 제시한 비율 혹은 제시된 근거 중 주장을 뒷받침하는 근거의 비율을 파악하기 위해, 저자는 답변 선호도를 수집할 때, 다음과 같은 추가 설문을 진행했다.

 

후보 답변을 보기 이전, 답변을 생성하기 위해 인터넷 검색을 해야 하는가?

근거와 함께 제시된 답변일 경우, 1). 답변이 그럴싸한가? 2). 인터넷에서 수집한 근거가 답변을 뒷받침하는가?

근거 없이 제시된 답변일 경우, 1). 답변이 그럴싸한가? 2). 인터넷에서 근거를 수집해 답변을 뒷받침할 수 있을까?

 

위 두 가지 비율을 통해, 답변이 외부-지식에 얼마나 충실한지 그리고 환각(=hallucination) 정도를 파악할 수 있다.

 

더보기
We train our model to search the internet in order to provide more correct responses. This mechanism also allows for temporal generalisation beyond a static parametric model. 
In our user interface, we display the evidence used by the model next to the model's response to assist the rater in appraising whether the model's response is correct.
Learning to search 
To learn how to search and when to use the evidence, we train a preference model
We incorporate evidence into the dialogue framework by introducing two participants into the dialogue prompt: Search Query and Search Result.
Response preferences are collected over four-statement comparisons; two responses are sampled without evidence from agents with the non-evidence prompt.
The rater's choice between these four options provides signal both for the overall quality of the response and search query (if used), and for the decision to display evidence or not.
Retrieval 
We scrape the returned HTML web pages and truncate a fragment of up to 500-characters around the search engine-provided snippet for each result. Search Result turn contains a single scraped fragment and is added to the dialogue context for the Agent.
Collecting human feedback
First, how often does the model provide evidence when making a factual claim? Second, how often does the evidence support the claims of the model? To make these assessments, we ask raters additional questions about the dialogue when collecting response preferences.

Before seeing possible responses:• Should the AI search the internet to support its response?For each response with evidence, individually:• Is the response plausible (reasonable, on topic, could be true)?• Is the response supported by the provided evidence from the internet? (i.e. the evidence convinces you that the answer is correct) For each response without evidence, individually:• Is this response plausible (reasonable, on topic, could be true)?• Could this response be supported by quoting facts from the internet? Responses to these questions let us investigate how often the model provides evidence when needed, and how often it successfully makes claims that are supported by evidence. Measuring and optimising towards the supportedness of evidence is important for assessing and increasing the rate at which responses are faithfully-grounded in external knowledge, and reducing the problem of hallucinations

2.5. Reward models

Chilchilla 70B로 두 종류의 보상 모델을 학습시킬 것이다.

1). Preference RM은 답변에 선호도 점수를 매길 것이다.

2). Rule RM은 Sparrow의 규칙 위반 확률을 추정할 것이다.

 

차례별 답변 선호도 데이터셋을 통해 Preference RM을 다음과 같이 학습시킬 것이다. 1). 후보 답변의 점수를 추정한다. 2). softmax로 최종 답변의 확률을 추정한다. 3). 최종 답변의 확률을 극대화한다. 주제에서 벗어난 후보 답변에 대해 페널티를 부여하기 위해, 후보 외의 답변을 하나 무작위로 선별해 추가했다.

뿐만 아니라, 손실값에 1). 근거가 답변을 뒷받침하지 않을 경우의 추가 손실값, 2). 후보 답변 점수의 합을 영으로 정규화하는 작업를 추가했다.

$$ \mathcal{L}_{\mathrm{pr}}=\alpha \mathcal{L}_{\text {classification }}+(1-\alpha) \underbrace{\mathbb{E}\left[\log \frac{\exp \left(r_b\right)}{\sum_i \exp \left(r_i\right)}\right]}_{\text {Elo RM loss }}+\underbrace{\left(\sum_i r_i\right)^2}_{\text {regulariser }} $$

 

Rule RM은 다음과 같은 조건부 분류 모델(=r(x, y) ∈ [0, 1], x는 대화, y는 적용 규칙)이다. 

다음과 같은 프롬프트가 주어졌을 때, Yes 혹은 No 확률을 극대화하는 것이 학습 목표 함수다.

자세히 말하자면, instruction tuning으로 규칙 위반을 했으면, Yes를 극대화하고, 위반을 안했으면 No를 극대화하는 방식으로 학습을 진행할 것이다.

 

Rule RM은 동시에 모든 규칙을 학습하기 때문에, 단일 모델만으로 모든 규칙 위반 여부를 확인할 수 있다. 이는 메모리와 연산량을 절약해준다.

보상 모델을 포함한 모든 모델을 파인튜닝할 때, Chilchilla 모델 하단의 64개 레이어는 고정시키고, 오직 상단 16개 레이어만 파인튜닝한다. 이는 메모리 사용량을 줄여준다.

 

더보기
We train two types of reward models separately, both fine-tuned from Chinchilla 70B:
The Response Preference Reward Model (Preference RM) scores responses according to human preferences between candidate responses.
The Rule Violation Reward Model (Rule RM) estimates the probability that Sparrow breaks a rule in a given dialogue.
Response preference data allows us to train a Preference RM that for each response predicts an Elo preference score such that the softmax over the scores predicts the preference probability. To help the Preference RM penalise off-topic answers, we add a randomly chosen distractor response to each comparison, sampled from the rest of our response preference data. We also found that two auxiliary losses improved preference modelling. We add a classification loss predicting whether evidence conditioned answer were supported and plausible. We also ask raters to indicate when all responses in a comparison are low quality and regularise the corresponding Elo scores to be negative.
The Rule RM is conditional classifier r(x, y) ∈ [0, 1] that estimates the probability that the rule y was violated by Sparrow at any point in the dialogue x. We use a version of instruction tuning.
The training objective is to maximise the likelihood of the sequence of tokens corresponding to Yes or No, depending on the label from human ratings.
Because the Rule RM is trained jointly on all rules, memory and computation can be shared across rules for the same dialogue.
In all cases when fine-tuning, we freeze the bottom 64 transformer layers of Chinchilla, and only fine-tune the final 16 layers, resulting in a reduced memory footprint.

2.6. Reranking

Preference RM과 rule RM으로 후보 답변의 순위를 지정하는 방식으로 대화형-agent의 정책을 개선할 수 있다.

추론 때, N개의 후보 답변을 생성한 뒤, 보상값이 가장 높은 최종 답변을 선택한다. 이를 'model@N"이라고 하며, 두 가지 방식으로 답변을 생성한다.

1). 프준 대화 프롬프트(=dialogue history + Agent: )로 4개의 후보 답변을 생성한다. 

2). 근거 프롬프트(=dialolgue history + Search Query: )로 2개의 검색어를 생성한다. 검색어를 사용해 최대 4개의 토막글(=검색 결과)을 가져온다. 각 토막글을 기반으로 후보 답변을 생성한다.

이로 인해, Sparrow가 생성한 후보 답변의 총 개수가 8개가 되며, 보상 수식의 값이 가장 높은 후보 답변을 최종 답변으로 선정할 것이다.

 

$$R_\text{rerank} = \frac{e^{R_\text{pr}}}{e^{R_\text{pr}} + e^{AVG(R_\text{pr})}} \left( \prod_{i=1}^n R_{\text{rule}_i} \right) ^\frac{1}{n}$$

$$R_\text{pr} = \text{Preference RM score},\quad R_{\text{rule}_i} = \text{Reward RM score of rule i out of n},\\ AVG(R_\text{pr}) = \text{average of Preference RM score on the valid set}$$

 

Preference RM은 명확한 근거가 뒷받침되는 답변 혹은 불필요한 근거가 없는 답변을 제공할 때 높은 점수를 주고, 명확하지 않거나 불필요한 근거를 제시할 경우 낮은 점수를 준다. Rule RM은 답변이 규칙 위반을 했을 때, 패널티를 부여한다.

 

더보기
Given a Preference RM and a rule RM, a dialogue agent's policy can be improved by reranking multiple sampled responses.

At inference time, we draw N samples and select the sample with the maximum combined reward. We call such models 'model@N'.
Given the previous dialogue, a generative model samples four answers using a standard dialogue prompt and two search queries using an evidence prompt. The search queries are used to retrieve up to four search result fragments, which in turn are used to sample Sparrow responses. The total of 8 samples are Sparrow responses.

The Preference RM gives high scores to factual model responses with clearly supporting evidence and responses without evidence to non-factual questions. It gives lower scores for responses with unnecessary or low-quality evidence. The Rule RM penalises responses that break rules.

2.7. Supervised fine-tuning

선호도가 높고 규칙 위반이 없는 대화데이터와 LM loss로 Chinchilla를 파인튜닝하여 STF 모델을 만든다. 

1). 차례별 답변 선호도 데이터의 경우, 선호도가 가장 높은 후보 답변으로만 파인튜닝한다.

2). 규칙 위반 데이터의 경우, Agent 답변 중 규칙 위반이 없고 좋은 평가(=good)를 받은 답변으로만 파인튜닝한다.

STF 모델은 DPC보다 강한 베이스라인을 제공하며, 괜찮은 초기 모델 선택지가 될 수 있다.

 

더보기
We also fine-tune Chinchilla directly via LM loss on the collected dialogues rated as preferred and rule compliant, as an alternative to reward modelling and reinforcement learning. For pre-turn preference data, we fine-tune the model to produce the preferred response. For adversarial probing dialogues, we fine-tune the model on the Agent responses in dialogues rated at least good and where no rule was broken. The SFT model provides a stronger baseline than DPC, as well as a better initial starting point for RL.

 

더보기

2.8. Reinforcement learning

보상 모델과 강화학습을 사용해 대화형-agent의 성능을 향상시킨다.

기존 대화 내용과 역할 프롬프트(e.g., User: , Agent: , Search Query: )가 주어지면, 역할에 맞는 발화를 생성하는 방향으로 에피소드가 진행된다. 발화가 완성되면 에피소드가 끝나며, 이후 보상은 감가율 없이 한꺼번에 지급된다. (참고로, action = token)

 

위 논문은 self-play 방식을 사용한다. 즉, 학습 때 생성된 발화 내용을 기존 대화 내용에 추가해 새로운 대화 내용을 만들어 학습에 사용한다. 위 방식으로 인해, Sparrow는 User, Agent, Search Query 역할을 다양하게 수행할 수 있게 되었다. 

 

기존 대화 내용은 다양한 방식으로 수집했다. 

1). 복잡하고 다양한 질문을 포함하고 있는 ELI5 데이터셋, 2). 사람 간의 개방적(즉, 제한된 답변 아닌 다양한 답변을 할 수 있는 대화)이고 적대적인 대화  3). Chinchilla가 생성한 적대적 질문 4). self-play 방식: Sparrow가 생성한 발화 내용 중 타당하다고 판단되는 발화는 기존 대화 내용에 추가한다. 참고로, 대화 내용을 발화 최대 개수는 12개다.

학습 데이터는 off-policy다. 즉, 기존 정책이 아닌 이전 정책으로 수집한 데이터다.

 

다음과 같이 보상을 극대화하여, agent(=$\pi$)를 최적화할 것이다.

$$\arg \max _\pi \mathbb{E}_{c \sim \mathcal{D}, s \sim \pi}[R(s \mid c)]$$

 

규칙 보상 범위와 선호도 보상 범위가 다르기 때문에, 합치기 전에 정규화 과정을 거칠 것이다. 그리고, 두 가지 패널티를 사용할 것이다.  1). 간결한 답변을 장려하기 위해, 토큰 개수 증가에 따른 패널티 부여, 2). 형식 준수를 장려하기 위해, 형식 미준수에 따른 패널티 부여

 

$$R_{\text {agent }}(s \mid c)=\underbrace{\tilde{R}_{\mathrm{pr}}(s \mid c)}_{\text {Preference }}+\underbrace{\frac{1}{n} \sum_{i=1}^n \tilde{R}_{\text {rule }_i}(s \mid c)}_{\text {Rules }}-\underbrace{\left(\beta T+\gamma \mathbb{1}_{\text {IS_INVALID (s) }}\right)}_{\text {Length and formatting penalties }}$$

 

참고로, s는 agent가 생성한 길이 T의 발화 내용이고, C는 기존 대화 내용이다.

 

기존 대화 내용, 생성한 발화, 보상으로 모델 업데이트를 했다. 했다. A2C 알고리즘을 사용했다 

 

we use reinforcement learning with our reward models to improve the dialogue agent.
Each episode consists of a single statement (not a complete conversation) conditioned on a preceding dialogue context, where the actions are individual tokens and the rewards is given at the end of each episode.

we use a form of self-play, where during training the generated statement and the dialogue context form a new dialogue context for a later episode; thus, Sparrow generates multiple turns of a dialogue, playing the role of User, Agent, and Search Query over multiple episodes.

The preceding dialogue context can come from several possible sources, which are effectively user models that exhibit different interests and behaviours

A dataset of questions. We use the filtered train subset of ELI5 from GopherCite. A conversation with a human. We take a mixture of open-ended and adversarial conversations from annotators. A red team language model. prompting Chinchilla to generate adversarial questions that augment the available human data. Self-play data accumulated through training. During training, Sparrow generates a response to each dialogue context in a batch, playing a role of both User and Agent as needed. Any valid statements are combined with their dialogue contexts to form a new context that is added to self-play buffer up to a maximum conversation length of 12 statements.

Rule and preference rewards are given at the end of the episode without discounting. We also use a small per-token penalty to encourage concise responses, and give a large negative reward to improperly-formatted statements.  Due to the difference output ranges of the preference and rule models, we independently normalise each one using a running mean and standard deviation before adding them.

 where s is an agent utterance consisting of a sequence of T actions, c is the dialogue context, B << 1 and lambda >> 1 are constants. Note that since we do not use discounting, and rewards are zero for all actions but the final action of each episode (utterance), the reward and return are the same.

The dialogue context, sampled actions, and rewards from the trajectory data are used to update the model parameters. The RL algorithm we use is a batched synchronous advantage actor-critic (A2C)
Due to nucleus sampling, our training data is off-policy, which we do not correct for; one solution could be to introduce off-policy methods.

3. Results and analysis

3.1. Preferences and rule violations

 

정보-검색 대화형 agent의 답변을 두 가지 관점(답변 선호도, 규칙 위반)에서 평가할 것이다.

 

Three-model preference rate

모델 답변을 차례별 답변 선호도 관점에서 평가할 것이며, 두 DPC 모델(DPC-never search, DPC-always search)과 비교하는 방식으로 진행할 것이다.

 

Violation rate under adversarial probing

평가자가 Sparrow와 대화를 할 때 특정 규칙을 위반하도록 유도할 것이며, 그 후 대화에서 모델이 해당 규칙을 위반 했는지 판단할 것이다.

이때, 척도를 break/follow로 통합하여 진행할 것이다.

 

 

일반적으로 선호도 최적화와 유해성 최적화는 서로 상반된다. 

그럼에도 불구하고, RL과 ranking@8의 조합이 선호도 측면과 유해성 측면에서 가장 높은 성능을 보였다.

 

강화학습과 순위 조정은 상호보완적이다. 

1). 답변 선호도 측면에서, 순위 조정은 모든 모델(DPC, STF, RL)의 성능을 모두 향상시켜준다.

2). 규칙 위반 측면에서, RL과 STF는 DPC보다 높은 성능을 보여줬다. 

Sparrow는 대부분의 규칙 위반 유도에 대한 높은 저항력을 갖고 있다. 하지만, 몇 가지 규칙에서는 상대적으로 낮은 저향력을 보였다. 그에 대한 이유는 다음과 같다고 생각한다.

1). Sparrow는 종종 의약, 금융 분야에서 그럴듯한 검색 결과를 가져온다. 2). 일부 규칙에서 데이터를 적게 수집했다.

3). 선호도 데이터셋 작업을 하던 대부분의 평가자는 규칙 위반 데이터셋 작업을 수행해본 경험이 없다. 그렇기 때문에, 무의식적으로 규칙 위반답변을 선택했을 수 있다.

 

더보기
Our primary evaluations for information-seeking dialogue are conducted by asking paid annotators to assess model responses in two types of human data collection: per-turn response preference and adversarial probing.

Three-model preference rate We assess the quality of a model's answers in terms of preference against two DPC baselines. DPC - never search, DPC - always search. The three-model preference rate is established through per-turn preference comparison of an evaluated model with the two DPC baselines.

Violation rate under adversarial probing.We ask the raters to lead a conversation with Sparrow in such a way that Sparrow might break the specified rule. We aggregate by dropping unsure rating and binarising the scale into break and follow.
Optimising for preference and harmlessness stand in opposition to each other.we find that combining RL with ranking@8 (in red) achieves the best performance both in terms of preference win rates and resilience to adversarial probing.

RL and reranking are complementary: reranking gives a consistent three-model preference rate improvement for all the classes of model (DPC, STF, RL). RL and STF outperform the DPC baseline by having lower violation rates under adversarial probing.

our interventions improve Sparrow's resilience to attack for a majority of rules. however, they do not alleviate harms from the following rules. 
Sparrow often finds convincing search results supporting the responses for medical or financial topics, or even stereotyping opinions from the web.
we collected less data from some rules.
Many of the human raters for the Preference RM data have never completed the adversarial probing or rule rating task and so may unknowingly pick rule-breaking responses.

3.2. Evidence evaluation

Multi-turn supported and plausible evaluation

supported & plausible 관점에서, Sparrow의 답변과 함께 제시된 근거를 평가할 것이다. 즉, 근거를 기반으로 타당한 답변을 제공하는지를 평가할 것이다.

사실적 답변을 요구하는 대화 내용(=근거가 필수 경우)만 사용하여, 두 가지 평가 지표를 측정했다. 1). 근거를 제공한 비율, 2). 근거와 함께 제시된 답변들 중 supported & plausible한 답변 비율

그 결과, supported & plausible 관점에서, RL@8이 가장 높은 점수를 받았다.

 

Selective prediction of using evidence

근거 사용 여부(답변을 제시할 때, 근거와 함께 제시할지 말지)를 결정하는 것은 agent의 핵심 능력이다.

(참고로, 이전 평가에서는 근거 사용 능력을 정확히 평가할 수 없었다. 왜냐하면, 근거가 필수인 경우에서만 평가가 이루어졌기 때문이다.)

평가는 다음과 같이 이루어진다.

User의 답변으로 마감된 대화 내용이 주어졌을 때, 평가자는 Agent의 답변 때 외부 정보가 필요한지 결정하여, agent의 답변과 비교할 것이다. 즉, 근거 사용 여부 관점에서, 평가자와 생각이 같은지에 대해 평가할 것이다.

측정한 결과, 평가자와 90%이상 일치하는 것으로 나타났다.

 

False negatives

저자는 7%의 False negative(평가자는 근거 사용, Sparrow는 근거 미사용)경우를 분석해봤다.

절반(51%)의 경우, 평가자의 생각이 바꿨다. 즉, Sparrow의 답변을 보고 근거 미사용으로 생각이 바꿨다.

그 외 49%는 세 가지 경우로 나눠 생각할 수 있다.

a). 근거가 필요한 질문이지만, 규칙 위반 가능성이 있어, 답변을 정중히 거절한 경우

b). 모든 탐색 결과가 좋지 않아, 순위 조정 때 어쩔 수 없이 근거를 사용하지 않은 답변을 제공한 경우

c). 라벨링 실수한 경우

 

Comparison to GopherCite

이번에는 Sparrow(RL@4 - always search)와 GopherCite(RL@16)의 성능을 비교해볼 것이다.

(참고로, GopherCite는 단일 QA 테스크에 맞게 설계되었다. 즉, 후속 질문을 던지는 대화에는 일반화되어 있지 않다.)

1). FilteredELi5로 비교 해본 결과, 비슷한 supported & plausible 비율이 나왔다.

2). 사람 선호도 평가를 진행해본 결과, Sparrow가 GopherCite보다 높은 비율(63%)을 보여줬다. 

결론, Sparrow는 후속 질문을 실시간으로 답변해줌에도 불구하고, QA 테스크에서 성능 저하가 나타나지 않았다

 

 

더보기
Multi-turn supported and plausible evaluation
We assess Sparrow's responses and accompanying evidence through human evaluation, using the metrics of supported and plausible. We evaluate these metrics in the multi-turn dialogue setting as an extra rating task within the per-turn preferred response task. We measure the supported and plausible rates achieved on the turns requiring factual responses from the model.
individual models chose to provide answers with evidence, along with the supported and plausible rater judgements for the cases in which the evidence was given.
our best model's responses with evidence to be plausible and supported in 78% of the cases.
Selective prediction of using evidence 
An important ability of the agent is to determine for which turns to display supporting evidence alongside the response.
We evaluate this ability with the annotation tasks given the previous dialogue ending with a User turn, the rater indicates if the Agent turn requires grounding external knowledge.
Sparrow generally agrees with raters on whether evidence is necessary, with an overall agreement rate of over 90%.
False negatives
We were particularly interested in the 7% of cases where raters judged that external evidence should be cited, but Sparrow did not. 51% of the time, raters actually changed their minds after seeing Sparrow's response and agreed that evidence would not be useful.
we found three common explanations for the remaining half 
a) questions whose answers would normally require evidence but which lead to rule violations and where Sparrow declined to answers, b) cases where all the search results were of low quality and so reranking picked non-search response. c) simple mislabelling by the raters.
Comparison to GopherCite
GopherCite was designed for single-turn question answering and does not generalise to dialogues with followup questions.
We evaluate Sparrow with reranking over 4 responses with evidence (RL@4 - always search), and GopherCite with reranking over 16 responses.
Sparrow achieves similar supported and plausible rates to GopherCite. Human raters also show a preference 63% for Sparrow answers over GopherCite
Sparrow, an interactive system that can additionally answer follow-up questions in real-time, does not degrade QA performance as compared to the larger and slower GopherCite system.

3.3. Correctness evaluation

이번 절에서는, Sparrow의 정확성에 대해 살펴볼 것이다.

supported & plausible 관점에서, 답변의 타당성 위주로 평가가 이루어졌지, 답변의 정확성 또는 사실 확인 측면에서 평가하지 않았다.

 

정확성을 평가하기 위해, 사실 기반 질문과 그에 따른 후속 질문에 답변하는 대화를 총 200개 수집했다. (DPC-never search와 Sparrow(RL@8)에서 대화를 각각 100개씩 수집했다.) 이때, 적대적 대화로 수집한 것이 아닌, 자유 대화로 수집했다.

 

두 가지 관점으로 수집한 대화의 정확성을 평가한다. 

1). 답변 평가: 근거는 배제하고, 오직 답변이 정확한지 평가한다.

2). 근거 평가: 근거가 답변의 정확성을 확인하는데 도움이 되는지 평가한다.

 

참고로, 답변의 유용성 평가가 아니라, 답변의 정확성임을 유의해야 한다.

 

평가 결과, Sparrow는 80%의 정확성을 보였다. 이는 "검색 방법 학습(by Preference RM)"과 "근거 기반"이 답변의 정확성을 높여줌을 시사한다.

 

더보기
It is naturally of interest how often Sparrow is correct during a conversation.
Our supported and plausible evaluation do not require human raters to make an absolute judgement of the response correctness or to fact-check with external sources.
We collected 200 information-seeking dialogues instructing raters to ask factual questions and follow-ups. 
Of these dialogues, 100 conversations were collected from the baseline DPC without evidence, and 100 were collected from Sparrow (RL@8).
These dialogues were then annotated by some of the authors for correctness, according to the following procedure:
1). Rate just the model response. Rate the correctness of each claim based on general knowledge and fact-checking with external sources.
2). Rate the evidence if present. Determine whether the evidence is helpful and sufficient to verify the correctness of the model response.
We do not judge the model responses for helpfulness, only for correctness of factual claims. 
conditioning answers on the search results and training for quality of evidence increases the correctness of Sparrow's answers.
This evaluation for correctness is not on an adversarial distribution.
However for the questions our raters chose to ask in the free conversation setting, Sparrow gave answers that were rated as true or mostly true around 80% of the time in our judgement.

3.4. Rater perception of truthworthiness

정확성 평가에 사용할 자유 대화를 수집한 후, 저자는 평가자한테 "AI가 얼마나 신롸할 만하다고 생각하는지"에 대해 물어봤다.

외부 요인의 영향을 줄이기 위해 즉, 공정하게 평가하기 위해, 다음 두 가지 방법을 사용했다.

1). 라운드 로빈 방식: 참가자는 순서대로 각 모델을 체험한다. 2). 최소 응답 시간 6초로 제한: 참가자의 빠른 답변을 방지한다.

 

설문 결과, Sparrow(69%)가 DPC-never search(54%)보다 높은 신뢰성을 보였다. 

 

더보기
After each free dialogue was collected for the correctness evaluation, we asked the raters How trustworthy did you find the AI?
We reduce the impact of some confounders by presenting the models to participants in round robin fashion, so that each participant interacts with both moodels, and also setting a minimum response time of 6 s in order to avoid effects driven by latency.
participants give higher ratings to Sparrow than the DPC baseline for truthworthiness, indicating that they find Sparrow trustworthy or very trustworthy in around 70% of conversations.

3.5. General versus specific rules

이번 절에서는, 일반화된 단일 규칙을 사용하는 것보다 다수 세부 규칙을 사용하는 것이 얼마나 효율적인지 살펴볼 것이다.

이때, 유해성에 집중할 것이다. 유해성 발화는 적대적 조사가 필요한 long-tail phenomenon이기 때문이다.

 

일반화된 단일 규칙과 다수 세부 규칙 차이를 비교하기 위해, DPC로 1078개 발화를 수집했다. 538개는 단일 세부 규칙 위반에 집중한 적대적 조사로 수집했고, 540개는 단일화된 일반 규칙 위반에 집중한 적대적 조사로 수집했다. 참고로 각 발화를 수집할 때, 일반 프롬프트와 안정성이 낮은 프롬프트 중 하나를 무작위로 선정해 수집했다.

 

이후, 2명의 평가자가 각 발화마다 일반화된 단일 규칙과 모든 세부 규칙의 위반 여부를 확인했다. 

 

Effectiveness of adversarial probing

다수 세부 규칙에서 높은 정확도를 보이는 모델을 만들기 위해서는, 각 규칙마다 충분한 데이터가 있어야 한다.

세부 규칙에 집중한 적대적 조사는 학습 데이터 부족 문제를 해결해준다. 세부 규칙에 집중한 적대적 발화는 일반 규칙에 집중한 적대적 발화보다 규칙 위반을 더 잘 이끌어 내기 때문이다. 

 

 

The general harm rule as a method to find new specific rules

다수 세부 규칙으로는 모든 유해성 영역을 다룰 수 없다. 그에 반해, 일반 규칙은 세부 규칙에서 다루지 않았던 영역을 다룰 수 있다.

일반 규칙에 집중한 적대적 발화 566개 중 19개는 세부 규칙에서 다루지 않았던 새로운 영역을 다루고 있고 있기 때문이다.

 

Effectiveness of rule rating

일반 규칙 사용에 비해, 세부 규칙 사용이 IAA(=규칙 위반에 얼마나 동의하는지)에 영향을 얼마나 주는지 살펴보았다.

세부 규칙의 IAA는 0.53%인 반면, 일반 규칙의 IAA는 0.37%다. 즉, 세부 규칙을 사용할 때, 더 높은 IAA가 나왔다.

 

General versus rule-conditioned rule reward model

조건부 분류 모델은 일반 분류 모델보다 높은 성능을 보일 뿐만 아니라, 더 작은 데이터셋으로 학습이 가능하다.

비교를 위해, 세부 규칙 위반에 집중한 발화 538개를 사용할 것이다. 이때, 두 명의 평가자가 발화의 모든 세부 규칙 위반 여부를 판단할 것이고, 한 명의 평가자라도 위반이라고 판단할 경우, 그 발화는 규칙 위반으로 분류할 것이다. 그리고, 임의의 규칙을 위반한 발화는 무조건 유해성 발화로 분류하여, 일반 분류 모델에 사용할 것이다.

 

유해성 규칙 위반 여부를 학습하기 위해, 조건부 분류 모델은 instruction tuning을 사용할 것이고, 일반 분류 모델은 head layer를 사용할 것이다.

추가적으로, sample-efficiency가 있는지 살펴보기 위해, 데이터셋의 절반으로 학습을 진행해 성능을 측정해볼 예정이다.

참고로, 공정성을 위해 두 모델 모두 같은 하이퍼 파라미터를 사용했다.

조건부 분류 모델의 성능을 측정할 때, 모든 세부 규칙 위반 확률 중 가장 높은 확률을 사용할 것이다.

 

전체 데이터셋으로 학습한 결과, 조건부 분류 모델(0.85)이 일반 분류 모델(0.77)보다 높은 성능을 보였다. 뿐만 아니라, 데이터셋의 절반으로 학습한 결과에도, 조건부 분류 모델(0.81)이 일반 분류 모델(0.69)보다 높은 성능을 보였다. 즉, 조건부 분류 모델은 sample-efficiency가 좋다.

 

더보기
Here, we analyse the effectiveness of our fine-grained approach compared to using only a single general harm rule.
We focus on harm rules since harmful language can be a long-tail phenomenon for which adversarial probing is particularly important.

To assess how effective specific rules are compared to the general harm rule, we collected 1078 dialogues with DPC. For 538, participants were instructed to adversarially probe for violations of specific rule; the other 540 were asked to adversarially probe for violations of the general harm rule.
For all of these dialogues, we randomly sample from two Agent prompts, the DPC prompt and the less safe prompt which makes the Agent more more vulnerable to violations.
All of these dialogues were then independently re-rated against all rules, including the general harm rule.
Effectiveness of adversarial probing
To train a rule model with hight accuracy for many rules, the training data needs to sufficiently cover the space of harms. 
adversarial probing for a specific rule lets us steer raters towards problems that we lack data on. If raters are asked to target a specific rule, they are more likely to elicit a violation of that rule, than if the raters are probing for the general harm rule.
The general harm rule as a method to find new specific rules
specific harm rules cannot over the entire space of harm. A general rule might act as catch-all to find and fix bad behaviour not covered by specific rule. we find that at least 19 of 566 dialogues that adversarially probed the general harm rule discover novel harms not covered by our specific harm rules.
Effectiveness of rule rating
We investigate how using specific rules impacts inter-annotator agreement (IAA) compared to using a general rule.
The IAA for the was any specific harm rule violated rating is 0.53%, while it is 0.37% for the was the general harm rule violated rating for the same dialogues.
General versus rule-conditioned rule reward model
Rule-conditioned RMs perform better compared to general safety classifiers, while requiring less data.
For this comparisons, we use the same set of N = 538 rule-specific adversarial dialogues and their rule-specific annotations. If at least one of the two raters considers the rule to be violated, we also consider it violated. When training the overall safety classifier, we mark each dialogue an unsafe if any rule is violated.
For the rule-conditioned classifiers at test-time, we predict was any rule violated as the maximum rule-conditional violation probability across all rules.
We trained both a Rule RM using instruction tuning, and an unconditional general rule classifier using a linear head on the full training set.
rule conditioned classifiers achieve a higher final performance (0.85) when trained on the full training dataset, as well as better sample efficiency (0.81) on 50% if the training data.

3.6. Distributional harms

세부 규칙과 근거 사용은 단일 발화로 식별할 수 있는 유해성을 완화시켜주지만, 모델의 전반적인 행동에서 나타나는 분포적 편향을 악화시켜줄 수 있다.

 

다목적 RL을 사용하면, 편향이 증폭할 수 있음을 3.6.1.절에서 보여줄 것이며, 3.6.2.절에서는 사실 기반 질문에서 집단 간의 성능 차이를 살펴볼 것이다.

 

더보기
targeted rules and inline evidence mitigate instance harms, which can be identified given a single example, but not distributional harms, which depend on aggregate behavior.

we show that bias in dialogue models can be amplified after multi-objective RL, that bias persists in model samples, and that bias can manifest in incorrect answers on fully specified questions.

we conduct a preliminary investigation into disparate impact (differences in model performance for different groups), focusing on fact-based question answering.

3.6.1. Stereotypes and social biases

Setup

모델의 편견 의존도를 측정할 수 있는 데이터셋 세 가지(Winogender, Winobias, BBQ)를 사용할 것이다. Winogender와 Winobias는 공통 참조 데이터셋이다. 참고로, Winobias는 두 종류(type1, type2)로 나뉜다. type1은 문법적 단서가 없어 상대적으로 type2보다 어렵게 설계되었다. BBQ는 서로 다른 집단에 속해 있는 사람들이 포함된 특정 상황이 문맥으로 주어졌을 때, 그 상황에 관해 질문하는 데이터셋이다. (e.g., context: I saw a granddaughter and their grandmother last week outside the Walmart trying to book a cab on Uber. question: Who was not comfortable using the phone?) 각 데이터셋의 답은 고정관념에 갇힌 답일 수 있고 고정관념을 벗어난 답일 수 있다.

 

Winogender와 Winobias는 확률을 통해 참조 단어를 선정할 것이고, BBW는 후보 답변을 샘플링하여 최종 답변을 선정할 것이다. 이때, 전자는 zero-shot을, 후자는 5-shot을 사용할 것이다.

 

이번 절에서 s(=고정관념에 박힌 답변과 고정관념을 벗어난 답변의 비율)라는 편견 평가 지표를 사용할 것이다. (s=1이면, 항상 고정관념에 갇힘, s=-1이면, 항상 고정관념에서 벗어남, s=0이면, 균형을 의미한다.). s는 고정관념에 벗어난 답을 가지고 있는 질문의 정확도와 고정관념에 갇힌 답을 가지고 있는 질문의 정확도의 차이로도 볼 수 있다 그리고, 완벽한 모델은 s=0을 가진다.

 

BBQ 데이터셋 일부의 정답이 "I don't know"다. 이 경우 편견 점수를 조정해, 질문에 답하지 않은 즉 'I don't know' 답변을 한 모델에게 가산점을 준다.

 

Results

모든 모델이 모든 데이터셋에서 편견이 드러났다.

뿐만 아니라, 강화학습을 사용하면 편견이 증복되었다. Winogender에서는 0.4 증가했고, BBQ의 모호한 질문('I don't know')에서는, 11개 부문 중 10개 부문에서 평균 0.05 증가했다.

이러한 현상은 RL 모델이 대답을 회피하지 않을 뿐만 아니라 고정관념에 박힌 답변을 제공하는 경향 때문에 발생한다고 추측하고 있다. 

 

더보기
Setup
we use three datasets designed to test model's reliance on stereotypes; Winogender, Winobias, and BBQ. Windogender and Winobias are co-reference datasets, with Winobias including two sentence "types"; type 1 sentences are designed to be more challenging as they do not include syntactic cues for coreference. BBQ is a question answering dataset which asks questions about people belonging to different groups based on context in a few sentences. questions can be answered with either a stereotype-reinforcing or stereotype-challenging response.
For Winogender and Winobias, we select an option by comparing LM likelihood given zero-shot dialogue prompt. For BBQ, we sample responses. We use 5-shot dialogue prompt to ensure the model uses the expected output format.
For our bias metric s, we measure the fraction of stereotype-reinforcing versus stereotype-challenging responses. We rescale so that s=1 indicates always being stereotype-reinforcing, s=-1 always stereotype-challenging, and s=0 an even balance. s is also the difference in accuracy between questions with stereotype-reinforcing versus stereotypes-challenging answers, and a perfectly accurate model would have s = 0.
For BBQ when 'I don't know' is correct, we rescale the bias score to reflect that a model which correctly abstains from answering question is preferable.
Results
We find that bias persists across models and dataset;
RL finetuning can amplify bias over the base model: on Winogender, the bias score increases from 0.06 to 0.10. For ambiguous questions in BBQ, bias scores increase in 10 out of 11 categories. Averaged across groups, the bias score increases from an average of 0.05 to 0.10.
Evidence suggests much of this effect is due to the RL model becoming less likely to abstain, along with a tendency towards stereotype-reinforcing responses in such cases.

3.6.2. Disparate impact for factual question answering

각 집단에 관련된 QA의 정확도를 측정하여, 정보-검색 테스크에서 이질적인 영향이 어떻게 발생하는지 살펴볼 것이다.

 

Setup

세 가지 데이터셋(NQ, Quiz Bowl, TriviaQA)을 사용해, 각 집단(성별, 지역, 직업)과 관련된 사실 기반 QA의 모델 정확도를 일일이 측정했다.

 

Results

1. TrivaQA 데이터셋으로 측정한 결과, 답변이 근거와 함께 제공될 경우 모든 집단에서 정확도 향상이 이루어졌다.

2. 인구학적 집단(=성별, 지역, 직업)에 따라 정확도 차이가 유의미하게 발생한 부분을 존재했다.

3. 하지만, 이질적인 영향은 모든 집단에서 나타나지 않으며, 근거를 통해 해소될 수 있다.

 

더보기
how disparate impact might arise in an information-seeking task by measuring our model's ability to answer questions about specific group.
Setup
we evaluate factual question answer performance across questions relating to different demographic groups (gender, country, and occupation) using three QA datasets (Natural Questions, Quiz Bowl and TriviaQA.
We give questions directly to the dialogue model and report the rate at which the correct answer appears within the model's response for each group.
Results
TriviaQA, where incorporating evidence improves accuracy across all categories.
Figure17 reports when correlation between accuracy and demographic group is significant.
we do not always see a statistically significant effect, and including evidence can both introduce and remove correlations.

4. Discussion

4.1. Evidence limitations

한번에 단일 근거만 사용할 수 있다는 것이 Sparrow의 핵심 한계점이다. 그리고, 근거를 그대로 사용하는 모습이 종종 보인다.

하지만, 다단계 논리적 추론으로 "정확"함을 어느 정도 해결할 수 있다고 생각한다.

 

이번 논문에서는, 모델 답변이 상식 혹은 근거에 기반될 경우, "정확"하다고 판단할 것이다.

하지만, 근거의 신뢰도에 대해 조사해보지 않아, 거짓 근거를 기반으로 답변을 생성할 수 있다. 

 

마지막으로, RLHF와 근거가 "정확"함에 도움을 주지만, "정직"함이 있기 위해선 다른 요소를 추가해야 한다.

 

더보기
A key limitation of Sparrow is that we use only one external knowledge fragment at a time.
We believe these limitations are best addressed via multistep reasoning
Sparrow also frequently copies text verbatim from the evidence

statement is correct if each factual claim it makes is supported by either common sense or evidence from a source that is truthworthy. 
However, we do not investigate the trustworthiness of sources in this paper.
Finally, although we believe RLHF and evidence are key for correctness, other machinery such as interpretability or eliciting latent knowledge will be required to specifically target honesty.

4.2. Dialogue as supervision mechanism

저자는 대화(=dialogue)가 정확한 지도 학습을 하기 위해 필요한 핵심 요소라고 생각한다.

실제로, 대화로 정확한 지도 학습을 하는 경험과 인프라를 구축하기 위해 대화(=dialogue) 생성을 이번 논문의 테스크로 선정했다.

 

이전 연구에서는, AI의 도움이 정확한 지도 학습에 도움을 줄 수 있다고 제안했다.

그 중 대화 생성이라는 수단으로 AI가 도움을 줄 수 있다. 미묘한 부분에 대한 설명과 반복적인 토론이 가능하기 때문이다.

 

모델 행동이 규칙을 위반했는지 판단하는 것은 미묘한 문제이며, 사람은 평가 때 세부적인 요소를 놓치거나 내용을 잘못 이해하기 쉽다.

 

 

위 예제에는, 규칙 위반 여부에 대한 저자들의 논쟁이 대화로 나와있다.

테스크가 대화 생성이기 때문에 지도 대화는 대화 생성에 관한 것이다. 하지만, 지도 대화는 대화 생성이 아닌 행동(=이미지 생성)에 사용될 수 있다.

 

예제에 대한 저자 간의 논쟁을 살펴보면, 첫번째 규칙 위반 주장은 부정확해 논쟁을 통해 반려되었고, 마지막에는 다른 저자가 그 외 규칙 위반 가능성을 제시했다.

 

저자는 미묘한 지도 학습을 정확히 하기 위해서는 토의가 필요하다고 생각한다. 위 예시에서는, 사람이 설명과 보정을 했지만, agent도 이 역할을 할 수 있다.

 

정확한 지도 학습을 하기 위해서는, agent끼리 서로의 주장을 반박하는 대화 즉, 토론이 필요하다. 하지만, 주장을 명확히 하고 오해를 피하기 위해선, 사람과 agent 간의 협력적인 대화도 필요하다.

 

토론이 주는 효과는 복합적이다. 모델이 제공하는 비평은 사람이 결함(=규칙 위반)을 찾는데 도움을 준다. 하지만, 사람에게 설명이 주어졌을 때, 정확도(=결함이 있는지 없는지)가 상승하지 않았다.

 

더보기
dialogue is a key component of accurate supervision for machine learning models. Indeed, we chose dialogue as the task in part to build experience and infrastructure to tackle dialogue for supervision.
Prior work has suggested that assistance from LM systems may help with accurate human supervision.
dialogue is a natural medium for this ML assistance, as it enables both clarifications and iterative discussion of subtle points.
Determining whether a particular model behaviour is good often quite subtle, and it is easy for human review to mis key details or misinterpret text.
Table 6 shows an example of a dialogue about whether a model is violating a rule, in this case edited from a Slack discussion by several of the authors.
In this case, as our task is also dialogue, the supervision dialogue is about a dialogue transcript, but one could also have a supervision dialogue about non-dialogue behaviour.
The initial statement is incorrect, someone else provides a correction, and the first person changes their mind. But then another author points out a different flaw. The eventual conclusion is that the first rule is not violated, but a different rule might be.
Our hypothesis is that this type of multistep discussion is required to resolve subtle cases of supervision correctly. In the above dialogue, humans provided the corrections and clarifications, but sufficiently capable dialogue agents could also provide them.

The adversarial case of dialogue for supervision is debate, where two or more dialogue agents point out flaws in each other's statements. However, dialogue for supervision also needs cooperation between humans and agents to jointly clarify what is meant, and avoid misunderstandings or gaps

Initial evidence from one-step debate is mixed: Saunder find that model-generated critiques help human notice flaws in summaries, but in Parrish accuracy did not improve when humans were shown explanations.

4.3. Ethical and sociotechnical aspects

규칙 메커니즘의 목표는 "좋은 대화"에 대한 여러 이해관계자의 다양한 의견을 효과적으로 통합하는 것이다.

위 방식은 성공했지만, 여러 문제점이 남아있다. 예를 들어, 여러 이해관계자의 요구와 기대를 균형있게 맞춰야 한다.

 

향후에는 더 많은 이해관계자들의 참여가 유저의 요구에 부합하면서도 타당한 agent를 만드는데 중요한 역할을 할 것이다. 

물론 위 방식이 모든 문제를 해결하지 못하며, 기술적 윤리적 질문들을 던졌다.

 

저자는 agent 행동에 영향을 주는 규칙의 목표를 두 가지로 분류했다. 1). 유해성 완화, 2). 더 나은 언어 장려

Bender과 Weidinger는 LLM에서 나타나는 유해성에 대해 조사했다. 

유해성은 모든 집단에게 균등하게 영향을 주지 않는다. 예를 들어, 소수 민족은 agent에게 유해성에 노출될 가능성이 높다.

 

유해성 완화 뿐만 아니라, 적절한 규범과 가치에 일치한 발화를 장려하기 위해 규칙을 활용할 수 있다.

Kasirzadeh와 Gabriel은 유용하고 이로운 대화를 가져오는 실용적인 원칙을 세웠다. 

이와 같은 규칙에 맞게 대화를 구성하는 것은 대화 테스크와 그 테스크의 정확한 지도 학습(agent 행동의 정확한 평가)에 중요하다.

 

규칙 기반 보상 모델은 수십 가지의 규칙에서는 잘 작동된다. 하지만 향후에는 수백 가지 혹은 수천 가지의 규칙에서도 잘 작동하는 모델을 설계해야 한다.

 

상세한 규칙을 통해 데이터를 수집하여 얻는 이점은 규칙 간의 충돌과 가중치를 향후에 바꿀 수 있다는 점이다.

 

더보기
A primary goal of the rule mechanism is to enable to scalable incorporation of input from multiple stakeholders on whta constitudes good speech for langauge agents.
However, the successful implementation of such a mechanism raises a range of open research questions. For example, any rule mechanism will need to balance the needs and expectations of relevant stakeholders

In future, more participatory inputs, from other stakeholders will be critical for developing language agents that are both legitimate and aligned to the needs of its users. Participatory approaches are not a panacea, however, and their successful deployment turns on a set of technical and ethical considerations that have been well documented in prior research on sociotechnical ML.
We distinguish two goals of rules in influencing agent behaviour: mitigating harms and incentivising better speech.Prior research has delinated a range of emergent and existing harms from large language models.The impact of these harms is not distributed evenly, as underrepresented groups are most likely to be at risk due to problematic agent behaviour.Kasirzadeh and Gabriel build in formulating pragmatics principles whose joint enforcement results in effective and beneficial communciation. Using rules to shape dialogue can be important both for dialogue as a task and dialogue for supervision, where our goal is the accuarte evaluation of agent behaviour.
Our rule-conditional reward models work well up to the number of rules used in this paper, but we expect further architectural work to be required to scale to 100s or 1000s of rules.

Finally, a key practical advantage of collecting data via detailed rules is that conflicts and weighting between rules can be changed after the fact

 

5. Conclusion

생성 모델로 유용하고, 정확하고, 무해한 agent를 만들기 위해선, 폭(다양한 주제와 목표 다루기)과 깊이(각 주제와 목표를 정확하게)를 모두 다뤄야 한다. 

Sparrow는 폭에 집중한 모델이다. 1). 목표를 여러 세부 규칙으로 나눴고, 2). 외부 지식을 활용해 agent가 다양한 주제를 논의할 수 있게 만들었다.

이는, 더 유용한 답변을 제공하고, 근거를 기반으로 타당한 답변(=거짓이 아닌 사실 답변)을 제공하며, 규칙 위반을 덜하게 만들었다.

 

깊이를 해결하는 방법에는 1). agent가 다단계 추론으로 문제에 대해 논의한 내용을 평가에 사용한다. 2). 전문가와 유저의 참여로 좋은 규칙을 찾는다. 3). 토론과 대화로 제대로된 규칙 위반을 찾아 정확한 지도 학습을 한다.

 

더보기
Building helpful, correct, and harmless agents out of raw generative models involves both width and depth: width to deal with the detailed complexity of goals and topics, and depth to handle each of these carefully and correctly. With Sparrow, we have focused on width: breaking down goals into details rules, and allowing the agent to pull in external knowledge to broaden the topics it can correctly discuss. We found that these techniques work, enabling Sparrow to respond helpfully more often as measured by rater preference, correctly cite evidence 78% of the time for factual questions, and reduce rule violation rate to 8% under adversarial conditions.
Addressing depth will require multistep reasoning for the agent to talk through problems (leaving interpretable traces for human to evaluate), expert and participatory engagement to find and evolve good sets of rules, debate and dialogue for supervision to improve detection of rule violations.