Table of Contents
Fetching ...

PyOD 2: A Python Library for Outlier Detection with LLM-powered Model Selection

Sihan Chen, Zhuangzhuang Qian, Wingchun Siu, Xingcan Hu, Jiaqi Li, Shawn Li, Yuehan Qin, Tiankai Yang, Zhuo Xiao, Wanghao Ye, Yichi Zhang, Yushun Dong, Yue Zhao

TL;DR

PyOD 2 addresses the core limitations of the original PyOD by unifying a broad suite of deep learning outlier detection methods under PyTorch and introducing an LLM-powered automated model selection pipeline. The approach expands from a few neural methods to 45 algorithms, standardizes a reusable base_dl architecture, and provides a three-step symbolic-neural reasoning process to tailor model choice to dataset characteristics. Through demonstrations and experiments on 17 datasets with 10 neural OD models, the study shows that the automated selector can outperform naive baselines and standalone deep models, reducing manual tuning while maintaining strong OD performance. The work promises significant practical impact by simplifying deployment, improving accessibility for non-experts, and enabling scalable, data-driven model selection in real-world OD tasks.

Abstract

Outlier detection (OD), also known as anomaly detection, is a critical machine learning (ML) task with applications in fraud detection, network intrusion detection, clickstream analysis, recommendation systems, and social network moderation. Among open-source libraries for outlier detection, the Python Outlier Detection (PyOD) library is the most widely adopted, with over 8,500 GitHub stars, 25 million downloads, and diverse industry usage. However, PyOD currently faces three limitations: (1) insufficient coverage of modern deep learning algorithms, (2) fragmented implementations across PyTorch and TensorFlow, and (3) no automated model selection, making it hard for non-experts. To address these issues, we present PyOD Version 2 (PyOD 2), which integrates 12 state-of-the-art deep learning models into a unified PyTorch framework and introduces a large language model (LLM)-based pipeline for automated OD model selection. These improvements simplify OD workflows, provide access to 45 algorithms, and deliver robust performance on various datasets. In this paper, we demonstrate how PyOD 2 streamlines the deployment and automation of OD models and sets a new standard in both research and industry. PyOD 2 is accessible at [https://github.com/yzhao062/pyod](https://github.com/yzhao062/pyod). This study aligns with the Web Mining and Content Analysis track, addressing topics such as the robustness of Web mining methods and the quality of algorithmically-generated Web data.

PyOD 2: A Python Library for Outlier Detection with LLM-powered Model Selection

TL;DR

PyOD 2 addresses the core limitations of the original PyOD by unifying a broad suite of deep learning outlier detection methods under PyTorch and introducing an LLM-powered automated model selection pipeline. The approach expands from a few neural methods to 45 algorithms, standardizes a reusable base_dl architecture, and provides a three-step symbolic-neural reasoning process to tailor model choice to dataset characteristics. Through demonstrations and experiments on 17 datasets with 10 neural OD models, the study shows that the automated selector can outperform naive baselines and standalone deep models, reducing manual tuning while maintaining strong OD performance. The work promises significant practical impact by simplifying deployment, improving accessibility for non-experts, and enabling scalable, data-driven model selection in real-world OD tasks.

Abstract

Outlier detection (OD), also known as anomaly detection, is a critical machine learning (ML) task with applications in fraud detection, network intrusion detection, clickstream analysis, recommendation systems, and social network moderation. Among open-source libraries for outlier detection, the Python Outlier Detection (PyOD) library is the most widely adopted, with over 8,500 GitHub stars, 25 million downloads, and diverse industry usage. However, PyOD currently faces three limitations: (1) insufficient coverage of modern deep learning algorithms, (2) fragmented implementations across PyTorch and TensorFlow, and (3) no automated model selection, making it hard for non-experts. To address these issues, we present PyOD Version 2 (PyOD 2), which integrates 12 state-of-the-art deep learning models into a unified PyTorch framework and introduces a large language model (LLM)-based pipeline for automated OD model selection. These improvements simplify OD workflows, provide access to 45 algorithms, and deliver robust performance on various datasets. In this paper, we demonstrate how PyOD 2 streamlines the deployment and automation of OD models and sets a new standard in both research and industry. PyOD 2 is accessible at [https://github.com/yzhao062/pyod](https://github.com/yzhao062/pyod). This study aligns with the Web Mining and Content Analysis track, addressing topics such as the robustness of Web mining methods and the quality of algorithmically-generated Web data.

Paper Structure

This paper contains 7 sections, 6 equations, 2 figures, 1 table.

Figures (2)

  • Figure 1: An overview of the automated three-step pipeline for model selection in PyOD 2 (see § \ref{['subsec:llm']}). Step 1 analyzes each model's paper and code to produce symbolic tags describing its strengths and weaknesses. Step 2 profiles the dataset, generates statistical summaries, and produces symbolic tags characterizing it. Step 3 uses these model and dataset tags, combined with LLM-based reasoning, to identify the most suitable model and provide an explanation of the decision.
  • Figure 2: Comparison of AUROC rankings of baseline methods, the AutoModelSelector (with and without additional notes), and two standalone models (AutoEncoder and LUNAR). Lower ranks indicate better performance.