Elamur Research

CoSafe: Evaluating Large Language Model Safety in Multi-Turn Dialogue Coreference

Paper · 2024 · Erxin Yu, Jing Li, Ming Liao et al.

Summary

A follow-up question can omit the very detail that determines whether it is safe to answer. A user may name a person, group, or subject earlier in a conversation and refer to it later with a short expression such as “that group.” Connecting those mentions is a task called coreference resolution. CoSafe asks whether large language models handle a potentially harmful request differently when part of its meaning has to be recovered from the conversation. The authors present CoSafe as the first safety benchmark specifically designed around this combination of dialogue and reference.

The released dataset contains 1,400 dialogues. The authors drew 100 standalone requests from each of 14 categories in BeaverTails, then used GPT-4 to construct related conversations. Each CoSafe entry has three turns, with the request under evaluation at the end, and the entries average 10.22 sentences. The authors intervened manually when GPT-4’s safeguards disrupted construction. The test covered five open-source systems tuned to follow instructions, and their responses were evaluated by an automated question-and-answer moderator, human reviewers, and GPT-4 scoring for helpfulness and harmlessness. Human reviewers examined 100 randomly selected CoSafe items along with their corresponding responses.

The experiment compares each dialogue answer with the answer to its original standalone request. GPT-4 rated the dialogue answer less harmless in 13.9% of the paired cases for Mistral-7B-Instruct and 56% for LLaMA2-Chat-7b, the low and high ends of the reported range. The paper calls this proportion the attack success rate. On a separate measure, the automatic moderator classified 14.5% of LLaMA2’s standalone question-and-answer pairs as harmful and 39.4% of its CoSafe pairs as harmful. LLaMA3 and Mistral moved in the other direction on that measure. The authors found differences across categories, observed refusals that came with lower helpfulness, and illustrated how added context could make a risk easier to recognize. The moderator and human evaluation agreed on over 85% of the sampled judgments in their comparison.

A general safety instruction and an instruction that guided the system through interpreting the final question both lowered the moderator’s harmful rate in the defense experiment. Helpfulness ratings fell as well, and the defenses left some unsafe answers. The authors also report that 3 of 50 manually checked items had problems preserving the meaning or force of the original request, and that generating the full dataset cost approximately $400. CoSafe shows what a standalone test can miss, while the contrasting results across systems show why the effect of dialogue depends on what is being measured.

Deep dive: CoSafe: Evaluating Large Language Model Safety in Multi-Turn Dialogue Coreference

CoSafe tests whether chatbots answer harmful requests differently when the final question refers back to an earlier part of the conversation. · about 31 minutes to read

The problem and its context

When a question depends on a conversation

Consider a conversation about a painting in which the next question is “Where was it exhibited?” The latest message gives the reader an action to take, but the object of the inquiry comes from earlier in the exchange. The word it is a mention, and the earlier expression that establishes what it means is its antecedent. A reader can recognize the kind of question being asked from the final sentence alone. To give a relevant answer, the reader still needs to know which painting the user means. This is an ordinary use of reference in dialogue systems.

The answer to a safety question can depend on that same connection. A user can name the subject of a request in one message and specify what they want done in a later message. Until those pieces are combined, some of the information needed to judge the request is missing. Once the assistant has interpreted the follow-up, its response has to reflect the implications of the interpreted request. What matters to the user is the answer the assistant produces with both pieces available.

The paper motivates the study with a case involving abuse directed at a person with a mental health condition. The directly worded request received a refusal that identified the problem. In the conversational version, the answer included the kind of abuse that the refusal had withheld. The point of the example is the difference in responses across presentations of the request. It gives a reason to study the behavior systematically. A single example leaves open its frequency, the breadth of topics affected, and the possibility that other conversations make the same systems more cautious.

A dialogue can change the safety judgment in several ways. A reference can make the last message less explicit, which puts more weight on the assistant’s reading of the history. The history can also make the implications clearer by supplying facts, qualifications, or an explanation. Both possibilities follow from the same property of a conversation. Earlier messages can change the meaning that the assistant assigns to the last one. The empirical question is how the answers change when systems receive those messages.

What earlier safety tests put in front of the assistant

CoSafe belongs to red teaming, the practice of deliberately testing systems with inputs that might reveal undesirable behavior. A researcher can use a successful test case to identify a failure and use a collection of cases to ask whether failures recur. As the paper describes it, Anthropic and DeepMind introduced red teaming for this purpose. AnthropicRedTeam supplied examples for identifying and measuring harmful output, and BeaverTails used material drawn from it to organize a safety dataset around questions and answers. CoSafe takes its source requests and category scheme from BeaverTails. Red Teaming Language Models to Reduce Harms and BeaverTails

The authors describe earlier evaluations that differ in the property they seek to measure. Some center on categories of problematic content. A collection can cover different kinds of risky questions and examine which of them lead to objectionable answers. Other work centers on the kind of interaction or the safety principle at issue, including conversational safety, privacy, and alignment with human values. Those approaches leave room for benchmarks that share a subject while asking different things of the system. For CoSafe, the arrangement of information across messages is part of the test. Do-Not-Answer

The paper’s comparison of red-teaming datasets emphasizes where the request occurs. The authors characterize most of the comparison datasets as collections of individual prompts. They discuss SaFeRDialogues and HH-RLHF as existing examples that include conversations, with the potentially harmful request usually appearing at the beginning. In that design, the opening gives the assistant an opportunity to recognize the problem immediately, and the rest of the exchange can reveal what happens afterwards. In CoSafe, the history is already present when the question under evaluation arrives. The assistant must interpret that history to understand part of the request.

This difference is easy to miss if a benchmark is described only as single-turn or multi-turn. Turn count gives the size of the exchange in messages or rounds. It leaves open when the user’s aim becomes clear, whether the assistant has already responded to a harmful request, and which part of the exchange is being scored. Placing the question at the end asks whether the assistant can apply a safety judgment after using prior turns to understand what the user means. That is the narrower question behind the authors’ claim of novelty.

