Model Development (Gate 4)
The AI Model Development phase starts with high quality training data. Model developers have the main responsibility in this phase - ensuring that the AI model they are developing is suited for the application and works with the data prepared in phases 2 and 3. To be sure of this, performance metrics are drawn from the model and presented to the stakeholders. Furthermore, we test the model performance and functionality on the most granular level.
Under the traceability and auditability principle, use ML Flow for model versioning and log output. Split repositories and pipelines into development, acceptance, and production. Use a git version control system to push a new version of the code to different environments. Add required reviewers in each step to ensure traceability.
Under the fairness principle, assess model adequacy and model bias through adversarial debiasing with generative adversarial networks (GANs), ensuring equal outcomes from all groups. IBM’s Trusted AI is a python package that can be used here.
Under the robustness principle, test the model performance on the most granular level and provide the accuracy scores, area under curve, F1 score, confusion matrix, mean square and absolute errors. Extend code coverage by unit testing your code using the python unittest framework.
Finally, implement explainable AI (XAI) techniques like Lime and SHAP to understand model predictions. This adds transparency and interpretability to the model. XAI aims to mimic model behavior at a global and/or local level to help explain how the model came to its decision. SHAP (SHapley Additive exPlanations) is a method based on a game theory approach to explain individual predictions. LIME is model-agnostic and provides local model interpretability which means that it modifies a single data sample by tweaking the feature values and observes the resulting impact on the output. The output is a list of explanations, reflecting the contribution of each feature to the prediction of a data sample. This provides local interpretability, and it also allows to determine which feature changes will have most impact on the prediction. For the business owners and regulators, this explainable layer is especially important in understanding what is behind the ‘black-box’ model and prediction.
Complete this gate by providing a model quality report to a technical reviewer for approval.