Skip to Content
  • Proceeding Paper
  • Open Access

18 November 2026

9 Pages

Data-Driven Failure Prediction: Leveraging Ontologies and LLMs in Industrial Predictive Maintenance †

,
,
,
,
and
1
College of Physical Sciences and Engineering, Mohammed VI Polytechnic University, Ben Guerir 43150, Morocco
2
Software Project Management Research Team, ENSIAS, Mohammed V University in Rabat, Rabat 10112, Morocco
*
Author to whom correspondence should be addressed.
†
Presented at the 8th edition of the International Conference on Advanced Technologies for Humanity (ICATH 2026), Rabat, Morocco, 15–17 July 2026.

Abstract

Predictive maintenance has emerged as a key enabler of equipment availability and overall industrial system performance, allowing early failure detection and reduced downtime. However, effective predictive models such as XGBoost remain constrained by their limited interpretability, which hinders their adoption in critical decision-making contexts. To address this limitation, this work proposes a hybrid approach that combines domain knowledge with artificial intelligence to transform a “black-box” predictive model into an interpretable, human-centered decision support system. Using the Kaggle AI4I 2020 dataset, an XGBoost classifier was trained and evaluated, achieving strong performance in failure detection. To enhance interpretability, decision rules were extracted from the trained model and formalized within a knowledge base structured through a rule-based ontology. SHAP (SHapley Additive exPlanations) was subsequently employed to validate the consistency between the model’s internal behavior and the extracted rules. The proposed framework thus integrates machine learning, rule-based reasoning, and knowledge engineering to improve the prediction of equipment health status and support actionable decision-making in industrial systems.

1. Introduction

Predictive maintenance (PdM) has become a central component of Industry 4.0, enabling organizations to anticipate equipment failures and optimize maintenance strategies. Recent advances in machine learning have significantly improved the accuracy of failure prediction, particularly through the use of ensemble methods such as XGBoost and Random Forest, which have demonstrated strong performance on industrial datasets [1,2].
Despite their predictive power, these models are often considered “black boxes”, making it difficult for engineers and operators to understand and trust their outputs. This lack of interpretability is a major barrier to adoption in safety-critical environments, where decisions must be transparent and justifiable. To address this challenge, explainable artificial intelligence (XAI) techniques such as SHAP have been proposed to provide both global and local explanations of model behavior [2].
In parallel, rule extraction methods have been developed to convert complex models into interpretable IF–THEN rules, allowing integration into knowledge-based systems and facilitating human understanding [3]. Furthermore, ontology-based approaches have shown promise in structuring industrial knowledge and enabling semantic reasoning over heterogeneous data sources [4].
Building on these developments, this work proposes a hybrid framework that combines machine learning, rule extraction, knowledge representation, and human-centered validation. The objective is to move beyond predictive performance and design a system that is interpretable, actionable, and aligned with real industrial decision-making processes.

2. Materials and Methods

2.1. Dataset Description

This study is based on the Kaggle AI4I 2020 Predictive Maintenance Dataset, a synthetic dataset designed to simulate industrial machine behavior. It contains 10,000 observations and multiple sensor measurements, including air temperature, process temperature, rotational speed, torque, and tool wear.
The dataset includes five types of failure modes: tool wear failure (TWF), heat dissipation failure (HDF), power failure (PWF), overstrain failure (OSF), and random failure (RNF). Although synthetic, the dataset provides a controlled environment for evaluating predictive maintenance models and testing interpretability methods.

2.2. Data Preprocessing

Data preprocessing was performed to ensure data quality, model robustness, and reproducibility of the experimental setup. Initially, non-informative identifiers such as UDI and Product ID were removed, as they do not contribute to the predictive task and could introduce noise into the model.
The categorical variable representing product type (L, M, H) was transformed using one-hot encoding, allowing the model to process categorical information without introducing ordinal bias. All numerical features were retained in their original scale, as tree-based models such as XGBoost are insensitive to feature scaling.
The dataset was split into training and testing sets using an 80/20 stratified sampling strategy to preserve the distribution of failure classes across both subsets. This is particularly important in predictive maintenance scenarios, where class imbalance is common.
To address this imbalance, the scale_pos_weight parameter of XGBoost was used to assign higher importance to minority failure classes during training. This approach avoids the need for synthetic data generation techniques such as SMOTE, thereby preserving the original data distribution and preventing potential overfitting.
Finally, preprocessing steps were consistently applied across all experiments to ensure comparability of results and reproducibility of the pipeline.