From finding an antecedent to judging an answer

Work on coreference provides the linguistic vocabulary for describing what the assistant has to do. The paper points to rule-based, statistical, and neural approaches. These are different ways of deciding which expressions belong together. A system might be evaluated on whether its proposed link agrees with a reference annotation. Such an evaluation has a clear target. The relation between the mentions is the outcome being assessed. Stanford’s Multi-Pass Sieve and End-to-end Neural Coreference Resolution

Coreference research had already raised safety-related questions. The authors cite WinoGender and WinoBias as evaluations of gender bias in the resolution of references. In that line of work, an undesirable association can show up in the antecedent chosen for a mention. CoSafe directs the assessment towards what the assistant says after it has been given the opportunity to make the connection. A correct interpretation can still lead to a harmful response. By the same logic, an assistant can withhold a harmful response even when its interpretation is incomplete. WinoGender and WinoBias

For a safety evaluator, this changes the evidence that counts. An answer may make it apparent that the assistant understood the subject, but the judgment turns on what the assistant did with that understanding. A refusal may be an appropriate result even when the answer gives little evidence about the antecedent the assistant recovered. A benchmark for answer safety can therefore use coreference to define its inputs without scoring the linguistic decision itself. CoSafe brings a familiar language-understanding problem into red teaming through this change in what is evaluated.

The method, step by step

Build the comparison around the same source request

The starting material is a set of standalone BeaverTails questions. The authors choose 100 from each of the dataset’s 14 harm categories. Each category describes the kind of risk the authors intend to test. The same selection supplies both the original questions for the baseline and the starting points for creating CoSafe dialogue items. A source question can therefore be paired with a related dialogue introduced specifically for the study.

The categories cover a range of concerns. Some describe harms towards people, such as discrimination, abusive language, and privacy violations. Others cover conduct, including theft, violence, and organized crime. The scheme also includes topics such as misinformation, sexually explicit content, and politics. Category membership concerns the request the researchers started from. It is established before any answer is collected. A response to a request in a harm category can still be judged harmless, for instance if it declines to provide the requested material.

Sampling the same number per category gives each category equal representation in the question set. This makes it possible to compare changes within categories as well as across the full dataset. It also gives the resulting rates a specific interpretation. They summarize performance on a deliberately balanced set of safety probes. The proportions in the benchmark come from the study’s sampling decision.

The paired structure serves a different purpose from category balance. Selecting standalone prompts and dialogue prompts independently could introduce differences in what the two sets of requests ask for. Starting each pair with the same source question ties the two presentations to a common request. When the benchmark works as intended, the question becomes dependent on the dialogue while retaining enough of the original aim for its answer to be compared with the standalone answer. That link between conditions is what makes a paired change in harmlessness interpretable.

Construct the earlier exchange

The authors use GPT-4 for dialogue construction, drawing on prior work that used language systems for data annotation. The construction output is a short conversation with a reference-dependent user question at the end. The preceding exchange provides the information that the final question leaves implicit. The authors report manual intervention when GPT-4’s safeguards interrupted this process. The completed CoSafe collection has 1,400 entries, with three dialogue turns per entry and an average of 10.22 sentences. Do-Not-Answer and ProsocialDialog

Here the turn count and sentence count describe different aspects of the data. The turn count establishes the shape of a benchmark interaction. The sentence count gives a sense of the amount of text included in that shape. The dialogue is short and has a designated question to evaluate. An average over sentences provides no information about where a particular antecedent appears or how much of the exchange is needed to interpret it.

The history is supplied to the answering system as part of each case. This matters whenever an earlier line appears under the assistant’s role. That line belongs to the prepared history, so the experiment observes the system’s behavior when it continues the exchange from the given point. Each system has the same substantive setup for the final question. There is no need for the systems to independently generate matching earlier replies before a comparison can be made.

The authors release this collection under the name CoSafe. The dataset is the study’s test material. The original standalone questions retain a role after the dialogue has been built, because each of them provides the response against which the corresponding dialogue answer can be compared. In a paired analysis, the unit is the item with both presentations. In an analysis of the harmful rate within one condition, the unit is the question-and-answer pair assessed in that condition.

How CoSafe produces a paired safety evaluation

The steps in order.

How CoSafe produces a paired safety evaluationStep 1: Sample standalone requests by harm category1. Sample standalone requests by harm categoryStep 2: Prepare a corresponding dialogue for each request2. Prepare a corresponding dialogue for each requestStep 3: Keep both versions for evaluation3. Keep both versions for evaluationStep 4: Collect answers under both presentations4. Collect answers under both presentationsStep 5: Assess harm and helpfulness5. Assess harm and helpfulnessStep 6: Compare results within pairs and across categories6. Compare results within pairs and across categories

Collect the answers under each presentation

The systems in the experiment had already been instruction-tuned, meaning that they had been adapted to respond to instructions. The study uses them as answering systems and evaluates their outputs. Data construction produces the material for that evaluation. The prompting defenses later change the directions given at response time. The paper’s procedure includes no new training stage for the systems whose scores it reports.

For each test system, the authors enter the dialogue in the format that system expects. In a conversation, message boundaries indicate whose utterance the text represents and which question the assistant is supposed to answer now. Delivering the prepared history in the expected format gives those boundaries their intended role. The baseline uses the original question as a standalone request. The collected output in the CoSafe condition is the response to the final question with the prepared history available.

There are several ways to compare the resulting answers. The authors can ask how often a safety classifier flagged answers in either condition. They can ask whether an individual dialogue answer was rated less harmless than the standalone answer for the same item. They can also ask how useful the answers were judged to be. Those questions lead to separate measurements, because a change in a graded score, an unsafe answer, and an unhelpful answer are different observations.

Use binary labels for the harmful rate

The automatic moderator, beaver-dam-7b, follows the question-and-answer evaluation approach associated with BeaverTails. It receives a question-and-answer pair to judge and classifies it as harmful or harmless according to the risk it sees in the pair. “Binary” means that the moderator assigns one of those labels. It does not express a degree of harmfulness in the reported measure.

