AI Flashcards
What is XAI (Explainable AI)
XAI are models that aim to be as well performing as they are interpretable. XAI is designed so that a human user can understand how it reached a particular decision/outcome.
Why is XAI important?
XAI is important as it provides trust and transparency. This is important in high stake areas such as medicine. Furthermore, it allows for adjustments and improvements, because if we know how it works we can identify the problems and solutions.
What is interpretability in AI?
Interpretability refers to the level of understanding of HOW an outcome is reached.
What is explainability in AI?
The level of explanation there is FOR the outcome of a model. (Also acts as an accuracy proxy of the model)
What is fidelity in AI?
Fidelity refers to how WELL the explanation matches the actual behaviour of the model.
What is comprehensibility?
The EASE of which users can understand a provided explanation.
What are the four types of evaluations humans perform to ensure user ability of XAI?
Binary forced choice, forward simulation/prediction, counterfactual simulation, surveys
What are the two approaches for XAI and what is their focus?
Intrinsic: more interpretable
Post-hoc: better explanations
What are examples of intrinsic models? and why is this?
Linar models, decision trees, k-Nearest neighbours, rule-based systems, personalised interpretability systems. These are more interpretable models to human users as long as they are relatively small and less complex. We can understand how they reached the outcomes they did by looking at them.
What can we use to reduce the number of features in models? Why do we want to minimise weights?
Lasso regression. Implicity needs as many weights to be zero as possible for increased understanding.
What does k-Nearest neighbours do?
uses existing instances to explain new instances
What are some approaches to maximise intrinsic interpretability in neural networks?
add interpretability constraints, visualise network attentions, employ attention matrix, forcing weights and parameters to zero, model-specific complexity measures, consider meaning of intermediate outputs
What is the con of more localised sampling and the con of generalised sampling?
More localised sampling might not capture enough information about a complex model.
More generalised sampling might be too complex to capture a linear model.
What are the two types of AI systems social media incorporates?
Recommender systems and harmful content classifiers
What are recommender systems?
Recommender systems are what push content at you. They curate your feed using a positive feedback loop.
What are harmful content classifiers?
Harmful content classifiers withhold harmful content from users by removing or downlinking risk content. This content moderation works using supervised learning and uses a harmful content rating.
What types of AI are “coming” for human jobs?
Generative AI is the leading impact - LLMS. Gig platforms such as uber and door dash are too. This is because they are replacing human organisation/management. AI is able to effectively sort and compare information, enabling it to be a helpful tool in the recruitment process too. It can sort through CVs and judge applicant responses in AI interviewing systems.
What is a concern for the AI recruitment process?
Bias. There is an ethical concern that AI may perpetuate bias in its recruitment process due to misrepresentation in its data, causing it to overlook some individuals.
What are the three possible scenarios for the future of AI and jobs?
“Enabling AI”
- benefiting humans, causing us to be more productive and work more effectively. no loss to jobs, just less workload
“Replacing onshore”
workers are displaced into lower value work. but we can regain profit from making AI jobs NZ owned and taxed.
“Replacing offshore”
again displacing workers into lower value work but AI systems are owned offshore therefore we cannot regain profit
What is a solution for reducing further inequality with the rise of AI in jobs?
tech taxes.
What laws have been set up across the world to ensure safety around AI?
EU’s AI Act (UK)
Bletchey Park AI Safety Summit
Executive Order on AI (US)
Interim Measures on Gen AI (China)
What is the Maori Algorithmic Sovereignty?
MASov acknowledges that any data that is about Maori, by Maori, or about Maori environment should be subject to Maori governance. They recognise that if data under/misrepresents Maori, the models will perpetuate bias and stereotypes that can further worsen outcomes for Maori.Maori should have control over how their data is collected, stored and used.
Explain the principle of Whakapapa in AI?
Transparency: there should be transparency of the algorithm - who is involved, the motives, deployment, explainability etc. Maori participants should be given transparency on their data.
Data relationship: how is Maori data used throughout the algorithm. This aligns with the MASov.
Sustainability: should ensure that the algorithms output benefits Maori for the long term and that there is a sustainable positive outcome.
What is ‘one hot’ encoding?
encoding for words by which there is one unit for each word
What does implementing an attention mechanism in a neural network do?
It allows the model better access to previous context than a recurrent network. This leads to learning which words in the context are the most important for predicting the next word.
What did OpenAI use to remove harmful content from GPT-4 before it was trained.
Text classifiers
What should you do if you are building a decision tree and at a particular node, all the data belongs to a single class?
You should mark this node as a leaf node and assign it the class label.
Is clustering an example of a reinforcement learning task?
No, clustering is an example of unsupervised learning as it learns to group similar data points together based on their features without any prior labelling or guidance.
In regression tasks, is the output continuous?
Yes, the data is continuous numerical- e.g, house prices, can be measured down to cents and infinite prices.
Describe artificial intelligence
Artificial Intelligence is a broad field of computer science that focuses on creating intelligent agents that can reason, learn, and act autonomously. AI aims to simulate human intelligence and problem-solving capabilities in machines. There is narrow AI, general AI and super intelligence. Some AI are also transformers, which means they are trained broadly on things and fine-tuned to specify in something - GPT-4 is a transformer model. Self driving cars such as Tesla are applications of AI too.
Describe machine learning
Machine learning is a subset of artificial intelligence that focuses on developing algorithms and models that allow computers to learn from data and improve their performance on a specific task without being explicitly programmed. In essence, machine learning enables computers to “learn” from experience. An example of machine learning is recommendation systems such as the recommender systems seen in social media that push peoples preferences at them.
Describe deep learning
Deep learning is a subset of machine learning that uses neural networks with multiple layers to learn complex patterns from data. AI Image generation is an example of a deep learning model.
Describe the relationship between artificial intelligence, machine learning and deep learning
Artificial intelligence is a field of computer science -> machine learning is a subset of AI -> deep learning is a subset of machine learning.
AI is the general field of creating intelligent agents.
ML is a specific approach within AI that focuses on learning from data.
DL is a specialized technique within ML that uses deep neural networks.
What is overfitting in the context of supervised learning and why does it occur?
Overfitting happens when a model fits too closely and memorises the patterns of the training data, causing it to be unable to generalise to unseen data.
Explain how to reduce the chance that a decision tree overfits
To avoid a decision tree from overfitting, ensure the model is not too complex and doesn’t have too much ‘noise’. Further, train the model on test data, so it doesn’t perfect training data patterns and is able to generalise to unseen data.
Prune: set a maximum depth or minimum number of samples per leaf to limit the tree’s growth.
Remove irrelevant features: Select only the most relevant features to reduce the complexity of the model.
Feature engineering: Create new features that are more informative and less prone to overfitting.
Where does the data come from for ChatGPT and what form does its training data take?
ChatGPT is trained on a wide variety of data sources, such as the internet, books, websites, articles. The data is typically in text sequences or tokens, and the model learns to predict the next word based on the preceding words.
Does ChatGPT use supervised or unsupervised methods to learn and how does this learning happen?
ChatGPT uses supervised learning. Here are the supervised steps to its learning:
Data Preparation: A massive dataset of text is collected and preprocessed to remove noise, inconsistencies, and other issues.
Tokenisation: The text is broken down into smaller units, such as words or phrases.
Model Architecture: A neural network architecture, such as a transformer, is used.
Training: During training, the model is fed a sequence of tokens and is asked to predict the next token. The model’s predictions are compared to the actual next token, and the model’s parameters are adjusted to minimise the error.
Fine-tuning: Once the model has been trained on a large dataset, it can be further fine-tuned on specific tasks or domains.
Why and how does ChatGPT produce different output texts each time to the same input prompt several times?
predictions, make a comment about form - unsupervised - it learns from training data - llm and picks best prediction from that data. It is taught using training data that involves various examples, and predicts the best fit based on context.
What is involved in fine tuning a deep network like GPT-4? How is fine-tuning different from training from scratch?
refer to tranformer models and how GPT4 is a transformer and can be trained on large amounts of information and then fine tuned to focus on one thing
What kind of training data is used to fine-tune GPT-4 to encourage ‘helpful’ responses?
Harmful content classifiers
Describe three reasons why XAI is important.
Trust, transparency, adjustability (through interpretability and explainability).
What components are in a simple convolution neural network?
Input, convolution, pooling, output (fully connected)
Describe how a caption can be used to generate an image using a text-to-image AI generator. You can use an analogy.
A caption is the input, therefore the more detail given the better fit the generator will create an image to your idea. A caption to the generator is like a brush to a canvas.
Describe one usage of AI text-to-image generation hat could be helpful to society and one that could be harmful.
interior design ideas and sexual exploitation via deepfakes
Describe ways to determine whether an image is a deepfake
unnaturally smooth texture, facial deformities, tags, unrealistic depth perception, background blurs to one, details such as too many fingers or clothes with false labels
When creating an AI agent for playing the Super Mario game using reinforcement learning, briefly explain how to define the state, action and reward.
State = Current screen
Action = movements
Reward = win/loss (outcome)
State one classification task example and one regression task example
Classification: email spam detection
Regression: predicting house prices
Predictive AI models, trained using supervised learning, have many applications in healthcare. Describe two such applications, indicating in each case how the predictive model would be trained.
Sensor systems:
send signals (e.g, if vitals drop, first responders would be notified), provide summary data, can sensor reminders
Systems that predict patient flow in/out, bed use, patient recovery time, organise administrative stuff
Describe three ways in which AI technology is currently impacting society, indicating for each whether it is positive or negative.
AI is positively benefiting workers in the workplace as a complementary tool for efficiency. Likewise, AI is a complementary tool for students, positively benefiting their research and idea generation. Although, negatively, AI is breaching ethical concerns with its ability to generate convincing faux videos of people saying or doing things they didn’t.
describe a regulatory mechanism that is currently being used by governments, or that could be used in the future, to provide some measure of control.
There are regulations around which AI systems hit the market, such as the EU AI laws act which prevents harmful AI models from being disseminated.
Further, some models use harmful content classifiers that block users from requesting inappropriate misuse of output.
Choose one of the Maori data sovereignty principles that we introduced in lectures.
Describe how this principle applies to AI.
Discus show you could ensure you follow this principle when building an AI system.
Use examples.
Whakapapa: Relationships
The principle of whakapapa recognises Maori right to control the collection, storage and distribution of data about Maori - ensuring it positively benefits them - sustainably as well - long term. If data collected about Maori includes under/misrepresentation about Maori individuals/groups then this can perpetuate bias in the model - worsening Maori outcomes from AI.
- by ensuring Maori are in control and have full transparency throughout the process of the collection and use of their data. Also, by making sure that the data is representative of Maori, so that in the long run it benefits them rather than indicting bias/stereotypes.
What is supervised learning?
The algorithm learns from LABELLED training data and then makes predictions based on the learned relationships.
What is unsupervised learning?
The data is UNLABELLED, therefore, the algorithm must find patterns by itself. E.g, regressors in social media - pushes content at us that we have ‘interacted’ with.
How does ML perform tasks?
Maps inputs (training data) to outputs (model)
A human writes the ML program, and the ML program creates the model
What type of learning was the animal classification in assignment 3?
Supervised - as it is given training data that is labelled (cat, dog, etc with pictures)
what are the two main ways of finding patterns in unsupervised learning?
clustering: identifying different types of input
dimensionality reduction: simplifying the way data is represented
What is an example of clustering (discussed in class)?
A database of ‘customer transactions’, what items do different types of customers purchase together
What is an example of reinforcement learning (discussed in class)?
AI that plays games - AlphaGo etc
What is transfer learning?
A model that is trained for one task and re-trained for a new, similar task.
Explain tabular data and the areas
Tabular data refers to the structure of training data as a table.
Each row is a training instance. (single piece of data)
Each instance has many features.
Each column holds one of these features.
One feature is the output, and the others are inputs.
What does feature engineering include and why do we need to do it?
Our data often doesn’t arrive in a neat table - we have to create the table.
Therefore, we need to create suitable categories, we need to normalise features (make sure one feature doesn’t dominate the other), and fix any missing or incorrect data
How do we gemoetrically represent datasets with just one feature?
A one-dimensional space - a line
How do we geometrically represent a dataset with two features?
Scatterplot
How do we geometrically represent a dataset with three features?
A set of points in 3D, using different colours (of dots) for different output labels. The boundaries between output classes can ne thought of as lines or planes, learning often involves finding the right boundary
How do ML algorithms represent training items?
As points in a n-dimensional feature space
what does Pythagoras theorem refer to in ML algorithms?
the distance between two points in a feature space
What is the validation test?
the set we use to explore over/underfitting so we keep the test set for one use only. we can experiment with different parameters on the validation set to see which ones generalise best
k=1 and k=5 in k-nearest neighbours will cause what effects?
k=1 will cause overfitting as the model will pay too much attention. to single items
k=5 will capture general trends but may ignore actual patterns which is underfitting
How does k-NN work?
k-NN is an ‘instance-based’ classification algorithm that classifies new instances based on similarity (small distance)
What are the parts of a decision tree?
a tree is a structure of nodes (boxes) connected by arcs (lines)
each node represents one of the features to consider and each nodes arc represent all the possible values for that featuee
What is a decision tree?
a classifier that maps input features to an output. it is a structured process that represents a sequence of decisions . they’re very easy for humans to understand.
how do u train a decision tree?
u pick an input feature
and add a node for that feature in the tree
split the training set by values of that feature
and create arcs to the node for each value
at each arc, make a new decision tree with the remaining features
What is a binary classifier, how does it work ?
a binary classifier predicts whether an input item is ‘in’ a class or not. its output is either positive (yes its in the class) or negative (no its not in the class).
we can also use a confusion matrix in. a binary classifier to provide extra information about positive and negative predictions
How do deepfakes work/what network do they use?
Generative adversarial networks
generator network - makes fake images
discriminator - judges if an image is fake or real
how do u train the discriminator network?
the discriminator classifies both real and fake data from the generator
it is then penalised for misclassifying a real instance as fake/fake as real
the discriminator then updates its weights through backpropogation
how do u train a generator network?
produce generator output from random noise
use discriminator to classify this output as a real or fake image
penalise generator if classified as fake
updates weights through back propagation
what is the outcome/goal of training the generator and discriminator?
for the generator to create images so realistic the discriminator cant tell they’re fake
whats an example from class about when a deepfake was used?
The Gabon deepfake controversy - video released of bongo in 2018
What is the kaka AI implementation example in ecology and how does the pipeline work?
Kaka - identification of whether its a new or known individual
pipeline: input visuals through data collection
then pre processed
then object detection
then image segmentation
then feature matching
then knowledgebase
then output of known or new individual
What is the other AI implementation in ecology example?
modelling plant stress responses
:
predicting where a species is likely to move and using the ML to understand why
we can do this through ML’s that predict variables - climate, elevation etc, then training data (NVS surveys) then prediction of area change
Any further ways AI is used in ecology?
prediction -
using climate and geographical features as inputs to try and predict the abundance changes (species increase or decrease)
What are the two types of AI systems in the medical field? what things can they do?
generate and predictive systems
medical imaging to diagnose diseases and guide treatment
sensing technology - alerts, summary data
predicting patient outcomes, patient in/out flow, bed use
What are examples of post-hoc approaches?
proxy interpretable models, visualisation, counterfactual explanation, feature importance
what does a post-hoc model focus on doing? and how does it do this?
giving an explanation for the model.
this can be ether a global (overall model structure/behaviour) or local (how/why the model makes a decision) explanation
can also be model specific or model agnostic
an explanation can look like a simpler model, visualisation, data points, text explanation, feature importance,
In a simplified linear model, what would be of importance? (in terms of feature importance)
coefficients
these show the positive/negative relationship and ignore the different scales of the features
What is SHAP?
SHAP is Shapley Additive exPlanations
this refers to the use of Shapley values where the contribution of each feature tp the overall result is calculates, it uses every possible feature subset, and
SHAP approximates Shapley values to give a measure of feature importance
what does counterfactual mean?
its causal - if X has not occurred, then Y would not have occurred
a counterfactual explanation of a prediction describes the smallest change of the feature values that changes the prediction output
What is the purpose of CNNs?
CNN’s are for handling image data
- to understand spatial relationships in images and avoid the flattening issue (more similar to human vision)
What are the parts of a CNN?and what happens between them?
Input (convolutions ->) Feature maps (pooling ->) feature maps (convolutions ->) feature maps (pooling->) feature maps (fully connected ->) output
What do the pooling, convolution and fully connected layers of a CNN do?
convolution -
has filters, that allow recognition of edges, textures etc
each filer slides across the image to create a feature map
pooling -
reduces dimensionality (width and height) of the feature map
this is important for reducing sensitivity, computational cost and gets us closer to the size of the output layer
fully connected -
connects all neurons from the previous layer to each node in the fully connected layer
allows the network to produce an output (final decision/classification)
How do u train a CNN?
human designs the network architecture
train weights in network (filters and standard weights) with back propagation
needs a lot of labelled data - supervised learning
Give an analogy for a caption to a text-to-image generator
draft with ideas etc to an essay
explain why chagpt produces different responses for the same text
stochastic selection - it chooses an output based on probabilities. when u give ChatGPT a prompt its like ur pointing to a space of its training data and saying I want u to produce text from here! the more detail u give, the more precise the region ur pointing. its given various examples for inputs so it chooses based on probs