Non Functional Requirement For ML Systems

Anshu Kumar
3 min readJul 7, 2021
https://www.softwaretestinghelp.com/functional-and-non-functional-requirements/

Majority of Machine Learning(ML) systems built today are focusing only on some of the functional requirements. As the ML systems mature and start being used by millions of users we should start considering Non Functional Requirements(NFRs). For a mature ML system adhering to NFRs becomes critical.

I will try to list some common NFRs and their possible use cases when they needed or being used.

Let’s first define Non-Functional Requirements

Non-Functional Requirements — Attributes/Qualities that make the product affordable, easy to use, and accessible.

List Non-Functional Requirements for ML systems:

  1. Accuracy & Performance: Good ML systems must qualify for some acceptable accuracies. In broader terms MLT system should satisfy the required metrics and industry benchmarks. It could be Sensitivity/Specificity in classification of NDCG/MRR in IR systems.

Some complex AI problems are Self-Driving Cars, Sarcasm Detection etc.

Not an optimal performance of Deep Learning algorithms which are actually used in self-driving cars on certain tweaks and rotations.

2. Fairness: If the results are independent of given variables, especially those considered sensitive, gender, ethnicity, sexual orientation, disability, etc.

Examples of Biased ML systems are

  • COMPAS: the model predicted twice as many false positives for recidivism for black offenders(45%) than white offenders(23%).
  • Amazon’s Sexist Hiring Algorithm: AI seemed to have a serious problem with women, and it emerged that the algorithm had been programmed to replicate existing hiring practices, meaning it also replicated their biases.
  • Facebook’s Ad’s Algorithm: Job ads for janitors and taxi drivers had been shown to a higher number of men, in particular men from minority backgrounds.

3. Transparency: Often ML algorithms are considered black boxes. There are reasons for being black box(Complex and sophisticated algorithms). Since we want to achieve the first requirement(Accuracy & Performance).

List will includes the product which majorly built using Deep Learning. Outputs can not be easily explained to end users. More you can read here: Explainable Machine Learning in Deployment

4. Security & Privacy: ML systems are being used to identify people who wish to remain anonymous; to infer and generate sensitive information about people from non-sensitive data. Some companies Like Apple trying to have privacy inbuilt in their products.

List of examples where Privacy is emphasized and being practiced. Privacy is becoming critical requirements for all ML systems handling sensitive/end-users data.

5. Testability: Another requirement of a robust ML system is how well the system can be tested. Models should be validated against,

a. Adversarial Examples:

b. Influential Examples: These would include the following cases having,

  • Outliers
  • Majority Class
  • Data Bias

6. Reliability: A reliable ML system should consider these three points

  • Failure Prevention: Prevent or reduce the likelihood of failures. Sources of errors should be identified, e.g. Bad or Inadequate Data, Data Drift, Faulty (implicit) model assumptions
  • Failure Identification & Reliability Monitoring: Identify failures and their causes when they occur.
  • Maintenance: Fix or address the failures when they occur.

Read more at Safe and Reliable Machine Learning

Conclusion

Non functional Requirements are critical to success of any mid/large scale ML systems. Requirements such as fairness and transparency are currently receiving much attention. We may prioritize these requirements but at the end we need all of them.

--

--

Anshu Kumar

Data Scientist, Author. Building Semantic Search and Recommendation Engine.