2.3. Predictive Modeling

To evaluate the effectiveness of different machine learning approaches for predictive maintenance, three models were implemented and compared: Logistic Regression, Random Forest, and XGBoost. These models were selected to represent different levels of complexity and interpretability, ranging from linear models to ensemble tree-based methods.
Model training and evaluation were conducted using stratified k-fold cross-validation (k = 4) to ensure robustness and preserve the distribution of failure classes across folds. Given the industrial context of predictive maintenance, recall was considered a critical metric, as minimizing false negatives (i.e., undetected failures) is essential for preventing unexpected breakdowns Table 1.
Table 1. Comparison of machine learning models on the AI4I 2020 dataset.
The results show that all models achieve high precision, indicating a low rate of false positives. However, significant differences appear in recall, F1-score, and overall balance between performance metrics.
Logistic Regression achieves a high recall but suffers from a significantly lower F1-score and accuracy, indicating poor overall generalization and an inability to capture complex nonlinear relationships in the data. This limitation makes it less suitable for industrial predictive maintenance scenarios.
Random Forest demonstrates strong performance across all metrics, particularly in recall and accuracy, confirming its robustness as an ensemble method for tabular data.
XGBoost achieves the best overall balance between precision, recall, and F1-score while maintaining the highest accuracy. Although its recall is slightly lower than Random Forest, it provides a more stable and consistent performance across all metrics.
Based on these results, XGBoost was selected as the final model for this study. This choice is further supported by recent literature highlighting the effectiveness of gradient boosting methods in predictive maintenance tasks, particularly in handling complex feature interactions and imbalanced datasets [1].

2.4. Explainable AI Using SHAP

To address the lack of interpretability inherent to ensemble models such as XGBoost, explainability was incorporated using SHAP (SHapley Additive exPlanations), a game-theoretic approach that attributes the contribution of each feature to individual predictions. SHAP was employed to provide both global and local interpretability. At the global level, feature importance analysis was conducted to identify the most influential variables driving failure prediction across the entire dataset. At the local level, SHAP values were used to analyze individual predictions, allowing detailed inspection of how specific sensor readings contributed to predicted failure outcomes.
This dual-level interpretability is particularly relevant in predictive maintenance contexts, where understanding both general model behavior and specific failure cases is critical for decision-making.
Beyond interpretability, SHAP was used as a validation mechanism for the extracted rule set. Specifically, the most influential features identified by SHAP were compared with the conditions appearing in the extracted rules. This comparison ensured consistency between the internal behavior of the XGBoost model and the symbolic representation of knowledge in the rule base.
Such alignment between model explanations and extracted rules is essential to guarantee the reliability of the proposed system, as it reduces the risk of generating rules that are not faithful to the underlying model. This approach is supported by recent studies emphasizing the importance of combining XAI techniques with interpretable rule extraction to enhance trust and transparency in industrial AI systems [2].

2.5. Rule Extraction, Aggregation, and Optimization

To enhance interpretability while preserving the predictive power of the XGBoost model, a multi-stage rule extraction and optimization process was implemented.
Initially, decision rules were extracted by traversing all decision paths from root to leaf nodes across the ensemble of trees. This process generated a large set of fine-grained rules corresponding to specific regions of the feature space. However, such raw rule sets are typically redundant, highly fragmented, and difficult to interpret in practice. To address this limitation, a structured filtering and aggregation strategy was applied.
First, rules were filtered based on quality metrics, including precision and coverage, in order to retain only reliable and representative patterns. Subsequently, rules sharing similar structures, failure types, and operational contexts were grouped and merged.
This aggregation process resulted in a significant reduction of rule complexity while preserving semantic meaning. For example, multiple rules associated with the same failure type and similar feature patterns were consolidated into higher-level rules representing common operational phenomena.
The final rule set consists of a reduced number of optimized rules, each characterized by
  • Core conditions (high-frequency features across merged rules);
  • Optional conditions (context-dependent features);
  • Associated failure type and underlying physical phenomenon;
  • Decision actions and priority levels;
  • Performance metrics (precision, coverage, aggregated score).
This transformation allows moving from a large set of low-level decision paths to a compact and interpretable rule system, suitable for integration into a knowledge-based framework.
Such an approach aligns with recent research emphasizing the importance of balancing fidelity and interpretability in rule extraction from ensemble models [3].

2.6. Knowledge Base and Ontology-Inspired Representation

