{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/qanet-combining-local-convolution-with-global","title":"QANet: Combining Local Convolution with Global Self-Attention for Reading Comprehension","arxiv_id":"1804.09541","date":"2018-04-23","proceeding":"ICLR 2018 1","authors":["Adams Wei Yu","David Dohan","Minh-Thang Luong","Rui Zhao","Kai Chen","Mohammad Norouzi","Quoc V. Le"],"abstract":"Current end-to-end machine reading and question answering (Q\\&A) models are\nprimarily based on recurrent neural networks (RNNs) with attention. Despite\ntheir success, these models are often slow for both training and inference due\nto the sequential nature of RNNs. We propose a new Q\\&A architecture called\nQANet, which does not require recurrent networks: Its encoder consists\nexclusively of convolution and self-attention, where convolution models local\ninteractions and self-attention models global interactions. On the SQuAD\ndataset, our model is 3x to 13x faster in training and 4x to 9x faster in\ninference, while achieving equivalent accuracy to recurrent models. The\nspeed-up gain allows us to train the model with much more data. We hence\ncombine our model with data generated by backtranslation from a neural machine\ntranslation model. On the SQuAD dataset, our single model, trained with\naugmented data, achieves 84.6 F1 score on the test set, which is significantly\nbetter than the best published F1 score of 81.8.","url_abs":"http://arxiv.org/abs/1804.09541v1","url_pdf":"http://arxiv.org/pdf/1804.09541v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"qanet-combining-local-convolution-with-global","repo_url":"https://github.com/BangLiu/QANet-PyTorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"qanet-combining-local-convolution-with-global","repo_url":"https://github.com/Francois-Aubet/EQuANt","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"qanet-combining-local-convolution-with-global","repo_url":"https://github.com/TSLNIHAOGIT/QANet_keras_debug","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok"}},{"paper_slug":"qanet-combining-local-convolution-with-global","repo_url":"https://github.com/Tao-Mind/QDD_Net","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"qanet-combining-local-convolution-with-global","repo_url":"https://github.com/ajoshi80/QANet","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"qanet-combining-local-convolution-with-global","repo_url":"https://github.com/andy840314/QANet-pytorch-","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"qanet-combining-local-convolution-with-global","repo_url":"https://github.com/annaorosz/my_qanet_implementation","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"qanet-combining-local-convolution-with-global","repo_url":"https://github.com/benywon/ComQA","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"qanet-combining-local-convolution-with-global","repo_url":"https://github.com/ewrfcas/QANet_keras","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok"}},{"paper_slug":"qanet-combining-local-convolution-with-global","repo_url":"https://github.com/lottens/QA-SQuAD","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"qanet-combining-local-convolution-with-global","repo_url":"https://github.com/mirbostani/QA-KD-AL","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"qanet-combining-local-convolution-with-global","repo_url":"https://github.com/ni9elf/QANet","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok"}},{"paper_slug":"qanet-combining-local-convolution-with-global","repo_url":"https://github.com/shikhar1sharma/NLP-Resources","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"qanet-combining-local-convolution-with-global","repo_url":"https://github.com/yuriak/PPDAI","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok"}},{"paper_slug":"qanet-combining-local-convolution-with-global","repo_url":"https://github.com/allenai/allennlp-reading-comprehension","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok"}}],"tasks":[{"task_slug":"machine-translation","task_name":"Machine Translation"},{"task_slug":"question-answering","task_name":"Question Answering"},{"task_slug":"reading-comprehension","task_name":"Reading Comprehension"},{"task_slug":"translation","task_name":"Translation"}],"methods":[{"method_slug":"convolution","method_name":"Convolution"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/question-answering-on-squad11","task":"Question Answering","dataset":"SQuAD1.1","model":"QANet + data augmentation ×3","rank_in_archive_order":111,"of":213,"metrics":{"EM":"76.2","F1":"84.6"},"uses_additional_data":false},{"leaderboard":"/sota/question-answering-on-squad11-dev","task":"Question Answering","dataset":"SQuAD1.1 dev","model":"QANet (data aug x3)","rank_in_archive_order":27,"of":55,"metrics":{"EM":"75.1","F1":"83.8"},"uses_additional_data":false},{"leaderboard":"/sota/question-answering-on-squad11-dev","task":"Question Answering","dataset":"SQuAD1.1 dev","model":"QANet (data aug x2)","rank_in_archive_order":28,"of":55,"metrics":{"EM":"74.5","F1":"83.2"},"uses_additional_data":false},{"leaderboard":"/sota/question-answering-on-squad11-dev","task":"Question Answering","dataset":"SQuAD1.1 dev","model":"QANet","rank_in_archive_order":30,"of":55,"metrics":{"EM":"73.6","F1":"82.7"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1804.09541","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1804.09541"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/shikhar1sharma/NLP-Resources","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/annaorosz/my_qanet_implementation","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ewrfcas/QANet_keras","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Tao-Mind/QDD_Net","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Francois-Aubet/EQuANt","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lottens/QA-SQuAD","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ni9elf/QANet","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/mirbostani/QA-KD-AL","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ajoshi80/QANet","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/andy840314/QANet-pytorch-","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/allenai/allennlp-reading-comprehension","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/BangLiu/QANet-PyTorch","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yuriak/PPDAI","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/benywon/ComQA","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/TSLNIHAOGIT/QANet_keras_debug","reach":{"status":"ok"}}],"summary":{"ran_fixture":1,"ran_draft_wrong":3,"ran_honours":3,"unverified":12},"by_repo_kind":{"listed":{"samples":19,"ran":7,"repositories":6}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":2,"samples":[{"code_sha256_prefix":"5c8c86edd3d3e783","entry":"PosEncoder","repo":"andy840314/QANet-pytorch-","repo_kind":"listed","path":"models.py","file_url":"https://github.com/andy840314/QANet-pytorch-/blob/HEAD/models.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5c8c86edd3d3e783"}},{"code_sha256_prefix":"cf78c734df121970","entry":"clones","repo":"BangLiu/QANet-PyTorch","repo_kind":"listed","path":"model/modules/attention.py","file_url":"https://github.com/BangLiu/QANet-PyTorch/blob/HEAD/model/modules/attention.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cf78c734df121970"}},{"code_sha256_prefix":"2a6a9ea511d97648","entry":"convert_idx","repo":"Francois-Aubet/EQuANt","repo_kind":"listed","path":"prepro.py","file_url":"https://github.com/Francois-Aubet/EQuANt/blob/HEAD/prepro.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2a6a9ea511d97648"}},{"code_sha256_prefix":"f82361ad7330d575","entry":"get_timing_signal","repo":"mirbostani/QA-KD-AL","repo_kind":"listed","path":"qa/model/qanet.py","file_url":"https://github.com/mirbostani/QA-KD-AL/blob/HEAD/qa/model/qanet.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f82361ad7330d575"}},{"code_sha256_prefix":"d2e8e18023f286ab","entry":"get_timing_signal","repo":"andy840314/QANet-pytorch-","repo_kind":"listed","path":"models.py","file_url":"https://github.com/andy840314/QANet-pytorch-/blob/HEAD/models.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d2e8e18023f286ab"}},{"code_sha256_prefix":"9dc49f46edd7a69d","entry":"mask_logits","repo":"mirbostani/QA-KD-AL","repo_kind":"listed","path":"qa/model/qanet.py","file_url":"https://github.com/mirbostani/QA-KD-AL/blob/HEAD/qa/model/qanet.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9dc49f46edd7a69d"}},{"code_sha256_prefix":"dea46bb8718e5def","entry":"mask_logits","repo":"andy840314/QANet-pytorch-","repo_kind":"listed","path":"models.py","file_url":"https://github.com/andy840314/QANet-pytorch-/blob/HEAD/models.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"dea46bb8718e5def"}},{"code_sha256_prefix":"73f7bc81c21d46f4","entry":"OpenAITransformer_loss","repo":"BangLiu/QANet-PyTorch","repo_kind":"listed","path":"trainer/loss.py","file_url":"https://github.com/BangLiu/QANet-PyTorch/blob/HEAD/trainer/loss.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"73f7bc81c21d46f4"}},{"code_sha256_prefix":"ee4ade0d8bcf356a","entry":"PosEncoder","repo":"mirbostani/QA-KD-AL","repo_kind":"listed","path":"qa/model/qanet.py","file_url":"https://github.com/mirbostani/QA-KD-AL/blob/HEAD/qa/model/qanet.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ee4ade0d8bcf356a"}},{"code_sha256_prefix":"edf10b1abda15159","entry":"add_dense_layer","repo":"Tao-Mind/QDD_Net","repo_kind":"listed","path":"models/layers.py","file_url":"https://github.com/Tao-Mind/QDD_Net/blob/HEAD/models/layers.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"edf10b1abda15159"}},{"code_sha256_prefix":"d6c2afca4b825f12","entry":"biGRUs","repo":"Tao-Mind/QDD_Net","repo_kind":"listed","path":"models/layers.py","file_url":"https://github.com/Tao-Mind/QDD_Net/blob/HEAD/models/layers.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d6c2afca4b825f12"}},{"code_sha256_prefix":"23587f1e97b0e35d","entry":"convert_idx","repo":"BangLiu/QANet-PyTorch","repo_kind":"listed","path":"data_loader/SQuAD.py","file_url":"https://github.com/BangLiu/QANet-PyTorch/blob/HEAD/data_loader/SQuAD.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"23587f1e97b0e35d"}},{"code_sha256_prefix":"32abbed1f309ad9f","entry":"crop_pad","repo":"Tao-Mind/QDD_Net","repo_kind":"listed","path":"pre_process.py","file_url":"https://github.com/Tao-Mind/QDD_Net/blob/HEAD/pre_process.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"32abbed1f309ad9f"}},{"code_sha256_prefix":"96be8bbb7b022500","entry":"dot_attention","repo":"Tao-Mind/QDD_Net","repo_kind":"listed","path":"models/layers.py","file_url":"https://github.com/Tao-Mind/QDD_Net/blob/HEAD/models/layers.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"96be8bbb7b022500"}},{"code_sha256_prefix":"c4d748327c33e6cc","entry":"filter_func","repo":"BangLiu/QANet-PyTorch","repo_kind":"listed","path":"data_loader/SQuAD.py","file_url":"https://github.com/BangLiu/QANet-PyTorch/blob/HEAD/data_loader/SQuAD.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c4d748327c33e6cc"}},{"code_sha256_prefix":"fc42ce0856c29480","entry":"get_ids","repo":"Tao-Mind/QDD_Net","repo_kind":"listed","path":"pre_process.py","file_url":"https://github.com/Tao-Mind/QDD_Net/blob/HEAD/pre_process.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fc42ce0856c29480"}},{"code_sha256_prefix":"fdbd06a820d2930d","entry":"get_texts","repo":"Tao-Mind/QDD_Net","repo_kind":"listed","path":"pre_process.py","file_url":"https://github.com/Tao-Mind/QDD_Net/blob/HEAD/pre_process.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fdbd06a820d2930d"}},{"code_sha256_prefix":"9549014140b95768","entry":"highway","repo":"annaorosz/my_qanet_implementation","repo_kind":"listed","path":"QANet_keras.py","file_url":"https://github.com/annaorosz/my_qanet_implementation/blob/HEAD/QANet_keras.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9549014140b95768"}},{"code_sha256_prefix":"cb4ce684e3929e65","entry":"my_loss","repo":"BangLiu/QANet-PyTorch","repo_kind":"listed","path":"trainer/loss.py","file_url":"https://github.com/BangLiu/QANet-PyTorch/blob/HEAD/trainer/loss.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cb4ce684e3929e65"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}