murawaki の雑記

はてなグループから移転してきました

アノテーション一致度

アノテーション一致度 (inter-annotator agreement) を測りたいけど、κ が使えない場合どうするか。想定しているタスクは以下の通り。テキストからいくつか chunk を抽出し、それぞれにラベルを付与する。chunk の大きさはバラバラだし、テキストの一部しか被覆しない。

てっきり FAQ になっているかと思ったが見当たらない。少し調べた結果、以下の手順を採用した。

  1. アノテーション結果を集約したデータを 1 セット用意
  2. 一致度を測りたいサンプルを対象に、1 とは独立にアノテート
  3. 集約データを普通の正解、独立にアノテートした結果をシステム出力扱いして、再現率、適合率、F 値等の通常の評価尺度を使う

タスクの設定によっては Krippendorff’s α も使えるかもしれない。もしより良い方法を知っていたら教えてほしい。

以下、ここに至った経緯をメモ書き。

ざっと調べた中で一番詳しく議論していたのが Grouin et al. (2011)。workshop 論文だけど。

アノテーション一致度の尺度としてすぐに思い浮かぶのは Cohen's κ とその変種。N 個の要素に異なり数 C のラベルのいずれかを付与する場合。Cohen's κ は 2 人のアノテータの一致度の尺度。単にラベルが一致した割合を測るのではなく、偶然一致する確率で補正している。

κ 系の尺度が問題となるのは、固有表現認識のように、テキストの一部にタグ付けする場合。N 個の要素というが、その要素自体が自明ではなくなる。Grouin et al. (2011) は要素を markable と呼んで、いろんな markable を検討している。n <= 6 の n-gram とか。そうすると overlap する n-gram は明らかに独立ではない。独立試行の仮定に反している。

また、データのごく一部にしかタグ付けしない場合、タグ付けされていない (どうでもいい) 部分が与える影響が大きくなりすぎてしまう。

次に考えているのが pooling。複数のアノテータの間で、少なくとも一人がつけたものに対象を限定する。これもやはり重複する markable 同士が独立ではないと思うが、その指摘はない。この方法だと低めの数字が出る。

これも指摘されていなけど、ラベル異なり数が増えてくると偶然一致の確率が 0 に近づいていくはず。その場合、単に一致する割合を測るのと変わらなくなるだろう。

結論として F-measure を使えば良いと Grouin et al. (2011) は主張している。

Grouin et al. (2011) は Alex et al. (2010) を参照している。これも workshop 論文。

こちらもタスクは固有表現認識。

For each pair of annotations on the same document, IAA was calculated by scoring one annotator against another using precision (P), recall (R) and F1. An overall IAA was calculated by micro-averaging across all annotated document pairs. We used F1 rather than the Kappa score (Cohen, 1960) to measure IAA as the latter requires comparison with a random baseline, which does not make sense for tasks such as NER.

もう一つ引いている Hripcsak and Rothschild (2005) は 3 ページのジャーナル。

こちらは情報検索。要旨だけ読んでおけばよさそう。結論としては F-measure を使えと。

Information retrieval studies that involve searching the Internet or marking phrases usually lack a well-defined number of negative cases. This prevents the use of traditional interrater reliability metrics like the κ statistic to assess the quality of expert-generated gold standards. Such studies often quantify system performance as precision, recall, and F-measure, or as agreement. It can be shown that the average F-measure among pairs of experts is numerically identical to the average positive specific agreement among experts and that κ approaches these measures as the number of negative cases grows large. Positive specific agreement--or the equivalent F-measure--may be an appropriate way to quantify interrater reliability and therefore to assess the reliability of a gold standard in these studies.

Corbett et al. (2007) な chemical named entities を扱う。

彼らも F1 を使う。アノテータ同士の pairwise で。

Inter-annotator agreement was measured pairwise, using the F score.

κ は使い物にならないと主張。

Given the character-level nature of the annotation task, and that the papers were not tokenised, the task cannot sensibly be cast as a classification problem, and so we have not calculated any kappa scores.

しかし pairwise な比較は、アノテータによって質がばらついているときに微妙っぽい。

Krippendorff (2004) は独自手法を提案している。

Krippendorff’s α として Wikipedia に長文記事があるが、本人がかなり手を入れているっぽい。

基本は \alpha = 1 - \frac{D_o}{D_e}。ここで D_o は observed agreement、D_e は chance agreement。複数のラベルからなる場合は \alpha = 1 - \frac{\sum_c D_{oc}}{\sum_c D_{ec}}。ラベルタイプごとに別々に計算した結果を集約する。問題は、D_oD_e の計算方法。詳細は省くが、2 つの線分上の重複区間を考慮するような式になっている。

Krippendorff (2004) の手法には微妙な点がある。文字列 A B C D E に対して、A [ B C D ] E のように BCD ひとかたまりにタグ付けする場合と、A [ B ] [ C D ] E のように B と CD をわけてタグ付けする場合を区別したいことがある。私の理解が正しければ、この区別ができない式になっている。

Krippendorff’s α を NLP で使っていて、なおかつ markable の問題がある例として Wacholder et al. (2014) が見つかった。

談話へのアノテート。fuzziness of unit boundaries が問題となる。以下のように既存尺度の問題を述べたあとで独自のクラスタリング手法を提案する。

We show that current metrics for inter-annotator agreement (IAA) such as P/R/F1 and Krippendorff’s α provide inconsistent results for the same text. In addition, IAA metrics do not tell us what parts of a text are easier or harder for human judges to annotate and so do not provide sufficiently specific information for evaluating systems that automatically identify discourse units.

彼らの説明によると、Krippendorff’s α, a variant of the α family of IAA coefficients specifically designed to handle fuzzy boundaries and multiple annotators らしい。

F1 と Krippendorff’s α を文書 (thread) ごとに出して、順位付けしたら全然違う結果がでたという。

ただ、彼らが問題にしているのはむしろ別の点。

They do not pinpoint the location in a document where the extent of variation can be observed.

1 個のスカラーで要約されても役に立たないというが、これは言いがかりに近い。

Stab and Gurevych (2014) も Krippendorff’s α を使っている。

Since there are no predefined markables in our study, annotators have to identify the boundaries of argument components. We evaluate the annotations using Krippendorff’s αU (Krippendorff, 2004). It considers the differences in the markable boundaries of several annotators and thus allows for assessing the reliability of our annotated corpus.

Krippendorff’s αU は低めの数値になる様子。ちなみに Kolhatkar et al. (2013)uα と表記している。