To support interpretability and integration with decision-support systems, the optimized rules were structured into a multi-format knowledge base (JSON and SQLite). This dual implementation ensures flexibility in storage while enabling complex querying for real-time industrial deployment.

2.6.1. Structured Rule Schema

Rather than relying on simple Boolean logic, each rule is built around a rich, hierarchical schema that captures the full complexity of the decision-making process. At its foundation, the context and conditions layer defines the relevant failure types and their associated concepts, such as mechanical stress, alongside precise numerical thresholds drawn from sensor readings like torque, speed, and temperature. Building on this, a semantic decomposition separates what is truly essential from what merely adds nuance, distinguishing core conditions, the features a rule cannot do without, from optional conditions that refine and contextualize the diagnosis. The framework then moves beyond raw data toward genuine understanding through its knowledge and decision layers, which connect the physical interpretation of a failure, its root cause, to concrete, actionable intelligence, including recommended interventions and a tiered system of risk or priority levels such as CRITICAL. Finally, to ensure that no rule becomes a black box in its own right, a traceability and metrics layer preserves full transparency by tracking the number of source rules behind each aggregation along with performance indicators such as precision and coverage, so that every rule remains auditable and its reasoning can be traced back to its origins.

2.6.2. Ontological Abstraction and Reasoning

The framework incorporates a lightweight, application-oriented abstraction layer following a specific semantic flow:
Sensor → Condition → Concept → Failure → Action
By grouping heterogeneous rules under common physical phenomena, such as overheating or power instability, this ontology-inspired approach facilitates
  • Enhanced Interpretability: Bridges the gap between raw data and human-operator comprehension.
  • Semantic Reasoning: Enables efficient querying across diverse rule sets based on physical origins.
  • System Interoperability: Prepares the knowledge base for integration with natural language explanation (XAI) systems.

3. System Architecture

The proposed framework is structured as a layered architecture that transforms raw sensor data into interpretable and actionable decision support. The design follows a progressive pipeline where each layer adds a level of abstraction, moving from numerical data to human-centered reasoning.

3.1. Data Layer

This layer corresponds to the acquisition and structuring of sensor data describing machine operating conditions. In this work, the AI4I 2020 dataset is used as a proxy for industrial data, including temperature, rotational speed, torque, and tool wear. These variables represent the physical state of the system and serve as input for predictive modeling.

3.2. Machine Learning Layer

This layer is responsible for failure prediction using an XGBoost model. Beyond prediction, the model is exploited to extract decision rules by analyzing tree structures. This enables the transformation of learned patterns into explicit IF–THEN conditions, bridging the gap between black-box modeling and interpretability, as commonly explored in recent predictive maintenance frameworks [1].

3.3. Knowledge Layer

The extracted rules are structured into a knowledge base using an ontology-inspired representation. At this level, low-level conditions are organized into higher-level concepts such as overheating, mechanical stress, and power instability. Each rule is enriched with contextual information, interpretation, and recommended actions, allowing a transition from numerical patterns to domain-relevant knowledge. This approach is consistent with ontology-based industrial systems that aim to formalize operational knowledge and support reasoning [4].

3.4. Reasoning and Explanation Layer

This layer enables contextual reasoning and explanation generation. By combining activated rules, model explanations (e.g., SHAP), and machine context, the system produces interpretable justifications of predictions. Language models can be integrated at this stage to translate structured knowledge into natural language explanations, improving accessibility for non-expert users and aligning with recent approaches in explainable AI systems [5].

3.5. Human-Centered Decision Layer

The final layer integrates human validation into the decision-making process as shown in Figure 1. Model predictions and recommended actions are presented to operators, who can validate or adjust decisions based on their expertise. This human-in-the-loop mechanism ensures reliability, builds trust, and enables continuous refinement of the knowledge base, as highlighted in recent research on hybrid human-AI systems [6].
Figure 1. Interpretable predictive maintenance framework architecture.
Overall, this architecture enables a seamless transition from predictive modeling to interpretable, knowledge-driven, and human-centered decision support.

4. Human-Centered Decision Integration

