Overview


Preparing to train a model


  • Some tasks are not appropriate for machine learning due to ethical concerns.
  • Machine learning tasks should have a valid prediction target that maps clearly to the real-world goal.
  • Training data can be biased due to societal inequities, errors in the data collection process, and lack of attention to careful sampling practices.
  • “Bias” also refers to statistical bias, and certain algorithms can be biased towards some solutions.

Scientific validity in the modeling process


  • Overfitting is characterized by worse performance on the test set than on the train set and can be fixed by switching to a simpler model architecture or by adding regularization.
  • Underfitting is characterized by poor performance on both the training and test datasets. It can be fixed by collecting more training data, switching to a more complex model architecture, or improving feature quality.
  • Data leakage occurs when the model has access to the test data during training and results in overconfidence in the model’s performance.

Model evaluation and fairness


  • It’s important to consider many dimensions of model performance: a single accuracy score is not sufficient.
  • There is no single definition of “fair machine learning”: different notions of fairness are appropriate in different contexts.
  • Representational harms and stereotypes can be perpetuated by generative AI.
  • The fairness of a model can be improved by using techniques like data reweighting and model postprocessing.

Interpretablility versus explainability


  • Model Explainability vs. Model Interpretability:
    • Interpretability: Refers to the degree to which a human can understand the cause of a decision made by a model. It is essential for verifying the correctness of the model, ensuring compliance with regulations, and enabling effective debugging.
    • Explainability: Refers to the extent to which the internal mechanics of a machine learning model can be explained in human terms. It is crucial for understanding how models make decisions, ensuring transparency, and building trust with stakeholders.
  • Choosing Between Explainable and Interpretable Models:
    • When Transparency is Critical: Opt for interpretable models (e.g., linear regression, decision trees) when it is essential to have a clear understanding of how decisions are made, such as in healthcare or finance.
    • When Performance is a Priority: Choose explainable models (e.g., neural networks, gradient boosting machines) when predictive accuracy is the primary concern, and you can use explanation methods to understand model behavior.

Explainability methods overview


Explainability methods: deep dive


Explainability methods: linear probe


Explainability methods: GradCAM


Estimating model uncertainty


  • TODO

OOD detection: overview, output-based methodsIntroduction to Out-of-Distribution (OOD) DataDetecting and Handling OOD DataExample 1: Softmax scoresExample 2: Energy-Based OOD DetectionLimitations of our approach thus far


OOD detection: distance-based and contrastive learningExample 3: Distance-Based MethodsLimitations of Threshold-Based OOD Detection Methods


OOD detection: training-time regularizationTraining-time regularization for OOD detection


Documenting and releasing a model


  • Model cards are the standard technique for communicating information about how machine learning systems were trained and how they should and should not be used.
  • Models can be shared and reused via the Hugging Face platform.