0% found this document useful (0 votes)
12 views57 pages

AI and Generative Models in Data Visualization

The document discusses data visualization and the role of artificial intelligence (AI) in image generation, highlighting the differences between strong and weak AI. It explains generative AI and large language models (LLMs), including their capabilities in generating text, images, and code. Additionally, it covers various theories and methods for language modeling, including attention visualization techniques to understand LLMs better.

Uploaded by

mmr12420
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views57 pages

AI and Generative Models in Data Visualization

The document discusses data visualization and the role of artificial intelligence (AI) in image generation, highlighting the differences between strong and weak AI. It explains generative AI and large language models (LLMs), including their capabilities in generating text, images, and code. Additionally, it covers various theories and methods for language modeling, including attention visualization techniques to understand LLMs better.

Uploaded by

mmr12420
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Data Visualization

Visual analytics
Requremnets
• Data Analysis
• Visualzation
• Computer Vision
• Machine learning
• Programming skills + Software Engineering
• HCI
Interaction
• Sort
• Filter
• Drill down
• Cluster
Use of Artificial Intelligence
in Image Generation
Artificial Intelligence, What is it?
• AI is defined as “A system that shows behavior that
could be interpreted as human intelligence.” -
Doug Rose
• AI thrives in an environment where there are defined
rules and patterns that it can work with. This is where
AI will seem the most “Intelligent”.
• If you have used any of the following, you have used
AI:
• T-9 Texting, Google Translate, Hulu, Alexa etc.
Strong AI Vs. Weak AI

• Strong AI is AI that acts exactly as a human would, the


Terminator or Commander Data. They exhibit emotions,
real creativity, and can even have a sense of purpose.
• Weak AI is AI that is confined to a narrow task, like
when a system processes language into text or sorts
all the pictures on your pc.
• Examples of Weak AI include: Siri, Cortana, Bing,
Netflix, and even ChatGPT.
Generative AI
•Generative AI operates by learning
patterns and structures from large
datasets and then using that
knowledge to produce new content
that fits within those learned patterns.
•It's a type of machine learning where the
AI model learns to understand and mimic
the characteristics of the data it has been
trained on.
Generative AI in protection
What is Generative AI?
ChatGPT, Bing, Bard, DallE…

Generative AI, like ChatGPT, uses


machine learning to create new
content. While generative AI tools
can help explore new ideas, write
text, and get feedback, there are
important limitations to these tools
to keep in mind.
What can Artificial Intelligence generate?
• Large language models such as ChatGPT can generate tex t in
multiple languages and styles. They can also interpret text
and images.
• Generative programs such as DALL.E2 and Midjourney
generate images from text instructions. Others can generate
video (Sora), audio, and code.
• ChatGPT has an increasing list of plugins that extend the
natural language model to connect to services, data, and
calculations.
What are large language models (LLMs)?
• Large language models (LLMs) are a type of advanced artificial
intelligence system. allows people to interact with a computer in a
more natural and conversational way.
• GPT stands for “Generative Pre-trained Transformer” and is the
name given to a family of natural language models developed by
OpenAI. There are other large language models such as Gemini,
LLaMA, and Claude, deepseek.
• They are trained on large text datasets to learn to predict the next
word in a sentence and, from that, generate coherent and
compelling responses.
Language Models (LMs)
•How can we come up with good queries?
•Think of words that would likely appear in a
relevant document.
•Idea of LM:
•A document is a good match to a query if the
document model is likely to generate the query.

26
Language Models (LMs)
• Generative Model:
• Recognize or generate strings.

• The full set of strings that can be generated is called the language of the
automaton.
• Language Model:
• A function that puts a probability measure over strings drawn from some
vocabulary.
Language Models (LMs)
• Calculate the probability of a word sequence.
• Multiply the probabilities that the model gives to each word
in the sequence, together with the probability of continuing
or stopping after producing each word.
• P(frog said that toad likes frog) =
(0.01*0.03*0.04*0.01*0.02*0.01)
• *(0.8*0.8*0.8*0.8*0.8*0.8*0.2)
• =0.000000000001573
Language Models (LMs)
• Example:

P(s|M1)>P(s|M2)
Language Models (LMs)
• Basic LM using chain rule:

• Unigram language model:


• Throws away all conditioning context.
• Most used in Information Retrieval.

• Bigram language model:


• Condition on the previous term.

30
Query Likelihood Model
•Query likelihood model:
• Rank document by P(d|q)
• Likelihood that document
d is relevant to the query.
• Using Bayes rule:
• P(q) is the same for all
documents. P(d | q)  P(q | d )
• P(d) is treated as uniform
across all d.
31
Markov Assumption

•Simplifying assumption:
Andrei Markov

P(the | its water is so transparent that) » P(the | that)


•Or maybe

P(the | its water is so transparent that) » P(the | transparent that)


Markov Assumption

P ( w1w2  wn ) »  P ( wi | wi  k  wi 1 )
i
•In other words, we approximate each
component in the product

P( wi | w1w2  wi 1 ) » P( wi | wi k  wi 1 )
Theories of Language Models
Three approaches for language modelling

· Sentence Correction (Denoising)

· Text Completion

· Text Translation

34
Theories of Language Models
Parametric architectures for sentence denoising: Encoder

39
Theories of Language Models
Parametric architectures for text completion: Decoder

40
Theories of Language Models
Parametric architectures for text translation: Encoder-Decoder

41
Theories of Language Models

Training Language Models

· Pre-training

· Supervised Training

· Reinforcement Learning

42
capabilities of LLMs

• Language Modeling – these capabilities assist in the


generation of semantically meaningful visualization
goals.
• Code Writing (i.e. Code Generation) – these
capabilities assist in generating code to create data
visualizations, which are then used as input to image
generation models, such as DALL-E and Latent
Diffusion, to generate stylized infographics.
Attention Head Visualization

• Attention Heatmaps:
• One of the most popular methods to understand LLMs is
through attention heatmaps. An attention heatmap shows
how much each token attends to every other token within
a sequence.
• For example, in a sentence like “The cat sat on the mat,” a
heatmap might show that “cat” heavily attends to “sat,”
while “mat” might attend strongly to “on.”
Multi-Head Aggregation:

•Since transformers rely on multiple attention


heads per layer, it’s often useful to aggregate
attention matrices for all heads.
•Some visualizations show each head as a
separate matrix, while others combine them
to highlight overall trends.
Gradient-Based Visualization

•Saliency Maps:
•In tasks like sentiment classification, saliency
maps highlight which tokens have the highest
gradient magnitudes with respect to a prediction.
•This indicates which parts of the input most
strongly affect the model’s output
Output Distribution Visualization

•Token Probability Plots:


•When an LLM is generating text (e.g., next-token
prediction), you can visualize the probability
distribution over the vocabulary at each step.
•This can show which alternative tokens were
close contenders to the final prediction.

You might also like