Code Monkey home page Code Monkey logo

toucheretrievalvisualization's Introduction

Touché Task 1: Argument Retrieval for Controversial Questions

Team Skeletor

Five runs

  1. BM25 search

k1=3.2, b=0.2, indexed via Pyserini using default settings.

  1. Semantic (dense) search

Encoder: msmarco-distilbert-base-v3 from SentenceTransformers.
Each document is segmented into BERT-sized passages, the passages are encoded and indexed in hnswlib. Each topic title is encoded, knn search on the passages, take the max of all passage knn returned per document. Each passage is about 200 words, and k=1000 similar passages are returned per topic title search.

  1. Interpolated BM25 and semantic search scores

(1) + 0.7 * (2)

  1. Nearest-neighbor pseudo feedback via manifold approximation

Using the run from (3), collect the passages from the top k highest-ranked documents (assumed to be relevant). Then, do knn search using these passages across the entire corpus. Use the resulting ditances per passage to approximate a local manifold for each passage. Aggregate the resulting edge existence probabilties per document.
k = 3, knn = 50
Note that this approach is modeled after UMAP manifold approximation: https://arxiv.org/pdf/1802.03426.pdf

  1. Nearest-neighbor pseudo feedback via manifold approximation, with cutoff

Same approach as (4), however only rerank the top j documents from (3).
k = 3, knn = 50, j = 10

How to reproduce the runs

  1. Clone the repository
  2. Install the required python packages (in requirements.txt)
  3. In main.py, set corpus_path to point to the directory containing the unzipped json debate corpora
  4. In main.py, set the topic_path to the desired topic file (if last year's, then the trec_evals can be uncommented, but need to specify trec_eval dir path)
  5. In main.py, set the "initialize", "setup", and "evaluate" flags to True
  6. Run the main.py script

Description of files

  • main.py : main script to reproduce runs
  • initializer.py : helper methods to initialize the Pyserini and semantic indices
  • processor.py : helper methods to load topics, write to run files, and to create passages
  • searcher.py : provides the methods for bm25 Pyserini search and semantic knn search
  • reranker.py : provides the methods to rerank runs using manifold approximation, and to interpolate runs

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.