Challenges in Engineering Machine Learning (Software) Systems

Raffi Khatchadourian (based on material from Christian Kaestner and Eunsuk Kang)

December 10, 2025

Disclaimer

New part of the course.

Recall

AI vs. ML
AI vs. ML

Machine Learning (ML)

  • In ML, the system learns patterns from data and uses these patterns to make predictions or decisions on new, unseen data or generate “new” data.

Machine Learning (ML) Systems

  • An ML system is a software system that incorporates machine learning models to perform specific tasks or provide certain functionalities.
  • The ML component of an ML system may be relatively small compared to the overall system, but it plays a crucial role in enabling “intelligent” behavior.
    • This includes personalization, i.e., adapting behavior based on user data and preferences.
  • ML systems often involve data collection, preprocessing, model training, evaluation, deployment, and monitoring.

Challenges in ML Systems

Traditional Programming vs ML

Programming vs ML
Programming vs ML

Complexity in Engineering (Software) Systems

Airplane
Airplane

Q: How do we build such complex systems?

Managing Complexity in Software

public class Algorithms {

    /**
     * Finds the shortest distance between to vertices <code>v1</code>
     * and <code>v2</code> in graph <code>g</code>.
     *
     * This method is only supported for connected vertices.
     */
    public static int shortestDistance(Graph g, Vertex v1, Vertex v2) {
        // ...
    }
}

(Lack of) Modularity in ML

Concept Drifts

Q: Examples?

Feedback Loops

Feedback Loop
Feedback Loop

Example: Crime Prediction

  1. Use past data to predict crime rates.
  2. Police increases the frequency of patrol in area X.
  3. More arrested made in area X.
  4. New crime data fed back to the model.
  5. Repeat.
Crime Map
Crime Map

Discussion: Product Recommendations

Product recommendations
Product recommendations
  1. Specification/metrics?
  2. Concept drift?
  3. Feedback loop?

Discussion: Streaming Recommendations

“How Does Amazon & Netflix Personalization Work?” by Astha Khandelwal
  1. Specification/metrics?
  2. Concept drift?
  3. Feedback loop?

Technical Debt

“Machine learning: The high interest credit card of technical debt” – Sculley et al. 2014

Technical Debt

The Notebook

Jupyter Notebooks are a gift from God to those who work with data. They allow us to do quick experiments with Julia, Python, R, and more – John Paul Ada

Q: What are some benefits and drawbacks of Jupyter-style notebooks?

Notebooks

Pros

Cons

Questions

Q: What may notebooks be good for (something we learned in this class!)?

ML and Technical Debt

Example Problems

Further Reading

Sculley, David, et al. Hidden technical debt in machine learning systems. Advances in Neural Information Processing Systems. 2015.