Instuderingsfrågor - AI II Flashcards

(38 cards)

1
Q

Hur skiljer sig ANNs från symbolisk AI?

A

ANNs använder en bottom-up-approach, där systemet inte programmeras med fasta regler, utan istället lär sig från data genom att justera vikter mellan neuroner. De viktigaste skillnaderna är:

  • ANNs kan lära sig mönster automatiskt istället för att förlita sig på manuellt kodade regler.
  • ANNs är bättre på att hantera komplexa och “luddiga” problem, som bild- och taligenkänning.
  • ANNs förbättras med större datamängder och kraftfullare hårdvara, medan symbolisk AI inte skalas lika effektivt.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Varför stannade forskningen av perceptroner av under flera år, och vad var det som återväckte intresset av neurala nätverk?

A

Forskning om perceptroner stannade av efter att Minsky & Papert (1969) visade att SLP:er inte kunde lära sig XOR eller andra icke-linjärt separerbara problem.

Detta ledde till missuppfattningen att artificiella neurala nätverk var fundamentalt begränsade.

Intresset för neurala nätverk återupplivades dock på 1980-talet när forskare upptäckte backpropagation-algoritmen, som möjliggjorde träning av MLPs.

Med ökad datorkapacitet och datatillgång blev neurala nätverk så småningom praktiska, vilket ledde till den moderna deep learning-revolutionen.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Vad är “The Credit Assignment Problem” och hur hjälper back propagation till att lösa det?

A

The Credit Assignment Problem hänvisar till utmaningen att bestämma vilka specifika vikter i ett neuralt nätverk som är ansvariga för fel när nätverket producerar felaktig output. I SLPs existerar inte detta problem eftersom det bara finns ett lager av vikter att justera. Men i MLPs kan fel härröra från vilket lager som helst, vilket gör det svårt att veta exakt vilka vikter som måste justeras. Backpropagation löser detta genom att:

  • Beräkna hur stort felet är (hur mycket erhållen output skiljer sig från förväntat output).
  • Propagera felet från outputlagret baklänges genom nätverket, lager för lager.
  • Justera vikterna med hjälp av gradient descent.

Detta systematiska tillvägagångssätt gör det möjligt för MLP:er att lära sig komplexa funktioner effektivt.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Hur tränas ett neuralt nätverk med ett dataset som MNIST?

A

MNIST är ett dataset med handritade siffror (0–9) som används för att träna neurala nätverk att känna igen siffror. Träningen sker i följande steg:

  • Förbehandling: Varje bild konverteras till en vektor av pixlar (1 = färgad pixel, 0 = tom pixel).
  • Forward pass: Bilden matas in i nätverket, och en första gissning görs.
  • Lossberäkning: Om svaret är felaktigt beräknas ett felvärde (loss).
  • Backpropagation: Vikterna justeras för att minimera felet.
  • Iterativ träning: Processen upprepas över flera epoker tills nätverket kan klassificera nya siffror korrekt.

När träningen är klar kan nätverket känna igen handskrivna siffror även om det aldrig har sett just den bilden tidigare.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Vad menas med att ett problem är linjärt separerbart, och varför kräver XOR ett mer komplext nätverk än en SLP?

A

En SLP kan bara klassificera data som är linjärt separerbar, vilket innebär att en enda rät linje kan separera de olika klasserna i en tvådimensionell problemrymd. XOR-funktionen är dock inte linjärt separerbar - det finns ingen enskild linje som korrekt kan avgränsa dess 1- och 0-outputs. Denna begränsning ledde till tidig skepsis mot perceptroner, som beskrivs av Minsky & Papert (1969). Problemet löstes senare med Multi-Layer Perceptrons som kan representera flera linjära separationer med hjälp av hidden layers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Vad är fördelen med att använda hidden layers i en MLP, och hur hjälper det till att lösa XOR-problemet?

A