The proposed framework incorporates a human-centered decision process in which human expertise plays an active role in validating and refining system outputs. Rather than relying solely on automated predictions, the system presents inferred failures, associated rules, and recommended actions to domain experts for evaluation.
This interaction enables operators to confirm, adjust, or contextualize decisions based on their operational knowledge. Such a mechanism is particularly critical in industrial environments, where contextual factors and tacit knowledge cannot always be captured by data-driven models alone [7,8,9].
A key aspect of this approach is the formalization of human feedback. Expert interventions are not only used for immediate decision validation [10,11] but are also integrated into the knowledge base as structured information. This allows the system to progressively incorporate experiential knowledge, such as recurring failure patterns, contextual constraints, or corrective strategies developed through practice [11].
Over time, this process leads to the enrichment of the knowledge base with both data-driven rules and human-derived insights, enabling a more robust and context-aware decision system. This continuous feedback loop is consistent with recent human-in-the-loop frameworks, which emphasize the importance of combining machine intelligence with human expertise to improve reliability, trust, and long-term system performance [6,12,13].

5. LLM-Based Reasoning and Explanation

To enhance interpretability and usability, the system integrates a language-based reasoning component that transforms structured knowledge into human-readable explanations.
At this level, the system combines multiple sources of information, including activated rules from the knowledge base, feature importance derived from SHAP, and contextual information related to the machine state. These elements are used to generate explanations that describe both the reasoning behind predictions and the associated operational implications.
Language models are leveraged to translate this structured information into natural language, enabling operators to understand complex decision processes without requiring expertise in machine learning. This approach facilitates communication between the system and human users, making the decision process more transparent and accessible.
In addition to explanation, this layer supports reasoning by contextualizing decisions within broader operational knowledge. By linking sensor conditions, failure types, and recommended actions, the system provides coherent narratives that reflect both data-driven insights and domain-specific understanding.
Such integration of language models within structured decision frameworks is increasingly explored in recent research, where LLMs are used to enhance explainability, traceability, and user interaction in complex AI systems [6,13,14,15].

6. Discussion

This work demonstrates that predictive maintenance systems can be extended beyond pure prediction into structured, interpretable, and human-centered decision-support frameworks. By combining XGBoost modeling, rule extraction, explainable AI, and knowledge representation, the proposed approach enables a coherent transition from data-driven prediction to actionable insights.
One of the main strengths of the system lies in the alignment between model behavior and symbolic representation. The use of SHAP ensures that feature importance is consistent with extracted rules, while the ontology-inspired structure organizes these rules into meaningful concepts. This combination improves both interpretability and usability in industrial contexts.
Furthermore, the integration of human expertise introduces an additional layer of robustness. By incorporating feedback from operators into the knowledge base, the system captures experiential knowledge that is not directly observable in data. This hybridization of machine learning and human intelligence contributes to building more reliable and adaptive systems.
However, this study is conducted on a synthetic dataset, which limits the direct transferability of the results to real industrial environments. While the dataset provides a controlled setting for developing and validating the framework, real-world data may introduce additional complexity, variability, and noise.
Despite this limitation, the proposed architecture provides a scalable and extensible foundation for industrial AI systems. Its modular design allows integration of additional data sources, refinement of knowledge structures, and deployment in real operational contexts.

7. Conclusions

This paper presents a hybrid framework for predictive maintenance that integrates machine learning, explainable AI, rule extraction, and knowledge-based reasoning into a unified decision-support system.
The results demonstrate that high-performance models such as XGBoost can be transformed into interpretable and actionable systems through structured rule extraction and semantic organization. By combining data-driven insights with human expertise and language-based explanations, the proposed approach moves beyond traditional predictive modeling toward a more transparent and user-centered paradigm.
The integration of human feedback and knowledge representation enables the system to evolve over time, capturing both statistical patterns and experiential insights. This positions the framework as a foundation for next-generation industrial AI systems that are not only accurate but also interpretable, trustworthy, and aligned with real-world decision-making processes.

Author Contributions

Conceptualization, M.B. and K.K.; methodology, M.B. and A.C.; software, A.Z. and M.B.; validation, M.B., K.K. and A.Z.; formal analysis, M.G. and K.N.; investigation, M.B.; data curation, M.G. and K.N.; writing—original draft preparation, M.B.; writing—review and editing, M.B.; visualization, M.B.; supervision, M.B. and K.K. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

This article does not contain any studies involving human or animal subjects.

Data Availability Statement

Data will be made available on request.

Acknowledgments

During the preparation of this manuscript, the authors used GPT Edu 6.1 to generate an illustration of the architectural framework and to improve the grammatical accuracy of the text. The authors have reviewed and edited the output and take full responsibility for the content of this publication.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
PdMPredictive Maintenance
XGBoosteXtreme Gradient Boosting
RFRandom Forest
LRLogistic Regression
XAIExplainable Artificial Intelligence
SHAPSHapley Additive exPlanations
LLMLarge Language Model
JSONJavaScript Object Notation
TWFTool Wear Failure
HDFHeat Dissipation Failure
PWFPower Failure
OSFOverstrain Failure
RNFRandom Failure
HITLHuman-in-the-Loop
AIArtificial Intelligence

