判别性重排序在 NLP 任务中有何作用?

发布于 2024-12-08 22:48:57 字数 77 浏览 1 评论 0原文

最近,我读到了柯林斯的“自然语言处理的歧视性重新排名”。 我很困惑重新排名实际上有什么作用? 向重新排序模型添加更多全局特征?或者其他什么?

Recently,i have read about the "discriminative reranking for natural language processing" by Collins.
I'm confused what does the reranking actually do?
Add more global features to the rerank model? or something else?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

吖咩 2024-12-15 22:48:57

如果您的意思是本文,那么所做的就是以下:

  1. 使用生成模型训练解析器,即计算P(术语|树)并使用贝叶斯规则反转该模型并得到P(树|术语) ,
  2. 应用它得到模型中树木的初始 k 最佳排名,
  3. 根据所需树木的特征训练第二个模型,
  4. 应用它来重新排名 2 的输出。

第二个模型有用的原因是在生成模型(例如朴素贝叶斯、HMM、PCFG)中,很难添加除单词同一性之外的特征,因为模型会尝试预测精确特征向量的概率,而不是单独的功能,可能没有发生在训练数据中,并且P(向量|树) = 0,因此P(树|向量) = 0(+平滑,但问题仍然存在)。这是数据稀疏性的永恒 NLP 问题:您无法构建一个包含您想要处理的每一个话语的训练语料库。

像 MaxEnt 这样的判别模型在处理特征向量方面要好得多,但需要更长的时间来拟合并且处理起来可能更复杂(尽管 CRF 和神经网络已被用来构建解析器作为判别模型)。 Collins 等人试图在完全生成性方法和完全歧视性方法之间找到中间立场。

If you mean this paper, then what is done is the following:

  1. train a parser using a generative model, i.e. one where you compute P(term | tree) and use Bayes' rule to reverse that and get P(tree | term),
  2. apply that to get an initial k-best ranking of trees from the model,
  3. train a second model on features of the desired trees,
  4. apply that to re-rank the output from 2.

The reason why the second model is useful is that in generative models (such as naïve Bayes, HMMs, PCFGs), it can be hard to add features other than word identity, because the model would try to predict the probability of the exact feature vector instead of the separate features, which might not have occurred in the training data and will have P(vector|tree) = 0 and therefore P(tree|vector) = 0 (+ smoothing, but the problem remains). This is the eternal NLP problem of data sparsity: you can't build a training corpus that contains every single utterance that you'll want to handle.

Discriminative models such as MaxEnt are much better at handling feature vectors, but take longer to fit and can be more complicated to handle (although CRFs and neural nets have been used to construct parsers as discriminative models). Collins et al. try to find a middle ground between the fully generative and fully discriminative approaches.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文