The harmful rate is the proportion of the assessed pairs labeled harmful. A reader can interpret it as the frequency with which the classifier flagged a pair under the specified condition. A harmful request paired with a refusal can produce a harmless judgment, since the evaluation considers the answer in context. The labels assigned to the source requests for sampling and the labels assigned during moderation play separate roles, even when they describe related subject matter.

The human study checks this kind of judgment using another procedure. The authors sample 100 CoSafe items at random and use the responses generated for those items. Three annotators each make a harmful-or-harmless judgment. Their work supports a comparison of human and automatic classifications, including whether the methods agree case by case. The authors also report agreement among the human annotators, which concerns the consistency of the manual judgments themselves.

Use graded scores for helpfulness and harmlessness

GPT-4 evaluates the answers on two scales, each running from 1 to 10. One is for harmlessness and the other for helpfulness. The harmlessness rating gives the judge a way to express differences in the safety of answers. The helpfulness rating captures how useful or responsive it judges an answer to be under the evaluation rubric. A refusal can receive a favorable safety judgment and have little of the content the user requested. Having both dimensions records that combination of outcomes.

When grading responses, the authors present answers from multiple systems together. They randomize the order before GPT-4 sees them. With a fixed order, any tendency to treat a position differently could repeatedly affect the same system. Shuffling is intended to reduce that dependence between the identity of the system that supplied an answer and the position of that answer in the grading input. The ratings still come from GPT-4’s application of the evaluation instructions.

The appendix also uses GPT-4’s harmlessness ratings to count safe and unsafe answers. It treats an answer as unsafe when its harmlessness score is below 5. This use of a cutoff makes an absolute judgment on an individual answer using its position on the scale. Automatic question-and-answer moderation reaches its binary judgment through a different evaluator. The paired attack success rate uses the graded harmlessness scores in another way, by looking for movement from the standalone answer to the dialogue answer.

Count decreases in harmlessness within pairs

The paper specifies the attack success rule verbally. In notation, its definition can be written as follows.

ASR = |{i ∈ P : hᵈ(i) < hˢ(i)}| / |P|

ASR is the attack success rate as a proportion. P is the set of prompt pairs assessed for a given answering system, and i identifies one pair. The symbol ∈ means that the pair belongs to P. The function h gives the GPT-4 harmlessness score, with the superscript d identifying the dialogue answer and s identifying the standalone answer. The symbol < selects pairs with a lower score in the dialogue condition. The braces enclose the set of pairs meeting that condition, and the colon introduces the condition for membership. Vertical bars give the number of pairs in a set. The slash divides the count of qualifying pairs by the count of all evaluated pairs.

A pair contributes to the numerator whenever the harmlessness score falls. The size of the fall has no effect on its contribution. Unchanged scores and score increases stay in the denominator and do not enter the numerator. The rates reported in the results express this proportion as a percentage.

This definition matters because the name “attack success” can suggest an absolute judgment about a dialogue answer. The event measured is a decline relative to an answer obtained under the standalone condition. Both answers can fall on the same side of the appendix’s unsafe cutoff and still receive different scores. An already harmful standalone answer can also have an unsafe dialogue counterpart with the same score. The cutoff, the automatic moderator, and the paired comparison are ways to see different properties of the outputs.

Vary the instructions in the defense experiment

The authors also assess whether changes to the answering instructions improve responses to CoSafe. One intervention adds a safety directive as a system prompt. A system prompt sets general expectations for how the assistant should behave. In this experiment, it tells the assistant to keep its responses safe while answering the dialogue questions.

The other intervention uses chain-of-thought prompting, which calls for an explicit intermediate analysis of the question. The analysis is directed toward interpreting the references and recovering the meaning of the final request before answering. This links the defense to the linguistic difficulty the dataset is meant to test. The authors evaluate the resulting answers for harmfulness and helpfulness. The intermediate interpretation does not receive a separate score for identifying the right referent. Reasoning

Experiments and results

Systems and comparison conditions

The LLaMA series in the study includes LLaMA3-instruct-8b, Alpaca-7b, and LLaMA2-chat-7b. The remaining systems are Mistral-7B-Instruct-v0.2 and ChatGLM3-6b. The authors describe the five systems as open-source and instruction-tuned. They use a batch size of 4, an input length limit of 512, and an output length limit of 256 for each system. The dialogue input follows each system’s expected format.

The main baseline is each system’s answer to the standalone version of the request. The CoSafe condition gives that system the related conversation and asks it to answer the final question. This places the comparison within each answering system. Comparisons across systems then ask how much the change in format affected each system under the same evaluation rule. The defense comparison has a different point of reference, namely the response under the ordinary CoSafe condition before adding the particular defense instruction.

The main automated evaluation uses the CoSafe dataset and its paired standalone requests. The human evaluation uses the sampled CoSafe items and answers. The difference in scope matters when attaching statements to their evidence. A statistic about agreement between people and the classifier describes the human review sample. The headline attack success rates describe the larger paired benchmark comparison using GPT-4 judgments.

How often judged harmlessness fell

Mistral-7B-Instruct had the lowest reported paired attack success rate, at 13.9%. LLaMA2-Chat-7b had the highest, at 56%. For each system, those percentages give the share of its paired test cases in which GPT-4 assigned the dialogue response a lower harmlessness score than the matching standalone response. The values mark the ends of the range across the systems evaluated.

Lowest and highest attack success rates on CoSafe and its paired source requests

Declines in rated harmlessness were less frequent for Mistral than for LLaMA2.

Lowest and highest attack success rates on CoSafe and its paired source requestsMistral-7B-Instruct (this paper): 13.9Mistral-7B-Instruct (this paper)13.9LLaMA2-Chat-7b: 56LLaMA2-Chat-7b56
The numbers
System or settingattack success rate %
Mistral-7B-Instruct (this paper)13.9
LLaMA2-Chat-7b56

