{"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/uni-nlx-unifying-textual-explanations-for","title":"Uni-NLX: Unifying Textual Explanations for Vision and Vision-Language Tasks","arxiv_id":"2308.09033","date":"2023-08-17","proceeding":null,"authors":["Fawaz Sammani","Nikos Deligiannis"],"abstract":"Natural Language Explanations (NLE) aim at supplementing the prediction of a model with human-friendly natural text. Existing NLE approaches involve training separate models for each downstream task. In this work, we propose Uni-NLX, a unified framework that consolidates all NLE tasks into a single and compact multi-task model using a unified training objective of text generation. Additionally, we introduce two new NLE datasets: 1) ImageNetX, a dataset of 144K samples for explaining ImageNet categories, and 2) VQA-ParaX, a dataset of 123K samples for explaining the task of Visual Question Answering (VQA). Both datasets are derived leveraging large language models (LLMs). By training on the 1M combined NLE samples, our single unified framework is capable of simultaneously performing seven NLE tasks including VQA, visual recognition and visual reasoning tasks with 7X fewer parameters, demonstrating comparable performance to the independent task-specific models in previous approaches, and in certain tasks even outperforming them. Code is at https://github.com/fawazsammani/uni-nlx","url_abs":"https://arxiv.org/abs/2308.09033v2","url_pdf":"https://arxiv.org/pdf/2308.09033v2.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":"uni-nlx-unifying-textual-explanations-for","repo_url":"https://github.com/fawazsammani/uni-nlx","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"uni-nlx-unifying-textual-explanations-for","repo_url":"https://github.com/fawazsammani/nlxgpt","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"question-answering","task_name":"Question Answering"},{"task_slug":"text-generation","task_name":"Text Generation"},{"task_slug":"visual-question-answering-1","task_name":"Visual Question Answering"},{"task_slug":"visual-question-answering","task_name":"Visual Question Answering (VQA)"},{"task_slug":"visual-reasoning","task_name":"Visual Reasoning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2308.09033","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2308.09033"}},"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/fawazsammani/nlxgpt","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/fawazsammani/uni-nlx","reach":null}],"summary":{"ran":5,"ran_fixture":1},"by_repo_kind":{"official":{"samples":6,"ran":6,"repositories":2}},"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":6,"samples":[{"code_sha256_prefix":"c48e4f80bebee3df","entry":"align_bb_to_tokens","repo":"fawazsammani/nlxgpt","repo_kind":"official","path":"vcr.py","file_url":"https://github.com/fawazsammani/nlxgpt/blob/HEAD/vcr.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c48e4f80bebee3df"}},{"code_sha256_prefix":"1ef1f52dfc9b012d","entry":"get_answer_labels","repo":"fawazsammani/nlxgpt","repo_kind":"official","path":"explain_predict/ep_actX.py","file_url":"https://github.com/fawazsammani/nlxgpt/blob/HEAD/explain_predict/ep_actX.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1ef1f52dfc9b012d"}},{"code_sha256_prefix":"4d9dcbd8a0583e25","entry":"get_answer_labels","repo":"fawazsammani/nlxgpt","repo_kind":"official","path":"explain_predict/ep_vqaX.py","file_url":"https://github.com/fawazsammani/nlxgpt/blob/HEAD/explain_predict/ep_vqaX.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4d9dcbd8a0583e25"}},{"code_sha256_prefix":"d55588caa6163310","entry":"get_bb_coordinates","repo":"fawazsammani/nlxgpt","repo_kind":"official","path":"vcr.py","file_url":"https://github.com/fawazsammani/nlxgpt/blob/HEAD/vcr.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d55588caa6163310"}},{"code_sha256_prefix":"04a66156efbb1777","entry":"get_score","repo":"fawazsammani/nlxgpt","repo_kind":"official","path":"explain_predict/ep_vqaX.py","file_url":"https://github.com/fawazsammani/nlxgpt/blob/HEAD/explain_predict/ep_vqaX.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"04a66156efbb1777"}},{"code_sha256_prefix":"ab2479ed7a576c4a","entry":"top_filtering","repo":"fawazsammani/uni-nlx","repo_kind":"official","path":"test_datasets.py","file_url":"https://github.com/fawazsammani/uni-nlx/blob/HEAD/test_datasets.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ab2479ed7a576c4a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}