Hidden layers gör det möjligt för en MLP att utföra flera linjära separationer på inputdatan innan den når outputlagret. Varje dold neuron kombinerar funktioner på ett icke-linjärt sätt, vilket gör att nätverket kan separera komplexa mönster. Man kan se en MLP som en kobination av flera SLPs som var och en kan utföra sin egna linjära separation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Hur kommer ökandet av antalet hidden neurons (neuroner i hidden layers) att påverka prestandan hos ett neuralt nätverk? Vad händer om man lägger till för få hidden layers? Vad händer om man lägger till för många hidden layers?

A

För få hidden neurons: Nätverket kommer inte att ha tillräckligt med kapacitet för att lära sig komplexa mönster, vilket leder till underfitting (dålig prestanda).

För många hidden neurons: Nätverket löper riskt att memorera specifik träningsdata istället för att generalisera, vilket leder till overfitting.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Vad är backpropagation och varför är det viktigt för träning av neurala nätverk?

A

Backpropagation är en träningsalgoritm som används för att uppdatera vikterna i ett neuralt nätverk genom att sprida felvärdet bakåt genom lagren. Processen fungerar så här:

  • Forward pass: En insignal skickas genom nätverket, och en utgång beräknas.
  • Felberäkning: Skillnaden mellan det faktiska svaret och det förväntade svaret beräknas.
  • Backpropagation: Felet sprids bakåt genom nätverket, och vikterna justeras för att minska felet.
  • Iterativ förbättring: Processen upprepas i många epoker tills nätverket lär sig att producera rätt svar.

Backpropagation är avgörande eftersom det gör det möjligt att träna deep neural networks och optimera deras prestanda.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Vad händer under en träningsepok, och varför förbättras inlärningen av multipla epoker?

A

En epok hänvisar till ett helt pass genom träningsdatauppsättningen. Att träna ett neuralt nätverk över flera epoker gör att modellen gradvis kan lära sig bättre viktvärden och minska mänden felaktiga outputs.

  • I tidiga epoker kommer nätverket att ge väldigt felaktig output, men lär sig gradvis vad de korrekta outputen ska vara.
  • I takt med att antalet epoker ökar finjusterar nätverket vikterna för att fånga subtila datamönster.
  • För få epoker → modellen lär sig inte tillräckligt (underfitting).
  • För många epoker → modellen memorerar specifika träningsdata istället för att generalisera (overfitting).

Att hitta rätt antal epoker är avgörande för optimal träning.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

I vilka situationer kan en SLP vara användbar? Vilka typer av problem kräver att man använder en MLP?

A

SLPs är användbara för enkla binära klassificeringsproblem där data är linjärt separerbara (t. ex. att skilja mellan skräppost och icke-spam e-postmeddelanden när en enda tröskel räcker).
MLPs behövs för mer komplexa problem, såsom

  • Medicinsk diagnostik (klassificering av sjukdomsförekomst baserat på flera symtom).
  • Handskriven sifferigenkänning (att lära sig icke-linjära mönster i bilder).
  • Upptäckt av ekonomiskt bedrägeri (upptäcka mönster i stora datauppsättningar med flera funktioner).

MLP:s förmåga att lära sig komplexa datastrukturer gör dem ovärdeliga för deep learning.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Vad är syftet med back propagation vid träning av neruala nätverk, och vilken roll spelar gradient descent-algoritmen?

A

Backpropagation är en algoritm som används för att träna MLP:er genom att beräkna felet vid outputlagret och gå baklänges genom nätverket. Detta hjälper till att avgöra hur mycket varje vikt bidrar till nätverkets felaktiga output (lösa credit assignment problem). Gradient descent-algoritmen justerar sedan vikterna för att minimera detta fel. Denna process upprepas över flera iterationer (epoker) tills nätverket lär sig korrekt output.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Vilken var det största nackdelen med enkla perceptroner som fick utvecklingen att avstanna?

A

Att den inte kan lära sig icke linjärt separerbara funktioner som XOR.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Vad var den ursprungliga idén bakom symbolisk AI, och varför blev den svår att skala upp?

A

