REGULATING GENERATIVE AI — LLMOPS
PIPELINES WITH TRANSPARENCY
DEBMALYA BISWAS, WIPRO AI
AGENDA
 Enterprise AI
 Ethical / Responsible AI
 Explainability
 Fairness & Bias
 LLMOps Architecture Patterns
 Generative AI - Responsible
Design Principles
ENTERPRISE AI
• Enterprise AI use-
cases are pervasive
RESPONSIBLE AI
“Ethical AI, also known as responsible AI, is the practice of using AI with good
intention to empower employees and businesses, and fairly impact customers
and society. Ethical AI enables companies to engender trust and scale AI with
confidence.” [1]
Failing to operationalize Ethical AI can not only expose enterprises to
reputational, regulatory, and legal risks; but also lead to wasted resources,
inefficiencies in product development, and even an inability to use data to train
AI models. [2]
[1] R. Porter. Beyond the promise: implementing Ethical AI, 2020
(link)
[2] R. Blackman. A Practical Guide to Building Ethical AI, 2020 (link)
REGULATIONS
 Good news: is that there has been a recent
trend towards ensuring that AI applications are
responsibly trained and deployed, in line with
the enterprise strategy and policies.
 Bad news: Efforts have been complicated by
different governmental organizations and
regulatory bodies releasing their own
guidelines and policies; with little to no
standardization on the definition of terms.
 For example, the EU AI Act mandates a different
set of dos & don’ts depending on the ‘risk level’
of an AI application. However, quantifying the
risk level of an AI application is easier said than
done as it basically requires you to classify how
the capabilities of a non-deterministic system
will impact users and systems who might
interact with it in the future.
ETHICAL AI PRINCIPLES
 Explainability
 Bias & Fairness
 Accountability
 Reproducibility
 Data Privacy
*D. Biswas. Ethical AI: its implications for Enterprise AI Use-
cases and Governance. Towards Data Science (link)
*D. Biswas. Privacy Preserving Chatbot Conversations.
3rd IEEE AIKE 2020: 179-182
EXPLAINABLE AI
 Explainable AI is an umbrella term for
a range of tools, algorithms and
methods; which accompany AI model
predictions with explanations.
 Explainability of AI models ranks high
among the list of ‘non-functional’ AI
features to be considered by
enterprises.
 For example, this implies having to
explain why an ML model profiled
a user to be in a specific segment
— which led him/her to receiving
an advertisement.
(Labeled)
Data
Train ML
Model
Predictions
Explanation
Model
Explainable
Predictions
EXPLAINABLE AI FRAMEWORKS - LIME
 Local Interpretable
Model-Agnostic
Explanations (LIME*)
provides easy to
understand explanations
of a prediction by training
an explainability model
based on samples around
a prediction.
 The approximate nature
of the explainability
model might limit its
usage for compliance
needs. *M. T. Ribeiro, S. Singh, C. Guestrin. “Why Should I Trust You?”
Explaining the Predictions of Any Classifier, 2016 (link)
LIME output showing the important features,
positively and negatively impacting the model’s
prediction.
EXPLAINABLE AI - FEASIBILITY
 Machine (Deep) Learning algorithms
vary in the level of accuracy and
explainability that they can provide-
the two are often inversely
proportional.
 Explainability starts becoming more
difficult as as we move to Random
Forests, which are basically an
ensemble of Decision Trees. At the
end of the spectrum are Neural
Networks (Deep Learning), which
have shown human-level accuracy.
Explainability
Accuracy
Logistic Regression
DecisionTrees
Random Forest
(Ensemble of
DecisionTrees)
Deep Learning
(Neural Networks)
EXPLAINABLE AI - ABSTRACTION
“important thing is to explain the right thing to the right person in the right way at the right
time”*
Singapore AI Governance framework: “technical explainability may not always be enlightening,
esp. to the man in the street… providing an individual with counterfactuals (such as “you would
have been approved if your average debt was 15% lower” or “these are users with similar profiles
to yours that received a different decision”) can be a powerful type of explanation”
*N. Xie, et. al. Explainable Deep Learning: A
Field Guide for the Uninitiated, 2020 (link)
AI Developer
Goal:ensure/improve
performance
Regulatory Bodies
Goal:Ensure compliance with legislation,
protect interests of constituents
End Users
Goal:Understanding of
decision,trust model output
FAIRNESS & BIAS
 Bias is a phenomenon that occurs when an algorithm
produces results that are systemically prejudiced due
to erroneous assumptions in the machine learning
process*.
 AI models should behave in all fairness towards
everyone, without any bias. However, defining
‘fairness’ is easier said than done.
 Does fairness mean, e.g., that the same proportion
of male and female applicants get high risk
assessment scores?
 Or that the same level of risk result in the same
score regardless of gender?
 (Impossible to fulfill both)
