Code Monkey home page Code Monkey logo

collision-bert's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

collision-bert's Issues

evaluation of re-ranking

Hello, I'm trying to grasp the method used for evaluating a ranking experiment, specifically how the rankings for new documents are computed. Below is the relevant portion of the code:

collision, new_score, collision_cands = gen_aggressive_collision(
    query, best_sent, model, tokenizer, device, best_score, lm_model)

if args.verbose:
    log('---Rank shifts for less relevant documents---')
    weighted_new_score = sum(BIRCH_ALPHAS) * new_score
    for did in bm25_q_doc[qid]:
        new_score = bm25_q_doc[qid][did] * BIRCH_GAMMA + weighted_new_score * (1 - BIRCH_GAMMA)
        old_rank, old_score = target_q_doc[qid][did]
        new_rank = 1000 - bisect.bisect_left(old_scores, new_score)
        log(f'Query id={qid}, Doc id={did}, '
            f'old score={old_score:.2f}, new score={new_score:.2f}, old rank={old_rank}, new rank={new_rank}')

From the code, the collision-generation-methods produce a new_score that is linked to the query and generated collision.

What confuses me is why this new_score is directly used in ranking of low-ranking calculations for documents.
According to the paper, for each of the 50 query topics, irrelevant articles ranked between 900 and 1000 by Birch are selected and collisions are inserted to boost their ranks. However, the script doesn’t seem to insert collisions into new documents; it appears to reuse the new_score for each of the low-ranking examples. Shouldn't this test involve recomputing the embedding for the low-ranking documents after inserting the collision?

Am I misunderstanding something here?

Cannot download data and models

Hi! Thank you for releasing the code.

When I was trying to download the data and models through this link, I always get Failed - Unknown server error. Please try again, or contact the server administrator. when I am halfway done with the download. My internet connection is stable and have a bandwidth of 1GB; I am not located in a country with firewall as well.

Are there extra steps I need to do for download? I am wondering, if it is convenient for you, could you please separate the models and data into a different compressed file making it easier to download?

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.