{"id":29167291,"url":"https://github.com/applied-machine-learning-lab/seed-attack","last_synced_at":"2025-07-01T09:09:28.117Z","repository":{"id":296959975,"uuid":"900668678","full_name":"Applied-Machine-Learning-Lab/SEED-Attack","owner":"Applied-Machine-Learning-Lab","description":"[ACL'25]Code implementation of ACL‘25 paper \"Stepwise Reasoning Disruption Attack of LLMs\"","archived":false,"fork":false,"pushed_at":"2025-06-03T04:11:10.000Z","size":16741,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-03T16:25:03.236Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/Applied-Machine-Learning-Lab.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":"2024-12-09T08:52:04.000Z","updated_at":"2025-06-03T04:11:12.000Z","dependencies_parsed_at":"2025-06-03T16:35:06.536Z","dependency_job_id":null,"html_url":"https://github.com/Applied-Machine-Learning-Lab/SEED-Attack","commit_stats":null,"previous_names":["applied-machine-learning-lab/seed-attack"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Applied-Machine-Learning-Lab/SEED-Attack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Applied-Machine-Learning-Lab%2FSEED-Attack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Applied-Machine-Learning-Lab%2FSEED-Attack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Applied-Machine-Learning-Lab%2FSEED-Attack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Applied-Machine-Learning-Lab%2FSEED-Attack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Applied-Machine-Learning-Lab","download_url":"https://codeload.github.com/Applied-Machine-Learning-Lab/SEED-Attack/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Applied-Machine-Learning-Lab%2FSEED-Attack/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262933326,"owners_count":23386785,"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":[],"created_at":"2025-07-01T09:09:25.944Z","updated_at":"2025-07-01T09:09:28.098Z","avatar_url":"https://github.com/Applied-Machine-Learning-Lab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [ACL'25 Main] Stepwise Reasoning Disruption Attack of LLMs\n\nCode implementation of ACL paper \"Stepwise Reasoning Disruption Attack of LLMs\"\n\n\u003cp align='center'\u003e\n\u003cimg src=\"assets/method.png\" style=\"width: 80%;\" /\u003e\n\u003c/p\u003e\n\n\n## Usage\n\n### 1. Question Modification (`QuestionModification.py`)\n\nThis component modifies original questions while preserving their semantic meaning.\n\n```bash\npython QuestionModification.py \\\n    --llm_name \u003cmodel_name\u003e \\\n    --dataset \u003cdataset_name\u003e \\\n    --few_shot \u003cTrue/False\u003e \\\n```\n\n### 2. Solution Generation (`GetSolutionofQuestionModified.py`)\n\nGenerates CoT solutions for modified questions.\n\n```bash\npython GetSolutionofQuestionModified.py \\\n    --llm_name \u003cmodel_name\u003e \\\n    --dataset \u003cdataset_name\u003e \\\n    --few_shot \u003cTrue/False\u003e \\\n```\n\n\n### 3. SEED-P Attack (`SEEDpAttack.py`)\n\nPerforms the SEED-P attack by introducing prior reasoning steps of the modified question.\n\n```bash\npython SEEDpAttack.py \\\n    --llm_name \u003cmodel_name\u003e \\\n    --dataset \u003cdataset_name\u003e \\\n    --ratio \u003cfloat\u003e \\\n    --few_shot \u003cTrue/False\u003e \\\n```\n\n\n### 4. Evaluation (`Evaluation.py`)\n\nEvaluation the Accuracy and Attack Success Rate.\n\n\nStep1: Run baseline (no attack) for comparison:\n\n```bash\npython SEEDpAttack.py \\\n    --llm_name \u003cmodel_name\u003e \\\n    --dataset \u003cdataset_name\u003e \\\n    --ratio 0.0 \\\n    --few_shot \u003cTrue/False\u003e \\\n```\n\n\nStep 2: Compute ASR and Accuracy:\n\n```bash\npython Evaluation.py \n    --llm_name \u003cmodel_name\u003e \\\n    --dataset \u003cdataset_name\u003e \\\n    --ratio \u003cfloat\u003e \\\n    --few_shot \u003cTrue/False\u003e \\\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapplied-machine-learning-lab%2Fseed-attack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapplied-machine-learning-lab%2Fseed-attack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapplied-machine-learning-lab%2Fseed-attack/lists"}