The Detection of Spurious Correlations in Public Bidding and Contract Descriptions Using Explainable Artificial Intelligence and Unsupervised Learning
Artificial Intelligence (AI) models, including deep learning and rule-based approaches, often function as black boxes, limiting transparency and increasing uncertainty in decisions. This study addresses spurious correlations, defined as associations between patterns and classes that do not reflect causal relationships, affecting AI models’ reliability and applicability. In Natural Language Processing (NLP), these correlations lead to inaccurate predictions, biases, and challenges in model generalization. We propose a method that employs Explainable Artificial Intelligence (XAI) techniques to detect spurious patterns in textual datasets for binary classification tasks. The method applies the K-means algorithm to cluster patterns and interprets them based on their distance from centroids. It hypothesizes that patterns farther from the centroids are more likely to be spurious than those closer to them. We apply the method to public procurement datasets from the Court of Auditors of Piauí (TCE-PI) using models based on Support Vector Machine (SVM) and Logistic Regression with text representations from TFIDF and Word Embeddings, as well as a BERT model. The analysis is extended to the IMDB movie review dataset to evaluate generalizability. The results support the hypothesis that patterns farther from centroids exhibit higher spuriousness potential and demonstrate the clustering’s consistency across models and datasets. The method operates independently of the techniques used in its stages, enabling the automatic detection and quantification of spurious patterns without prior human intervention.
Authors
- Rodrigo Veras (ORCID: https://orcid.org/0000-0001-8180-4032)
- Anselmo Cardoso de Paiva (ORCID: https://orcid.org/0000-0003-4921-0626)
- Raimundo Santos Moura (ORCID: https://orcid.org/0000-0002-1558-3830)
- Vinícius Ponte Machado (ORCID: https://orcid.org/0000-0003-3391-8443)
- Hélcio Soares (ORCID: https://orcid.org/0000-0003-0120-6409)
- Weslley Lima (ORCID: https://orcid.org/0000-0003-1062-9876)
Institutions
- Universidade Federal do Piauí (BR)
- Instituto Federal do Piauí (BR)
- Universidade Federal do Maranhão (BR)
Publication Details
- Journal
- Electronics
- Published
- 2025-03-22
- DOI
- https://doi.org/10.3390/electronics14071251
- Citations
- 2
- Primary Topic
- Artificial Intelligence in Law
- Type
- article
- Field-Weighted Citation Impact
- 17.04