References

  1. Chen, T.; Guestrin, C. XGBoost: A Scalable Tree Boosting System. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016; pp. 785–794. [Google Scholar]
  2. Chen, Z.; Surendraarcharyagie, K.; Granland, K.; Chen, C.; Xu, X.; Xiong, Y.; Davies, C. Service oriented digital twin for additive manufacturing process. J. Manuf. Syst. 2024, 74, 762–776. [Google Scholar] [CrossRef] [Scilit]
  3. Wang, C.; Wang, Z.; Liu, Q.; Dong, H.; Liu, W.; Liu, X. A comprehensive survey on domain adaptation for intelligent fault diagnosis. Knowl. Based Syst. 2025, 327, 114109. [Google Scholar] [CrossRef] [Scilit]
  4. Hara, S.; Hayashi, K. Making Tree Ensembles Interpretable: A Bayesian Model Selection Approach. In Proceedings of the 21st International Conference on Artificial Intelligence and Statistics (AISTATS), Yaiza, Spain, 9–11 April 2018; pp. 77–85. [Google Scholar]
  5. Studer, R.; Benjamins, V.R.; Fensel, D. Knowledge Engineering: Principles and Methods. Data Knowl. Eng. 1998, 25, 161–197. [Google Scholar] [CrossRef] [Scilit]
  6. Shneiderman, B. Human-Centered AI; Oxford University Press: Oxford, UK, 2022. [Google Scholar]
  7. Pan, S.; Luo, L.; Wang, Y.; Chen, C.; Wang, J.; Wu, X. Unifying Large Language Models and Knowledge Graphs: A Roadmap. IEEE Trans. Knowl. Data Eng. 2024, 36, 3580–3599. [Google Scholar] [CrossRef] [Scilit]
  8. Carvalho, T.P.; Soares, F.A.A.M.N.; Vita, R.; Francisco, R.; Basto, J.; Alcalá, S.G. A Systematic Literature Review of Machine Learning Methods Applied to Predictive Maintenance. Comput. Ind. Eng. 2019, 137, 106024. [Google Scholar] [CrossRef] [Scilit]
  9. Arena, S.; Florian, E.; Zennaro, I.; Orrù, P.F.; Sgarbossa, F. A Novel Decision Support System for Managing Predictive Maintenance Strategies Based on Machine Learning Approaches. Saf. Sci. 2022, 146, 105529. [Google Scholar] [CrossRef] [Scilit]
  10. Ribeiro, M.T.; Singh, S.; Guestrin, C. “Why Should I Trust You?”: Explaining the Predictions of Any Classifier. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016; pp. 1135–1144. [Google Scholar]
  11. Zhang, W.; Yang, D.; Wang, H. Data-Driven Methods for Predictive Maintenance of Industrial Equipment: A Survey. IEEE Syst. J. 2019, 13, 2213–2227. [Google Scholar] [CrossRef] [Scilit]
  12. Chen, C.; Zhao, K.; Leng, J.; Liu, C.; Fan, J.; Zheng, P. Integrating large language model and digital twins in the context of industry 5.0: Framework, challenges and opportunities. Robot. Comput. Integr. Manuf. 2025, 94, 102982. [Google Scholar] [CrossRef] [Scilit]
  13. Zhao, Q.; Huang, Y.; Lv, T.; Cui, L.; Sun, Q.; Mao, S.; Zhang, X.; Xin, Y.; Yin, Q.; Li, S.; et al. MMLU-CF: A Contamination-free Multi-task Language Understanding Benchmark. arXiv 2024, arXiv:2412.15194. [Google Scholar] [CrossRef] [Scilit]
  14. Wang, Y.; Ma, X.; Zhang, G.; Ni, Y.; Chandra, A.; Guo, S.; Ren, W.; Arulraj, A.; He, X.; Jiang, Z.; et al. MMLU-Pro: A More Robust and Challenging Multi-Task Language Understanding Benchmark. arXiv 2024, arXiv:2406.01574. [Google Scholar] [CrossRef] [Scilit]
  15. Hendrycks, D.; Burns, C.; Basart, S.; Zou, A.; Mazeika, M.; Song, D.; Steinhardt, J. Measuring Massive Multitask Language Understanding. arXiv 2021, arXiv:2009.03300. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.