[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-sbi-dev--sbi":3,"tool-sbi-dev--sbi":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},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,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",160015,2,"2026-04-18T11:30:52",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",109154,"2026-04-18T11:18:24",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":32,"last_commit_at":59,"category_tags":60,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":64,"owner_avatar_url":73,"owner_bio":74,"owner_company":75,"owner_location":75,"owner_email":75,"owner_twitter":76,"owner_website":77,"owner_url":78,"languages":79,"stars":88,"forks":89,"last_commit_at":90,"license":91,"difficulty_score":92,"env_os":93,"env_gpu":94,"env_ram":93,"env_deps":95,"category_tags":102,"github_topics":104,"view_count":32,"oss_zip_url":75,"oss_zip_packed_at":75,"status":17,"created_at":111,"updated_at":112,"faqs":113,"releases":142},9269,"sbi-dev\u002Fsbi","sbi","sbi is a Python package for simulation-based inference, designed to meet the needs of both researchers and practitioners. Whether you need fine-grained control or an easy-to-use interface, sbi has you covered.","sbi 是一个专为“基于模拟的推断”（Simulation-Based Inference, SBI）打造的 Python 开源包。在科学研究和工程实践中，我们常拥有能模拟真实世界的复杂模型，却难以直接计算其参数的概率分布。sbi 正是为了解决这一难题而生：它利用贝叶斯推断技术，根据观测数据反推模拟器参数的完整后验分布。这不仅帮助用户找到最可能的参数值，还能量化不确定性并揭示参数间的潜在关联。\n\nsbi 的设计兼顾了灵活性与易用性，非常适合科研人员、数据科学家以及需要处理复杂模拟模型的开发者使用。对于希望快速上手的用户，sbi 提供了简洁的高级接口，仅需几行代码即可启动复杂的推断任务；而对于需要深度定制的研究者，它也开放了底层接口，允许对推断流程进行精细控制。\n\n其技术亮点在于支持多种前沿算法，包括可跨多个观测任务复用模型的“摊销方法”，以及针对单次观测优化模拟次数的“序列方法”。此外，sbi 还内置了丰富的验证工具和可视化功能，帮助用户轻松评估推断结果的准确性并直观解读数据。无论是探索神经科学模型还是分析物理系统，sbi 都能成为你连接模拟数据与现实参数的得力助手。","[![PyPI version](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fsbi.svg)](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fsbi)\n[![Conda Version](https:\u002F\u002Fimg.shields.io\u002Fconda\u002Fvn\u002Fconda-forge\u002Fsbi.svg)](https:\u002F\u002Fgithub.com\u002Fconda-forge\u002Fsbi-feedstock)\n[![Contributions welcome](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fcontributions-welcome-brightgreen.svg?style=flat)](https:\u002F\u002Fsbi.readthedocs.io\u002Fen\u002Flatest\u002Fcontributing.html)\n[![Tests](https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Factions\u002Fworkflows\u002Fcd.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Factions)\n[![codecov](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fsbi-dev\u002Fsbi\u002Fbranch\u002Fmain\u002Fgraph\u002Fbadge.svg)](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fsbi-dev\u002Fsbi)\n[![GitHub license](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fsbi-dev\u002Fsbi)](https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fblob\u002Fmaster\u002FLICENSE.txt)\n[![DOI](https:\u002F\u002Fjoss.theoj.org\u002Fpapers\u002F10.21105\u002Fjoss.07754\u002Fstatus.svg)](https:\u002F\u002Fdoi.org\u002F10.21105\u002Fjoss.07754)\n[![NumFOCUS affiliated](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FNumFOCUS-affiliated%20project-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](https:\u002F\u002Fnumfocus.org\u002Fsponsored-projects\u002Faffiliated-projects)\n\n## `sbi`: Simulation-Based Inference\n\n[Getting Started](https:\u002F\u002Fsbi.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002F00_getting_started.html) |\n[Documentation](https:\u002F\u002Fsbi.readthedocs.io\u002Fen\u002Flatest\u002F) | [Discord Server](https:\u002F\u002Fdiscord.gg\u002FVPkV7XPj7k)\n\n`sbi` is a Python package for simulation-based inference, designed to meet the needs of\nboth researchers and practitioners. Whether you need fine-grained control or an\neasy-to-use interface, `sbi` has you covered.\n\nWith `sbi`, you can perform parameter inference using Bayesian inference: Given a\nsimulator that models a real-world process, SBI estimates the full posterior\ndistribution over the simulator’s parameters based on observed data. This distribution\nindicates the most likely parameter values while additionally quantifying uncertainty\nand revealing potential interactions between parameters.\n\n### Key Features of `sbi`\n\n`sbi` offers a blend of flexibility and ease of use:\n\n- **Low-Level Interfaces**: For those who require maximum control over the inference\n  process, `sbi` provides low-level interfaces that allow you to fine-tune many aspects\n  of your workflow.\n- **High-Level Interfaces**: If you prefer simplicity and efficiency, `sbi` also offers\n  high-level interfaces that enable quick and easy implementation of complex inference\n  tasks.\n\nIn addition, `sbi` supports a wide range of state-of-the-art inference algorithms (see\nbelow for a list of implemented methods):\n\n- **Amortized Methods**: These methods enable the reuse of posterior estimators across\n  multiple observations without the need to retrain.\n- **Sequential Methods**: These methods focus on individual observations, optimizing the\n  number of simulations required.\n\nBeyond inference, `sbi` also provides:\n\n- **Validation Tools**: Built-in methods to validate and verify the accuracy of your\n  inferred posteriors.\n- **Plotting and Analysis Tools**: Comprehensive functions for visualizing and analyzing\n  results, helping you interpret the posterior distributions with ease.\n\nGetting started with `sbi` is straightforward, requiring only a few lines of code:\n\n```python\nfrom sbi.inference import NPE\n# Given: parameters theta and corresponding simulations x\ninference = NPE(prior=prior)\ninference.append_simulations(theta, x).train()\nposterior = inference.build_posterior()\n```\n\n### Installation\n\n`sbi` requires Python 3.10 or higher. While a GPU isn't necessary, it can\nimprove performance in some cases. We recommend using\n[`uv`](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002F) for package management:\n\n```bash\nuv pip install sbi\n```\n\nPyro and PyMC MCMC samplers are optional. Install them as needed:\n\n```bash\nuv pip install \"sbi[pyro]\"   # for Pyro samplers (HMC, NUTS)\nuv pip install \"sbi[pymc]\"   # for PyMC samplers (HMC, NUTS, Slice)\nuv pip install \"sbi[all]\"    # both Pyro and PyMC\n```\n\nFor conda, pixi, pip, and other installation methods, see the\n[full installation guide](https:\u002F\u002Fsbi.readthedocs.io\u002Fen\u002Flatest\u002Finstallation.html).\n\n### Testing the installation\n\nOpen a Python prompt and run\n\n```python\nfrom sbi.examples.minimal import simple\nposterior = simple()\nprint(posterior)\n```\n\n## Tutorials\n\nIf you're new to `sbi`, we recommend starting with our [Getting\nStarted](https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002Flatest\u002Ftutorials\u002F00_getting_started\u002F) tutorial.\n\nYou can also access and run these tutorials directly in your browser by opening\n[Codespace](https:\u002F\u002Fdocs.github.com\u002Fen\u002Fcodespaces\u002Foverview). To do so, click the green\n“Code” button on the GitHub repository and select “Open with Codespaces.” This provides\na fully functional environment where you can explore `sbi` through Jupyter notebooks.\n\nYou might also find this tutorial paper useful: [Deistler, M., Boelts, J., Steinbach, P., Moss, G., Moreau, T., Gloeckler, M., ... & Macke, J. H. (2025). Simulation-based inference: A practical guide. arXiv preprint arXiv:2508.12939.](https:\u002F\u002Farxiv.org\u002Fabs\u002F2508.12939). It describes the SBI workflow and offers practical guidelines and diagnostic tools for every stage of the process: from setting up the simulator and prior, choosing and training inference networks, to performing inference and validating the results. It also includes several worked examples.\n\n## Inference Algorithms\n\nThe following inference algorithms are currently available. You can find instructions on\nhow to run each of these methods\n[here](https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002Flatest\u002Ftutorials\u002F16_implemented_methods\u002F).\n\n### Neural Posterior Estimation: amortized (NPE) and sequential (SNPE)\n\n- [`(S)NPE_A`](https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002Flatest\u002Freference\u002F#sbi.inference.trainers.npe.npe_a.NPE_A)\n  (including amortized single-round `NPE`) from Papamakarios G and Murray I [_Fast\n  ε-free Inference of Simulation Models with Bayesian Conditional Density\n  Estimation_](https:\u002F\u002Fproceedings.neurips.cc\u002Fpaper\u002F2016\u002Fhash\u002F6aca97005c68f1206823815f66102863-Abstract.html)\n  (NeurIPS 2016).\n\n- [`(S)NPE_B`](https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002Flatest\u002Freference\u002F#sbi.inference.trainers.npe.npe_b.NPE_B)\n  from Lueckmann JM, Goncalves P, Bassetto G, Öcal K, Nonnenmacher M, and Macke J [_Flexible\n  statistical inference for mechanistic models of neural dynamics_](https:\u002F\u002Farxiv.org\u002Fabs\u002F1711.01861)\n  (NeurIPS 2017).\n\n- [`(S)NPE_C`](https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002Flatest\u002Freference\u002F#sbi.inference.trainers.npe.npe_c.NPE_C)\n  or `APT` from Greenberg D, Nonnenmacher M, and Macke J [_Automatic Posterior\n  Transformation for likelihood-free inference_](https:\u002F\u002Farxiv.org\u002Fabs\u002F1905.07488) (ICML\n  2019).\n\n- `TSNPE` from Deistler M, Goncalves P, and Macke J [_Truncated proposals for scalable\n  and hassle-free simulation-based inference_](https:\u002F\u002Farxiv.org\u002Fabs\u002F2210.04815)\n  (NeurIPS 2022).\n\n- [`FMPE`](https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002Flatest\u002Freference\u002F#sbi.inference.trainers.vfpe.fmpe.FMPE)\n  from Wildberger, J., Dax, M., Buchholz, S., Green, S., Macke, J. H., & Schölkopf, B.\n  [_Flow matching for scalable simulation-based\n  inference_](https:\u002F\u002Fproceedings.neurips.cc\u002Fpaper_files\u002Fpaper\u002F2023\u002Fhash\u002F3663ae53ec078860bb0b9c6606e092a0-Abstract-Conference.html).\n  (NeurIPS 2023).\n\n- [`NPSE`](https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002Flatest\u002Freference\u002F#sbi.inference.trainers.vfpe.npse.NPSE) from\n  Geffner, T., Papamakarios, G., & Mnih, A. [_Compositional score modeling for\n  simulation-based inference_](https:\u002F\u002Fproceedings.mlr.press\u002Fv202\u002Fgeffner23a.html).\n  (ICML 2023)\n\n### Neural Likelihood Estimation: amortized (NLE) and sequential (SNLE)\n\n- [`(S)NLE`](https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002Flatest\u002Freference\u002F#sbi.inference.trainers.nle.nle_a.NLE_A)\n  or just `SNL` from Papamakarios G, Sterrat DC and Murray I [_Sequential Neural\n  Likelihood_](https:\u002F\u002Farxiv.org\u002Fabs\u002F1805.07226) (AISTATS 2019).\n\n### Neural Ratio Estimation: amortized (NRE) and sequential (SNRE)\n\n- [`(S)NRE_A`](https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002Flatest\u002Freference\u002F#sbi.inference.trainers.nre.nre_a.NRE_A)\n  or `AALR` from Hermans J, Begy V, and Louppe G. [_Likelihood-free Inference with\n  Amortized Approximate Likelihood Ratios_](https:\u002F\u002Farxiv.org\u002Fabs\u002F1903.04057) (ICML\n  2020).\n\n- [`(S)NRE_B`](https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002Flatest\u002Freference\u002F#sbi.inference.trainers.nre.nre_b.NRE_B)\n  or `SRE` from Durkan C, Murray I, and Papamakarios G. [_On Contrastive Learning for\n  Likelihood-free Inference_](https:\u002F\u002Farxiv.org\u002Fabs\u002F2002.03712) (ICML 2020).\n\n- [`(S)NRE_C`](https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002Flatest\u002Freference\u002F#sbi.inference.trainers.nre.nre_c.NRE_C)\n  or `NRE-C` from Miller BK, Weniger C, Forré P. [_Contrastive Neural Ratio\n  Estimation_](https:\u002F\u002Farxiv.org\u002Fabs\u002F2210.06170) (NeurIPS 2022).\n\n- [`BNRE`](https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002Flatest\u002Freference\u002F#sbi.inference.trainers.nre.bnre.BNRE) from\n  Delaunoy A, Hermans J, Rozet F, Wehenkel A, and Louppe G. [_Towards Reliable\n  Simulation-Based Inference with Balanced Neural Ratio\n  Estimation_](https:\u002F\u002Farxiv.org\u002Fabs\u002F2208.13624) (NeurIPS 2022).\n\n### Neural Variational Inference, amortized (NVI) and sequential (SNVI)\n\n- [`SNVI`](https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002Flatest\u002Freference\u002F#sbi.inference.posteriors.vi_posterior)\n  from Glöckler M, Deistler M, Macke J, [_Variational methods for simulation-based\n  inference_](https:\u002F\u002Fopenreview.net\u002Fforum?id=kZ0UYdhqkNY) (ICLR 2022).\n\n### Mixed Neural Likelihood Estimation (MNLE)\n\n- [`MNLE`](https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002Flatest\u002Freference\u002F#sbi.inference.trainers.nle.mnle.MNLE) from\n  Boelts J, Lueckmann JM, Gao R, Macke J, [_Flexible and efficient simulation-based\n  inference for models of decision-making_](https:\u002F\u002Felifesciences.org\u002Farticles\u002F77220)\n  (eLife 2022).\n\n## Feedback and Contributions\n\nWe welcome any feedback on how `sbi` is working for your inference problems (see\n[Discussions](https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fdiscussions)) and are happy to receive bug\nreports, pull requests, and other feedback (see\n[contribute](https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002Flatest\u002Fcontribute\u002F)). We wish to maintain a\npositive and respectful community; please read our [Code of\nConduct](CODE_OF_CONDUCT.md). To report a security vulnerability, please see our\n[Security Policy](SECURITY.md).\n\n## Acknowledgments\n\n`sbi` is the successor (using PyTorch) of the\n[`delfi`](https:\u002F\u002Fgithub.com\u002Fmackelab\u002Fdelfi) package. It started as a fork of Conor M.\nDurkan's `lfi`. `sbi` runs as a community project. See also\n[credits](https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fblob\u002Fmaster\u002Fdocs\u002Fcredits.md).\n\n## Support\n\n`sbi` has been supported by the German Federal Ministry of Education and Research (BMBF)\nthrough project ADIMEM (FKZ 01IS18052 A-D), project SiMaLeSAM (FKZ 01IS21055A) and the\nTübingen AI Center (FKZ 01IS18039A). Since 2024, `sbi` is supported by the appliedAI\nInstitute for Europe, and by NumFOCUS.\n\n## License\n\n[Apache License Version 2.0 (Apache-2.0)](https:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0)\n\n## Citation\n\nThe `sbi` package has grown and improved significantly since its initial release, with\ncontributions from a large and diverse community. To reflect these developments and the\nexpanded functionality, we published an [updated JOSS\npaper](https:\u002F\u002Fdoi.org\u002F10.21105\u002Fjoss.07754). We encourage you to cite this\nnewer version as the primary reference:\n\n```latex\n@article{BoeltsDeistler_sbi_2025,\n  doi = {10.21105\u002Fjoss.07754},\n  url = {https:\u002F\u002Fdoi.org\u002F10.21105\u002Fjoss.07754},\n  year = {2025},\n  publisher = {The Open Journal},\n  volume = {10},\n  number = {108},\n  pages = {7754},\n  author = {Jan Boelts and Michael Deistler and Manuel Gloeckler and Álvaro Tejero-Cantero and Jan-Matthis Lueckmann and Guy Moss and Peter Steinbach and Thomas Moreau and Fabio Muratore and Julia Linhart and Conor Durkan and Julius Vetter and Benjamin Kurt Miller and Maternus Herold and Abolfazl Ziaeemehr and Matthijs Pals and Theo Gruner and Sebastian Bischoff and Nastya Krouglova and Richard Gao and Janne K. Lappalainen and Bálint Mucsányi and Felix Pei and Auguste Schulz and Zinovia Stefanidi and Pedro Rodrigues and Cornelius Schröder and Faried Abu Zaid and Jonas Beck and Jaivardhan Kapoor and David S. Greenberg and Pedro J. Gonçalves and Jakob H. Macke},\n  title = {sbi reloaded: a toolkit for simulation-based inference workflows},\n  journal = {Journal of Open Source Software}\n}\n```\n\nThis updated paper, with its expanded author list, reflects the broader community\ncontributions and the package's enhanced capabilities in releases\n[0.23.0](https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Freleases\u002Ftag\u002Fv0.23.3) and later.\n\nIf you are using a version of `sbi` prior to 0.23.0, please cite the original sbi\nsoftware paper:\n\n```latex\n@article{tejero-cantero2020sbi,\n  doi = {10.21105\u002Fjoss.02505},\n  url = {https:\u002F\u002Fdoi.org\u002F10.21105\u002Fjoss.02505},\n  year = {2020},\n  publisher = {The Open Journal},\n  volume = {5},\n  number = {52},\n  pages = {2505},\n  author = {Alvaro Tejero-Cantero and Jan Boelts and Michael Deistler and Jan-Matthis Lueckmann and Conor Durkan and Pedro J. Gonçalves and David S. Greenberg and Jakob H. Macke},\n  title = {sbi: A toolkit for simulation-based inference},\n  journal = {Journal of Open Source Software}\n}\n```\n\nRegardless of which software paper you cite, please also remember to cite the original\nresearch articles describing the specific sbi-algorithm(s) you are using.\n\nSpecific releases of `sbi` are also citable via\n[Zenodo](https:\u002F\u002Fzenodo.org\u002Frecords\u002F15034786), where we generate a new software DOI for\neach release.\n","[![PyPI版本](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fsbi.svg)](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fsbi)\n[![Conda版本](https:\u002F\u002Fimg.shields.io\u002Fconda\u002Fvn\u002Fconda-forge\u002Fsbi.svg)](https:\u002F\u002Fgithub.com\u002Fconda-forge\u002Fsbi-feedstock)\n[![欢迎贡献](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fcontributions-welcome-brightgreen.svg?style=flat)](https:\u002F\u002Fsbi.readthedocs.io\u002Fen\u002Flatest\u002Fcontributing.html)\n[![测试](https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Factions\u002Fworkflows\u002Fcd.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Factions)\n[![Codecov](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fsbi-dev\u002Fsbi\u002Fbranch\u002Fmain\u002Fgraph\u002Fbadge.svg)](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fsbi-dev\u002Fsbi)\n[![GitHub许可证](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fsbi-dev\u002Fsbi)](https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fblob\u002Fmaster\u002FLICENSE.txt)\n[![DOI](https:\u002F\u002Fjoss.theoj.org\u002Fpapers\u002F10.21105\u002Fjoss.07754\u002Fstatus.svg)](https:\u002F\u002Fdoi.org\u002F10.21105\u002Fjoss.07754)\n[![NumFOCUS关联项目](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FNumFOCUS-affiliated%20project-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](https:\u002F\u002Fnumfocus.org\u002Fsponsored-projects\u002Faffiliated-projects)\n\n## `sbi`: 基于模拟的推断\n\n[快速入门](https:\u002F\u002Fsbi.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002F00_getting_started.html) |\n[文档](https:\u002F\u002Fsbi.readthedocs.io\u002Fen\u002Flatest\u002F) | [Discord服务器](https:\u002F\u002Fdiscord.gg\u002FVPkV7XPj7k)\n\n`sbi` 是一个用于基于模拟的推断的 Python 软件包，旨在满足研究人员和实践者的双重需求。无论您需要精细的控制还是易于使用的界面，`sbi` 都能为您提供支持。\n\n借助 `sbi`，您可以使用贝叶斯推断进行参数估计：给定一个模拟真实世界过程的模拟器，SBI 可以根据观测数据估计模拟器参数的完整后验分布。该分布不仅指示最可能的参数值，还能量化不确定性，并揭示参数之间的潜在交互作用。\n\n### `sbi` 的主要特性\n\n`sbi` 兼具灵活性和易用性：\n\n- **低级接口**：对于那些需要对推断过程进行最大程度控制的用户，`sbi` 提供了低级接口，允许您微调工作流的许多方面。\n- **高级接口**：如果您更倾向于简单高效的方式，`sbi` 还提供了高级接口，可快速轻松地实现复杂的推断任务。\n\n此外，`sbi` 支持多种最先进的推断算法（已实现的方法列表见下文）：\n\n- **摊销方法**：这些方法允许在多次观测中重复使用后验估计器，而无需重新训练。\n- **序列方法**：这些方法专注于单个观测，从而优化所需的模拟次数。\n\n除了推断之外，`sbi` 还提供：\n\n- **验证工具**：内置方法用于验证和确认推断后验的准确性。\n- **绘图与分析工具**：全面的结果可视化和分析功能，帮助您轻松解释后验分布。\n\n开始使用 `sbi` 非常简单，只需几行代码即可：\n\n```python\nfrom sbi.inference import NPE\n# 已知：参数 theta 和对应的模拟数据 x\ninference = NPE(prior=prior)\ninference.append_simulations(theta, x).train()\nposterior = inference.build_posterior()\n```\n\n### 安装\n\n`sbi` 需要 Python 3.10 或更高版本。虽然 GPU 并非必需，但在某些情况下可以提升性能。我们建议使用 [`uv`](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002F) 进行包管理：\n\n```bash\nuv pip install sbi\n```\n\nPyro 和 PyMC 的 MCMC 采样器是可选的。请根据需要安装：\n\n```bash\nuv pip install \"sbi[pyro]\"   # 用于 Pyro 采样器（HMC、NUTS）\nuv pip install \"sbi[pymc]\"   # 用于 PyMC 采样器（HMC、NUTS、Slice）\nuv pip install \"sbi[all]\"    # 同时包含 Pyro 和 PyMC\n```\n\n有关 conda、pixi、pip 等其他安装方式，请参阅[完整的安装指南](https:\u002F\u002Fsbi.readthedocs.io\u002Fen\u002Flatest\u002Finstallation.html)。\n\n### 测试安装\n\n打开 Python 提示符并运行以下代码：\n\n```python\nfrom sbi.examples.minimal import simple\nposterior = simple()\nprint(posterior)\n```\n\n## 教程\n\n如果您是 `sbi` 的新手，我们建议从我们的[快速入门](https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002Flatest\u002Ftutorials\u002F00_getting_started\u002F)教程开始。\n\n您也可以直接在浏览器中访问并运行这些教程，只需打开 [Codespace](https:\u002F\u002Fdocs.github.com\u002Fen\u002Fcodespaces\u002Foverview) 即可。为此，点击 GitHub 仓库上的绿色“Code”按钮，然后选择“Open with Codespaces”。这将为您提供一个功能齐全的环境，您可以在其中通过 Jupyter 笔记本探索 `sbi`。\n\n您可能还会发现这篇教程论文很有用：[Deistler, M., Boelts, J., Steinbach, P., Moss, G., Moreau, T., Gloeckler, M., ... & Macke, J. H. (2025). 基于模拟的推断：实用指南。arXiv 预印本 arXiv:2508.12939。](https:\u002F\u002Farxiv.org\u002Fabs\u002F2508.12939)。它描述了 SBI 工作流程，并为每个阶段提供了实用指南和诊断工具：从设置模拟器和先验分布、选择和训练推断网络，到执行推断和验证结果。文中还包含多个示例。\n\n## 推断算法\n\n目前可用的推断算法如下。您可以在此处找到每种方法的运行说明：\n[这里](https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002Flatest\u002Ftutorials\u002F16_implemented_methods\u002F)。\n\n### 神经后验估计：摊销型（NPE）和序列型（SNPE）\n\n- [`(S)NPE_A`](https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002Flatest\u002Freference\u002F#sbi.inference.trainers.npe.npe_a.NPE_A)\n  （包括摊销型单轮 `NPE`）由 Papamakarios G 和 Murray I 提出，论文为 [_Fast ε-free Inference of Simulation Models with Bayesian Conditional Density Estimation_](https:\u002F\u002Fproceedings.neurips.cc\u002Fpaper\u002F2016\u002Fhash\u002F6aca97005c68f1206823815f66102863-Abstract.html)（NeurIPS 2016）。\n\n- [`(S)NPE_B`](https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002Flatest\u002Freference\u002F#sbi.inference.trainers.npe.npe_b.NPE_B)\n  由 Lueckmann JM、Goncalves P、Bassetto G、Öcal K、Nonnenmacher M 和 Macke J 提出，论文为 [_Flexible statistical inference for mechanistic models of neural dynamics_](https:\u002F\u002Farxiv.org\u002Fabs\u002F1711.01861)（NeurIPS 2017）。\n\n- [`(S)NPE_C`](https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002Flatest\u002Freference\u002F#sbi.inference.trainers.npe.npe_c.NPE_C)\n  或者 `APT` 由 Greenberg D、Nonnenmacher M 和 Macke J 提出，论文为 [_Automatic Posterior Transformation for likelihood-free inference_](https:\u002F\u002Farxiv.org\u002Fabs\u002F1905.07488)（ICML 2019）。\n\n- `TSNPE` 由 Deistler M、Goncalves P 和 Macke J 提出，论文为 [_Truncated proposals for scalable and hassle-free simulation-based inference_](https:\u002F\u002Farxiv.org\u002Fabs\u002F2210.04815)（NeurIPS 2022）。\n\n- [`FMPE`](https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002Flatest\u002Freference\u002F#sbi.inference.trainers.vfpe.fmpe.FMPE)\n  由 Wildberger, J., Dax, M., Buchholz, S., Green, S., Macke, J. H., 和 Schölkopf, B 提出，论文为 [_Flow matching for scalable simulation-based inference_](https:\u002F\u002Fproceedings.neurips.cc\u002Fpaper_files\u002Fpaper\u002F2023\u002Fhash\u002F3663ae53ec078860bb0b9c6606e092a0-Abstract-Conference.html)（NeurIPS 2023）。\n\n- [`NPSE`](https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002Flatest\u002Freference\u002F#sbi.inference.trainers.vfpe.npse.NPSE) 由 Geffner, T., Papamakarios, G., 和 Mnih, A 提出，论文为 [_Compositional score modeling for simulation-based inference_](https:\u002F\u002Fproceedings.mlr.press\u002Fv202\u002Fgeffner23a.html)（ICML 2023）。\n\n### 神经似然估计：摊销型（NLE）和序列型（SNLE）\n\n- [`(S)NLE`](https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002Flatest\u002Freference\u002F#sbi.inference.trainers.nle.nle_a.NLE_A)\n  或简称 `SNL` 由 Papamakarios G、Sterrat DC 和 Murray I 提出，论文为 [_Sequential Neural Likelihood_](https:\u002F\u002Farxiv.org\u002Fabs\u002F1805.07226)（AISTATS 2019）。\n\n### 神经比率估计：摊销型（NRE）和序列型（SNRE）\n\n- [`(S)NRE_A`](https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002Flatest\u002Freference\u002F#sbi.inference.trainers.nre.nre_a.NRE_A)\n  或 `AALR` 由 Hermans J、Begy V 和 Louppe G 提出，论文为 [_Likelihood-free Inference with Amortized Approximate Likelihood Ratios_](https:\u002F\u002Farxiv.org\u002Fabs\u002F1903.04057)（ICML 2020）。\n\n- [`(S)NRE_B`](https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002Flatest\u002Freference\u002F#sbi.inference.trainers.nre.nre_b.NRE_B)\n  或 `SRE` 由 Durkan C、Murray I 和 Papamakarios G 提出，论文为 [_On Contrastive Learning for Likelihood-free Inference_](https:\u002F\u002Farxiv.org\u002Fabs\u002F2002.03712)（ICML 2020）。\n\n- [`(S)NRE_C`](https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002Flatest\u002Freference\u002F#sbi.inference.trainers.nre.nre_c.NRE_C)\n  或 `NRE-C` 由 Miller BK、Weniger C 和 Forré P 提出，论文为 [_Contrastive Neural Ratio Estimation_](https:\u002F\u002Farxiv.org\u002Fabs\u002F2210.06170)（NeurIPS 2022）。\n\n- [`BNRE`](https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002Flatest\u002Freference\u002F#sbi.inference.trainers.nre.bnre.BNRE) 由 Delaunoy A、Hermans J、Rozet F、Wehenkel A 和 Louppe G 提出，论文为 [_Towards Reliable Simulation-Based Inference with Balanced Neural Ratio Estimation_](https:\u002F\u002Farxiv.org\u002Fabs\u002F2208.13624)（NeurIPS 2022）。\n\n### 神经变分推断：摊销型（NVI）和序列型（SNVI）\n\n- [`SNVI`](https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002Flatest\u002Freference\u002F#sbi.inference.posteriors.vi_posterior)\n  由 Glöckler M、Deistler M 和 Macke J 提出，论文为 [_Variational methods for simulation-based inference_](https:\u002F\u002Fopenreview.net\u002Fforum?id=kZ0UYdhqkNY)（ICLR 2022）。\n\n### 混合神经似然估计（MNLE）\n\n- [`MNLE`](https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002Flatest\u002Freference\u002F#sbi.inference.trainers.nle.mnle.MNLE) 由 Boelts J、Lueckmann JM、Gao R 和 Macke J 提出，论文为 [_Flexible and efficient simulation-based inference for models of decision-making_](https:\u002F\u002Felifesciences.org\u002Farticles\u002F77220)（eLife 2022）。\n\n## 反馈与贡献\n\n我们欢迎关于 `sbi` 在您的推断问题中表现的任何反馈（请参阅 [Discussions](https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fdiscussions)），并乐于接受错误报告、拉取请求及其他反馈（请参阅 [contribute](https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002Flatest\u002Fcontribute\u002F)）。我们希望维护一个积极且尊重的社区；请阅读我们的 [行为准则](CODE_OF_CONDUCT.md)。如需报告安全漏洞，请参阅我们的 [安全政策](SECURITY.md)。\n\n## 致谢\n\n`sbi` 是 [`delfi`](https:\u002F\u002Fgithub.com\u002Fmackelab\u002Fdelfi) 包的继任者（使用 PyTorch）。它最初是 Conor M. Durkan 的 `lfi` 的分支。`sbi` 作为一个社区项目运行。更多信息请参阅 [credits](https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fblob\u002Fmaster\u002Fdocs\u002Fcredits.md)。\n\n## 支持\n\n`sbi` 曾得到德国联邦教育与研究部（BMBF）通过 ADIMEM 项目（FKZ 01IS18052 A-D）、SiMaLeSAM 项目（FKZ 01IS21055A）以及图宾根人工智能中心（FKZ 01IS18039A）的支持。自 2024 年起，`sbi` 还得到了 appliedAI 欧洲研究所及 NumFOCUS 的支持。\n\n## 许可证\n\n[Apache 许可证版本 2.0（Apache-2.0）](https:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0)\n\n## 引用\n\n自 `sbi` 软件包首次发布以来，它在广大且多元化的社区贡献下得到了显著的发展和改进。为了反映这些进展及功能的扩展，我们发表了一篇 [更新后的 JOSS 论文](https:\u002F\u002Fdoi.org\u002F10.21105\u002Fjoss.07754)。我们鼓励您将这一较新的版本作为主要参考文献：\n\n```latex\n@article{BoeltsDeistler_sbi_2025,\n  doi = {10.21105\u002Fjoss.07754},\n  url = {https:\u002F\u002Fdoi.org\u002F10.21105\u002Fjoss.07754},\n  year = {2025},\n  publisher = {The Open Journal},\n  volume = {10},\n  number = {108},\n  pages = {7754},\n  author = {Jan Boelts and Michael Deistler and Manuel Gloeckler and Álvaro Tejero-Cantero and Jan-Matthis Lueckmann and Guy Moss and Peter Steinbach and Thomas Moreau and Fabio Muratore and Julia Linhart and Conor Durkan and Julius Vetter and Benjamin Kurt Miller and Maternus Herold and Abolfazl Ziaeemehr and Matthijs Pals and Theo Gruner and Sebastian Bischoff and Nastya Krouglova and Richard Gao and Janne K. Lappalainen and Bálint Mucsányi and Felix Pei and Auguste Schulz and Zinovia Stefanidi and Pedro Rodrigues and Cornelius Schröder and Faried Abu Zaid and Jonas Beck and Jaivardhan Kapoor and David S. Greenberg and Pedro J. Gonçalves and Jakob H. Macke},\n  title = {sbi reloaded: a toolkit for simulation-based inference workflows},\n  journal = {Journal of Open Source Software}\n}\n```\n\n这篇更新后的论文包含了更广泛的作者列表，体现了更广泛的社区贡献以及软件包在 [0.23.0](https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Freleases\u002Ftag\u002Fv0.23.3) 及更高版本中增强的能力。\n\n如果您使用的是 `sbi` 的 0.23.0 之前的版本，请引用最初的 `sbi` 软件论文：\n\n```latex\n@article{tejero-cantero2020sbi,\n  doi = {10.21105\u002Fjoss.02505},\n  url = {https:\u002F\u002Fdoi.org\u002F10.21105\u002Fjoss.02505},\n  year = {2020},\n  publisher = {The Open Journal},\n  volume = {5},\n  number = {52},\n  pages = {2505},\n  author = {Alvaro Tejero-Cantero and Jan Boelts and Michael Deistler and Jan-Matthis Lueckmann and Conor Durkan and Pedro J. Gonçalves and David S. Greenberg and Jakob H. Macke},\n  title = {sbi: A toolkit for simulation-based inference},\n  journal = {Journal of Open Source Software}\n}\n```\n\n无论您引用哪一篇软件论文，都请务必同时引用描述您所使用的特定 `sbi` 算法的原始研究论文。\n\n`sbi` 的各个具体版本也可以通过 [Zenodo](https:\u002F\u002Fzenodo.org\u002Frecords\u002F15034786) 进行引用，我们在每次发布时都会为该版本生成一个新的软件 DOI。","# sbi 快速上手指南\n\n`sbi` 是一个用于**基于模拟的推断（Simulation-Based Inference, SBI）**的 Python 库。它允许用户通过贝叶斯推断，根据观测数据估算模拟器参数的完整后验分布，从而量化不确定性并揭示参数间的相互作用。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**：Linux、macOS 或 Windows。\n*   **Python 版本**：3.10 或更高版本。\n*   **硬件加速（可选）**：虽然不需要 GPU 即可运行，但在某些复杂任务中，配备 NVIDIA GPU 并安装 CUDA 驱动可显著提升性能。\n*   **包管理工具**：推荐使用 [`uv`](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002F) 以获得更快的安装和依赖解析速度（同时也支持 `pip` 和 `conda`）。\n\n## 安装步骤\n\n### 方法一：使用 uv 推荐安装（最快）\n\n使用 `uv` 进行安装是官方推荐的方式，速度快且依赖冲突少。\n\n```bash\nuv pip install sbi\n```\n\n### 方法二：按需安装扩展功能\n\n如果您需要使用特定的 MCMC 采样器（如 Pyro 或 PyMC），可以选择以下安装方式：\n\n```bash\n# 安装 Pyro 采样器 (支持 HMC, NUTS)\nuv pip install \"sbi[pyro]\"\n\n# 安装 PyMC 采样器 (支持 HMC, NUTS, Slice)\nuv pip install \"sbi[pymc]\"\n\n# 安装所有可选依赖\nuv pip install \"sbi[all]\"\n```\n\n> **提示**：国内用户若遇到网络延迟，可在命令中添加国内镜像源，例如：\n> `uv pip install sbi --index-url https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple`\n\n### 方法三：使用 Conda 安装\n\n如果您偏好使用 Conda 环境：\n\n```bash\nconda install -c conda-forge sbi\n```\n\n### 验证安装\n\n安装完成后，运行以下 Python 代码以验证是否成功：\n\n```python\nfrom sbi.examples.minimal import simple\nposterior = simple()\nprint(posterior)\n```\n如果输出了后验分布对象信息，则说明安装成功。\n\n## 基本使用\n\n`sbi` 提供了高层接口，只需几行代码即可完成从模拟数据训练到后验推断的全过程。以下是最简化的使用示例：\n\n1.  导入必要的模块。\n2.  准备参数 `theta` 和对应的模拟数据 `x`。\n3.  选择推断算法（例如神经后验估计 `NPE`）。\n4.  训练模型并构建后验分布。\n\n```python\nfrom sbi.inference import NPE\n\n# 假设您已经有了模拟生成的参数 theta 和对应的数据 x\n# inference = NPE(prior=prior)  # prior 为您的先验分布对象\ninference = NPE(prior=prior)\n\n# 添加模拟数据并训练推断网络\ninference.append_simulations(theta, x).train()\n\n# 构建后验分布对象，用于后续对新观测数据进行推断\nposterior = inference.build_posterior()\n\n# 现在可以使用 posterior 对新的观测数据 x_obs 进行采样或评估\n# samples = posterior.sample((1000,), x=x_obs)\n```\n\n对于更复杂的场景（如顺序推断、不同的神经网络架构或验证工具），请参考官方 [文档](https:\u002F\u002Fsbi.readthedocs.io\u002F) 和 [教程](https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002Flatest\u002Ftutorials\u002F00_getting_started\u002F)。","某生物制药团队的计算生物学家正试图通过复杂的细胞动力学模拟器，反推决定药物疗效的关键生化反应速率参数。\n\n### 没有 sbi 时\n- **计算成本高昂**：传统马尔可夫链蒙特卡洛（MCMC）方法需要对模拟器进行数十万次调用才能收敛，单次分析耗时数天甚至数周。\n- **不确定性量化缺失**：难以获得参数的完整后验分布，只能得到单一的最佳估计值，无法评估参数间的关联性或置信区间。\n- **开发门槛极高**：研究人员需手动编写复杂的采样算法和诊断代码，稍有改动就需要重构大量底层逻辑。\n- **无法复用模型**：每当有新的实验观测数据加入，必须从头开始重新运行整个耗时的推断流程，无法利用已有的计算成果。\n\n### 使用 sbi 后\n- **推理速度飞跃**：利用 sbi 的神经概率估计（NPE）等摊销算法，只需训练一次神经网络，即可在秒级时间内对新数据完成推断，效率提升百倍。\n- **全景不确定性分析**：直接输出完整的后验分布，清晰展示参数最可能的取值范围、多峰特性以及参数之间的复杂依赖关系。\n- **极简代码实现**：通过高层接口，仅需几行代码即可定义先验、添加模拟数据并训练模型，让科学家专注于生物学问题而非算法细节。\n- **模型一次训练多次复用**：训练好的后验估计器可直接应用于后续所有新的实验观测，无需重新模拟或训练，极大加速了迭代研发周期。\n\nsbi 将原本需要数周的高成本参数推断任务转化为分钟级的交互式分析，让研究人员能真正基于数据不确定性做出科学的决策。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsbi-dev_sbi_66ba0833.png","sbi-dev","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fsbi-dev_e20ca4f1.png","Simulation-based inference toolbox",null,"sbi_devs","https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002F","https:\u002F\u002Fgithub.com\u002Fsbi-dev",[80,84],{"name":81,"color":82,"percentage":83},"Python","#3572A5",100,{"name":85,"color":86,"percentage":87},"Dockerfile","#384d54",0,818,243,"2026-04-17T09:32:06","Apache-2.0",1,"未说明","非必需，但可提升性能；具体型号、显存及 CUDA 版本未说明",{"notes":96,"python":97,"dependencies":98},"推荐使用 uv 进行包管理。Pyro 和 PyMC 采样器为可选依赖，需根据需求单独安装（如 sbi[pyro] 或 sbi[pymc]）。支持通过 Conda、pixi 等多种方式安装。","3.10+",[99,100,101],"torch","pyro-ppl (可选)","pymc (可选)",[103,14],"其他",[105,106,107,108,109,110],"simulation-based-inference","likelihood-free-inference","bayesian-inference","parameter-estimation","pytorch","machine-learning","2026-03-27T02:49:30.150509","2026-04-19T06:02:50.712163",[114,119,124,129,134,138],{"id":115,"question_zh":116,"answer_zh":117,"source_url":118},41607,"使用 MDN 密度估计器进行多轮 SNPE 时出现 \"NaN\u002FInf present in proposal posterior eval\" 断言错误怎么办？","该错误通常由数值不稳定引起，特别是当数据中某一列的值完全相同（导致标准差为零）时。这可能与 PyTorch 处理全为 NaN 或单一值的数据有关。建议检查输入数据是否存在标准差为零的情况，或者尝试增加高斯分布的标准差以减少错误发生的概率。此外，确保使用的是较新版本的 PyTorch 和 sbi，因为旧版本在处理此类边界情况时可能存在缺陷。","https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fissues\u002F669",{"id":120,"question_zh":121,"answer_zh":122,"source_url":123},41608,"如何从 sbi.utils 导入 NeuralPosteriorEnsemble？","NeuralPosteriorEnsemble 类实际上位于 sbi.utils.posterior_ensemble 模块中，而不是直接暴露在 sbi.utils 的顶层命名空间中。您可以使用以下代码进行导入：\nfrom sbi.utils.posterior_ensemble import NeuralPosteriorEnsemble\n由于循环导入的问题，目前尚未将其添加到 __init__.py 中以便直接从 sbi.utils 导入。","https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fissues\u002F744",{"id":125,"question_zh":126,"answer_zh":127,"source_url":128},41609,"如何使用 sbi 计算非归一化的对数概率以用于模型比较（如 AIC）？","可以通过 posterior.potential(theta, x) 方法获取非归一化的对数概率。该方法的输出近似于 $p(x|\\theta, M)p(\\theta|M)$。如果您需要估计似然函数 $q(x|\\theta)$（即去除先验影响），可以将 potential 的输出除以先验概率 $p(\\theta|M)$。具体代码示例如下：\nlog_likelihood = posterior.potential(theta=best_params, x=x_0) - prior.log_prob(best_params)\n注意：不同运行间的结果可能会有显著差异，且如果模型间的先验不同，它们在计算 AIC 时不会自动抵消，需要手动处理。","https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fissues\u002F823",{"id":130,"question_zh":131,"answer_zh":132,"source_url":133},41610,"在 VSCode 中配置 sbi 项目开发环境时，如何处理 black、isort 和 flake8 的路径问题？","由于每个开发者的 conda 环境路径不同，不建议在共享的 .vscode\u002Fsettings.json 文件中硬编码具体的二进制文件路径（如 \u002FUsers\u002Fjm\u002Fopt\u002F...）。更好的做法是：\n1. 不在共享配置中定义 python.pythonPath，让每位开发者使用自己的环境。\n2. 或者将 conda 环境嵌套在项目仓库中，并将其添加到 .gitignore 中，从而统一路径结构。\n3. 对于格式化提供者，可以仅指定 provider 名称（如 \"black\"），依赖系统 PATH 或激活的虚拟环境来查找可执行文件，而不是指定绝对路径。","https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fissues\u002F128",{"id":135,"question_zh":136,"answer_zh":137,"source_url":123},41611,"为什么在使用多个观测值进行后验采样时，真实参数值（true_theta）被排除在置信区间之外？","当观测数量增加时，后验分布的轮廓确实会收缩，但如果真实参数值被排除在外，可能是因为模拟器的噪声模型与实际生成的观测数据不匹配，或者是训练用的模拟器与测试时的观测数据分布存在偏差。在使用 amortized inference（摊销推断）或多观测值场景时，需确保训练数据和测试数据的生成过程一致。此外，检查是否正确传递了观测张量的维度，确保 posterior.sample 接收到的 x 参数形状符合预期（通常为 [num_observations, dim]）。",{"id":139,"question_zh":140,"answer_zh":141,"source_url":128},41612,"在计算模型证据或边际似然时，如何正确处理先验项？","在基于势函数（potential）进行模型比较时，势函数返回的是联合对数概率 $\\log p(x, \\theta) = \\log p(x|\\theta) + \\log p(\\theta)$。若要获得仅关于数据的似然估计以计算模型证据，必须减去先验的对数概率：$\\log p(x|\\theta) \\approx \\text{potential}(\\theta, x) - \\log p(\\theta)$。如果不同模型的先验分布不同，它们不会在比率中自动抵消，因此必须在计算 AIC 或贝叶斯因子时显式地考虑并归一化这些先验差异。",[143,148,153,158,163,168,173,178,183,188,193,198,203,208,213,218,223,228,233,238],{"id":144,"version":145,"summary_zh":146,"released_at":147},333608,"v0.26.1","### ⚠️ 重大变更\n\n* **将 PyMC 和 Pyro 设为可选依赖项**（[#1835](https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fissues\u002F1835)）：执行 `pip install sbi` 不再自动安装 `pymc` 或 `pyro-ppl`。如果用户需要使用 Pyro 或 PyMC 的 MCMC 采样器，应安装相应的额外依赖：\n  * 使用 `pip install \"sbi[pyro]\"` 安装 Pyro 采样器（`hmc_pyro`、`nuts_pyro`）\n  * 使用 `pip install \"sbi[pymc]\"` 安装 PyMC 采样器（`slice_pymc`、`hmc_pymc`、`nuts_pymc`）\n  * 使用 `pip install \"sbi[all]\"` 同时安装两者\n  * 如果未安装相应依赖而尝试使用 Pyro\u002FPyMC 方法，将抛出带有安装说明的清晰 `ImportError`。\n\n### 🐛 错误修复\n\n* **修复 TARP z-score 计算错误**（[#1832](https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fissues\u002F1832)）：当 `z_score_theta=True` 时，参考点现在会与 `thetas` 和 `posterior_samples` 一起进行 z-score 标准化，从而修复了导致偏差检测被掩盖的距离计算错误。\n* **修复损坏的 `biased_toy_gaussian` 测试辅助函数**：已重写该函数，使其能够生成真实的均值偏移（后验均值偏离真实值），而非之前会导致 NaN 值的公式。\n\n### 📖 文档更新\n\n* 简化了 README 中的安装部分，并推荐使用 `uv` 作为默认包管理工具。\n* 在 README、安装指南以及相关教程中添加了可选依赖的安装说明。\n\n### 🔧 功能改进\n\n* **更改 TARP 的默认 `num_bins` 参数**：`run_tarp` 和 `_run_tarp` 现在默认设置为 `num_bins=None`（根据 `num_sims \u002F\u002F 10` 自动调整），取代之前的硬编码值 `30`，从而提高了在较大样本量下 KS 检验的功效。\n\n### 🔒 安全性\n\n* 在发布工作流中添加了 SLSA 构建溯源证明。\n* 引入 Dependabot 以实现 GitHub Actions 版本的自动化更新。\n* 添加了 `SECURITY.md` 文件，包含漏洞披露政策。\n* 修复了发布上传时使用 `--clobber` 标志的问题。","2026-04-09T10:02:35",{"id":149,"version":150,"summary_zh":151,"released_at":152},333609,"v0.26.0","### ✨ 亮点\n\n### 🎉 新贡献者\n\n* @vagechirkov 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1689 中做出了首次贡献\n* @satwiksps 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1695 中做出了首次贡献\n* @Dev-Sudarshan 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1697 中做出了首次贡献\n* @touronc 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1740 中做出了首次贡献\n* @XBastille 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1759 中做出了首次贡献\n* @renecotyfanboy 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1809 中做出了首次贡献\n* @rsvr76 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1806 中做出了首次贡献\n* @khaledeslam20 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1815 中做出了首次贡献\n* @Jocho-Smith 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1803 中做出了首次贡献\n\n#### 🚀 新的推断方法与后验分布\n\n* **添加用于摊销变分推断的 AmortizedVIPosterior**，由 @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1751 中实现\n* **扩散模型引导，包括 PriorGuide**，由 @manuelgloeckler 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1482 中实现\n* **通过 MCMC、VI、IS 为 NPE 添加独立同分布支持**，由 @satwiksps 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1810 中实现\n\n#### 🧠 神经网络架构\n\n* **将 MDN 从 pyknos 移植过来，并提升数值稳定性**，由 @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1724 中实现\n* **为 VEScoreEstimator 添加 EDM 风格的噪声调度**，由 @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1754 中实现\n* **为 TransformerEmbedding 添加一维时间序列支持及自动输入投影功能**，由 @satwiksps 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1703 中实现\n* **FC 嵌入层可选 LayerNorm 和 GELU 激活函数**，由 @renecotyfanboy 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1809 中实现\n* **将 build_mlp_classifier 默认切换为使用 LayerNorm**，由 @rsvr76 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1806 中实现\n\n#### 🔧 代码质量与重构\n\n* **为所有网络构建器配置数据类，以解决 kwargs 链式调用问题**，由 @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1795 中实现\n* **为向量场 kwargs 配置类**，由 @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1777 中实现\n* **重构并模块化推断训练方法**，由 @abelaba 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1651 中实现\n* **训练相关数据类**，由 @abelaba 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1668 中实现\n* **重构绘图函数**，由 @abelaba 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1631 中实现\n\n### ⭐ 新特性\n\n* **为拒绝采样器添加 max_sampling_time 支持**，由 @satwiksps 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1705 中实现\n* **为拒绝采样器添加 return_partial_on_timeout 选项**，由 @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1720 中实现\n* **具有更高维度条件的 FMPE**，由 @gmoss13 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1704 中实现\n* **LC2ST MLP 的 GPU 支持（关闭 #1160）**，由 @Dev-Sudarshan 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1715 中实现\n* **为混合样本添加 Pairplot 支持**，由 @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1808 中实现\n* **添加协议用于**","2026-04-02T19:36:55",{"id":154,"version":155,"summary_zh":156,"released_at":157},333610,"v0.25.0","### ✨ 亮点\n\n#### 🚀 新的推断方法\n\n* @dgedon 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1362 中提出的 **MNPE 类混合参数（类似于 MNLE）**\n* @etouron1 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1471 中实现的 **SNPE-B (#199)**\n\n#### 🧠 神经网络架构与嵌入网络\n\n* @NicolasRR 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1494 中添加的 **Transformer 嵌入网络**\n* @Aranka-S 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1499 中添加的 **使用一维因果卷积的嵌入网络 (#1459)**\n* @famura 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1512 中添加的 **基于 LRU 的嵌入网络**\n* @StefanWahl 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1472 中添加的 **ResNet 作为嵌入模型**\n* @L-in-da 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1503 中提出的 **谱卷积嵌入网络**\n\n#### ⭐ 主要特性与功能\n\n* @StarostinV 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1497 中实现的 **统一流匹配和基于分数的模型**\n* @coschroeder 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1502 中提出的 **基于 MMD 的模型误设检测**\n* @swag2198 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1522 中提出的 **基于边际估计器对数似然的误设检验**\n* @plcrodrigues 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1470 中添加的 **无条件流训练接口**\n* @sethaxen 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1491 中提出的 **支持在 Pyro 模型中使用已训练的估计器**\n* @hayden-johnson 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1483 中添加的 **用于从用户定义势能生成 MCMC 样本的工具 (#1405)**\n* @anastasiakrouglova 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1485 中提出的 **Logit 变换**\n* @Kartik-Sama 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1508 中提出的 **针对独立同分布数据的分数估计器对数似然**\n\n#### 📚 文档与教程\n\n* @touronc 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1489 中编写的 **关于基于分数方法新特性的教程 #1392**\n* @michaeldeistler 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1463 中提出的 **文档：引入 Readthedocs 官网**\n\n### 🐛 错误修复\n\n* @anastasiakrouglova 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1492 中修复的 Zuko 中 z_score 的正确顺序\n* @famura 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1515 中进行的将 theta 从 GPU 移至 CPU 时的小修复\n* @ARna06 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1556 中进行的使用无条件密度估计器和 LRU 嵌入时的小修复\n* @abelaba 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1550 中提出的用 `==` 替代 `in` 操作符以正确比较分类器的修复\n* @gmoss13 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1584 中修复的流匹配条件形状问题\n* @psteinb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1596 中为解决 torch bug 而进行的补丁，即仅使用 CPU 张量运行 torch.histogram\n* @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1628 中修复的 TARP 测试失败问题\n* @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1624 中提出的将 `max_sampling_batch_size` 限制以防止内存过度消耗的修复\n* @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1561 中修复的去噪后验精度计算问题","2025-09-05T13:02:36",{"id":159,"version":160,"summary_zh":161,"released_at":162},333611,"v0.24.0","### ✨ 亮点\n\n- 功能：@jnsbck 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1269 中添加了 `CategoricalMADE` **（重大新功能）**\n- 测试：@manuelgloeckler 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1335 中引入了 `mini-sbibm` **（重大新功能）**\n- 功能：@manuelgloeckler 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1381 中实现了基于得分的独立同分布采样 **（重大新功能）**\n- 取消对 Python 3.9 的支持，并由 @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1412 中修复 CI **（Python 版本支持变更）**\n- @gmoss13 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1370 中为 NPSE 添加了更多功能 **（增强功能）**\n\n### 🐛 错误修复\n\n- 修复：泄漏校正破坏了对数概率与批量对数概率之间的一致性，由 @manuelgloeckler 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1355 中修复\n- 修复 #1343：mog_log_prob 中的设备处理问题，由 @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1356 中修复\n- 修复失败的教程，并将 MNLE 的 log_transform 默认值改为 False，由 @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1367 中完成\n- 修复条件后验形状和设备相关的错误，由 @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1373 中完成\n- 修复：变分推断子类中的类型问题，并跳过 pymc 测试，由 @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1390 中完成\n- 临时包装器以修复 MADE，由 @gmoss13 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1398 中实现\n- 修复 MNLE 测试、MCMC 初始化进度条以及 SIR 批量大小问题，由 @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1410 中完成\n- 修复 MNLE 测试，由 @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1415 中完成\n- 修复：自定义势能的协议并进行重构，由 @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1409 中完成\n- 修复文档工作流程，由 @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1419 中完成\n- 修复 CategoricalMADE 的 GPU 处理问题，由 @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1448 中完成\n\n### 🛠️ 维护与改进\n\n- 增加教程测试的超时时间，由 @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1360 中完成\n- 向 _loss 方法中添加 NaN 检查，由 @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1361 中完成\n- 更新并固定 pre-commit 和 ruff 到最新版本，由 @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1358 中完成\n- 在诊断中添加 NaN 处理，由 @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1359 中完成\n- 改进测试以检测循环导入，并由 @manuelgloeckler 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1357 中解决所有问题\n- 文档：添加关于 zuko 密度估计器的详细信息，由 @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1387 中完成\n- 修复：警告中“大量”一词的重复，由 @turnmanh 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1391 中完成\n- 改进 PR 和 issue 模板，由 @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1399 中完成\n- 性能：通过 uv 加速 CI，由 @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1400 中完成\n- 测试：添加 pytest testmon 插件以加速 CI，由 @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1402 中完成\n- 对得分方法进行小幅修复，由 @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1404 中完成\n- 文档：修正安装文档中的 Python 版本说明（修订版），由 @VijaySamant4368 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1423 中完成\n- 文档：M","2025-03-16T11:59:59",{"id":164,"version":165,"summary_zh":166,"released_at":167},333612,"v0.23.3","# v0.23.3\n\n## 亮点 🤩\n\n* 文档：添加了 conda-forge 的安装说明，由 @matthewfeickert 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1340 中完成\n* 功能：支持多组独立同分布条件的 `NLE`，由 @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1331 中实现\n\n## 变更内容 🚧\n\n* 修复：修正了 y 轴标签中的拼写错误，由 @turnmanh 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1296 中完成\n* 文档：更新了嵌入网络笔记本，由 @emmanuel-ferdman 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1297 中完成\n* 修复：解决了 MCMC 后验中的 pickle 问题，并添加了相关测试，由 @manuelgloeckler 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1291 中完成\n* 对 EnsemblePosterior 的 weights.setter 进行了小幅修复，由 @CompiledAtBirth 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1299 中完成\n* 从 `utils` 中移除了已弃用的 neural_net 访问方式，由 @tvwenger 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1302 中完成\n* [测试] 添加了针对集成后验权重的测试，由 @samadpls 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1307 中完成\n* 澄清了 SNPE-A 最后一轮的行为，由 @michaeldeistler 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1323 中完成\n* 公开了批处理采样选项及错误处理机制，由 @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1321 中完成\n* 修复 #1316：移除了 condition 的 sample_dim 文档字符串，由 @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1338 中完成\n* 文档：修复了教程中的错别字，由 @janfb 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1341 中完成\n* 文档：运行并设置了 SBC 教程的随机种子，由 @manuel-morales-a 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1336 中完成\n\n## 新贡献者 🎉\n\n* @emmanuel-ferdman 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1297 中完成了首次贡献\n* @CompiledAtBirth 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1299 中完成了首次贡献\n* @tvwenger 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1302 中完成了首次贡献\n* @matthewfeickert 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1340 中完成了首次贡献\n* @manuel-morales-a 在 https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fpull\u002F1336 中完成了首次贡献\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi\u002Fcompare\u002Fv0.23.2...v0.23.3","2024-12-30T13:27:44",{"id":169,"version":170,"summary_zh":171,"released_at":172},333613,"v0.23.2","## Bug 修复\n\n- 由 @michaeldeistler 修复 HMC 测试失败问题 (#1247)\n- 修复：将 RestrictedPrior 改为分布，以启用 log_prob 方法 @janfb (#1257)\n- 修复：处理 NPE 的独立同分布情况 @janfb (#1262)\n- 修复：教程测试中的错误处理，并修复教程中的 bug @janfb (#1264)\n- 修复 #1260：在绘图范围内包含点 @janfb (#1265)\n- 修复：条件势能的错误处理 @janfb、@michaeldeistler (#1275、#1289)\n- 修复：允许使用一维 PyTorch 分布 @michaeldeistler (#1286)\n\n## 文档更新\n\n- 将 README 中的 SNPE 重命名为 NPE @michaeldeistler (#1248)\n- 更新序列化常见问题解答 @michaeldeistler (#1255)\n- 在第 18 篇教程中添加自定义 DataLoader 示例 @psteinb (#1256)\n- 文档：在文档首页添加 README 简介 @janfb (#1272)\n- 将 LC2ST 的采样方法改为 `sample_batched()` @JuliaLinhart (#1279)\n\n## 维护工作\n\n- 重构 simulate_for_sbi 的位置 @samadpls (#1253)\n- 构建：更新开发容器 @janfb (#1252)\n- 修复：Docker Notebook 的 Python 版本问题 @janfb (#1258)\n- 重构：移除教程中除图表以外的输出文件 @janfb (#1266)\n- 构建：自动去除笔记本中的输出内容并上传至 PyPI @janfb (#1267)\n- 重构：移除不再需要的已弃用 x_shape 参数 @janfb (#1271)\n- 为 CNN 形状提供更明确的错误信息 @Ankush7890 (#1281)","2024-10-04T12:27:08",{"id":174,"version":175,"summary_zh":176,"released_at":177},333614,"v0.23.1","- 修复：通过添加 `__init__.py` 文件来包含 `score` 文件夹 (#1245 #1246)","2024-08-29T06:58:16",{"id":179,"version":180,"summary_zh":181,"released_at":182},333615,"v0.23.0","## 公告\n\n- 重新许可：许可证由\n  [AGPLv3](https:\u002F\u002Fwww.gnu.org\u002Flicenses\u002Fagpl-3.0.en.html) 更改为\n  [Apache-2.0](https:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0)（详情请参见 #997）\n- `sbi` 现在隶属于 [`NumFOCUS`](https:\u002F\u002Fnumfocus.org) 🎉\n- 新贡献者 🎉：@anastasiakrouglova、@theogruner、@felixp8、@Matthijspals、@jsvetter、@pfuhr、@turnmanh、@fariedabuzaid、@augustes、@zinastef、@Baschdl、@danielmk、@lisahaxel、@janko-petkovic、@samadpls、@ThomasGesseyJonesPX、@schroedk\n\n## 主要变更\n\n- 内部将所有推断类的名称从例如 `SNPE` 改为 `NPE`（即移除了 `S` 前缀）。这些类的功能保持不变。`NPE` 类同时支持神经后验估计的摊销版本和序列版本。为了向后兼容，`SNPE`（以及其他序列方法）的别名仍然存在（#1238）(@michaeldeistler)。\n- 修改 `sbi` 默认参数：`training_batch_size=200`，`num_chains=20`（#1221）(@janfb)。\n- 更改 `posterior_nn`、`likelihood_nn` 和 `classifier_nn` 的导入方式。现在应从 `sbi.neural_nets` 导入，而非从 `sbi.utils` 导入（#994）(@famura)。\n- 大规模重构绘图工具，并新增教程（#1084）(@Matthijspals)。\n- 改进教程和网站文档（#1012、#1051、#1073）(@augustes、@zinaStef、@lisahaxel、@psteinb)。\n- 完善网站结构和贡献指南（#1019）(@tomMoral、@janfb)。\n- 停止对 Python 3.8 和 PyTorch 1.12 的支持（#1233）。\n- 重构 `neural_nets` 文件夹结构及命名（#1237）(@michaeldeistler)。\n\n## 新特性\n\n- 训练循环的完全灵活性（#983）(@michaeldeistler)。\n- 统一的密度估计器类（#952、#965、#979、#1151）(@michaeldeistler、@gmoss13、@tomMoral、@manualgloeckler)。\n- 对于 `(S)NPE`，给定一批 x，实现向量化采样和 log_prob 计算（#1153）(@manuelgloeckler、@michaeldeistler)。\n- 向量化 MCMC 采样器的批量采样功能（#1176、#1210）(@gmoss13、@janfb)。\n- 支持 @zuko 作为归一化流的后端（#1088、#1116）(@anastasiakrouglova)。\n- 局部 c2st 指标（#1109）(@JuliaLinhart)。\n- TARP 覆盖率指标（#1106）(@psteinb)。\n- 添加对 @PyMC 采样器的接口支持（#1053）(@famura、@felixp8)。\n- 流匹配密度估计器（#1049）(@turnmanh、@fariedabuzaid、@janfb)。\n- 分数匹配密度估计器（#1015）(@rdgao、@jsvetter、@pfuhr、@manuelgloeckler、@michaeldeistler、@janfb)。\n- 基于试验数据、使用统计距离的 ABC 方法（#1104）(@theogruner)。\n- 支持 Apple MPS 作为 GPU 设备（#912）(@janfb)。\n- 用于在 GitHub Codespaces 中使用 `sbi` 的开发容器（#1070）(@turnmanh)。\n- 为基于似然的估计器启用重要性采样功能（#1183）(@manuelgloeckler)。\n- 对 `RatioEstimator` 进行重构并统一形状处理（#1097）(@bkmi)。\n- 通过批量采样加速 SBC 和 TARP 校准检查（#1196）(@janfb)。\n- 为 `MNLE` 提供批量采样和嵌入网络支持（#1203）。","2024-08-28T15:48:10",{"id":184,"version":185,"summary_zh":186,"released_at":187},333616,"v0.22.0","## API 变更\n\n- 我们已将 `sbi` 迁移到一个新的 GitHub 组织：`https:\u002F\u002Fgithub.com\u002Fsbi-dev\u002Fsbi`。\n- `sbi` 文档的网站地址已更改：`https:\u002F\u002Fsbi-dev.github.io\u002Fsbi\u002F`。\n- `sbi.analysis.pairplot` 中的 `upper` 参数已被 `offdiag` 替代，并将在未来的版本中弃用。\n\n## 功能与改进\n\n- 用于独立同分布数据的尺寸不变嵌入网络，支持摊销推理 (@janfb, #808)\n- 新增使用带有有理二次样条的 MAF 的选项 (感谢 @ImahnShekhzadeh, #819)\n- 改进了 `process_prior` 的文档字符串 (感谢 @musoke, #813)\n- 扩展了关于独立同分布数据 SBI 的教程 (@janfb, #857)\n- 新增了关于具有实验条件和混合数据的 SBI 教程 (@janfb, #829)\n- `pairplot` 的新选项：\n  - `upper` 现在更名为 `offdiag`，以与其他关键字参数保持一致。\n  - 为 `samples` 和 `points` 提供交替的颜色。\n  - 增加了添加图例的选项，并可传递图例的相关参数。\n\n## 错误修复\n\n- 修复了 `append_simulations` 中的内存泄漏问题 (感谢 @VictorSven, #803)\n- 修复了 CNRE 的错误 (感谢 @bkmi, #815)\n- 修复了使用后验集成进行独立同分布推理时的错误 (@janfb, #826)\n- 修复了使用变分推断后验进行基于模拟校准时的错误 (@janfb, #834, #838)\n- 修复了 BoxUniform 设备处理方面的错误 (@janfb, #854, #856)\n- 修复了使用独立先验进行最大后验估计时的错误 (@janfb, #867)\n- 修复了关于 SBC 教程中的错误 (@michaeldeistler, #891)\n- 修复了 `simulate_for_sbi` 中的虚假随机种子问题 (@jan-matthis, #876)\n- 将 GitHub Actions 测试的 Python 版本升级至 `3.9.13` (@michaeldeistler, #888, #900)","2023-12-04T11:07:17",{"id":189,"version":190,"summary_zh":191,"released_at":192},333617,"v0.21.0","- 实现了【对比神经比率估计】（Contrastive Neural Ratio Estimation）（感谢 @bkmi，#787）\n- 实现了【平衡神经比率估计】（Balanced Neural Ratio Estimation）（感谢 @ADelau，#779）\n- 修复了 SBC、设备管理和独立同分布观测处理方面的 bug（#793、#789、#780）","2022-12-22T16:15:08",{"id":194,"version":195,"summary_zh":196,"released_at":197},333618,"v0.20.0","## Major changes and bug fixes\r\n\r\n- implementation of [\"Truncated proposals for scalable and hassle-free sbi\"](https:\u002F\u002Fopenreview.net\u002Fforum?id=QW98XBAqNRa) (#754)\r\n- sample-based expected coverage tests (#754)\r\n- permutation invariant embedding to allow iid data in SNPE (thanks @coschroeder, #751)\r\n- convolutional neural network embedding (thanks @coschroeder, #745, #751, #769)\r\n- disallow invalid simulations when using SNLE, SNRE, or atomic SNPE-C (#768)\r\n\r\n## Enhancements\r\n\r\n- add tutorial on all available methods (#754)\r\n- allow seeding of `simulate_for_sbi` on multiple workers (#762)\r\n- expose `enable_transforms` in sampler interface (#756)\r\n- bugfix for building the transformation of transformed distributions (#756)","2022-11-04T07:39:32",{"id":199,"version":200,"summary_zh":201,"released_at":202},333619,"v0.19.2","- Rely on new version of `pyknos` with bugfix for APT with MDNs (#734)\r\n- bugfix: atomic SNPE-C now allows any kind of proposal (#732)\r\n- bugfix for SNPE with implicit prior on GPU (#730)\r\n- SNPE-A has `force_first_round_loss=True` as default (#729)","2022-08-30T09:20:40",{"id":204,"version":205,"summary_zh":206,"released_at":207},333620,"v0.19.1","- bug fix for `ArviZ` integration (#727)","2022-08-24T06:14:58",{"id":209,"version":210,"summary_zh":211,"released_at":212},333621,"v0.19.0","## Major changes and bug fixes\r\n\r\n- new option to sample posterior using importance sampling (#692)\r\n- new option to use `arviz` for posterior plotting and MCMC diagnostics (#546, #607, thanks to @sethaxen)\r\n- fixes for using the `VIPosterior` with `MultipleIndependent` prior, a51e93b\r\n- bug fix for sir (sequential importance reweighting) for MCMC initialization (#692)\r\n- bug fix for SNPE-A 565082c\r\n- bug fix for validation loader batch size (#674, thanks to @bkmi)\r\n- small bug fixes for `pairplot` and MCMC kwargs\r\n\r\n## Enhancements\r\n\r\n- improved and new tutorials:\r\n  - Tutorial for simulation-based calibration (SBC) (#629, thanks to @psteinb)\r\n  - Tutorial for sampling the conditional posterior (#667)\r\n- new option to use first-round loss in all rounds\r\n- simulated data is now stored as `Dataset` to reduce memory load and add flexibility\r\n  with large data sets (#685, thanks to @tbmiller-astro)\r\n- refactoring of summary write for better training logs with tensorboard (#704)\r\n- new option to find peaks of 1D posterior marginals without gradients (#707, #708, thanks to @Ziaeemehr)\r\n- new option to not use parameter transforms in `DirectPosterior` for more flexibility with custom priors (#714)","2022-08-13T19:13:57",{"id":214,"version":215,"summary_zh":216,"released_at":217},333622,"v0.18.0","## Breaking changes\r\n- Posteriors saved under `sbi` `v0.17.2` or older can not be loaded under `sbi` \r\n`v0.18.0` or newer.\r\n- `sample_with` can no longer be passed to `.sample()`. Instead, the user has to rerun\r\n`.build_posterior(sample_with=...)`. (#573)\r\n- the `posterior` no longer has the the method `.sample_conditional()`. Using this \r\n  feature now requires using the `sampler interface` (see tutorial\r\n  [here](https:\u002F\u002Fwww.mackelab.org\u002Fsbi\u002Ftutorial\u002F07_conditional_distributions\u002F)) (#573)\r\n- `retrain_from_scratch_each_round` is now called `retrain_from_scratch` (#598, thanks to @jnsbck)\r\n- API changes that had been introduced in `sbi v0.14.0` and `v0.15.0` are not enforced. Using the interface prior to\r\n  those changes leads to an error (#645)\r\n- prior passed to SNPE \u002F SNLE \u002F SNRE must be a PyTorch distribution (#655), see FAQ-7 for how to pass use custom prior.\r\n\r\n## Major changes and bug fixes\r\n- new `sampler interface` (#573)\r\n- posterior quality assurance with simulation-based calibration (SBC) (#501)\r\n- added `Sequential Neural Variational Inference (SNVI)` (Glöckler et al. 2022) (#609, thanks to @manuelgloeckler)\r\n- bugfix for SNPE-C with mixture density networks (#573)\r\n- bugfix for sampling-importance resampling (SIR) as `init_strategy` for MCMC (#646)\r\n- new density estimator for neural likelihood estimation with mixed data types (MNLE, #638)\r\n- MCMC can now be parallelized across CPUs (#648)\r\n- improved device check to remove several GPU issues (#610, thanks to @LouisRouillard)\r\n\r\n## Enhancements\r\n- pairplot takes `ax` and `fig` (#557)\r\n- bugfix for rejection sampling (#561)\r\n- remove warninig when using multiple transforms with NSF in single dimension (#537)\r\n- Sampling-importance-resampling (SIR) is now the default `init_strategy` for MCMC (#605)\r\n- change `mp_context` to allow for multi-chain pyro samplers (#608, thanks to @sethaxen)\r\n- tutorial on posterior predictive checks (#592, thanks to @LouisRouillard)\r\n- add FAQ entry for using a custom prior (#595, thanks to @jnsbck)\r\n- add methods to plot tensorboard data (#593, thanks to @lappalainenj)\r\n- add option to pass the support for custom priors (#602)\r\n- plotting method for 1D marginals (#600, thanks to @guymoss)\r\n- fix GPU issues for `conditional_pairplot` and `ActiveSubspace` (#613)\r\n- MCMC can be performed in unconstrained space also when using a `MultipleIndependent` distribution as prior (#619)\r\n- added z-scoring option for structured data (#597, thanks to @rdgao)\r\n- refactor c2st; change its default classifier to random forest (#503, thanks to @psteinb)\r\n- MCMC `init_strategy` is now called `proposal` instead of `prior` (#602)\r\n- inference objects can be serialized with `pickle` (#617)\r\n- preconfigured fully connected embedding net (#644, thanks to @JuliaLinhart #624)\r\n- posterior ensembles (#612, thanks to @jnsbck)\r\n- remove gradients before returning the `posterior` (#631, thanks to @tomMoral)\r\n- reduce batchsize of rejection sampling if few samples are left (#631, thanks to @tomMoral)\r\n- tutorial for how to use SBC (#629, thanks to @psteinb)\r\n- tutorial for how to use SBI with trial-based data and mixed data types (#638)\r\n- allow to use a `RestrictedPrior` as prior for `SNPE` (#642)","2022-03-04T12:56:29",{"id":219,"version":220,"summary_zh":221,"released_at":222},333623,"v0.17.2","## Minor changes\r\n- bug fix for transforms in KDE (#552)","2021-11-13T16:47:36",{"id":224,"version":225,"summary_zh":226,"released_at":227},333624,"v0.17.1","## Minor changes\r\n- improve kwarg handling for rejection abc and smcabc\r\n- typo and link fixes (#549, thanks to @pitmonticone)\r\n- tutorial notebook on crafting summary statistics with sbi (#511, thanks to @ybernaerts)\r\n- small fixes and improved documenentation for device handling (#544, thanks to @milagorecki)","2021-11-10T09:55:23",{"id":229,"version":230,"summary_zh":231,"released_at":232},333625,"v0.17.0","## Major changes\r\n- New API for specifying sampling methods (#487). Old syntax:\r\n```python\r\nposterior = inference.build_posterior(sample_with_mcmc=True)\r\n```\r\nNew syntax:\r\n```python\r\nposterior = inference.build_posterior(sample_with=\"mcmc\")  # or \"rejection\"\r\n```\r\n- Rejection sampling for likelihood(-ratio)-based posteriors (#487)\r\n- MCMC in unconstrained and z-scored space (#510)\r\n- Prior is now allowed to lie on GPU. The prior has to be on the same device as the one\r\n  passed for training (#519).\r\n- Rejection-ABC and SMC-ABC now return the accepted particles \u002F parameters by default,\r\n  or a KDE fit on those particles (`kde=True`) (#525).\r\n- Fast analytical sampling, evaluation and conditioning for `DirectPosterior` trained\r\n  with MDNs (thanks @jnsbck #458). \r\n\r\n## Minor changes\r\n- `scatter` allowed for diagonal entries in pairplot (#510)\r\n- Changes to default hyperparameters for `SNPE_A` (thanks @famura, #496, #497)\r\n- bugfix for `within_prior` checks (#506)","2021-08-04T08:09:36",{"id":234,"version":235,"summary_zh":236,"released_at":237},333626,"v0.16.0","## Major changes\r\n- Implementation of SNPE-A (thanks @famura and @theogruner, #474, #478, #480, #482)\r\n- Option to do inference over iid observations with SNLE and SNRE (#484, #488)\r\n\r\n## Minor changes\r\n- Fixed unused argument `num_bins` when using `nsf` as density estimator (#465)\r\n- Fixes to adapt to the new support handling in `torch` `v1.8.0` (#469)\r\n- More scalars for monitoring training progress (thanks @psteinb #471)\r\n- Fixed bug in `minimal.py` (thanks @psteinb, #485)\r\n- Depend on `pyknos` `v0.14.2`","2021-05-19T06:22:38",{"id":239,"version":240,"summary_zh":241,"released_at":242},333627,"v0.15.1","- add option to pass `torch.data.DataLoader` kwargs to all inference methods (thanks @narendramukherjee, #445)\r\n- fix bug due to release of `torch` `v1.8.0` (#451)\r\n- expose `leakage_correction` parameters for `log_prob` correction in unnormalized \r\n  posteriors (thanks @famura, #454)","2021-03-18T09:08:01"]