Machine Learning, Deep Learning & GenAI – Comprehensive Study Notes

Distinguishing Key Terms

  • Artificial Intelligence (AI)

    • Broad field aiming to create systems that exhibit behaviors normally requiring human intelligence.

    • Encompasses rule-based systems, search, optimization, and all data-driven approaches.

  • Machine Learning (ML)

    • Subset of AI that learns patterns from historical data to make predictions about future, unseen cases.

    • Central idea: instead of hand-coding complex rules, an algorithm infers them from data.

    • Accepts that results are probabilistic; errors are expected but manageable.

  • Deep Learning (DL)

    • Family of ML techniques using artificial neural networks with many hidden layers.

    • Employs backpropagation (first formalized in the 1980s1980s by Hinton et al.) to adjust millions of parameters.

    • Excels at handling high-dimensional, unstructured inputs (images, audio, raw text) while still producing relatively simple outputs (e.g.
      "cat" vs "dog", sentiment label, fraud vs non-fraud).

  • Generative AI (GenAI)

    • Newly prominent branch of DL focused on self-supervised learning from massive corpora.

    • Produces complex, creative outputs (paragraphs, code, images) in response to open-ended prompts.

    • Trained on vast, unlabeled internet-scale text/image datasets; learns distribution of natural language or pixels and samples from it.

Illustrative Business Scenario: Churn Prediction

  • Problem: In any subscription service (e.g.
    a mobile carrier), losing customers (“churn”) is costly; acquiring new ones costs more than retaining existing ones.

  • Traditional (rule-based) approach

    • Engineers attempt to hand-encode rules: if user made >3>3 support calls AND has <500<500 monthly minutes THEN high risk, etc.

    • Quickly becomes unscalable as variable count explodes; maintenance is brittle.

  • ML approach

    • Feed historical labeled data: each row = customer profile + flag "churned" or "stayed".

    • Algorithm induces a predictive model capturing subtle, multidimensional patterns.

    • Output: for any current customer, probability of churn; marketing team offers incentives only to the most at-risk, optimizing cost.

  • Key take-away: ML’s strength is future prediction leveraging past data, not simply describing history.

Why Now? – Hardware & Cloud Catalysts

  • Early AI research in the 1950s1950s–1960s1960s produced foundational ideas but lacked computational power.

  • Neural-network renaissance owed to:

    • Cheap, massively parallel GPUs enabling trillions of multiply-accumulate operations.

    • Elastic cloud platforms providing on-demand clusters; teams sidestep capital expense.

    • Result: Algorithms like backpropagation become practical on large datasets.

Choosing ML vs. Deterministic Software

  • Use conventional code when:

    • Problem can be expressed as unambiguous rules; outputs are fully determined by inputs (e.g.
      plotting last week’s network usage).

  • Consider ML when:

    • Variables are too numerous/interactive for manual rule writing.

    • Personalization at scale is required (recommendations for every visitor within milliseconds).

    • Data streams in real-time and quick classification/anomaly flagging is critical.

    • Environment drifts and model must adapt (concept drift monitoring still needed).

Detailed Comparison of Output Complexity

  • Classic ML and DL models: complex input → simple output

    • Fraud detection: transaction vector → {fraud, non-fraud}.

    • Image classification: pixels → {cat, dog, bird}.

    • Sentiment analysis: sentence → {positive, neutral, negative}.

  • GenAI: complex input → complex output

    • Natural-language prompt → multiple paragraphs, code snippets, or visual art.

Real-World ML Use Cases Highlighted

  • E-commerce recommendation & personalization

    • "Customers who bought X also bought …"; must return within <200<200 ms for seamless UX.

  • Anomaly Detection

    • AWS GuardDuty baseline-driven; flags unusual open ports or traffic patterns.

    • General recipe: model normal distribution, surface deviations.

  • Computer Vision

    • Object tracking across frames: first appearance → disappearance timestamps.

  • Geospatial / Overhead imagery

    • Detecting structures, vehicles, or environmental changes.

  • Log Analytics

    • Extracting “interesting” events amid terabytes of machine logs.

  • Time-Series & Sensor Streams

    • Identifying anomalies in IoT data, radar returns, biomedical signals.

  • Text Processing & PII Scrubbing

    • Automatically masking emails, dates of birth, or other sensitive tokens—even when they hide in headers or embedded metadata.

    • Especially vital under strict regulations (e.g.
      GDPR in Europe).

Example: PII Removal Workflow Challenge

  • Manual regex-based scrubbing fails whenever new entity types appear.

  • Pipeline pain-points:

    • Each newly discovered PII pattern forces code change, redeployment.

    • Headers vs.
      body mismatch led to unexpected leaks in a real project.

  • ML advantage: train a model on examples of sensitive vs.
    non-sensitive tokens; model generalizes beyond enumerated rules.

Error Tolerance & Model Evaluation

  • No ML system is 100%100\% accurate; organizations must define acceptable error trade-offs (false positives vs.
    false negatives).

  • Hyperparameter tuning, threshold adjustment, and cost-sensitive metrics help align with business tolerance.

From Proof of Concept (PoC) to Production

  • Many PoCs fail when:

    • Data-access scripts used in experiments are not production-grade.

    • No plan for automated retraining, monitoring, or model drift detection.

  • Best Practices:

    • Define data pipelines, versioning, and governance before model training.

    • Use CI/CD for models; treat them like software artifacts.

    • Integrate logging and A/B testing to verify real-world impact.

Ethical & Practical Implications

  • Customer trust: Misclassifying loyal users as churn risks damaging relationships.

  • Bias risk: Historical data can encode unfair patterns; fairness audits are mandatory.

  • Privacy: Large language models ingest public data—must respect copyright and personal data constraints.

Quick Recap / Checklist for ML Applicability

  • High-dimensional data? ✅

  • Need rapid, individualized predictions? ✅

  • Environment or patterns evolving? ✅

  • Deterministic rules infeasible? ✅ → ML likely beneficial.

Session Logistics

  • Content derived from an introductory module on machine learning; presenter offered a 1515-minute break afterward.