Requirements and Risks 09.06.20 | FB 20 | SE4AI Requirements and - - PowerPoint PPT Presentation

requirements and risks
SMART_READER_LITE
LIVE PREVIEW

Requirements and Risks 09.06.20 | FB 20 | SE4AI Requirements and - - PowerPoint PPT Presentation

Software Engineering for Artificial Intelligence Dani El-Soufi Benjamin Fleischmann TU Darmstadt SS 20 Requirements and Risks 09.06.20 | FB 20 | SE4AI Requirements and Risks | D. El-Soufi, B. Fleischmann | 1 Overview 1. AI makes


slide-1
SLIDE 1

09.06.20 | FB 20 | SE4AI Requirements and Risks | D. El-Soufi, B. Fleischmann | 1

Dani El-Soufi Benjamin Fleischmann TU Darmstadt – SS 20

Software Engineering for Artificial Intelligence

Requirements and Risks

slide-2
SLIDE 2

09.06.20 | FB 20 | SE4AI Requirements and Risks | D. El-Soufi, B. Fleischmann | 2

Overview

1. AI makes mistakes 2. Requirements 3. Risks 4. Risks mitigation ideas

  • Feature selection
  • Testing
  • Monitoring

5. Conclusion

slide-3
SLIDE 3

09.06.20 | FB 20 | SE4AI Requirements and Risks | D. El-Soufi, B. Fleischmann | 3

AI makes mistakes

The mistakes intelligence makes:

  • Aren’t necessarily intuitive.
  • Aren’t the same from day to day.
  • Aren’t easy to find ahead of time.
  • Aren’t possible to fix with “just a little more work on

intelligence.”

slide-4
SLIDE 4

09.06.20 | FB 20 | SE4AI Requirements and Risks | D. El-Soufi, B. Fleischmann | 4

Different types of mistakes

There Not there There True positive False negative Not There False positive True negative Someone actually is The Intelligence says some is

slide-5
SLIDE 5

09.06.20 | FB 20 | SE4AI Requirements and Risks | D. El-Soufi, B. Fleischmann | 5

AI Changes

  • If it learns something new, it maybe changes the result.
  • …but in which way?
  • We control the way AI changes
slide-6
SLIDE 6

09.06.20 | FB 20 | SE4AI Requirements and Risks | D. El-Soufi, B. Fleischmann | 6

Humanfactor

  • Confusion
  • Distrust
  • Lack of confidence
  • Fatigue
  • Creep Factor
slide-7
SLIDE 7

09.06.20 | FB 20 | SE4AI Requirements and Risks | D. El-Soufi, B. Fleischmann | 7

Intelligence Quality

  • What makes an AI a good AI?
  • It depends on the use case
  • A better Intelligence can support more forceful, frequent

experiences

  • Change comes from improved intelligence
slide-8
SLIDE 8

09.06.20 | FB 20 | SE4AI Requirements and Risks | D. El-Soufi, B. Fleischmann | 8

Requirements Engineering

  • The Process of defining the Specifications of the

Software

  • A lot of definitions and standards (e.g. IEEE 830)
slide-9
SLIDE 9

09.06.20 | FB 20 | SE4AI Requirements and Risks | D. El-Soufi, B. Fleischmann | 9

Types of Requirements

  • Functional requirements
  • What the system should do in terms of functionality
  • Input & output, response to events
  • Quality (non-functional) requirements
  • How well the system delivers its functionality
  • Performance, reliability, security, safety, availability...
slide-10
SLIDE 10

09.06.20 | FB 20 | SE4AI Requirements and Risks | D. El-Soufi, B. Fleischmann | 10

Specification in AI

Hard specifications are difficult

  • Available Data is often small or partially describe the

wanted AI model

  • Accuracy is often not the requirement in an AI system (it’s

quite okay if the model makes wrong predictions)

slide-11
SLIDE 11

09.06.20 | FB 20 | SE4AI Requirements and Risks | D. El-Soufi, B. Fleischmann | 11

Importance of Context

Too many parameters, features, sensors and the human factor (complex problem)

  • Slicing context to simple smaller problems
  • Monitoring user activities
  • Training AI to target smaller problems
  • Continual verification
slide-12
SLIDE 12

09.06.20 | FB 20 | SE4AI Requirements and Risks | D. El-Soufi, B. Fleischmann | 12

AI Models are specifications

  • The AI Model is just a Specification
  • What should it do?
  • If the implementation is correct but the result is wrong, it

could be the wrong Model

slide-13
SLIDE 13

09.06.20 | FB 20 | SE4AI Requirements and Risks | D. El-Soufi, B. Fleischmann | 13

Machine learning is like requirements engineering

Machine Learning as Requirements Engineering (Source [1])

slide-14
SLIDE 14

09.06.20 | FB 20 | SE4AI Requirements and Risks | D. El-Soufi, B. Fleischmann | 14

Machine learning is like requirements engineering