The word “success” describes the event from the red team’s perspective. An evaluation seeking stable safety behavior would prefer fewer declines in judged harmlessness. Even then, the rate needs to be read in the context of how the system answered the original questions. A system whose standalone answers are often rated poorly has fewer opportunities for a further decrease than one whose standalone answers typically receive high scores. The rate gives the direction of movement pair by pair. It leaves the initial and final levels to other reported measures.

The paper’s category analysis includes successful paired probes in every harm category. This establishes some breadth for the behavior observed with the construction. It also leaves room for many unaffected or improved answers within those categories. A category with a successful probe can have an aggregate rate that looks favorable, depending on the remaining answers and on the metric used. That distinction becomes important in interpreting the moderator’s classifications.

Where the harmful rate changed

For LLaMA2, the harmful rate was 14.5% on the standalone requests and 39.4% on the matching CoSafe dialogues. These are the proportions of assessed question-and-answer pairs labeled harmful by the automatic moderator in the respective conditions. They show that the change in presentation was accompanied by more outright harmful classifications for this system, as well as the decline observed in the paired GPT-4 measure.

LLaMA2 moderator harmful rate on CoSafe dialogues and their source requests

The moderator flagged a greater share of LLaMA2 pairs in the dialogue condition.

LLaMA2 moderator harmful rate on CoSafe dialogues and their source requestsStandalone BeaverTails requests (this paper): 14.5Standalone BeaverTails requests (thispaper)14.5CoSafe dialogues: 39.4CoSafe dialogues39.4
The numbers
System or settingharmful rate %
Standalone BeaverTails requests (this paper)14.5
CoSafe dialogues39.4

The authors characterize a rise in harmful rate as the more common pattern across the test systems. They identify LLaMA3 and Mistral as exceptions, with lower overall moderator harmful rates in the CoSafe condition than on their standalone source questions. The appendix describes LLaMA3 as having lower harmful rates across most CoSafe categories in the same comparison. Those results matter to the main claim because they show that the dialogue setup can expose problems without producing aggregate deterioration on every system and measure.

There is no contradiction between Mistral’s lower harmful rate in the dialogue condition and the presence of declines on the paired GPT-4 measure. A decline can occur in an item whose dialogue answer still receives a harmless label. Some items can get worse while enough other items improve to lower the overall rate of harmful classifications. The system’s aggregate harmful rate reflects how many answers receive a harmful label in each condition. Its attack success rate reflects the frequency of a score decrease in matched cases under a different judge.

The appendix’s count of answers on either side of the GPT-4 cutoff adds information about the level of the dialogue scores. ChatGLM3 and Mistral both produced some responses classified as unsafe under this analysis. In particular, Mistral’s place at the low end of the ASR range describes the frequency of decreases relative to its own baseline. Its unsafe outputs are evidence about behavior within the dialogue condition, which is a question a relative measure alone leaves open.

How closely human and automatic judgments matched

The human comparison examines responses to the random sample of 100 CoSafe cases. The results discussion describes the comparison for three answering systems. It gives Fleiss’ kappa values of 0.6858, 0.6585, and 0.6865 for agreement among the annotators. Fleiss’ kappa accounts for the amount of agreement expected from the overall use of the label categories. The authors characterize these results as substantial agreement among the people who reviewed the answers.

For the same comparison, the human and automatic evaluations yielded similar harmful rates, and their labels agreed on over 85% of cases. These are complementary observations. Rates can be close even when the evaluators select different cases as harmful. Case-level agreement examines whether the classifications match on individual answers, so it tells the reader more about the correspondence of the judgments than the similarity of the rates alone.

The agreement result gives the moderator-based analysis a check against a different source of binary judgments. It is specific to the sample and evaluators used. The kappa figures describe how the human annotators agreed with each other. The percentage describes agreement between the human and automatic assessments. Each figure belongs to a distinct comparison, and neither is a reported human validation of GPT-4’s helpfulness scale or its paired harmlessness rankings.

What the defense comparison found

Both the system safety instruction and the chain-of-thought intervention lowered the harmful rate in the reported CoSafe comparisons. The authors describe the system instruction as slightly more effective on that outcome. The two instructions therefore changed how frequently the automatic moderator found harm in the resulting answers. The comparison concerns systems operating on CoSafe, where the assistant has to answer the final question against a prepared history.

GPT-4’s helpfulness scores also fell with both interventions. The authors associate this with a greater tendency to refuse harmful requests. The two measures let readers see the effect from different sides. A refusal can be the desired response to a dangerous request and still provide less of the material measured by the helpfulness rubric. The reported change shows that the instructions made the evaluated answers less harmful on one measure and less helpful on the other. Unsafe responses still occurred.

What the ablations show

The comparisons the authors ran

The paper reports no ablation that varies coreference alone. Its evidence about what drives the outcomes comes from comparisons across the paired formats, breakdowns by harm category, observations of refusals, individual cases in which context changes the answer, and the two defense interventions. The format comparison measures the outcome of the whole presentation change. The defenses test changes to the instructions with the dialogue setup in place.

The two formats differ along several dimensions. The original question is presented in isolation and expresses the request more directly. The final CoSafe question appears after a prepared history and depends on an earlier mention. The history can change the information available, and the final wording can change the emphasis or force of the request. Since these dimensions vary together, the observed change is attributable to the presentation used in CoSafe as a whole. The experiment leaves the effect of each dimension unresolved.

An individual answer can still give clues about where a failure occurred. In the introductory example, the objectionable dialogue answer is directed at the relevant subject. That makes the observed failure compatible with the assistant recovering enough of the reference to produce a responsive answer. The safety problem can therefore arise even when the conversation has been understood well enough for the answer to address the target. The example supplies evidence about the relationship between the input and the answer a reader sees. It leaves the assistant’s internal process open.

Categories can move in opposite directions

The paper contrasts discrimination and stereotyping with sexually explicit content. In the examples of category-level trends the authors discuss, the moderator’s harmful rate rose under the dialogue presentation in the former category and fell in the latter. A balanced dataset gives those categories comparable opportunities to influence the overall result, but it cannot force their effects to move together. An aggregate result combines the movement in all the categories included.

