{"id":13595547,"url":"https://github.com/l11x0m7/Question_Answering_Models","last_synced_at":"2025-04-09T13:32:44.783Z","repository":{"id":95907884,"uuid":"131256901","full_name":"l11x0m7/Question_Answering_Models","owner":"l11x0m7","description":"This repo collects and re-produces models related to domains of question answering and machine reading comprehension","archived":false,"fork":false,"pushed_at":"2019-06-16T15:33:18.000Z","size":12678,"stargazers_count":155,"open_issues_count":2,"forks_count":45,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-07-10T23:27:14.243Z","etag":null,"topics":["machine-reading-comprehension","mrc","python","qa","question-answering","tensorflow"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/l11x0m7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-04-27T06:45:05.000Z","updated_at":"2024-03-20T01:04:47.000Z","dependencies_parsed_at":"2023-03-13T16:42:24.822Z","dependency_job_id":null,"html_url":"https://github.com/l11x0m7/Question_Answering_Models","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l11x0m7%2FQuestion_Answering_Models","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l11x0m7%2FQuestion_Answering_Models/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l11x0m7%2FQuestion_Answering_Models/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l11x0m7%2FQuestion_Answering_Models/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/l11x0m7","download_url":"https://codeload.github.com/l11x0m7/Question_Answering_Models/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":213549740,"owners_count":15604019,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["machine-reading-comprehension","mrc","python","qa","question-answering","tensorflow"],"created_at":"2024-08-01T16:01:52.201Z","updated_at":"2024-11-06T18:31:16.164Z","avatar_url":"https://github.com/l11x0m7.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Question_Answering_Models\n\nThis repo collects and re-produces models related to domains of question answering and machine reading comprehension.  \n\nIt's now still in the process of supplement.\n\n## comunity QA\n\n### Dataset\n\nWikiQA, TrecQA, InsuranceQA\n\n#### data preprocess on WikiQA\n\n```\ncd cQA\nbash download.sh\npython preprocess_wiki.py\n```\n\n### Siamese-NN model\n\nThis model is a simple complementation of a Siamese NN QA model with a pointwise way.\n\n[To this repo for details](./cQA/siamese_nn)\n\n#### train model\n\n`python siamese.py --train`\n\n#### test model\n\n`python siamese.py --test`\n\n### Siamese-CNN model\n\nThis model is a simple complementation of a Siamese CNN QA model with a pointwise way.\n\n[To this repo for details](./cQA/siamese_cnn)\n\n#### train model\n\n`python siamese.py --train`\n\n#### test model\n\n`python siamese.py --test`\n\n### Siamese-RNN model\n\nThis model is a simple complementation of a Siamese RNN/LSTM/GRU QA model with a pointwise way.\n\n[To this repo for details](./cQA/siamese_rnn)\n\n#### train model\n\n`python siamese.py --train`\n\n#### test model\n\n`python siamese.py --test`\n\n### note\n\nAll these three models above are based on the vanilla siamese structure. You can easily combine these basic deep learning module cells together and build your own models.\n\n### QACNN\n\nGiven a question, a positive answer and a negative answer, this pairwise model can rank two answers with higher ranking in terms of the right answer.\n\n[To this repo for details](./cQA/qacnn)\n\n![](./figures/qacnn.png)\n\n#### train model\n\n`python qacnn.py --train`\n\n#### test model\n\n`python qacnn.py --test`\n\nRefer to:\n\n* [Applying Deep Learning to Answer Selection: A Study and an Open Task](http://arxiv.org/abs/1508.01585v2)\n\n### Decomposable Attention Model\n\n[To this repo for details](./cQA/decomposable_att_model)\n\n![](./figures/decomposable_att.png)\n\n#### train model\n\n`python decomp_att.py --train`\n\n#### test model\n\n`python decomp_att.py --test`\n\nRefer to:\n\n* [A Decomposable Attention Model for Natural Language Inference](http://arxiv.org/abs/1606.01933v2)\n\n### Compare-Aggregate Model with Multi-Compare\n\n[To this repo for details](./cQA/seq_match_seq)\n\n![](./figures/multi-compare.png)\n\n#### train model\n\n`python seq_match_seq.py --train`\n\n#### test model\n\n`python seq_match_seq.py --test`\n\nRefer to:\n\n* [A Compare-Aggregate Model for Matching Text Sequences](http://arxiv.org/abs/1611.01747v1)\n\n### BiMPM\n\n[To this repo for details](./cQA/bimpm)\n\n![](./figures/bimpm1.png)\n\n![](./figures/bimpm2.png)\n\n#### train model\n\n`python bimpm.py --train`\n\n#### test model\n\n`python bimpm.py --test`\n\nRefer to:\n\n* [Bilateral Multi-Perspective Matching for Natural Language Sentences](http://arxiv.org/abs/1702.03814v3)\n\n## Machine Reading Comprehension\n\n### Dataset\n\nCNN/Daily mail, CBT, SQuAD, MS MARCO, RACE\n\n### GA Reader\n\nTo be done\n\n![GA](./figures/GA.png)\n\nRefer to:\n\n* [Gated-Attention Readers for Text Comprehension](http://arxiv.org/abs/1606.01549v3)\n\n### SA Reader\n\nTo be done\n\n![SAR](./figures/SAR.png)\n\nRefer to:\n\n* [A Thorough Examination of the Cnn/Daily Mail Reading Comprehension Task](http://arxiv.org/abs/1606.02858v2)\n\n### AoA Reader\n\nTo be done\n\n![AoA](./figures/AOA.png)\n\nRefer to:\n\n* Attention-over-Attention Neural Networks for Reading Comprehension\n\n### BiDAF\n\n[To this repo for details](./MRC/BiDAF)\n\n![BiDAF](./figures/BiDAF.png)\n\nThe result on dev set(single model) under my experimental environment is shown as follows:\n\n| training step | batch size | hidden size  | EM (%) | F1 (%) | speed | device |\n| :--------: |:------:|:------:|:------:|:------:|:------:|:------:|\n| 12W   | 32   | 75   | 67.7 | 77.3 | 3.40 it/s | 1 GTX 1080 Ti |\n\n![](./figures/bidaf_train.png)\n\n![](./figures/bidaf_dev.png)\n\nRefer to:\n\n* [Bidirectional Attention Flow for Machine Comprehension](https://arxiv.org/abs/1611.01603)\n\n### RNet\n\n[To this repo for details](./MRC/RNet)\n\n![RNet](./figures/RNet.png)\n\nThe result on dev set(single model) under my experimental environment is shown as follows:\n\n| training step | batch size | hidden size  | EM (%) | F1 (%) | speed | device | RNN type |\n| :--------: |:------:|:------:|:------:|:------:| :------:| :------:| :------:| \n| 12W   | 32   | 75  | 69.1 | 78.2 | 1.35 it/s | 1 GTX 1080 Ti | cuDNNGRU|\n| 6W   | 64   | 75  | 66.1 | 75.6 | 2.95 s/it | 1 GTX 1080 Ti | SRU |\n\nRNet trained with cuDNNGRU:\n\n![](./figures/rnet_train.png)\n\n![](./figures/rnet_dev.png)\n\nRNet trained with SRU(without optimization on operation efficiency):\n\n![](./figures/rnet_sru_train.png)\n\n![](./figures/rnet_sru_dev.png)\n\nRefer to:\n\n* [RNet](https://www.microsoft.com/en-us/research/publication/mrc/)\n* [HKUST-KnowComp/R-Net](https://github.com/HKUST-KnowComp/R-Net)\n\n### QANet\n\n[To this repo for details](./MRC/QANet)\n\n![QANet](./figures/QANet.png)\n\nThe result on dev set(single model) under my experimental environment is shown as follows:\n\n| training step | batch size |attention heads| hidden size  | EM (%) | F1 (%) | speed | device |\n| :--------: |:------:|:------:|:------:|:------:|:------:|:------:|:------:|\n| 6W   | 32   | 1   | 96 | 70.2 | 79.7 |2.4 it/s | 1 GTX 1080 Ti |\n| 12W   | 32   | 1   | 75 | 70.1 | 79.4 | 2.4 it/s | 1 GTX 1080 Ti |\n\nExperimental records for the first experiment:\n\n![](./figures/qanet_train.png)\n\n![](./figures/qanet_dev.png)\n\nExperimental records for the second experiment(without smooth):\n\n![](./figures/qanet_train_2.png)\n\n![](./figures/qanet_dev_2.png)\n\nRefer to:\n\n* QANet: Combining Local Convolution with Global Self-Attention for Reading Comprehension\n* github repo of [NLPLearn/QANet](https://github.com/NLPLearn/QANet)\n\n### Hybrid Network\n\n[To this repo for details](./MRC/Hybrid)\n\nThis repo contains my experiments and attempt for MRC problems, and I'm still working on it.\n\n| training step | batch size | hidden size  | EM (%) | F1 (%) | speed | device | description |\n| :--------: |:------:|:------:|:------:|:------:|:------:|:------:|:------:|\n| 12W   | 32  | 100 | 70.1 | 78.9 |1.6 it/s | 1 GTX 1080 Ti | \\ |\n| 12W   | 32  | 75 | 70.0 | 79.1 | 1.8 it/s | 1 GTX 1080 Ti | \\ |\n| 12W   | 32  | 75 | 69.5 | 78.8 | 1.8 it/s | 1 GTX 1080 Ti |with spatial dropout on embeddings|\n\nExperimental records for the first experiment(without smooth):\n\n![](./figures/hybrid_train_1.png)\n\n![](./figures/hybrid_dev_1.png)\n\nExperimental records for the second experiment(without smooth):\n\n![](./figures/hybrid_train_2.png)\n\n![](./figures/hybrid_dev_2.png)\n\n## Information\n\nFor more information, please visit http://skyhigh233.com/blog/2018/04/26/cqa-intro/.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl11x0m7%2FQuestion_Answering_Models","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fl11x0m7%2FQuestion_Answering_Models","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl11x0m7%2FQuestion_Answering_Models/lists"}