Main Concept

An AI model is a mathematical representation that has been trained to perform a specific intelligent task by learning patterns from data.

Think of a model like a brain:

  • In takes Inputs (data: text, images, speech, structured data, etc..)
  • It processes these inputs through a complex network of mathematical transformations
  • It produces Outputs (predictions, classifications, generations)

Key components of an AI Model

  1. Architecture: The structure/design of the model
  • Neural Networks, decision trees, linear regression, etc.
  • Like the “blueprint” of how information flows.
  1. Parameters: The learned values that determine behavior
  • Weight and biases in neural networks
  • These get adjusted during training
  1. Training Data: Examples the model learned from
  • Input-output pairs that taught the model patterns.
  • This is where the model get their “knowledge”

Training vs Inferencing

Training involves exposing the model to large amounts of data to learn patterns and relationships, while inferencing is the process of using the trained model to make predictions or generate outputs on new, unseen data.

NOTE

You train a model then you use the trained model to make inferences (predictions) on new data

Type of AI models

  • Classification models: Categorize things (fruit/animal)
  • Regression models: Predict numbers
  • Generative models: Create new content
  • Recommendation models: Suggest items you might like

A model vs an algorithm

An algorithm is a step-by-step procedure for solving a problem, while an AI model is the result of applying an algorithm to train on data, capturing learned patterns and relationships.

Foundation Models

  • Generally speaking, an AI model is a general term for a model that is specialized on a specific task or domain. However, we call it a Foundation Model when we want to refer to large, general-purpose models trained on massive and diverse datasets (billions+), where high resources are utilized to train them.
  • Foundation Models like GPT4, Bloom or Stable Diffusion are versatile and can do task across different domains like:
    • Writing
    • Generate Images
    • Solve Math Problems
    • Engage in Dialogues
    • Answer questions based on documents
    • Code

Main Foundation Models Examples:

  • Language Foundation Models:
    • GPT-4, Claude
    • BERT
  • Vision Foundation Models:
    • CLIP
    • DALL-E
  • Multimodal Foundation Model:
    • GPT-4 Vision
    • Flamingo

Bias on AI Models

AI bias occurs when models make systematically unfair or discriminatory decisions based on protected characteristics like race, gender, age or socioeconomic status, for instance if the training data has a bias it will be reflected on the model outputs.

Real Worlds Examples:

  • Hiring algorithms which favors male candidates based on historical data
  • Facial recognition which is more accurate iwth light-skinned faces, due has more trained data.

Fairness on AI Models

We would like an AI Model treat all individuals and groups the same way, this is AI Fairness however defining “fair” is complex.

Type of fairness on AI systems:

  • Individual fairness
  • Group fairness
  • Equalized opportunity
  • Demographic parity

The Challenge

The different fairness definition often conflict with each other - you can’t optimize for all simultaneously!

Model Fits

Model fits refers to how well an AI model has learned from it’s training data and how well it performs on new, unseen data.

There are three type of fits:

  • Good Fit (Just Right)
  • Underfitting (Too Simple)
  • Overfitting (Too Complex)