前言

最近在看自动文摘的论文,之前对Rouge评测略有了解,为了更好的理解Rouge评测原理,查了些资料,并简单总结。

关于Rouge

Rouge(Recall-Oriented Understudy for Gisting Evaluation),是评估自动文摘以及机器翻译的一组指标。它通过将自动生成的摘要或翻译与一组参考摘要(通常是人工生成的)进行比较计算,得出相应的分值,以衡量自动生成的摘要或翻译与参考摘要之间的“相似度”。

Rouge-1、Rouge-2、Rouge-N

论文[3]中对Rouge-N的定义是这样的:
Rouge-N
分母是n-gram的个数,分子是参考摘要和自动摘要共有的n-gram的个数。直接借用文章[2]中的例子说明一下:
自动摘要 Y Y Y(一般是自动生成的):

the cat was found under the bed

参考摘要, X 1 X1 X1(gold standard ,人工生成的):

the cat was under the bed

summary的1-gram、2-gram如下,N-gram以此类推:

#1-gramreference 1-gram2-gramreference 2-gram
1thethethe catthe cat
2catcatcat wascat was
3waswaswas foundwas under
4foundunderfound underunder the
5undertheunder thethe bed
6thebedthe bed
7bed
count7665

R o u g e _ 1 ( X 1 , Y ) = 6 6 = 1.0 Rouge\_1(X1,Y)=\dfrac{6}{6}=1.0 Rouge_1(X1,Y)=66=1.0,分子是待评测摘要和参考摘要都出现的1-gram的个数,分子是参考摘要的1-gram个数。(其实分母也可以是待评测摘要的,但是在精确率和召回率之间,我们更关心的是召回率Recall,同时这也和上面ROUGN-N的公式相同)
同样, R o u g e _ 2 ( X 1 , Y ) = 4 5 = 0.8 Rouge\_2(X1,Y)=\dfrac{4}{5}=0.8 Rouge_2(X1,Y)=54=0.8

Rouge-L

L即是LCS(longest common subsequence,最长公共子序列)的首字母,因为Rouge-L使用了最长公共子序列。Rouge-L计算方式如下图:
Rouge-L
其中 L C S ( X , Y ) LCS(X,Y) LCS(X,Y)是X和Y的最长公共子序列的长度,m,n分别表示参考摘要和自动摘要的长度(一般就是所含词的个数), R l c s , P l c s R_{lcs}, P_{lcs} Rlcs,Plcs分别表示召回率和准确率。最后的 F l c s F_{lcs} Flcs即是我们所说的Rouge-L。在DUC中, β \beta β被设置为一个很大的数,所以 R o u g e _ L Rouge\_L Rouge_L几乎只考虑了 R l c s R_{lcs} Rlcs,与上文所说的一般只考虑召回率对应。

Rouge-L的改进版 — Rouge-W

论文[3]针对Rouge-L提出了一个问题:
problem
图中, X X X是参考文摘, Y 1 , Y 2 Y_1,Y_2 Y1Y2是两个待评测文摘,明显 Y 1 Y_1 Y1要优于 Y 2 Y_2 Y2,因为 Y 1 Y_1 Y1可以和参考摘要 X X X连续匹配,但是 R o u g e _ L ( X , Y 1 ) = R o u g e _ L ( X , Y 2 ) Rouge\_L(X, Y_1)=Rouge\_L(X, Y_2) Rouge_L(X,Y1)=Rouge_L(X,Y2),针对这个问题论文作者提出了改进的方案—加权最长公共子序列(Weighted Longest Common Subsequence)。关于Rouge-W的详细内容请参看论文[3]。

Rouge-S

即使用了skip-grams,在参考摘要和待评测摘要进行匹配时,不要求gram之间必须是连续的,可以“跳过”几个单词,比如skip-bigram,在产生grams时,允许最多跳过两个词。比如“cat in the hat”的 skip-bigrams 就是 “cat in, cat the, cat hat, in the, in hat, the hat”.

多参考摘要的情况

某一个人的对谋篇文档的摘要也不一定准确,所以针对一篇文档,标准数据集一般有多个参考摘要(DUC数据集就有4个)。针对这个问题,论文作者也提出了多参考摘要的解决方案:
mutiple-references
论文中的详细描述如下:

This procedure is also applied to computation of ROUGE-L (Section 3), ROUGE-W (Section 4), and ROUGE-S (Section 5). In the implementation, we use a Jackknifing procedure. Given M references, we compute the best score over M sets of M-1 references. The final ROUGE-N score is the average of the M ROUGE-N scores using different M-1 references.

我的理解是由M个参考摘要 R = { r 1 , r 2 , r 3 , . . . , r m − 1 , r m } R=\{r_1,r_2,r_3,...,r_{m-1},r_m\} R={r1,r2,r3,...,rm1,rm}产生M个集合 R i = R − { r i } , i = 1 , 2 , . . . , M . R_i=R-\{r_i\},i=1,2,...,M. Ri=R{ri},i=1,2,...,M.然后计算出每个集合 R i R_i Ri的最高分数 m a x _ s c o r e i = max ⁡ r j ∈ R i R o u g e _ N ( r j , X ) . max\_score_i=\max_{r_j\in R_i}Rouge\_N(r_j,X). max_scorei=rjRimaxRouge_N(rj,X).最终 R o u g e _ S c o r e = 1 M ∑ i = 1 M m a x _ s c o r e i . Rouge\_Score=\dfrac{1}{M}\sum_{i=1}^Mmax\_score_i. Rouge_Score=M1i=1Mmax_scorei.

本博客参考:

[1].https://en.wikipedia.org/wiki/ROUGE_(metric)
[2].What is ROUGE and how it works for evaluation of summaries?
[3].ROUGE:A Package for Automatic Evaluation of Summaries

作者: 蒋平
http://blog.csdn.net/qq_25222361/article/details/78694617
欢迎转载/分享, 但请务必声明文章出处.

Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