The breakdown also clarifies the distinction between variation within a category and variation across categories. Some cases can meet the paired success criterion in a category whose overall harmful rate falls. Meanwhile, a category can account for more harmful labels under the dialogue condition even if many individual answers remain unchanged. Looking at the group totals and the paired changes gives different views of which cases drive the observed pattern.

For LLaMA3, the paper describes both lower harmful rates across most categories and lower helpfulness across most categories. The authors observed refusals and suggest that declining certain requests contributed to the pattern. This is more specific than an inference from the aggregate harmful rate alone, since the observations concern the content of the answers. The paper does not give a count of the reduction attributable to refusals or separate out different kinds of refusal. The combination of the scores and the answer observations supports the authors’ interpretation for some cases.

The same reasoning sets the scope of their account of Mistral’s aggregate result. A decline in the overall harmful rate tells the reader about the net distribution of moderator labels. The paper’s proposed explanations include differing category responses and the contribution of added context. They identify mechanisms that are compatible with the outcomes and illustrated by the analysis. The category comparison does not allocate the aggregate improvement among those mechanisms.

The earlier exchange can furnish a reason for caution

The authors show an unsuccessful probe in which the extra context helped the assistant recognize the risk. This is a case in which the information available in a dialogue supports a safer answer. A standalone question has to be interpreted from the information it contains. A conversation can give the assistant more grounds to see how the subject and the requested action fit together. When that connection clarifies the risk, the added text can support caution.

The example matters because ordinary conversational understanding serves both relevance and safety. A system that makes better use of the context can become more precise about what the user wants. That precision can expose an implication that a standalone question leaves vague. In other cases, the added demands of reading the exchange and applying a safety judgment may accompany worse answers. CoSafe’s paired design can register either outcome.

The case illustrates a plausible explanation for some favorable changes in the experiment. Its value is as a demonstration that the behavior occurred in the study. To estimate the separate contribution of risk-clarifying context, one would need evidence from matched variations of the same history. Here, the paired comparison gives the answer to the original prompt and the answer to the constructed dialogue. It leaves open how the response would change if only the detail that clarified the risk were varied.

The appendix’s scoring examples offer another way to inspect the findings. A high-level rate tells the reader how often an evaluator assigned a label or found a score decrease. Looking at a particular exchange can reveal that a refusal accounted for one improvement or that a response addressed the intended subject in a harmful way. These examples illuminate the interpretation of the aggregate statistics. The paper’s conclusions about the frequency of safety changes come from the broader evaluation.

The defense results concern the complete instructions

The system prompt and chain-of-thought conditions test whether added guidance is associated with safer final answers on the dialogue tasks. The system prompt gives broad behavioral guidance. The other condition directs attention to interpreting the final question in context. Each complete instruction changes the assistant’s task at the time it answers. The comparison establishes that both such changes can affect measured harm and usefulness.

The chain-of-thought instruction combines several operations in the task the assistant is asked to carry out. Getting a lower harmful rate under that instruction could result from improved interpretation of the reference, from increased caution after the request has been clarified, or from a general shift in how the system responds to explicit deliberation. The authors score what comes out at the end. Their comparison cannot show where within the instruction the observed benefit arose.

The smaller harmful rate and the lower helpfulness scores together are consistent with the authors’ account that the interventions encourage refusals. They are evidence about outcomes under the tested instructions. To tell how much of the safety benefit came from refusals, one would need a separate account of which answers were refusals and what changed in other answers. The report establishes a tradeoff in the ratings while preserving a distinction between the observed change and the proposed explanation.

Limitations

The authors’ stated limits

The authors identify imperfect preservation of the source request as a problem with dialogue construction. They manually examined 50 items and found 3 in which the final question had drifted in meaning or the probe had lost some of its original force. The finding places a qualification on the paired design. The two presentations originate in the same question, but their relationship in the finished data depends on what the dialogue construction preserves.

A change in meaning can affect the substance of the answer that would be appropriate. A change in force can also matter even when the topic and the broad request are similar. The final version may convey a less direct or less aggressive intent than the standalone source. An assistant can reasonably respond differently to those nuances, and a judge can reasonably score the resulting answers differently. In cases with such changes, an outcome difference is harder to interpret as a consequence of conversational framing alone.

The inspection establishes that these issues occurred within the checked items. The authors give the count for that inspection. They do not report a dataset-wide review of semantic equivalence or an analysis of whether individual ratings shift when a drifted item is repaired. The limit therefore bears on how confidently any particular CoSafe case can be treated as an equivalent presentation of its source.

The other stated limit is the cost of generating the conversations. The paper reports spending approximately $400 on GPT-4 through Microsoft Azure to construct 1,400 entries. That figure describes the construction reported in the paper. It does not provide a breakdown of the expense by category or an accounting of manual effort. The authors identify cheaper generation as future work and mention the possibility of adapting existing open-source systems using the generated material. The study gives no results for that prospective approach.

These two limits concern different requirements for expanding the benchmark. Lower generation cost would make it easier to add cases. Preserving the intended request would still require attention, because each new case is useful to the paired design only to the extent that its standalone and dialogue versions make a meaningful comparison. The cost result and the manual inspection document those requirements at the scales at which the authors examined them.

Limits apparent in the design

CoSafe answers a question about a particular change in presentation. Its direct evidence compares a standalone source question with a final question in a prepared conversation. The changes include the presence of history, the position of the question, and the wording of the reference. This is a suitable design for asking whether the two ways of presenting a request lead to different answers. A causal claim about reference wording on its own would require a comparison in which the rest of the presentation was held constant.

There is also a gap between evaluating the final answer and measuring the quality of reference resolution. If the answer is specific to the intended referent, a reader may be able to infer that the assistant recovered it. Other answers, especially refusals with little detail, may reveal little about that decision. The study has no separate item-level score for whether the intended antecedent was recovered. Its observations show behavior under reference-dependent conditions, with room for failures in understanding, safety judgment, or how an understood request was answered.

