{"id":19321854,"url":"https://github.com/abductivelearning/ablsim","last_synced_at":"2026-02-23T09:38:37.905Z","repository":{"id":38232662,"uuid":"435510860","full_name":"AbductiveLearning/ABLSim","owner":"AbductiveLearning","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-31T06:01:41.000Z","size":1016,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-22T19:44:42.195Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AbductiveLearning.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-12-06T13:38:59.000Z","updated_at":"2025-03-09T09:35:03.000Z","dependencies_parsed_at":"2025-04-22T19:42:30.574Z","dependency_job_id":"f87afdd3-01ee-410d-b05d-98c9a460cd19","html_url":"https://github.com/AbductiveLearning/ABLSim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AbductiveLearning/ABLSim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbductiveLearning%2FABLSim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbductiveLearning%2FABLSim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbductiveLearning%2FABLSim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbductiveLearning%2FABLSim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AbductiveLearning","download_url":"https://codeload.github.com/AbductiveLearning/ABLSim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbductiveLearning%2FABLSim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29741140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"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":[],"created_at":"2024-11-10T01:39:20.185Z","updated_at":"2026-02-23T09:38:37.876Z","avatar_url":"https://github.com/AbductiveLearning.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"🌟 **New!** [ABLkit](https://github.com/AbductiveLearning/ABLkit) released: A toolkit for Abductive Learning with high flexibility, user-friendly interface, and optimized performance. Welcome to try it out!🚀\r\n\r\n# Fast Abductive Learning by Similarity-based Consistency Optimization\r\n\r\nThis is the repository for holding the sample code of _[Fast Abductive Learning by Similarity-based Consistency Optimization](https://proceedings.neurips.cc/paper/2021/file/df7e148cabfd9b608090fa5ee3348bfe-Paper.pdf)_ in NeurIPS 2021.\r\n\r\nThis code is only tested in Linux environment.\r\n\r\n## Environment Dependency\r\n\r\n- Ubuntu 18.04\r\n- Python 3.7\r\n- PyTorch 1.7\r\n- CuPy 8.3\r\n- tqdm\r\n- scikit-learn\r\n- opencv-python\r\n\r\nTo create the above environment with [Anaconda](https://www.anaconda.com/products/distribution), you can run the following command (cudatoolkit=10.1 for old GPUs, cudatoolkit=11.3 for new GPUs / new drivers):\r\n\r\n (cudatoolkit=10.1)\r\n\r\n```\r\nconda create -n ablsim python=3.7 -y\r\nconda activate ablsim\r\nconda install -c conda-forge cupy cudatoolkit=10.1 -y\r\nconda install pytorch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0 cudatoolkit=10.1 -c pytorch -y\r\npip install tqdm opencv-python scikit-learn matplotlib\r\n```\r\n\r\n (cudatoolkit=11.3)\r\n\r\n```\r\nconda create -n ablsim python=3.7 -y\r\nconda activate ablsim\r\nconda install -c conda-forge cupy cudatoolkit=11.3 -y\r\nconda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch -y\r\npip install tqdm opencv-python scikit-learn matplotlib\r\n```\r\n\r\n## Running Code\r\n\r\nTo reproduce the experiment results, simply run the following code:\r\n\r\nDownload the [Handwritten_Math_Symbols.zip](https://drive.google.com/file/d/1tItMQAxoqKW6C4wC3tTc0asPu6zD9v4V/view?usp=sharing) from google drive and unzip it:\r\n\r\n```\r\nunzip Handwritten_Math_Symbols.zip -d data\r\n```\r\n\r\n- MNIST (CIFAR-10) Addition\r\n\r\n  ```\r\n  python main_1_2.py --dataset 2ADD --images handwritten \r\n  python main_1_2.py --dataset 2ADD --images CIFAR \r\n  ```\r\n\r\n- Handwritten Formula Recognition\r\n\r\n  ```\r\n  python main_1_2.py --dataset HWF --images handwritten\r\n  python main_1_2.py --dataset HWF --images CIFAR \r\n  ```\r\n\r\n- CIFAR-10 Decimal Equation Decipherment\r\n\r\n  Download the [images.zip](https://drive.google.com/file/d/15SvSF-mVLMjAKD5019IFGL9DgDtsLFQg/view?usp=sharing) and [ssl_mode.zip](https://drive.google.com/file/d/1dRdOiJnYqFpibypepEdI-v5lT5CdmwBf/view?usp=sharing) from google drive and unzip it:\r\n  \r\n  ```\r\n  unzip images.zip -d data\r\n  unzip ssl_model.zip\r\n  python main_3.py --images CIFAR\r\n  ```\r\n\r\nTo view or change the hyperparameters, please refer to the *arg_init()* function in the code.\r\n\r\n## Reference\r\n\r\n```\r\n@incollection{ablsim2021huang,\r\n\tauthor = {Huang, Yu-Xuan and Dai, Wang-Zhou and Cai, Le-Wen and Muggleton, Stephen H and Jiang, Yuan},\r\n\tbooktitle = {Advances in Neural Information Processing Systems 34},\r\n\tpages = {26574--26584},\r\n\ttitle = {Fast Abductive Learning by Similarity-based Consistency Optimization},\r\n\tyear = {2021}\r\n}\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabductivelearning%2Fablsim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabductivelearning%2Fablsim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabductivelearning%2Fablsim/lists"}