# MLScent: A Tool for Anti-Pattern Detection in ML Projects

- **År:** 2025
- **Type:** Vitenskapelig (NVA: AcademicChapter)
- **Publiseringssted:** Proceedings of the 2025 IEEE/ACM 4th International Conference on AI Engineering – Software Engineering for AI (CAIN), Ottawa, Ontario, Canada, 27–28 April 2025
- **Forfattere:** Karthik Shivashankar, Antonio Martini
- **Open access:** https://hdl.handle.net/11250/4048314
- **Cristin:** https://app.cristin.no/results/show.jsf?id=10249959

## Forskere med profil på nettstedet
- [Antonio Martini](https://research.lab.knowit.no/people/#antonio-martini) ([markdown](https://research.lab.knowit.no/people/antonio-martini.md))
- [Karthik Shivashankar](https://research.lab.knowit.no/people/#karthik-shivashankar) ([markdown](https://research.lab.knowit.no/people/karthik-shivashankar.md))

## 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 for data preprocessing and model training workflows. Our evaluation demonstrates MLScent's effectiveness through both quantitative classification metrics and qualitative assessment via user studies feedback with ML practitioners. Results show high accuracy in identifying framework-specific anti-patterns, data handling issues, and general ML code smells across real-world projects.

---
Kanonisk HTML: https://research.lab.knowit.no/publications/2025-mlscent-a-tool-for-antipattern-detection-in-ml-pro/
Oversikt: https://research.lab.knowit.no/publications.md · Alle ruter: https://research.lab.knowit.no/llms.txt