Assuming AI models are specifications

  • We need to identify relevant and representative data
  • In both machine learning and requirements engineering,

we may need to compromise user-desired functionality with laws governing privacy, fairness, or security

  • When we identify that the specification does not fit, we

have often gained valuable insights and in some cases learn something immediately actionable

slide-15
SLIDE 15

09.06.20 | FB 20 | SE4AI Requirements and Risks | D. El-Soufi, B. Fleischmann | 15

Intelligent Experiences are Complex

Ø Understanding AI mistakes is not intuitive Ø Unmitigated mistakes may result in system distrust Ø False positives and false negatives may result in confusion à Lack of confidence, safety and reliability in the system

ML-Based Testing and Monitoring (Source [2])

slide-16
SLIDE 16

09.06.20 | FB 20 | SE4AI Requirements and Risks | D. El-Soufi, B. Fleischmann | 16

Risks Mitigation

v Complex AI systems require constant testing and monitoring à Large technical debt v Traditional ways of paying debt

1. Code refactoring 2. Increasing coverage of unit tests 3. Reduce dependencies 4. Improving documentation

à Code and system-level complexity for ML

Traditional System Testing and Monitoring (Source [2])

slide-17
SLIDE 17

09.06.20 | FB 20 | SE4AI Requirements and Risks | D. El-Soufi, B. Fleischmann | 17

Data and Feature Selection

1. Identify expected features from the training data in schemas with help of statistics for future analysis 2. Understanding the value of every feature 3. Reduce the feature set to the features that add the most predictive benefit 4. The training data has appropriate privacy controls

slide-18
SLIDE 18

09.06.20 | FB 20 | SE4AI Requirements and Risks | D. El-Soufi, B. Fleischmann | 18

Testing

1. Version control for the model code and training data 2. Use A/B testing to understand online vs. offline result evaluation and model’s staleness 3. Use data slicing to understand model quality 4. Enforce ML faireness 5. Implement unit test for API usage 6. Implement assertions to verify the ML’s algorithmic sub- computations

slide-19
SLIDE 19

09.06.20 | FB 20 | SE4AI Requirements and Risks | D. El-Soufi, B. Fleischmann | 19

Monitoring

It’s important verify that the ML system is working over time à In case of an incident that ML system code can be rolled back How? 1. Notify on dependency changes 2. Log traffic and label data of new evolving features for future analysis 3. Measure statistical bias in predictions to monitor prediction quality

slide-20
SLIDE 20

09.06.20 | FB 20 | SE4AI Requirements and Risks | D. El-Soufi, B. Fleischmann | 20

Conclusion

Ø AI makes different and unpredictable mistakes Ø Undestanding AI mistakes isn’t intuitive Ø AI changes over time Ø Understanding context is a complex task Ø Requirements engineering produces large amount of technical debt Ø Possible mitigations:

  • 1. Data and Feature Selection
  • 2. Testing
  • 3. Monitoring
slide-21
SLIDE 21

09.06.20 | FB 20 | SE4AI Requirements and Risks | D. El-Soufi, B. Fleischmann | 21

Questions

slide-22
SLIDE 22

09.06.20 | FB 20 | SE4AI Requirements and Risks | D. El-Soufi, B. Fleischmann | 22

THANK YOU FOR YOUR ATTENTION!

slide-23
SLIDE 23

09.06.20 | FB 20 | SE4AI Requirements and Risks | D. El-Soufi, B. Fleischmann | 23

References

[1] Kaestner, C., “Machine Learning is Requirements Engineering — On the Role of Bugs, Verification, and Validation in Machine Learning”, https://medium.com/analytics- vidhya/machine-learning-is-requirements-engineering-8957aee55ef4, 2020 (visited 07.06.2020). [2] Breck, E., Cai, S., Nielsen, E., Salib, M. and Sculley, D., "The ML test score: A rubric for ML production readiness and technical debt reduction," 2017 IEEE International Conference on Big Data (Big Data), Boston, MA, 2017, pp. 1123-1132. [3] Sculley, D., Holt, G., Golovin, D., Davydov, E., Phillips, T., Ebner, D., Chaudhary, V. & Young, M., “Machine Learning: The High Interest Credit Card of Technical Debt”, SE4ML: Software Engineering for Machine Learning (NIPS 2014 Workshop), 2014. [4] Borg, M., “Requirements Engineering for Machine Learning: Perspectives from Data Scientists”, http://mrksbrg.com/aire19-vogelsang/, 2019 (visited 07.06.2020). [5] Hulten, G., ”Building intelligent systems : A guide to machine learning engineering”, Apress L. P., 2018.

slide-24
SLIDE 24

09.06.20 | FB 20 | SE4AI Requirements and Risks | D. El-Soufi, B. Fleischmann | 24

Acknowledgements & License

  • The Images either come from the authors of these slides
  • r the sources are linked
  • These slides are made available by the authors (Dani El-

Soufi, Benjamin Fleischmann) under CC BY 4.0