MLScent A tool for Anti-pattern detection in ML projects
Karthik Shivashankar, Antonio Martini

TL;DR
MLScent is a static analysis tool designed to detect ML-specific anti-patterns and code smells across major frameworks, improving code quality and maintainability in complex ML projects.
Contribution
Introduces MLScent, a novel static analysis tool with 76 detectors for ML-specific anti-patterns, addressing gaps in traditional code smell detection tools.
Findings
High accuracy in identifying framework-specific anti-patterns
Effective detection of data handling issues
Positive user feedback from ML practitioners
Abstract
Machine learning (ML) codebases face unprecedented challenges in maintaining code quality and sustainability as their complexity grows exponentially. While traditional code smell detection tools exist, they fail to address ML-specific issues that can significantly impact model performance, reproducibility, and maintainability. This paper introduces MLScent, a novel static analysis tool that leverages sophisticated Abstract Syntax Tree (AST) analysis to detect anti-patterns and code smells specific to ML projects. MLScent implements 76 distinct detectors across major ML frameworks including TensorFlow (13 detectors), PyTorch (12 detectors), Scikit-learn (9 detectors), and Hugging Face (10 detectors), along with data science libraries like Pandas and NumPy (8 detectors each). The tool's architecture also integrates general ML smell detection (16 detectors), and specialized analysis…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Scientific Computing and Data Management · Software Testing and Debugging Techniques
