0% found this document useful (0 votes)
8 views2 pages

Deep Learning Assignment Guide

The document outlines a deep learning assignment consisting of five questions, each worth four marks, covering topics such as the differences between shallow and deep neural networks, the effects of activation functions, the design of Convolutional Neural Networks (CNNs), issues with Recurrent Neural Networks (RNNs), and strategies for handling imbalanced datasets in fraud detection. Students are instructed to show their reasoning and justifications in their answers. The assignment emphasizes understanding concepts and practical applications in deep learning.

Uploaded by

Bhavya Arora
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)
8 views2 pages

Deep Learning Assignment Guide

The document outlines a deep learning assignment consisting of five questions, each worth four marks, covering topics such as the differences between shallow and deep neural networks, the effects of activation functions, the design of Convolutional Neural Networks (CNNs), issues with Recurrent Neural Networks (RNNs), and strategies for handling imbalanced datasets in fraud detection. Students are instructed to show their reasoning and justifications in their answers. The assignment emphasizes understanding concepts and practical applications in deep learning.

Uploaded by

Bhavya Arora
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

Deep Learning Assignment (Total Marks: 20)

Instructions: Answer all questions. Show intermediate steps, reasoning, and proper
justification wherever applicable.

Q1. (4 Marks)

Explain the diAerence between shallow and deep neural networks.


Then, for a given task of image recognition, justify why deep architectures generally
outperform shallow ones.

Q2. (4 Marks)

A neural network uses the sigmoid activation function.


Given input ! = 0.8, weight & = 1.5, and bias ) = −0.3:

1. Compute the neuron’s output.

2. Explain how the vanishing gradient problem could aHect training if such
activations are used in deep layers.

Q3. (4 Marks)

You are designing a Convolutional Neural Network (CNN) for handwritten digit
recognition (MNIST dataset).

a) Explain the roles of convolutional, pooling, and fully connected layers in your
model.
b) What would be the eHect on accuracy and training time if you:

• Increase the number of filters

• Add more pooling layers

• Use larger kernel sizes

Q4. (4 Marks)

Consider a Recurrent Neural Network (RNN) trained for text prediction.


During training, the model fails to capture long-term dependencies.

a) Explain the reason for this issue using the concept of gradient vanishing/exploding.
b) How do LSTM or GRU architectures help mitigate this problem? Illustrate with one key
gating mechanism.
Q5. (4 Marks)

Suppose you are building a deep learning model for detecting credit card fraud.

You notice the dataset is highly imbalanced (very few fraudulent cases).

a) Explain why standard accuracy is not a good metric in this case.

b) Suggest two suitable evaluation metrics and justify their use.

c) Describe two techniques to handle data imbalance during training.

Common questions

Powered by AI

Two techniques typically used to handle data imbalance are resampling and the use of appropriate algorithms. Resampling involves either oversampling the minority class (e.g., using methods like SMOTE) or undersampling the majority class to balance the class distribution . Additionally, employing specialized algorithms such as cost-sensitive learning, where different misclassification costs are assigned implicitly by weighting negative examples (non-fraudulent) higher, can help in providing balanced learning .

The vanishing gradient problem hinders the learning dynamics of deep neural networks by causing gradients to decay to near-zero values as they propagate backwards through the layers. This diminishes the updates for early-layer weights and restricts the network’s ability to learn deep hierarchical features . Solutions include using activation functions like ReLU, which maintain consistent gradients, and initializing weights using methods like Xavier or He uniform initialization to prevent small initial values . Batch normalization is also a common technique, as it normalizes inputs across a mini-batch, stabilizing the learning process .

LSTM and GRU models generally outperform traditional RNNs for tasks involving long-term dependencies due to their gating mechanisms that control information flow across time steps. LSTMs have input, output, and forget gates, allowing them to maintain, update, and forget information selectively, whereas GRUs use reset and update gates, achieving similar control with fewer parameters . These mechanisms prevent the vanishing gradient issue by enabling the model to maintain useful information over extended sequences, unlike traditional RNNs, which struggle with gradient decay .

RNNs struggle with long-term dependencies due to vanishing or exploding gradients. When gradients are backpropagated through many layers in an RNN, they may become exceedingly small (vanishing) or large (exploding), impeding the learning of long-range information . LSTM and GRU architectures mitigate this problem by introducing gating mechanisms that control information flow. A key feature is the forget gate, which allows these cells to retain or discard information from previous time steps selectively, thus maintaining long-term dependencies more effectively .

Deep neural networks differ from shallow neural networks primarily in depth, i.e., the number of layers. Deep networks have multiple hidden layers enabling them to learn complex hierarchical representations of data, whereas shallow networks typically have only one or two hidden layers offering limited representational capacity . In image recognition tasks, deep architectures generally outperform shallow ones because they can capture intricate patterns and features across various levels of abstraction, such as edges, textures, and objects. This capability allows deep networks to generalize better and accurately identify images .

In a CNN for handwritten digit recognition, convolutional layers apply filters to extract spatial hierarchies of features, such as edges or textures, from input images . Pooling layers reduce dimensionality, retaining important structural features while decreasing computational load and risk of overfitting . Fully connected layers interpret the learned features to classify the images into digits. Increasing the number of filters may enhance feature extraction but increases computation and memory requirements. Adding more pooling layers could further reduce dimensionality and computation but might also lose important information. Larger kernel sizes capture broader features but may miss finer details .

Essential considerations for constructing evaluation metrics for a highly imbalanced dataset include focusing on metrics that reflect the model's ability to correctly identify minority class instances, such as fraud cases, rather than overall accuracy, which can be misleading . Precision and recall assess different aspects of detection capability, with precision highlighting the proportion of correctly identified positive instances and recall capturing the detection rate of actual positives. The F1-score combines these metrics to provide a balanced view. Adjusting the classification threshold and using ROC and precision-recall curves are also crucial for a nuanced understanding of performance .

Increasing the number of filters in a CNN enhances feature extraction capability by capturing more patterns but can lead to higher computational requirements and memory usage . Adding more pooling layers reduces the spatial dimension progressively, which speeds up computations and decreases overfitting risk but might lead to loss of important information. Larger kernel sizes can capture broader context in images, which may increase the network's ability to generalize; however, they also involve more parameters, which could complicate the model and slow down the training .

The output of the neuron is calculated as follows: sigmoid(1.5 * 0.8 - 0.3) = sigmoid(0.9) = 1 / (1 + e^(-0.9)) ≈ 0.7109 . The vanishing gradient problem is a significant issue when using sigmoid activation functions in deep networks. This problem occurs because gradients multiply layer by layer during backpropagation, and sigmoid's derivatives are small in the saturated regions near 0 and 1, causing gradients to diminish. As a result, it leads to slow learning or failure to update weights in early layers .

In credit card fraud detection, using standard accuracy as a metric is not suitable because it can be misleading in imbalanced datasets. If fraudulent cases are rare, a classifier might achieve high accuracy by simply predicting all transactions as non-fraudulent, yet it would miss actual fraud cases . Precision and recall are more appropriate metrics. Precision focuses on the correctness of positive predictions, while recall assesses the model's ability to detect all actual positive cases. The F1-score, which is the harmonic mean of precision and recall, provides a balanced evaluation when dealing with class imbalance .

You might also like