module

Module 3 Overview: Inside the Machine — How AI Systems Are Actually Built

Introduction: From User to Systems Thinker

  • Modules 1 and 2 provided historical context on the evolution of AI and its applications in various sectors.

  • Module 3 delves into how AI systems work, specifically how raw data is transformed into models that perform tasks like diagnosing diseases, translating languages, recommending products, or detecting fraud.

  • This module is not focused on programming; instead, it aims at systems literacy, equipping professionals with a conceptual understanding of AI architecture.

  • Understanding AI architecture enhances professionals' abilities to:
      - Commission AI projects
      - Evaluate vendor claims
      - Identify potential failure modes
      - Ask relevant questions in technical meetings

  • Ultimately, participants will gain a form of technical literacy essential for engaging effectively with AI systems in their careers.

Part One: Data — The Indispensable Foundation

  • The core principle in AI: AI systems learn from data, not from explicit rules or human common sense.

  • Data types are categorized as:
      - Structured Data: Organized in defined formats (e.g., databases, spreadsheets). Examples include:
        - Financial transaction records
        - Patient demographic information
        - Agricultural weather data
        - Government census data
      - Unstructured Data: No predefined format (e.g., text, images, audio, video).

  • The majority of data generated today is unstructured, which fuels the effectiveness of deep learning systems.

  • Key Insight: AI project failures commonly arise from data issues such as incomplete data, inconsistent labeling, unrepresentative sampling, and poor data governance.
      - Example: A model trained on biased data yields biased outputs, leading to severe consequences.

Part Two: Machine Learning — Teaching Machines by Example

  • Machine Learning: Techniques allowing AI systems to learn from data instead of human-programmed rules.

  • Three Paradigms of Machine Learning:
      - Supervised Learning:
        - Involves training on input-output pairs (data with both input and correct output provided).
        - Adjusts internal parameters to minimize prediction error.
        - Common tasks:
          - Classification: Predicting categories
          - Regression: Predicting continuous values
      - Unsupervised Learning:
        - Training on unlabeled data, where the algorithm finds structure independently.
        - Common tasks:
          - Clustering: Grouping similar examples
          - Dimensionality Reduction: Compact representations
          - Anomaly Detection: Identifying outliers
      - Reinforcement Learning:
        - Trains agents through reward-based systems.
        - Used for game-playing AI, robotic control, and training large language models (RLHF).

  • Key concepts in machine learning training:
      - Training Dataset: The data used for training the model.
      - Validation Dataset: Monitors performance during training.
      - Test Dataset: Provides unbiased estimates after training completion.

  • Importance of distinct datasets: Evaluating on training data can yield misleadingly optimistic performance results.

Part Three: Neural Networks and Deep Learning — The Engine of Modern AI

  • Neural Networks: Fundamental structure behind modern AI.

  • Deep Learning: Involves using neural networks with multiple layers for advanced learning capabilities.

  • Components of an Artificial Neural Network:
      - Neurons/Nodes: Computational units taking inputs and producing outputs after weight adjustments.
      - Weight Adjustment: Achieved through backpropagation to minimize error contributions.

  • Hierarchical Feature Learning: Depth in neural networks allows complex feature representation.
      - Example: Image networks learn simple to complex shapes across layers.

  • Specialized architectures for different tasks:
      - Convolutional Neural Networks (CNNs): Designed for grid-structured data handling (e.g., images).
      - Recurrent Neural Networks (RNNs): For sequential data processing (e.g., text, audio).
      - Transformers: Introduced self-attention mechanisms, highly effective for natural language processing.

Part Four: The AI Ecosystem — Tools, Infrastructure, and Platforms

  • Building an AI system requires more than just algorithms and data; it requires a robust ecosystem of tools and platforms.

  • Key Programming Language: Python, has dominated AI development for its ease of use and vast library ecosystem.

  • Leading Deep Learning Frameworks:
      - TensorFlow: Developed by Google for scalable machine learning.
      - PyTorch: Developed by Meta AI for high-performance, imperative deep learning.

  • Hugging Face: Platform for hosting pre-trained models and datasets, simplifying model fine-tuning and deployment.

  • Computational Resources: AI model training is resource-intensive (e.g., training GPT-4 cost tens of millions).

  • Cloud Platforms:
      - Essential for providing access to computing resources (e.g., GPU, TPU).
      - Critical for organizations in regions like Africa, facilitating AI capability building effectively and affordably.

Part Five: The AI Development Lifecycle — From Problem to Production

  • Building an AI system is a multi-stage process:
      - Problem Framing: Defining the issue and assessing feasibility for AI solutions.
      - Data Collection and Preparation: May consume 60-80% of project time and budget.
      - Model Training: Selecting models, setting hyperparameters, monitoring for overfitting.
      - Evaluation: Testing on held-out data to assess model performance.
      - Deployment: Making the model available for use through various platforms.
      - Ongoing Monitoring: Tracking model performance and addressing model drift from changes in data distribution.

  • Importance of human judgment throughout the AI lifecycle:
      - Human involvement is necessary in problem framing, data curation, model evaluation, and decision-making about outputs.
      - The risk of inadequate oversight can lead to adverse outcomes in AI decision-making.

The Systems Perspective: Why Architecture Matters for Everyone

  • Understanding AI architecture enables professionals to engage more effectively with AI solutions and vendors.

  • Questions to consider when assessing AI proposals include:
      - Sources of training data
      - Labeling processes and representation of deployment context
      - Governance needs at different lifecycle stages

  • Importance for African Professionals:
      - As AI projects grow in Africa, professionals equipped with systems literacy can critically evaluate and negotiate AI systems effectively.

Conclusion: Building the Technical Foundation

  • Module 3 introduced essential AI architecture concepts necessary for understanding AI investments and their implications.

  • The five following sub-modules will explore these foundational areas in greater depth.