Git Product home page Git Product logo

Comments (4)

andrelmfarias avatar andrelmfarias commented on May 24, 2024 1

What I understand from the quote below is that they only use the logits (score) for comparison between answers spans, instead of using the probabilities after applying the softmax function.

to allow comparison and aggregation of results from different segments, we remove the final softmaxlayer over different answer spans.

@fmikaelian what do you think?

from cdqa.

fmikaelian avatar fmikaelian commented on May 24, 2024

Here are my takeways:

  • They use Anserini as their document retriever, based on open source Lucene. It uses the BM25 ranking function.
  • There are 2 types of retrievers: single-stage vs. multi-stage.
  • Article retrieval underperforms paragraph retrieval by a large margin.
  • To score predictions they use a weighted linear interpolation between the BERT and Anserini scores: S = (1 - μ) * S_anserini + μ * S_bert with μ=0.5
  • In production mode they retrieve k=10 paragraphs.
  • Answering a question with this setup takes 2,35 seconds in average with a Tesla P40 GPU.

They modified BERT to compare predictions in a meaningful way (see #36):

to allow comparison and aggregation of results from different segments, we remove the final softmaxlayer over different answer spans.

But this is to be clarified.

from cdqa.

fmikaelian avatar fmikaelian commented on May 24, 2024

Yes

It would be useful to cross check with the paper of danqi chen where she mentions something about it with their DrQA app
https://cs.stanford.edu/~danqi/papers/thesis.pdf

Also we should follow this thread: huggingface/transformers#360

from cdqa.

fmikaelian avatar fmikaelian commented on May 24, 2024

In section 5.2.3 of Danqi Chen's thesis:

We apply our trained DOCUMENT READER for each single paragraph that appears inthe top 5 Wikipedia articles and it predicts an answer span with a confidence score. To make scores compatible across paragraphs in one or several retrieved documents, we use the unnormalized exponential and take argmax over all considered paragraph spans for our final prediction. This is just a very simple heuristic and there are better ways to aggregate evidence over different paragraphs

This part seems to be implemented here:

https://github.com/facebookresearch/DrQA/blob/d27180fc527084263ca0e43091f5d35c4bbd4963/drqa/reader/layers.py#L243

And here:

https://github.com/facebookresearch/DrQA/blob/1f811ded549a69f8b5ea303fb6f6d35ad6fc84ae/drqa/pipeline/drqa.py#L113

Our predict() function does not currently returns this confidence score. How can we get it in our setup and modify it for comparision?

from cdqa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.