{"id":24822260,"url":"https://github.com/lazerlambda/udl-negation","last_synced_at":"2026-04-15T23:31:01.513Z","repository":{"id":186102632,"uuid":"586381338","full_name":"LazerLambda/udl-negation","owner":"LazerLambda","description":"Comparing Data-Driven Techniques for Enhancing Negation Sensitivity in MLM-Based Laguage-Models","archived":false,"fork":false,"pushed_at":"2023-03-22T14:53:50.000Z","size":6257,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-22T07:54:32.145Z","etag":null,"topics":["bert","computational-linguistics","deep-learning","deeplearning","dl","encoder","machine-learning","masked-language-modeling","ml","negation","nlp","nlu","python","research","statistics","torch","transformers"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/LazerLambda.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}},"created_at":"2023-01-07T23:23:55.000Z","updated_at":"2023-03-19T00:04:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"15dd5b6b-0d9a-4c94-b4c6-db12d1648d3d","html_url":"https://github.com/LazerLambda/udl-negation","commit_stats":null,"previous_names":["lazerlambda/udl-negation"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LazerLambda/udl-negation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LazerLambda%2Fudl-negation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LazerLambda%2Fudl-negation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LazerLambda%2Fudl-negation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LazerLambda%2Fudl-negation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LazerLambda","download_url":"https://codeload.github.com/LazerLambda/udl-negation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LazerLambda%2Fudl-negation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31864893,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["bert","computational-linguistics","deep-learning","deeplearning","dl","encoder","machine-learning","masked-language-modeling","ml","negation","nlp","nlu","python","research","statistics","torch","transformers"],"created_at":"2025-01-30T18:40:01.122Z","updated_at":"2026-04-15T23:31:01.483Z","avatar_url":"https://github.com/LazerLambda.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"UDL-Negation\n==============================\n\nCode to the report \"Comparing Data-Driven Techniques for Enhancing Negation Sensitivity in MLM-Based Laguage-Models\".\n\nTransformers in the field of language have shown impressive results in recent years. Despite the overall improvement, these models still lack an understanding of fundamental natural language concepts. One significant problem is the misunderstanding of the concept of negation. This work tested three different techniques to boost the model's understanding capabilities. These approaches include training a BERT-Small model on:\n - data with an increased amount of negations (filtered data) with MLM\n - filtered data (with MLM) and artificially generated data based on WordNet in an adversarial setting (WordNet adversarial data) by using supervised masking to guide the model in training\n - WordNet adversarial data and filtered data using only MLM.\n\n# Requirements\n\nTo install required libraries, run `pip install -r requirements.txt`.\n\n# Create Data\n\nTo create the filtered training data, run the following four commands:\n\n`make owt`\n`make bc`\n`make wiki`\n`make cc_news`\n\nSet paths and other configurations in `neg_udl/config/data_config.yaml`\n\nWARNING: These operations might take several days!\nWARNING: Undefined behavior experienced when using multiprocessing!\n\n# Run Experimeńts\n\nRun experiments running the following commands (CUDA-capable device recommended):\n\n```make exp_1_filtered```\n\n```make exp_2_mlm+sup```\n\n```make exp_3_mlm```\n\n```make exp_3+_mlm```\n\nSet paths and other configurations in `neg_udl/config/exp{1,2,3,3+}_config.yaml`\n\n# Evaluate\n\nTo evaluate the trained model on selected GLUE-Tasks, run:\n\n`make evaluate`\n\n# Project Organization\n------------\n\n    ├── LICENSE\n    ├── Makefile                    \u003c- Makefile with all necessary commands to generate data and run experiments.\n    ├── data                        \u003c- Create after cloning!\n    │   ├── interim                 \u003c- Intermediate data that has been transformed.\n    │   └── processed               \u003c- The final data used for experiments.\n    │\n    ├── models                      \u003c- Create after cloning! Trained and serialized models, model predictions, or model summaries.\n    │\n    ├── notebooks                   \u003c- Jupyter notebooks (for plots)\n    │\n    ├── reports                     \u003c- Report\n    │\n    ├── requirements.txt            \u003c- The requirements file for reproducing the analysis environment, e.g.\n    │                                       generated with `pip freeze \u003e requirements.txt`\n    │\n    ├── evaluation                  \u003c- Evaluation script for selected GLUE-tasks.\n    │\n    └── neg_udl                     \u003c- Source code for use in this project.\n\n\n--------\n\n\u003cp\u003e\u003csmall\u003eProject based on the \u003ca target=\"_blank\" href=\"https://drivendata.github.io/cookiecutter-data-science/\"\u003ecookiecutter data science project template\u003c/a\u003e. #cookiecutterdatascience\u003c/small\u003e\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flazerlambda%2Fudl-negation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flazerlambda%2Fudl-negation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flazerlambda%2Fudl-negation/lists"}