[en] Artificial intelligence (AI) is used for various purposes that are critical to human life. However, most state-of-the-art AI algorithms, and in particular deep-learning (DL) models, are black-box, meaning humans cannot understand how such models make decisions. To forestall an algorithm-based authoritarian society, decisions based on machine learning ought to inspire trust by being \emph{explainable}. For AI explainability to be practical, it must be feasible to obtain explanations systematically and automatically. There are two main methodologies to generate explanations. Explanation methods using internal components of DL models (a.k.a. model-specific explanations) are more accurate and effective than those relying solely on the inputs and outputs (a.k.a. model-agnostic explanations). However, the users of the black-box model lack white-box access to the internal components of the providers' models.Nevertheless, the only way for users to trust predictions and for these to align with ethical regulations is for predictions to be accompanied by explanations locally and independently generated by the users (rather than by explanations offered by the model providers). Furthermore, those models can be vulnerable to various security and privacy attacks targeting their training. In this thesis, we leverage both model-specific and model-agnostic explainability techniques. First, we propose a model-agnostic explainability method using random decision forests as surrogates. The surrogate model can explain the predictions of the black-box models in both centralized and decentralized settings. In addition, it uses those explanations to protect the models from attacks that might target them. We also propose a model-specific explainability method that uses the gradients of the model to generate adversarial examples that counterfactually explain why an input example is classified into a specific class. We also generalize this method so that external users can use it by training a local surrogate model that mimics the black-box model's behavior and using the surrogate gradients to generate the adversarial examples. Extensive experimental results show that our methods outperform the state-of-the-art techniques by providing more representative explanations and model protections while requiring a low computational cost.

[es] La inteligencia artificial (IA) es esencial para diversos propósitos cruciales en la vida humana. Sin embargo, muchos algoritmos de IA, especialmente los modelos de aprendizaje profundo (AP), son cajas negras, lo que implica que no comprendemos cómo toman decisiones. Para evitar una sociedad autoritaria basada en algoritmos, es fundamental que las decisiones basadas en el aprendizaje automático sean "explicables" para inspirar confianza. Existen dos metodologías principales para generar explicaciones. Los métodos de explicación que utilizan componentes internos de los modelos de AP (explicaciones específicas del modelo) son más precisos y efectivos que los basados solo en entradas y salidas (explicaciones independientes del modelo). Desafortunadamente, los usuarios de modelos caja negra carecen de acceso a los componentes internos de los proveedores. Sin embargo, para que los usuarios confíen en las predicciones y se alineen con normas éticas, estas deben estar acompañadas de explicaciones generadas local e independientemente por ellos mismos (en lugar de las ofrecidas por los proveedores del modelo). En esta tesis, se exploran técnicas de explicabilidad específicas y agnósticas del modelo. Se propone un método de explicación independiente del modelo basado en el uso de bosques aleatorios de decisión como modelo sustituto, protegiendo las predicciones de modelos caja negra en entornos centralizados y descentralizados. También se propone un explicador específico del modelo que utiliza los gradientes del modelo para generar ejemplos contradictorios y explicar por qué un ejemplo de entrada se clasifica en una clase específica. Estos métodos superan técnicas de vanguardia al proporcionar explicaciones más representativas y mayor protección del modelo, con menor costo computacional.