Symbolisk AI byggde på en top-down-approach, där man försökte modellera intelligenta system genom att definiera explicita logiska regler. Problemet var att:

  • Verkliga problem är för komplexa för att uttryckas med en uppsättning regler.
  • Det var omöjligt att förutse alla tänkbara situationer som ett AI-system kan ställas inför.
  • Symbolisk AI fungerade bra i begränsade miljöer (t.ex. schack), men kunde inte generalisera till den verkliga världen.

Därför blev det svårt att skala upp symbolisk AI till nivåer som motsvarar mänsklig intelligens.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

När man tränar MLP, vad syftar man på när man pratar om “credit assignment problem”?

A

Att avgöra exakt vilka vikter som orsakar den felaktiga outputen.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Vad innebär backpropagation i träning av neurala nätverk?

A

Att justera vikterna i nätverket genom att arbeta baklänges från felet i outputen.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Vad är den största fördelen med att använda en MLP istället för en SLP?

A

Den kan lära sig icke-linjära funktioner som XOR.

14
Q

Vad är den huvudsakliga rollen hos en optimerare (optimizer) när man tränar ett neuralt nätverk?

A

Att uppdatera vikterna vid back propagation.

14
Q

Why does the Transformer use positional encoding?

A

To help the model learn relationships between different positions in a sequence.

15
Q

In NLP, what is the purpose of tokenization?

A

To convert language input into numerical representations that can be processed by models.

16
Q

What is the key idea behind convolution in CNNs?

A

Using a small set of weights (filters) to detect local patterns and share them across the image.

17
Q

What is the purpose of pooling layers in a CNN?

A

To reduce spatial dimensions while preserving the most important information.

18
Q

Vad analyseras med en confusion matrix?

A

Accuracy hos en klassificeringsmodell.

19
Q

Vad är syftet med loss functions i ANNs?

A

Att kontrollera felstorleken hos nätverkets output.

20
Q

Vilken form (shape) har arrayen
[ [ [1, 2], [3, 4], [5, 6] ],
[ [7, 8], [9, 10], [11, 12] ] ] ?