* SearchEnterprise
AI. Machine Learning bias (AI
bias) (link)
Google Photo labeling pictures of a black
Haitian-American programmer as “gorilla”
“White Barack Obama”
images (link)
A computer program used for bail and
sentencing decisions was labeled biased
against blacks. (link)
TYPES OF BIAS
 Bias creeps into AI models, primarily due
to the inherent bias already present in the
training data. So the ‘data’ part of AI
model development is key to addressing
bias.
 Historical Bias: arises due to historical
inequality of human decisions
captured in the training data
 Representation Bias: arises due to
training data that is not representative
of the actual population
 Ensure that training data is representative
and uniformly distributed over the target
population - with respect to the selected
features. Source: H. Suresh, J. V. Guttag. A Framework for
Understanding Unintended Consequences of Machine
LLMOPS: MLOPS FOR LLMS
*D. Biswas. MLOps for Compositional AI. NeurIPS Workshop on Challenges in
Deploying and Monitoring Machine Learning Systems (DMML), 2022.
*D. Biswas. Generative AI – LLMOps Architecture Patterns. Data Driven Investor,
2023 (link)
 Black-box LLM APIs: This is the
classic ChatGPT example, where
we have black-box access to a
LLM API/UI. Prompts are the
primary interaction mechanism for
such scenarios.
 While Enterprise LLM Apps have
the potential to be a multi-billion
dollar marketplace and accelerate
LLM adoption by providing an
enterprise ready solution; the
same caution needs to be
exercised as you would do before
using a 3rd party ML model —
validate LLM/training data
ownership, IP, liability clauses.
LLMOPS: MLOPS FOR LLMS (2)
*D. Biswas. Contextualizing Large Language Models (LLMs)
with Enterprise Data. Data Driven Investor, 2023 (link)
 LLMs are generic in nature.
To realize the full potential
of LLMs for Enterprises, they
need to be contextualized
with enterprise knowledge
captured in terms of
documents, wikis, business
processes, etc.
 This is achieved by fine-
tuning a LLM with enterprise
knowledge / embeddings to
develop a context-specific
LLM.
GENERATIVE AI - RESPONSIBLE DESIGN PRINCIPLES
We take inspiration from
the “enterprise friendly”
Microsoft, “developer
friendly” Google and “user
friendly” Apple — to
enable this ‘transparent’
approach to Gen AI
system design.
• Guidelines for Human-
AI Interaction by
Microsoft
• People + AI
Guidebook by Google
• Machine Learning:
Human Interface
Guidelines by Apple
Thank
You
&
Question
s
Contact: Debmalya Biswas
LinkedIn:
https://www.linkedin.com/in/debmalya-
biswas-3975261/
Medium:
https://medium.com/@debmalyabiswas