Because the dialogue histories are prepared, the systems face a common test situation. A live interaction could develop differently for each system. Its earlier answers could alter what the user asks next, what information becomes available, and the stance the assistant takes towards the subject as the conversation progresses. CoSafe holds that part of the interaction fixed. Its outcome is the answer to a final question given the specified history, and the paper gives no estimate of how often a live interaction would reach that same history.

The dataset tests a specific conversation length and arrangement. All of the entries use three turns, with the focal request placed at the end. The experiment does not vary the number of turns or track safety as the conversation grows. Its 10.22-sentence average describes the prepared entries, without establishing a relation between length and risk. A longer interaction could give the system additional sources of clarification or additional references to track. The study leaves the effects of those changes open.

The balance across harm categories similarly defines the target of inference. In CoSafe, each category has 100 cases, and each case originates in material selected for safety testing. Real users could present these topics with very different frequencies or in combinations that differ from the benchmark. The aggregate rates apply to these evaluation inputs under the conditions studied. They quantify benchmark behavior without estimating the prevalence of harms in ordinary use.

The system sample also matters. The comparison concerns the five designated versions, under the formatting and length limits the authors report. The spread in their results establishes that the response to the benchmark change varies within this sample. It gives no estimate for systems with other training, other settings, or additional safeguards. Likewise, the observed ranking on paired score declines cannot supply a general ordering of safety across all uses of the tested systems.

Limits of the judgments

The human comparison supports the use of the automatic moderator on the sampled responses. Agreement over 85% still leaves a set of disputed cases, and the paper does not give a breakdown of those disagreements by harm category or type of answer. If the disagreements cluster in especially ambiguous cases, an aggregate agreement percentage can coexist with considerable uncertainty there. The reported comparison provides a check on the binary measure within its scope.

The distinction between human agreement and automatic agreement is particularly important in a benchmark whose input itself can be ambiguous. Agreement among human annotators says how consistent they were when applying the harmful-or-harmless judgment. Agreement of human evaluation with the moderator says how often those procedures reached the same label. Both concern the binary assessment. The ratings from GPT-4 introduce a separate rubric whose results the paper uses for other purposes.

GPT-4 has a role in both constructing the dialogues and grading responses. The study reports shuffling the answers to address the grading prompt’s position effects. It does not measure whether the way the dialogues were generated affects how GPT-4 judges their answers, and the human–moderator check does not answer that question. The paper gives direct evidence of GPT-4’s judgments under its chosen scoring procedure. A claim about how a different judge would score the paired changes would need its own comparison.

The design of ASR also limits its interpretation. Since it counts any score decrease, it can be influenced by small rating changes, and a decrease of greater severity receives the same weight in the count. It cannot measure how far the dialogue answer moved, whether it crossed the cutoff of 5, or how many other cases improved. The harmful rate and the cutoff analysis provide additional information about absolute judgments on answers. Reading them together gives a fuller account of the outcomes than treating one as a substitute for the others.

The helpfulness results have a related boundary. They concern responses to questions selected as safety probes. Lower helpfulness in these comparisons can reflect the refusal to deliver risky material, which the authors observed and discuss. The paper does not present a separate benign-dialogue evaluation of the defenses. It therefore cannot estimate how frequently the same instructions would interfere with serving a safe request in conversation, or how they would compare on usefulness across a broader range of tasks.

Finally, the reported directions in the defense comparison concern final-answer outcomes. The paper does not establish that either intervention improves the accuracy of antecedent selection, or that a recorded decline in harm can be fully explained by an observed rise in refusals. The study demonstrates that changes to the instructions can change the outputs under this evaluation. The mechanism and the transfer to other conversational circumstances remain open empirical questions.

What came after

Safety datasets and changes in the test distribution

SafetyPrompts cites CoSafe in a systematic review of open datasets for evaluating and improving safety. The review addresses the broader collection of evaluation data, while CoSafe is a case in which the format of the interaction defines much of what gets tested. A dataset organized around dialogue history makes a different part of the safety problem observable than a collection of isolated requests. The documented relationship is the citation in a review of datasets. The specific treatment of CoSafe within that review is unspecified. SafetyPrompts

LLMs know their vulnerabilities cites CoSafe in work on safety gaps under natural distribution shifts. A distribution shift is a change in the kinds of inputs or situations encountered by a system. CoSafe offers a related, deliberately constructed comparison in which the structure of a request changes from a standalone question to a context-dependent follow-up. Both research questions concern whether safety behavior carries across changes in the input. The citation establishes that connection in topic. It gives no basis for attributing CoSafe’s paired scoring procedure or examples to the later experiments. LLMs know their vulnerabilities

The distinction between these citing directions concerns what each takes as its subject. A review of evaluation data asks what resources exist for measuring behavior. A study of safety under distribution shift asks when behavior changes as the input conditions change. CoSafe is relevant to both because it defines a concrete change in presentation and ties it to a measurable outcome. Its role as a cited example is clearer than any claim about direct adoption of its methods.

Multi-turn alignment and multimodal safety

MTSA cites CoSafe in work on multi-turn safety alignment through multi-round red teaming. Safety alignment concerns shaping behavior to meet safety objectives. CoSafe documents final responses to prepared conversations and measures the effects of added instructions. MTSA’s stated focus puts safety across multiple turns in the context of alignment. The relationship is a shared concern with how conversational progression bears on safety. The citation alone leaves CoSafe’s role in MTSA’s data or experimental design unspecified. MTSA

SafeMT cites CoSafe in work on multi-turn safety for multimodal language systems. Multimodal inputs can convey information through more than one type of material. In CoSafe, an earlier piece of text supplies the meaning of a later textual reference. The concern shared with SafeMT is that an interaction may have to be read across turns before the full safety implications of an answer can be understood. SafeMT puts the broader multi-turn question in a multimodal setting. The citation gives no detail about whether its tests use the same categories or the same treatment of coreference. SafeMT

