[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-MadryLab--cifar10_challenge":3,"tool-MadryLab--cifar10_challenge":64},[4,17,26,40,48,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,2,"2026-04-03T11:11:01",[13,14,15],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":23,"last_commit_at":32,"category_tags":33,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,34,35,36,15,37,38,13,39],"数据工具","视频","插件","其他","语言模型","音频",{"id":41,"name":42,"github_repo":43,"description_zh":44,"stars":45,"difficulty_score":10,"last_commit_at":46,"category_tags":47,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,38,37],{"id":49,"name":50,"github_repo":51,"description_zh":52,"stars":53,"difficulty_score":10,"last_commit_at":54,"category_tags":55,"status":16},519,"PaddleOCR","PaddlePaddle\u002FPaddleOCR","PaddleOCR 是一款基于百度飞桨框架开发的高性能开源光学字符识别工具包。它的核心能力是将图片、PDF 等文档中的文字提取出来，转换成计算机可读取的结构化数据，让机器真正“看懂”图文内容。\n\n面对海量纸质或电子文档，PaddleOCR 解决了人工录入效率低、数字化成本高的问题。尤其在人工智能领域，它扮演着连接图像与大型语言模型（LLM）的桥梁角色，能将视觉信息直接转化为文本输入，助力智能问答、文档分析等应用场景落地。\n\nPaddleOCR 适合开发者、算法研究人员以及有文档自动化需求的普通用户。其技术优势十分明显：不仅支持全球 100 多种语言的识别，还能在 Windows、Linux、macOS 等多个系统上运行，并灵活适配 CPU、GPU、NPU 等各类硬件。作为一个轻量级且社区活跃的开源项目，PaddleOCR 既能满足快速集成的需求，也能支撑前沿的视觉语言研究，是处理文字识别任务的理想选择。",74913,"2026-04-05T10:44:17",[38,14,13,37],{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":23,"last_commit_at":62,"category_tags":63,"status":16},2471,"tesseract","tesseract-ocr\u002Ftesseract","Tesseract 是一款历史悠久且备受推崇的开源光学字符识别（OCR）引擎，最初由惠普实验室开发，后由 Google 维护，目前由全球社区共同贡献。它的核心功能是将图片中的文字转化为可编辑、可搜索的文本数据，有效解决了从扫描件、照片或 PDF 文档中提取文字信息的难题，是数字化归档和信息自动化的重要基础工具。\n\n在技术层面，Tesseract 展现了强大的适应能力。从版本 4 开始，它引入了基于长短期记忆网络（LSTM）的神经网络 OCR 引擎，显著提升了行识别的准确率；同时，为了兼顾旧有需求，它依然支持传统的字符模式识别引擎。Tesseract 原生支持 UTF-8 编码，开箱即用即可识别超过 100 种语言，并兼容 PNG、JPEG、TIFF 等多种常见图像格式。输出方面，它灵活支持纯文本、hOCR、PDF、TSV 等多种格式，方便后续数据处理。\n\nTesseract 主要面向开发者、研究人员以及需要构建文档处理流程的企业用户。由于它本身是一个命令行工具和库（libtesseract），不包含图形用户界面（GUI），因此最适合具备一定编程能力的技术人员集成到自动化脚本或应用程序中",73286,"2026-04-03T01:56:45",[13,14],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":69,"readme_en":70,"readme_zh":71,"quickstart_zh":72,"use_case_zh":73,"hero_image_url":74,"owner_login":75,"owner_name":76,"owner_avatar_url":77,"owner_bio":78,"owner_company":79,"owner_location":79,"owner_email":79,"owner_twitter":79,"owner_website":80,"owner_url":81,"languages":82,"stars":87,"forks":88,"last_commit_at":89,"license":90,"difficulty_score":10,"env_os":91,"env_gpu":92,"env_ram":91,"env_deps":93,"category_tags":100,"github_topics":79,"view_count":23,"oss_zip_url":79,"oss_zip_packed_at":79,"status":16,"created_at":101,"updated_at":102,"faqs":103,"releases":134},3043,"MadryLab\u002Fcifar10_challenge","cifar10_challenge"," A challenge to explore adversarial robustness of neural networks on CIFAR10.","cifar10_challenge 是一个专注于评估神经网络在 CIFAR-10 数据集上对抗鲁棒性的开源挑战项目。随着针对神经网络的对抗攻击技术（如 CleverHans 库）日益成熟，如何准确衡量模型的防御能力成为关键难题。该项目通过提供一个经过对抗训练的高鲁棒性模型（初期权重保密），邀请全球研究者提交攻击样本，旨在找出能让该模型准确率显著下降的对抗示例，从而厘清当前对抗防御技术的真实水平。\n\n这一挑战有效解决了以往防御机制评估中标准不一、复现困难的问题，为学术界提供了一个公平、透明的基准测试平台。它特别适合人工智能领域的研究人员、算法工程师以及对模型安全性感兴趣的开发者使用。通过参与挑战，用户可以验证自己提出的攻击算法有效性，或借鉴榜单上的顶尖方案优化防御策略。\n\n项目的独特亮点在于其严谨的“攻防演练”模式：不仅公开了训练代码和网络架构，还建立了动态排行榜，实时展示黑盒与白盒攻击下的最新突破成果。例如，榜单记录了从基础的 FGSM 到先进的引导式局部攻击等多种技术在不同阶段的表现。这种机制极大地促进了社区协作，推动了深度学习模型安全性的实证研究与技术进步。","# CIFAR10 Adversarial Examples Challenge\r\n\r\nRecently, there has been much progress on adversarial *attacks* against neural networks, such as the [cleverhans](https:\u002F\u002Fgithub.com\u002Ftensorflow\u002Fcleverhans) library and the code by [Carlini and Wagner](https:\u002F\u002Fgithub.com\u002Fcarlini\u002Fnn_robust_attacks).\r\nWe now complement these advances by proposing an *attack challenge* for the\r\n[CIFAR10 dataset](https:\u002F\u002Fwww.cs.toronto.edu\u002F~kriz\u002Fcifar.html) which follows the\r\nformat of [our earlier MNIST challenge](https:\u002F\u002Fgithub.com\u002FMadryLab\u002Fmnist_challenge).\r\nWe have trained a robust network, and the objective is to find a set of adversarial examples on which this network achieves only a low accuracy.\r\nTo train an adversarially-robust network, we followed the approach from our recent paper:\r\n\r\n**Towards Deep Learning Models Resistant to Adversarial Attacks** \u003Cbr>\r\n*Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, Adrian Vladu* \u003Cbr>\r\nhttps:\u002F\u002Farxiv.org\u002Fabs\u002F1706.06083.\r\n\r\nAs part of the challenge, we release both the training code and the network architecture, but keep the network weights secret.\r\nWe invite any researcher to submit attacks against our model (see the detailed instructions below).\r\nWe will maintain a leaderboard of the best attacks for the next two months and then publish our secret network weights.\r\n\r\nAnalogously to our MNIST challenge, the goal of this challenge is to clarify the state-of-the-art for adversarial robustness on CIFAR10. Moreover, we hope that future work on defense mechanisms will adopt a similar challenge format in order to improve reproducibility and empirical comparisons.\r\n\r\n**Update 2017-12-10**: We released our secret model. You can download it by running `python fetch_model.py secret`. As of Dec 10 we are no longer accepting black-box challenge submissions. We have set up a leaderboard for white-box attacks on the (now released) secret model. The submission format is the same as before. We plan to continue evaluating submissions and maintaining the leaderboard for the foreseeable future.\r\n\r\n## Black-Box Leaderboard (Original Challenge)\r\n\r\n| Attack                                 | Submitted by  | Accuracy | Submission Date |\r\n| -------------------------------------- | ------------- | -------- | ---- |\r\n| PGD on the cross-entropy loss for the\u003Cbr> adversarially trained public network     | (initial entry)       | **63.39%**   | Jul 12, 2017    |\r\n| PGD on the [CW](https:\u002F\u002Fgithub.com\u002Fcarlini\u002Fnn_robust_attacks) loss for the\u003Cbr> adversarially trained public network     | (initial entry)       | 64.38%   | Jul 12, 2017    |\r\n| FGSM on the [CW](https:\u002F\u002Fgithub.com\u002Fcarlini\u002Fnn_robust_attacks) loss for the\u003Cbr> adversarially trained public network     | (initial entry)       | 67.25%   | Jul 12, 2017    |\r\n| FGSM on the [CW](https:\u002F\u002Fgithub.com\u002Fcarlini\u002Fnn_robust_attacks) loss for the\u003Cbr> naturally trained public network     | (initial entry)       | 85.23%   | Jul 12, 2017    |\r\n\r\n## White-Box Leaderboard\r\n\r\n| Attack                                 | Submitted by  | Accuracy | Submission Date |\r\n| -------------------------------------- | ------------- | -------- | ---- |\r\n| Guided Local Attack | Siyuan Yi | **43.95%**   | Aug 2, 2021    |\r\n| [EWR-PGD](https:\u002F\u002Fgithub.com\u002Fliuye6666\u002FEWR-PGD) | Ye Liu | 43.96%   | Sep 8, 2020    |\r\n| [PGD attack with Output Diversified Initialization](https:\u002F\u002Farxiv.org\u002Fabs\u002F2003.06878) | Yusuke Tashiro | 43.99%   | Feb 15, 2020    |\r\n| [MultiTargeted](https:\u002F\u002Farxiv.org\u002Fabs\u002F1910.09338) | Sven Gowal | 44.03%   | Aug 28, 2019    |\r\n| [FAB: Fast Adaptive Boundary Attack](https:\u002F\u002Fgithub.com\u002Ffra31\u002Ffab-attack) | Francesco Croce       | 44.51%   | Jun 7, 2019    |\r\n| [Distributionally Adversarial Attack](https:\u002F\u002Fgithub.com\u002Ftianzheng4\u002FDistributionally-Adversarial-Attack) | Tianhang Zheng       | 44.71%   | Aug 21, 2018    |\r\n| 20-step PGD on the cross-entropy loss\u003Cbr> with 10 random restarts | Tianhang Zheng       | 45.21%   | Aug 24, 2018    |\r\n| 20-step PGD on the cross-entropy loss | (initial entry)       | 47.04%   | Dec 10, 2017    |\r\n| 20-step PGD on the [CW](https:\u002F\u002Fgithub.com\u002Fcarlini\u002Fnn_robust_attacks) loss | (initial entry)       | 47.76%   | Dec 10, 2017    |\r\n| FGSM on the [CW](https:\u002F\u002Fgithub.com\u002Fcarlini\u002Fnn_robust_attacks) loss | (initial entry)       | 54.92%   | Dec 10, 2017    |\r\n| FGSM on the cross-entropy loss | (initial entry)       | 55.55%   | Dec 10, 2017    |\r\n\r\n\r\n\r\n\r\n\r\n## Format and Rules\r\n\r\nThe objective of the challenge is to find black-box (transfer) attacks that are effective against our CIFAR10 model.\r\nAttacks are allowed to perturb each pixel of the input image by at most `epsilon=8.0` on a `0-255` pixel scale.\r\nTo ensure that the attacks are indeed black-box, we release our training code and model architecture, but keep the actual network weights secret. \r\n\r\nWe invite any interested researchers to submit attacks against our model.\r\nThe most successful attacks will be listed in the leaderboard above.\r\nAs a reference point, we have seeded the leaderboard with the results of some standard attacks.\r\n\r\n### The CIFAR10 Model\r\n\r\nWe used the code published in this repository to produce an adversarially robust model for CIFAR10 classification. The model is a residual convolutional neural network consisting of five residual units and a fully connected layer. This architecture is derived from the \"w32-10 wide\" variant of the [Tensorflow model repository](https:\u002F\u002Fgithub.com\u002Ftensorflow\u002Fmodels\u002Fblob\u002Fmaster\u002Fresnet\u002Fresnet_model.py).\r\nThe network was trained against an iterative adversary that is allowed to perturb each pixel by at most `epsilon=8.0`.\r\n\r\nThe random seed used for training and the trained network weights will be kept secret.\r\n\r\nThe `sha256()` digest of our model file is:\r\n```\r\n555be6e892372599380c9da5d5f9802f9cbd098be8a47d24d96937a002305fd4\r\n```\r\nWe will release the corresponding model file on September 15 2017, which is roughly two months after the start of this competition. **Edit: We are extending the deadline for submitting attacks to October 15th due to requests.**\r\n\r\n### The Attack Model\r\n\r\nWe are interested in adversarial inputs that are derived from the CIFAR10 test set.\r\nEach pixel can be perturbed by at most `epsilon=8.0` from its initial value on the `0-255` pixel scale.\r\nAll pixels can be perturbed independently, so this is an l_infinity attack.\r\n\r\n### Submitting an Attack\r\n\r\nEach attack should consist of a perturbed version of the CIFAR10 test set.\r\nEach perturbed image in this test set should follow the above attack model. \r\n\r\nThe adversarial test set should be formated as a numpy array with one row per example and each row containing a 32x32x3\r\narray of pixels.\r\nHence the overall dimensions are 10,000x32x32x3.\r\nEach pixel must be in the [0, 255] range.\r\nSee the script `pgd_attack.py` for an attack that generates an adversarial test set in this format.\r\n\r\nIn order to submit your attack, save the matrix containing your adversarial examples with `numpy.save` and email the resulting file to cifar10.challenge@gmail.com. \r\nWe will then run the `run_attack.py` script on your file to verify that the attack is valid and to evaluate the accuracy of our secret model on your examples.\r\nAfter that, we will reply with the predictions of our model on each of your examples and the overall accuracy of our model on your evaluation set.\r\n\r\nIf the attack is valid and outperforms all current attacks in the leaderboard, it will appear at the top of the leaderboard.\r\nNovel types of attacks might be included in the leaderboard even if they do not perform best.\r\n\r\nWe strongly encourage you to disclose your attack method.\r\nWe would be happy to add a link to your code in our leaderboard.\r\n\r\n## Overview of the Code\r\nThe code consists of seven Python scripts and the file `config.json` that contains various parameter settings.\r\n\r\n### Running the code\r\n- `python train.py`: trains the network, storing checkpoints along\r\n      the way.\r\n- `python eval.py`: an infinite evaluation loop, processing each new\r\n      checkpoint as it is created while logging summaries. It is intended\r\n      to be run in parallel with the `train.py` script.\r\n- `python pgd_attack.py`:  applies the attack to the CIFAR10 eval set and\r\n      stores the resulting adversarial eval set in a `.npy` file. This file is\r\n      in a valid attack format for our challenge.\r\n- `python run_attack.py`: evaluates the model on the examples in\r\n      the `.npy` file specified in config, while ensuring that the adversarial examples \r\n      are indeed a valid attack. The script also saves the network predictions in `pred.npy`.\r\n- `python fetch_model.py name`: downloads the pre-trained model with the\r\n      specified name (at the moment `adv_trained` or `natural`), prints the sha256\r\n      hash, and places it in the models directory.\r\n- `cifar10_input.py` provides utility functions and classes for loading the CIFAR10 dataset.\r\n\r\n### Parameters in `config.json`\r\n\r\nModel configuration:\r\n- `model_dir`: contains the path to the directory of the currently \r\n      trained\u002Fevaluated model.\r\n\r\nTraining configuration:\r\n- `tf_random_seed`: the seed for the RNG used to initialize the network\r\n      weights.\r\n- `numpy_random_seed`: the seed for the RNG used to pass over the dataset in random order\r\n- `max_num_training_steps`: the number of training steps.\r\n- `num_output_steps`: the number of training steps between printing\r\n      progress in standard output.\r\n- `num_summary_steps`: the number of training steps between storing\r\n      tensorboard summaries.\r\n- `num_checkpoint_steps`: the number of training steps between storing\r\n      model checkpoints.\r\n- `training_batch_size`: the size of the training batch.\r\n\r\nEvaluation configuration:\r\n- `num_eval_examples`: the number of CIFAR10 examples to evaluate the\r\n      model on.\r\n- `eval_batch_size`: the size of the evaluation batches.\r\n- `eval_on_cpu`: forces the `eval.py` script to run on the CPU so it does not compete with `train.py` for GPU resources.\r\n\r\nAdversarial examples configuration:\r\n- `epsilon`: the maximum allowed perturbation per pixel.\r\n- `k`: the number of PGD iterations used by the adversary.\r\n- `a`: the size of the PGD adversary steps.\r\n- `random_start`: specifies whether the adversary will start iterating\r\n      from the natural example or a random perturbation of it.\r\n- `loss_func`: the loss function used to run pgd on. `xent` corresponds to the\r\n      standard cross-entropy loss, `cw` corresponds to the loss function \r\n      of [Carlini and Wagner](https:\u002F\u002Farxiv.org\u002Fabs\u002F1608.04644).\r\n- `store_adv_path`: the file in which adversarial examples are stored.\r\n      Relevant for the `pgd_attack.py` and `run_attack.py` scripts.\r\n\r\n## Example usage\r\nAfter cloning the repository you can either train a new network or evaluate\u002Fattack one of our pre-trained networks.\r\n#### Training a new network\r\n* Start training by running:\r\n```\r\npython train.py\r\n```\r\n* (Optional) Evaluation summaries can be logged by simultaneously\r\n  running:\r\n```\r\npython eval.py\r\n```\r\n#### Download a pre-trained network\r\n* For an adversarially trained network, run\r\n```\r\npython fetch_model.py adv_trained\r\n```\r\nand use the `config.json` file to set `\"model_dir\": \"models\u002Fadv_trained\"`.\r\n* For a naturally trained network, run\r\n```\r\npython fetch_model.py natural\r\n```\r\nand use the `config.json` file to set `\"model_dir\": \"models\u002Fnaturally_trained\"`.\r\n#### Test the network\r\n* Create an attack file by running\r\n```\r\npython pgd_attack.py\r\n```\r\n* Evaluate the network with\r\n```\r\npython run_attack.py\r\n```\r\n","# CIFAR10 对抗样本挑战赛\n\n最近，针对神经网络的对抗性攻击取得了许多进展，例如 [CleverHans](https:\u002F\u002Fgithub.com\u002Ftensorflow\u002Fcleverhans) 库以及 [Carlini 和 Wagner](https:\u002F\u002Fgithub.com\u002Fcarlini\u002Fnn_robust_attacks) 的代码。我们现在通过为 [CIFAR10 数据集](https:\u002F\u002Fwww.cs.toronto.edu\u002F~kriz\u002Fcifar.html) 提出一项 *攻击挑战* 来补充这些进展，该挑战遵循我们之前 [MNIST 挑战](https:\u002F\u002Fgithub.com\u002FMadryLab\u002Fmnist_challenge) 的格式。我们已经训练了一种鲁棒网络，目标是找到一组对抗样本，使得该网络在这些样本上的准确率极低。为了训练这种对抗鲁棒网络，我们采用了近期论文中的方法：\n\n**迈向对抗攻击防御的深度学习模型** \u003Cbr>\n*Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, Adrian Vladu* \u003Cbr>\nhttps:\u002F\u002Farxiv.org\u002Fabs\u002F1706.06083。\n\n作为挑战的一部分，我们公开了训练代码和网络架构，但保留了网络权重的秘密。我们邀请所有研究人员提交针对我们模型的攻击（详见下文说明）。未来两个月内，我们将维护最佳攻击排行榜，随后公布我们的秘密网络权重。\n\n与我们的 MNIST 挑战类似，本次挑战的目标是明确 CIFAR10 上对抗鲁棒性的最新技术水平。此外，我们希望未来的防御机制研究也能采用类似的挑战形式，以提高可重复性和实验比较的可靠性。\n\n**更新 2017-12-10**：我们已发布秘密模型。您可以通过运行 `python fetch_model.py secret` 下载该模型。自 12 月 10 日起，我们不再接受黑盒挑战提交。我们已为白盒攻击（针对现已发布的秘密模型）设立了排行榜，提交格式与之前相同。我们计划在可预见的未来继续评估提交内容并维护排行榜。\n\n## 黑盒排行榜（原始挑战）\n\n| 攻击                                 | 提交者  | 准确率 | 提交日期 |\n| -------------------------------------- | ------------- | -------- | ---- |\n| 针对对抗训练的公开网络，在交叉熵损失上使用 PGD     | （初始条目）       | **63.39%**   | 2017年7月12日    |\n| 针对对抗训练的公开网络，在 [CW](https:\u002F\u002Fgithub.com\u002Fcarlini\u002Fnn_robust_attacks) 损失上使用 PGD     | （初始条目）       | 64.38%   | 2017年7月12日    |\n| 针对对抗训练的公开网络，在 [CW](https:\u002F\u002Fgithub.com\u002Fcarlini\u002Fnn_robust_attacks) 损失上使用 FGSM     | （初始条目）       | 67.25%   | 2017年7月12日    |\n| 针对自然训练的公开网络，在 [CW](https:\u002F\u002Fgithub.com\u002Fcarlini\u002Fnn_robust_attacks) 损失上使用 FGSM     | （初始条目）       | 85.23%   | 2017年7月12日    |\n\n## 白盒排行榜\n\n| 攻击                                 | 提交者  | 准确率 | 提交日期 |\n| -------------------------------------- | ------------- | -------- | ---- |\n| 引导局部攻击 | Siyuan Yi | **43.95%**   | 2021年8月2日    |\n| [EWR-PGD](https:\u002F\u002Fgithub.com\u002Fliuye6666\u002FEWR-PGD) | Ye Liu | 43.96%   | 2020年9月8日    |\n| [输出多样化初始化的 PGD 攻击](https:\u002F\u002Farxiv.org\u002Fabs\u002F2003.06878) | Yusuke Tashiro | 43.99%   | 2020年2月15日    |\n| [多目标攻击](https:\u002F\u002Farxiv.org\u002Fabs\u002F1910.09338) | Sven Gowal | 44.03%   | 2019年8月28日    |\n| [FAB：快速自适应边界攻击](https:\u002F\u002Fgithub.com\u002Ffra31\u002Ffab-attack) | Francesco Croce       | 44.51%   | 2019年6月7日    |\n| [分布对抗攻击](https:\u002F\u002Fgithub.com\u002Ftianzheng4\u002FDistributionally-Adversarial-Attack) | Tianhang Zheng       | 44.71%   | 2018年8月21日    |\n| 在交叉熵损失上进行 20 步 PGD，并随机重启 10 次 | Tianhang Zheng       | 45.21%   | 2018年8月24日    |\n| 在交叉熵损失上进行 20 步 PGD | （初始条目）       | 47.04%   | 2017年12月10日    |\n| 在 [CW](https:\u002F\u002Fgithub.com\u002Fcarlini\u002Fnn_robust_attacks) 损失上进行 20 步 PGD | （初始条目）       | 47.76%   | 2017年12月10日    |\n| 在 [CW](https:\u002F\u002Fgithub.com\u002Fcarlini\u002Fnn_robust_attacks) 损失上使用 FGSM | （初始条目）       | 54.92%   | 2017年12月10日    |\n| 在交叉熵损失上使用 FGSM | （初始条目）       | 55.55%   | 2017年12月10日    |\n\n\n\n## 格式与规则\n\n挑战的目标是寻找对我们的 CIFAR10 模型有效的黑盒（迁移）攻击。允许攻击将输入图像的每个像素在 0–255 的像素范围内最多扰动 `epsilon=8.0`。为确保攻击确实是黑盒性质，我们公开了训练代码和模型架构，但保留了实际的网络权重秘密。\n\n我们诚邀所有感兴趣的研究人员提交针对我们模型的攻击。最成功的攻击将被列入上述排行榜。作为参考，我们已在排行榜中预置了一些标准攻击的结果。\n\n### CIFAR10 模型\n\n我们使用本仓库中发布的代码，训练了一个用于 CIFAR10 分类的对抗鲁棒模型。该模型是一个残差卷积神经网络，由五个残差单元和一个全连接层组成。此架构源自 [TensorFlow 模型库](https:\u002F\u002Fgithub.com\u002Ftensorflow\u002Fmodels\u002Fblob\u002Fmaster\u002Fresnet\u002Fresnet_model.py) 中的“w32-10 wide”变体。该网络是在迭代对抗环境下训练的，允许对手对每个像素的最大扰动幅度为 `epsilon=8.0`。\n\n用于训练的随机种子以及训练好的网络权重将被保密。\n\n我们模型文件的 `sha256()` 摘要如下：\n```\n555be6e892372599380c9da5d5f9802f9cbd098be8a47d24d96937a002305fd4\n```\n我们将于 2017 年 9 月 15 日发布对应的模型文件，这大约是在本次竞赛开始后的两个月。**编辑：应大家要求，我们将提交攻击的截止日期延长至 10 月 15 日。**\n\n### 攻击模型\n\n我们关注的是基于 CIFAR10 测试集生成的对抗性输入。每个像素在其初始值的基础上，可在 0–255 的像素范围内最多扰动 `epsilon=8.0`。所有像素可以独立扰动，因此这是一种 l_infinity 范数下的攻击。\n\n### 提交攻击\n\n每个攻击应由 CIFAR10 测试集的扰动版本组成。该测试集中的每张扰动图像都应遵循上述攻击模型。\n\n对抗性测试集应以 NumPy 数组的形式呈现，每行为一个样本，每一行包含一个 32×32×3 的像素数组。因此，整体维度为 10,000×32×32×3。每个像素的取值范围必须在 [0, 255] 内。请参阅脚本 `pgd_attack.py`，其中实现了一种生成此格式对抗性测试集的攻击方法。\n\n要提交您的攻击，请使用 `numpy.save` 将包含对抗样本的矩阵保存下来，并将生成的文件发送至 cifar10.challenge@gmail.com。随后，我们将对您的文件运行 `run_attack.py` 脚本，以验证攻击的有效性，并评估我们的秘密模型在您提供的样本上的准确率。之后，我们会回复您关于我们模型对每个样本的预测结果以及模型在您评估集上的总体准确率。\n\n如果攻击有效且性能优于排行榜上所有现有攻击，则该攻击将显示在排行榜顶部。即使某些新型攻击并未取得最佳效果，也可能被纳入排行榜。\n\n我们强烈鼓励您公开您的攻击方法。我们很乐意在排行榜中添加指向您代码的链接。\n\n## 代码概述\n代码由七份 Python 脚本和一个名为 `config.json` 的配置文件组成，后者包含了各种参数设置。\n\n### 代码运行说明\n- `python train.py`：训练网络，并在训练过程中保存检查点。\n- `python eval.py`：无限循环的评估程序，会在新检查点生成时立即处理并记录摘要信息。该脚本通常与 `train.py` 并行运行。\n- `python pgd_attack.py`：对 CIFAR10 评估集应用攻击，并将生成的对抗性评估集保存为 `.npy` 文件。此文件符合我们挑战赛的有效攻击格式。\n- `python run_attack.py`：在 `config.json` 中指定的 `.npy` 文件所包含的样本上评估模型，同时确保这些对抗性样本确实构成有效的攻击。该脚本还会将模型预测结果保存到 `pred.npy` 文件中。\n- `python fetch_model.py name`：下载指定名称的预训练模型（目前支持 `adv_trained` 和 `natural`），打印其 SHA-256 哈希值，并将其放置在 `models` 目录中。\n- `cifar10_input.py` 提供用于加载 CIFAR10 数据集的实用函数和类。\n\n### `config.json` 中的参数\n\n#### 模型配置：\n- `model_dir`：当前正在训练或评估的模型目录路径。\n\n#### 训练配置：\n- `tf_random_seed`：用于初始化网络权重的随机数生成器种子。\n- `numpy_random_seed`：用于以随机顺序遍历数据集的随机数生成器种子。\n- `max_num_training_steps`：最大训练步数。\n- `num_output_steps`：每多少步在标准输出中打印一次进度。\n- `num_summary_steps`：每多少步存储一次 TensorBoard 摘要。\n- `num_checkpoint_steps`：每多少步保存一次模型检查点。\n- `training_batch_size`：训练批次大小。\n\n#### 评估配置：\n- `num_eval_examples`：用于评估模型的 CIFAR10 样本数量。\n- `eval_batch_size`：评估批次大小。\n- `eval_on_cpu`：强制 `eval.py` 脚本在 CPU 上运行，以避免与 `train.py` 脚本争夺 GPU 资源。\n\n#### 对抗性样本配置：\n- `epsilon`：每个像素允许的最大扰动幅度。\n- `k`：攻击者使用的 PGD 迭代次数。\n- `a`：PGD 攻击步长。\n- `random_start`：指定攻击者是从原始样本开始迭代，还是从其随机扰动版本开始。\n- `loss_func`：用于执行 PGD 的损失函数。`xent` 对应标准交叉熵损失，`cw` 对应 [Carlini 和 Wagner](https:\u002F\u002Farxiv.org\u002Fabs\u002F1608.04644) 提出的损失函数。\n- `store_adv_path`：存储对抗性样本的文件路径。此参数适用于 `pgd_attack.py` 和 `run_attack.py` 脚本。\n\n## 使用示例\n克隆仓库后，您可以选择训练新网络，也可以评估或攻击我们提供的预训练网络。\n\n#### 训练新网络\n* 启动训练：  \n```bash\npython train.py\n```\n* （可选）同时运行以下命令以记录评估摘要：  \n```bash\npython eval.py\n```\n\n#### 下载预训练网络\n* 对于对抗训练的网络，运行：  \n```bash\npython fetch_model.py adv_trained\n```\n并修改 `config.json` 文件，将 `\"model_dir\": \"models\u002Fadv_trained\"`。\n* 对于自然训练的网络，运行：  \n```bash\npython fetch_model.py natural\n```\n并修改 `config.json` 文件，将 `\"model_dir\": \"models\u002Fnaturally_trained\"`。\n\n#### 测试网络\n* 通过运行以下命令创建攻击文件：  \n```bash\npython pgd_attack.py\n```\n* 然后使用以下命令评估网络：  \n```bash\npython run_attack.py\n```","# CIFAR10 对抗样本挑战快速上手指南\n\n本指南帮助开发者快速部署 `cifar10_challenge` 项目，用于复现对抗训练模型或生成对抗样本以测试模型鲁棒性。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**: Linux 或 macOS (Windows 需配置兼容环境)\n*   **Python**: 推荐 Python 3.6+ (基于原始代码库的 TensorFlow 版本兼容性)\n*   **核心依赖**:\n    *   TensorFlow (建议版本 1.x，参考原项目 `requirements.txt` 或根据报错调整)\n    *   NumPy\n    *   Pillow (用于图像处理)\n*   **硬件**: 推荐使用 NVIDIA GPU 进行训练和攻击生成，CPU 仅适用于评估或小规模测试。\n\n**安装依赖命令：**\n```bash\npip install -r requirements.txt\n# 如果项目中没有 requirements.txt，可手动安装核心包：\npip install tensorflow-gpu==1.12.0 numpy pillow\n```\n> **提示**：国内用户可使用清华源加速安装：`pip install -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple ...`\n\n## 安装步骤\n\n1.  **克隆仓库**\n    从 GitHub 获取源代码：\n    ```bash\n    git clone https:\u002F\u002Fgithub.com\u002FMadryLab\u002Fcifar10_challenge.git\n    cd cifar10_challenge\n    ```\n\n2.  **下载预训练模型**\n    项目提供了两种预训练权重：对抗训练模型 (`adv_trained`) 和自然训练模型 (`natural`)。运行以下脚本下载（会自动验证 SHA256 哈希值）：\n\n    *   下载对抗训练模型（挑战用目标模型）：\n        ```bash\n        python fetch_model.py adv_trained\n        ```\n    *   下载自然训练模型（基准对比）：\n        ```bash\n        python fetch_model.py natural\n        ```\n\n3.  **配置模型路径**\n    打开 `config.json` 文件，根据下载的模型修改 `model_dir` 字段。\n    *   若使用对抗训练模型，设置为：`\"model_dir\": \"models\u002Fadv_trained\"`\n    *   若使用自然训练模型，设置为：`\"model_dir\": \"models\u002Fnaturally_trained\"`\n\n## 基本使用\n\n以下是生成对抗样本并评估模型准确率的最简流程。\n\n### 1. 生成对抗样本\n使用 PGD (Projected Gradient Descent) 算法针对当前配置的模型生成对抗测试集。生成的文件将保存为 `.npy` 格式。\n\n```bash\npython pgd_attack.py\n```\n*执行成功后，将在 `store_adv_path` 指定的路径（默认为 `adv_examples.npy`）生成对抗样本矩阵 (10000x32x32x3)。*\n\n### 2. 评估模型准确率\n使用生成的对抗样本文件评估模型的鲁棒性。该脚本会验证样本是否符合扰动限制（$\\epsilon \\le 8.0$），并输出模型在这些样本上的预测结果及整体准确率。\n\n```bash\npython run_attack.py\n```\n*运行结束后，查看终端输出的准确率数据，同时会在目录下生成 `pred.npy` 包含具体预测标签。*\n\n### 3. (可选) 从头训练模型\n如果您希望复现训练过程而非使用预训练权重：\n\n```bash\n# 启动训练\npython train.py\n\n# (并行运行) 启动评估监控\npython eval.py\n```","某自动驾驶初创公司的算法团队正在开发基于视觉的交通标志识别系统，急需验证其模型在对抗样本攻击下的鲁棒性以确保行车安全。\n\n### 没有 cifar10_challenge 时\n- **缺乏统一评测标准**：团队只能自行构建测试集，不同成员使用的攻击算法（如 FGSM、PGD）参数不一，导致评估结果无法横向对比，难以判断模型真实防御水平。\n- **复现前沿攻击成本高**：研究人员需花费数周时间从零复现 Carlini-Wagner 等复杂攻击代码，且常因细节缺失导致攻击效果不佳，误判模型安全性。\n- **陷入“虚假安全”陷阱**：由于未经历高强度、多样化的对抗训练挑战，模型在内部测试中准确率看似很高，实则存在严重盲区，部署后极易被恶意干扰误导。\n- **社区协作困难**：闭门造车式的测试无法利用全球研究者的智慧，错过了发现深层漏洞的机会，延缓了防御机制的迭代速度。\n\n### 使用 cifar10_challenge 后\n- **确立行业基准线**：直接接入挑战提供的标准化测试流程和白盒\u002F黑榜排行榜，团队能立即将自家模型与全球顶尖攻击算法（如 Guided Local Attack）进行公平对标。\n- **快速获取最强攻击样本**：利用挑战中开源的训练代码和已释放的权重，团队可瞬间生成涵盖多种策略的高质量对抗样本，将验证周期从数周缩短至数小时。\n- **暴露真实脆弱点**：通过挑战中积累的多样化攻击案例（如多目标攻击、分布对抗攻击），团队精准定位了模型在特定噪声下的失效模式，从而针对性地加固防御。\n- **融入全球科研生态**：提交攻击结果至排行榜不仅验证了自身能力，还促进了与社区的技术交流，加速了鲁棒性方案的落地应用。\n\ncifar10_challenge 通过提供标准化的对抗攻防竞技场，帮助开发者打破自测局限，以最低成本验证并提升神经网络在真实对抗环境中的生存能力。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FMadryLab_cifar10_challenge_4425c1de.png","MadryLab","Madry Lab","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FMadryLab_4dfbd7f6.png","Towards a Principled Science of Deep Learning",null,"madry-lab.ml","https:\u002F\u002Fgithub.com\u002FMadryLab",[83],{"name":84,"color":85,"percentage":86},"Python","#3572A5",100,510,131,"2026-04-02T07:41:45","MIT","未说明","训练和评估脚本支持 GPU 加速（eval.py 可配置在 CPU 运行以避免占用训练资源），具体型号、显存大小及 CUDA 版本未说明",{"notes":94,"python":95,"dependencies":96},"该项目基于较旧的 TensorFlow 版本（参考了 tensorflow\u002Fmodels 中的 ResNet 实现），主要依赖 numpy 处理数据。挑战的核心是生成符合特定格式（10000x32x32x3 numpy 数组）的对抗样本文件。原始挑战中秘密模型权重已公开，可通过 fetch_model.py 下载。配置参数存储在 config.json 中，可调整训练步数、批量大小及对抗攻击参数（如 epsilon=8.0）。","未说明 (基于 TensorFlow 1.x 环境)",[97,98,99],"tensorflow","numpy","cleverhans",[14,37],"2026-03-27T02:49:30.150509","2026-04-06T06:46:11.615867",[104,109,114,119,124,129],{"id":105,"question_zh":106,"answer_zh":107,"source_url":108},14016,"为什么论文中黑盒攻击（Black-box）的准确率比白盒攻击（White-box）更低（即黑盒攻击看起来更强）？","这是一个有趣的观察，但不应基于比较弱白盒攻击和弱黑盒攻击的相对性能来得出结论。通常情况下，PGD 攻击应比 FGSM 更强大，且准确率应更低。但在任何设置下，都不应期望基于迁移的黑盒 FGSM 攻击比白盒 FGSM 攻击更强大（尤其是差距达到约 10% 时）。这可能意味着在特定实验设置下，直接比较不同强度的攻击指标会产生误导。","https:\u002F\u002Fgithub.com\u002FMadryLab\u002Fcifar10_challenge\u002Fissues\u002F6",{"id":110,"question_zh":111,"answer_zh":112,"source_url":113},14017,"训练后保存了约 80 个模型，应该如何选择“最佳”模型进行评估？","论文表 5 中报告的模型通常就是训练结束时的最后一个模型（last model from training）。在选择模型时需注意对抗过拟合（overfitting the adversary）的问题：如果仅选择在训练对抗样本上鲁棒性最高的模型，其在干净数据上的准确率可能不佳。因此，通常直接使用训练流程结束时的最终模型，而不是根据中间某个指标挑选。","https:\u002F\u002Fgithub.com\u002FMadryLab\u002Fcifar10_challenge\u002Fissues\u002F5",{"id":115,"question_zh":116,"answer_zh":117,"source_url":118},14018,"仓库中默认的预训练模型是 Wide ResNet 还是标准 ResNet？如何获取具体的网络架构代码？","发布的 `adv_trained` 模型对应的是 Wide ResNet 变体（这是仓库的默认模型）。非 Wide 变体需要将 `filters` 设置为 `[16, 16, 32, 64]`，但该变体没有公开的预训练模型。具体的模型架构定义在 `model.py` 文件的第 50 行附近（https:\u002F\u002Fgithub.com\u002FMadryLab\u002Fcifar10_challenge\u002Fblob\u002Fmaster\u002Fmodel.py#L50）。如果需要标准架构（如 ResNet50），可以参考 MadryLab 新发布的 PyTorch 库：https:\u002F\u002Fgithub.com\u002FMadryLab\u002Frobustness。","https:\u002F\u002Fgithub.com\u002FMadryLab\u002Fcifar10_challenge\u002Fissues\u002F13",{"id":120,"question_zh":121,"answer_zh":122,"source_url":123},14019,"在训练过程中，如何判断模型是否已经收敛？","主要通过观察训练集和测试集的损失（loss）及准确率（accuracy）曲线来判断。当这些指标趋于稳定时，通常认为模型已收敛。","https:\u002F\u002Fgithub.com\u002FMadryLab\u002Fcifar10_challenge\u002Fissues\u002F17",{"id":125,"question_zh":126,"answer_zh":127,"source_url":128},14020,"训练后期交叉熵损失接近 0 是否正常？学习率调整时是否需要重新创建优化器以保留动量参数？","1. 训练后期损失接近 0 是正常的，因为模型足够宽（Wide），可以完美拟合训练集。\n2. 在学习率调整（learning rate drop）时，不需要创建新的优化器。只需直接向动量优化器（momentumOptimizer）提供一个学习率调度计划（LR schedule），动量参数会被自动保留和更新。","https:\u002F\u002Fgithub.com\u002FMadryLab\u002Fcifar10_challenge\u002Fissues\u002F16",{"id":130,"question_zh":131,"answer_zh":132,"source_url":133},14021,"为什么将标准化（normalization\u002Fstandardization）作为模型的一部分而不是数据预处理步骤？每图像标准化与全数据集标准化有何区别？","1. 将标准化放在模型内部是为了方便处理对抗约束。因为我们在输入空间定义了 epsilon 约束（每个像素最多变化 8\u002F255），如果预处理时做了标准化，就需要同时对 epsilon 进行标准化转换。将标准化放入模型后，对抗攻击在生成扰动时会自动反向传播通过标准化层，从而确保约束在原始像素空间正确应用。\n2. 选择每图像标准化（per_image_standardization）而非全数据集标准化没有特别深层的原因，主要是遵循了当时找到的 CIFAR10 TensorFlow 流水线实现。两者的目标都是使输入分布具有零均值和单位方差。","https:\u002F\u002Fgithub.com\u002FMadryLab\u002Fcifar10_challenge\u002Fissues\u002F15",[]]