Regulating Generative AI - LLMOps pipelines with Transparency

  • 1.
    REGULATING GENERATIVE AI— LLMOPS PIPELINES WITH TRANSPARENCY DEBMALYA BISWAS, WIPRO AI
  • 2.
    AGENDA  Enterprise AI Ethical / Responsible AI  Explainability  Fairness & Bias  LLMOps Architecture Patterns  Generative AI - Responsible Design Principles
  • 3.
    ENTERPRISE AI • EnterpriseAI use- cases are pervasive
  • 4.
    RESPONSIBLE AI “Ethical AI,also known as responsible AI, is the practice of using AI with good intention to empower employees and businesses, and fairly impact customers and society. Ethical AI enables companies to engender trust and scale AI with confidence.” [1] Failing to operationalize Ethical AI can not only expose enterprises to reputational, regulatory, and legal risks; but also lead to wasted resources, inefficiencies in product development, and even an inability to use data to train AI models. [2] [1] R. Porter. Beyond the promise: implementing Ethical AI, 2020 (link) [2] R. Blackman. A Practical Guide to Building Ethical AI, 2020 (link)
  • 5.
    REGULATIONS  Good news:is that there has been a recent trend towards ensuring that AI applications are responsibly trained and deployed, in line with the enterprise strategy and policies.  Bad news: Efforts have been complicated by different governmental organizations and regulatory bodies releasing their own guidelines and policies; with little to no standardization on the definition of terms.  For example, the EU AI Act mandates a different set of dos & don’ts depending on the ‘risk level’ of an AI application. However, quantifying the risk level of an AI application is easier said than done as it basically requires you to classify how the capabilities of a non-deterministic system will impact users and systems who might interact with it in the future.
  • 6.
    ETHICAL AI PRINCIPLES Explainability  Bias & Fairness  Accountability  Reproducibility  Data Privacy *D. Biswas. Ethical AI: its implications for Enterprise AI Use- cases and Governance. Towards Data Science (link) *D. Biswas. Privacy Preserving Chatbot Conversations. 3rd IEEE AIKE 2020: 179-182
  • 7.
    EXPLAINABLE AI  ExplainableAI is an umbrella term for a range of tools, algorithms and methods; which accompany AI model predictions with explanations.  Explainability of AI models ranks high among the list of ‘non-functional’ AI features to be considered by enterprises.  For example, this implies having to explain why an ML model profiled a user to be in a specific segment — which led him/her to receiving an advertisement. (Labeled) Data Train ML Model Predictions Explanation Model Explainable Predictions
  • 8.
    EXPLAINABLE AI FRAMEWORKS- LIME  Local Interpretable Model-Agnostic Explanations (LIME*) provides easy to understand explanations of a prediction by training an explainability model based on samples around a prediction.  The approximate nature of the explainability model might limit its usage for compliance needs. *M. T. Ribeiro, S. Singh, C. Guestrin. “Why Should I Trust You?” Explaining the Predictions of Any Classifier, 2016 (link) LIME output showing the important features, positively and negatively impacting the model’s prediction.
  • 9.
    EXPLAINABLE AI -FEASIBILITY  Machine (Deep) Learning algorithms vary in the level of accuracy and explainability that they can provide- the two are often inversely proportional.  Explainability starts becoming more difficult as as we move to Random Forests, which are basically an ensemble of Decision Trees. At the end of the spectrum are Neural Networks (Deep Learning), which have shown human-level accuracy. Explainability Accuracy Logistic Regression DecisionTrees Random Forest (Ensemble of DecisionTrees) Deep Learning (Neural Networks)
  • 10.
    EXPLAINABLE AI -ABSTRACTION “important thing is to explain the right thing to the right person in the right way at the right time”* Singapore AI Governance framework: “technical explainability may not always be enlightening, esp. to the man in the street… providing an individual with counterfactuals (such as “you would have been approved if your average debt was 15% lower” or “these are users with similar profiles to yours that received a different decision”) can be a powerful type of explanation” *N. Xie, et. al. Explainable Deep Learning: A Field Guide for the Uninitiated, 2020 (link) AI Developer Goal:ensure/improve performance Regulatory Bodies Goal:Ensure compliance with legislation, protect interests of constituents End Users Goal:Understanding of decision,trust model output
  • 11.
    FAIRNESS & BIAS Bias is a phenomenon that occurs when an algorithm produces results that are systemically prejudiced due to erroneous assumptions in the machine learning process*.  AI models should behave in all fairness towards everyone, without any bias. However, defining ‘fairness’ is easier said than done.  Does fairness mean, e.g., that the same proportion of male and female applicants get high risk assessment scores?  Or that the same level of risk result in the same score regardless of gender?  (Impossible to fulfill both) * SearchEnterprise AI. Machine Learning bias (AI bias) (link) Google Photo labeling pictures of a black Haitian-American programmer as “gorilla” “White Barack Obama” images (link) A computer program used for bail and sentencing decisions was labeled biased against blacks. (link)
  • 12.
    TYPES OF BIAS Bias creeps into AI models, primarily due to the inherent bias already present in the training data. So the ‘data’ part of AI model development is key to addressing bias.  Historical Bias: arises due to historical inequality of human decisions captured in the training data  Representation Bias: arises due to training data that is not representative of the actual population  Ensure that training data is representative and uniformly distributed over the target population - with respect to the selected features. Source: H. Suresh, J. V. Guttag. A Framework for Understanding Unintended Consequences of Machine
  • 13.
    LLMOPS: MLOPS FORLLMS *D. Biswas. MLOps for Compositional AI. NeurIPS Workshop on Challenges in Deploying and Monitoring Machine Learning Systems (DMML), 2022. *D. Biswas. Generative AI – LLMOps Architecture Patterns. Data Driven Investor, 2023 (link)  Black-box LLM APIs: This is the classic ChatGPT example, where we have black-box access to a LLM API/UI. Prompts are the primary interaction mechanism for such scenarios.  While Enterprise LLM Apps have the potential to be a multi-billion dollar marketplace and accelerate LLM adoption by providing an enterprise ready solution; the same caution needs to be exercised as you would do before using a 3rd party ML model — validate LLM/training data ownership, IP, liability clauses.
  • 14.
    LLMOPS: MLOPS FORLLMS (2) *D. Biswas. Contextualizing Large Language Models (LLMs) with Enterprise Data. Data Driven Investor, 2023 (link)  LLMs are generic in nature. To realize the full potential of LLMs for Enterprises, they need to be contextualized with enterprise knowledge captured in terms of documents, wikis, business processes, etc.  This is achieved by fine- tuning a LLM with enterprise knowledge / embeddings to develop a context-specific LLM.
  • 15.
    GENERATIVE AI -RESPONSIBLE DESIGN PRINCIPLES We take inspiration from the “enterprise friendly” Microsoft, “developer friendly” Google and “user friendly” Apple — to enable this ‘transparent’ approach to Gen AI system design. • Guidelines for Human- AI Interaction by Microsoft • People + AI Guidebook by Google • Machine Learning: Human Interface Guidelines by Apple
  • 16.