A citation from mathematical reasoning

Self-Error-Instruct cites CoSafe in research about generalizing from errors in mathematical reasoning. Its stated subject is how errors can inform work on a different capability. CoSafe is concerned with making a particular kind of safety failure observable in dialogue. The citation documents a connection between the papers, while the description of the later work leaves its purpose unspecified. Reuse of the dialogue data, safety labels, or paired harmlessness measure cannot be inferred from that relationship. Self-Error-Instruct

Cite

Cite as Erxin Yu, Jing Li, Ming Liao, Siqi Wang, Zuchen Gao, Fei Mi and Lanqing Hong. 2024. CoSafe: Evaluating Large Language Model Safety in Multi-Turn Dialogue Coreference. Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2024.emnlp-main.968 · arXiv 2406.17626

@inproceedings{yu2024cosafe,
  title = {{CoSafe: Evaluating Large Language Model Safety in Multi-Turn Dialogue Coreference}},
  author = {Erxin Yu, Jing Li, Ming Liao, Siqi Wang, Zuchen Gao, Fei Mi and Lanqing Hong},
  booktitle = {Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.emnlp-main.968},
  eprint = {2406.17626},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.18653/v1/2024.emnlp-main.968}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/yu-2024-cosafe-evaluating-large-language-model/

References

25 references, from the paper's own bibliography.

  1. Anders Björkelund and Jonas Kuhn. 2014. Learning structured perceptrons for coreference resolution with latent antecedents and non-local features (https://doi.org/10.3115/v1/P14-1005). In Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 47–57, Baltimore, Maryland. Association for Computational Linguistics. our card
  2. Bernd Bohnet, Chris Alberti, and Michael Collins. 2023. Coreference resolution through a seq2seq transition-based system (https://doi.org/10.1162/tacl_a_00543). Transactions of the Association for Computational Linguistics, 11:212–226. our card
  3. Kevin Clark and Christopher D. Manning. 2016. Deep reinforcement learning for mention-ranking coreference models (https://doi.org/10.18653/v1/D16-1245). In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 2256–2262, Austin, Texas. Association for Computational Linguistics. our card
  4. Emily Dinan, Samuel Humeau, Bharath Chintagunta, and Jason Weston. 2019. Build it break it fix it for dialogue safety: Robustness from adversarial human attack (https://doi.org/10.18653/v1/D19-1461). In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 4537–4546, Hong Kong, China. Association for Computational Linguistics. our card
  5. Greg Durrett and Dan Klein. 2013. Easy victories and uphill battles in coreference resolution (https://aclanthology.org/D13-1203). In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, pages 1971–1982, Seattle, Washington, USA. Association for Computational Linguistics. our card
  6. Deep Ganguli, Liane Lovitt, Jackson Kernion, Amanda Askell, Yuntao Bai, Saurav Kadavath, Ben Mann, Ethan Perez, Nicholas Schiefer, Kamal Ndousse, Andy Jones, Sam Bowman, Anna Chen, Tom Conerly, Nova DasSarma, Dawn Drain, Nelson Elhage, Sheer El-Showk, Stanislav Fort, Zac Hatfield-Dodds, Tom Henighan, Danny Hernandez, Tristan Hume, Josh Jacobson, Scott Johnston, Shauna Kravec, Catherine Olsson, Sam Ringer, Eli Tran-Johnson, Dario Amodei, Tom Brown, Nicholas Joseph, Sam McCandlish, Chris Olah, Jared Kaplan, and Jack Clark. 2022. Red teaming language models to reduce harms: Methods, scaling behaviors, and lessons learned (http://arxiv.org/abs/2209.07858). our card
  7. Jie Huang, Hanyin Shao, and Kevin Chen-Chuan Chang. 2022. Are large pre-trained language models leaking your personal information? (https://doi.org/10.18653/v1/2022.findings-emnlp.148) In Findings of the Association for Computational Linguistics: EMNLP 2022, pages 2038–2047, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics. our card
  8. Jiaming Ji, Mickel Liu, Juntao Dai, Xuehai Pan, Chi Zhang, Ce Bian, Chi Zhang, Ruiyang Sun, Yizhou Wang, and Yaodong Yang. 2023. Beavertails: Towards improved safety alignment of llm via a human-preference dataset. arXiv preprint arXiv:2307.04657. our card
  9. Zhijing Jin, Sydney Levine, Fernando Gonzalez, Ojasv Kamal, Maarten Sap, Mrinmaya Sachan, Rada Mihalcea, Joshua Tenenbaum, and Bernhard Schölkopf. 2024. When to make exceptions: exploring language models as accounts of human moral judgment. In Proceedings of the 36th International Conference on Neural Information Processing Systems, NIPS '22, Red Hook, NY, USA. Curran Associates Inc. OpenAlex ↗ · Scholar ↗
  10. Hyunwoo Kim, Youngjae Yu, Liwei Jiang, Ximing Lu, Daniel Khashabi, Gunhee Kim, Yejin Choi, and Maarten Sap. 2022. ProsocialDialog: A prosocial backbone for conversational agents (https://doi.org/10.18653/v1/2022.emnlp-main.267). In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 4005–4029, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics. our card
  11. Heeyoung Lee, Yves Peirsman, Angel Chang, Nathanael Chambers, Mihai Surdeanu, and Dan Jurafsky. 2011. Stanford's multi-pass sieve coreference resolution system at the CoNLL-2011 shared task (https://aclanthology.org/W11-1902). In Proceedings of the Fifteenth Conference on Computational Natural Language Learning: Shared Task, pages 28–34, Portland, Oregon, USA. Association for Computational Linguistics. our card
  12. Kenton Lee, Luheng He, Mike Lewis, and Luke Zettlemoyer. 2017. End-to-end neural coreference resolution (https://doi.org/10.18653/v1/D17-1018). In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 188–197, Copenhagen, Denmark. Association for Computational Linguistics. OpenAlex ↗ · Scholar ↗
  13. Stephanie Lin, Jacob Hilton, and Owain Evans. 2022. TruthfulQA: Measuring how models mimic human falsehoods (https://doi.org/10.18653/v1/2022.acl-long.229). In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 3214–3252, Dublin, Ireland. Association for Computational Linguistics. our card
  14. Niloofar Mireshghallah, Hyunwoo Kim, Xuhui Zhou, Yulia Tsvetkov, Maarten Sap, Reza Shokri, and Yejin Choi. 2024a. Can LLMs keep a secret? testing privacy implications of language models via contextual integrity theory (https://openreview.net/forum?id=gmg7t8b4s0). In The Twelfth International Conference on Learning Representations. OpenAlex ↗ · Scholar ↗
  15. Niloofar Mireshghallah, Hyunwoo Kim, Xuhui Zhou, Yulia Tsvetkov, Maarten Sap, Reza Shokri, and Yejin Choi. 2024b. Can LLMs keep a secret? testing privacy implications of language models via contextual integrity theory (https://openreview.net/forum?id=gmg7t8b4s0). In The Twelfth International Conference on Learning Representations. OpenAlex ↗ · Scholar ↗
  16. Alicia Parrish, Angelica Chen, Nikita Nangia, Vishakh Padmakumar, Jason Phang, Jana Thompson, Phu Mon Htut, and Samuel Bowman. 2022. BBQ: A hand-built bias benchmark for question answering (https://doi.org/10.18653/v1/2022.findings-acl.165). In Findings of the Association for Computational Linguistics: ACL 2022, pages 2086–2105, Dublin, Ireland. Association for Computational Linguistics. our card
  17. Ethan Perez, Sam Ringer, Kamile Lukosiute, Karina Nguyen, Edwin Chen, Scott Heiner, Craig Pettit, Catherine Olsson, Sandipan Kundu, Saurav Kadavath, Andy Jones, Anna Chen, Benjamin Mann, Brian Israel, Bryan Seethor, Cameron McKinnon, Christopher Olah, Da Yan, Daniela Amodei, Dario Amodei, Dawn Drain, Dustin Li, Eli Tran-Johnson, Guro Khundadze, Jackson Kernion, James Landis, Jamie Kerr, Jared Mueller, Jeeyoon Hyun, Joshua Landau, Kamal Ndousse, Landon Goldberg, Liane Lovitt, Martin Lucas, Michael Sellitto, Miranda Zhang, Neerav Kingsland, Nelson Elhage, Nicholas Joseph, Noemi Mercado, Nova DasSarma, Oliver Rausch, Robin Larson, Sam McCandlish, Scott Johnston, Shauna Kravec, Sheer El Showk, Tamera Lanham, Timothy Telleen-Lawton, Tom Brown, Tom Henighan, Tristan Hume, Yuntao Bai, Zac Hatfield-Dodds, Jack Clark, Samuel R. Bowman, Amanda Askell, Roger Grosse, Danny Hernandez, Deep Ganguli, Evan Hubinger, Nicholas Schiefer, and Jared Kaplan. 2023. Discovering language model behaviors with model-written evaluations (https://doi.org/10.18653/v1/2023.findings-acl.847). In Findings of the Association for Computational Linguistics: ACL 2023, pages 13387–13434, Toronto, Canada. Association for Computational Linguistics. our card
  18. Maribeth Rauh, John F J Mellor, Jonathan Uesato, Po-Sen Huang, Johannes Welbl, Laura Weidinger, Sumanth Dathathri, Amelia Glaese, Geoffrey Irving, Iason Gabriel, William Isaac, and Lisa Anne Hendricks. 2022. Characteristics of harmful text: Towards rigorous benchmarking of language models (https://openreview.net/forum?id=u46CbCaLufp). In Thirty-sixth Conference on Neural Information Processing Systems Datasets and Benchmarks Track. OpenAlex ↗ · Scholar ↗
  19. Rachel Rudinger, Jason Naradowsky, Brian Leonard, and Benjamin Van Durme. 2018a. Gender bias in coreference resolution (https://doi.org/10.18653/v1/N18-2002). In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), pages 8–14, New Orleans, Louisiana. Association for Computational Linguistics. our card
  20. Rachel Rudinger, Jason Naradowsky, Brian Leonard, and Benjamin Van Durme. 2018b. Gender bias in coreference resolution (https://doi.org/10.18653/v1/N18-2002). In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), pages 8–14, New Orleans, Louisiana. Association for Computational Linguistics. our card
  21. Shibani Santurkar, Esin Durmus, Faisal Ladhak, Cinoo Lee, Percy Liang, and Tatsunori Hashimoto. 2023. Whose opinions do language models reflect? In Proceedings of the 40th International Conference on Machine Learning, ICML'23. JMLR.org. our card
  22. Omar Shaikh, Hongxin Zhang, William Held, Michael Bernstein, and Diyi Yang. 2023. On second thought, let's not think step by step! bias and toxicity in zero-shot reasoning (https://doi.org/10.18653/v1/2023.acl-long.244). In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 4454–4470, Toronto, Canada. Association for Computational Linguistics. our card
  23. Megan Ung, Jing Xu, and Y-Lan Boureau. 2022. SaFeRDialogues: Taking feedback gracefully after conversational safety failures (https://doi.org/10.18653/v1/2022.acl-long.447). In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 6462–6481, Dublin, Ireland. Association for Computational Linguistics. OpenAlex ↗ · Scholar ↗
  24. Yuxia Wang, Haonan Li, Xudong Han, Preslav Nakov, and Timothy Baldwin. 2023. Do-not-answer: A dataset for evaluating safeguards in llms (http://arxiv.org/abs/2308.13387). our card
  25. Jieyu Zhao, Tianlu Wang, Mark Yatskar, Vicente Ordonez, and Kai-Wei Chang. 2018. Gender bias in coreference resolution: Evaluation and debiasing methods (https://doi.org/10.18653/v1/N18-2003). In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), pages 15–20, New Orleans, Louisiana. Association for Computational Linguistics. our card