21
Vad är funktionen hos en perceptron?
Det är en typ av artificiell neuron som multiplicerar input med vikter och summerar dem.
22
What is a key difference between fine-tuning and prompt engineering in LLMs?
Fine-tuning involves modifying the model's weights using new data, while prompt engineering shapes the model’s responses without changing its underlying weights.
23
Which of the following properties are true for Layerwise-Relevance Propagation (LRP) model explainers? (more than one of the below is correct)
They are model-specific They are post hoc approaches
24
What is the analogy in Artificial Neural Networks to synaptic efficiencies in biological neurons?
The strength of the weights between neurons They can be updated (strengthened or weakened) depending on learning performance (as for synaptic transmission)
25
Which of the following non-derivative functions can only produce outputs in the range 0 to 1? [may be more than one correct answer] a. Linear activation? b. The rectified linear unit (ReLU) activation function? c. The sigmoid function? d. The softmax function?
c. and d. (These two functions are squashing functions, softmax outputs must add to 1). Linear activation produces output that is a linear function of the input (not squashed). ReLU is a linear activation function for inputs of >=0 and outputs 0 otherwise. Note, you are not required to explain here though, just give the letters c. and d.)
26
How many weights (excluding threshold/bias) does a feedforward, fully-connected, neural network with a single hidden layer and with 5 inputs nodes, 3 hidden nodes and 1 output node and no biases have? [only one correct answer] a. 13 b. 18 c. 9 d. 20
Answer: b.
27
Describe the difference between supervised and unsupervised learning.
Supervised learning entails the ANN learning to predict specific outputs (targets) labelled by humans on a classification task. E.g. dog images are labelled as dogs and the ANN has to learn that the image is a dog rather than a cat). Unsupervised learning entails the ANN learning without specific human-labelled targets. E.g. unsupervised autoencoders learn according to how well they re-present their input – this is a sort of ‘target’ but it does not involve human labelling.
28
Which of the following, given appropriate connection weights, can a Multi-Layer Perceptron with one hidden layer find linearly-separable classifications for its inputs? [may be more than one correct answer] a. AND logic functions? b. OR logic functions? c. XOR logic functions?
Answer: a. b. and c. (MLPs can solve all such Boolean logic functions including Not-AND, Not- OR, Not-XOR, which give the opposite outputs).
29
In the below (left) visualization of a multi-layer perceptron set the weights (does not require learning) in order to provide a solution to the XOR problem. Since there is no learning required assume the output function is the standard threshold function for each node/neuron. Provide a solution (note, many solutions are possible!) as a combination of single-layer perceptrons that implement logic functions (in the input- >hidden layers), e.g. OR and AND gates. The -1 inputs correspond to fixed bias inputs. Every line /connection requires a weight value. Complete the truth table (below right) – that contains the output values of each node – that corresponds to your XOR ANN implementation. Draw 2D geometric vector spaces to show how the input-output space is transformed into a linearly separable hidden layer-output space (ignore the biases).
Answer: See slides 72-85 of Lecture 3 for answers to i. ii. and iii. The truth tables and 2D images were used for a different MLP (slides 72-79) to the one depicted here but it is a good exercise for you to work them out now!!
30
In what ways can Convolutional Neural Networks be seen as similar to how the Visual Cortex processes stimuli?
Cells in V1 are receptive to simple features (as can be seen in early convolutional layers with relatively small filter sizes) Cells in Visual cortex also appear to encode for pooling. Cells in higher levels of visual cortex and Inferotemporal cortex are responsive to objects and relatively invariant to the spatial and orientation presentation of the object.
31
How many pooling maps does a standard ‘shallow’ Convolutional Neural Network (1 layer of feature maps + 1 layer of pooling maps) have that uses 5 filters of dimensionality 4x4 over the input image? a. 5 b. 10 c. 16 d. 32
Answer. a. (each filter is used to encode features on a single feature map, each feature map outputs to a single pooling map, size of the filter here is irrelevant).
32
Q4. Describe how Convolutional Neural Networks encode for spatial invariance when being trained on multiple images of the same class.
CNNs use pooling maps that encode a lower dimensional ‘summary’ of the space of the features maps to which they respond by encoding, for example, the maximum value in an area of space on the feature map. This means that if the object in the image shifts (relative to other images of the same class) but is still in the receptive field of the pooling map neuron, the neuron will still be responsive. Because deeper CNNs have increasingly lower dimensionality (fewer neurons) in deeper layers, the representation of space becomes increasingly compressed, the receptive field becomes larger, and neurons (especially in pooling regions) become increasingly invariant to shifts of the object in the image. If the pooling neuron’s receptive field covers the entire image, it should be invariant to any shift of the object in the image space. (note, this is quite a detailed answer, it could be possible to score 3p with a slightly less detailed answer).
33
Describe two ways in which Deep Convolutional Neural Networks allow for a small number of weights/parameters with respect to MLPs like stacked autoencoders.
They use low-dimensional filters over the images they are processing and these filters (vector of weights) are shared for the feature map that is encoding the same feature in different positions in space. A large number of weights (usually most of the weights) are found between the final pooling layer and the fully connected layers. The deeper the network, the lower the dimensionality of the network. So, a deeper network with low dimensionality pooling maps will have fewer connections to the fully connected layers as compared to a shallow network with higher dimensionality. So, as a result, there may be fewer weights over the whole network when adding layers. This is not true for a stacked autoencoder that is fully connected all the way through and so more layers necessarily means more weights. (Note, the two points should be reasonably detailed to get the 4p).
34
Give three reasons why deeper Convolutional Neural Networks might be considered superior to more shallow Convolutional Neural Networks.
Training efficiency: Greater depth means fewer parameters between the final pooling layer and the fully connected layers, i.e. so doesn’t necessarily increase the number of parameters overall (see Q5). Spatial invariance: Greater depth increases the receptive field of the network (large in later layers) and therefore allows for more of the image space to be covered. Feature combination: Greater depth allows for more possible combinations of features for reconstructing/representing the images in greater detail.