Back In the print window choose "Save as PDF" as the destination
NOTE.CS

Artificial Intelligence

11 topics · 28 Nov 2026
1

Fundamentals

↑ Index
Artificial Intelligence

What is Artificial Intelligence?

It is a technique that makes computers able to think, learn, and make decisions like humans.


What is Machine Learning?

Machine Learning is a subset of AI where a system learns patterns from data and uses those patterns to make predictions or decisions.


What is Deep Learning?

Deep Learning is a subset of Machine Learning that uses multiple neural networks layers to learn more complex patterns from data.


Machine Learning vs Deep Learning?

Traditional Machine Learning often depends more on manually designed features, while Deep Learning can automatically learn useful features from raw data using neural networks.


What is supervised learning?

The model learns from input output pairs. Classification and regression are examples.


What is unsupervised learning?

The model finds hidden structure in data without labels. Clustering and dimensionality reduction are examples.


Classification vs regression? ⭐⭐⭐⭐⭐

Classification predicts a category or class, like pneumonia or normal. Regression predicts a continuous number, like house price.

2

Classical ML Algorithms

↑ Index
Artificial Intelligence

What is linear regression?

It fits a straight line between input features and a numeric output.


What is logistic regression?

It is a classification algorithm. It uses the sigmoid function to output a probability between 0 and 1.


What is a decision tree?

It splits data step by step using questions on features, like a flowchart, until it reaches a prediction.


What is a random forest?

It builds many decision trees on random parts of the data and combines their votes. This reduces overfitting.


What is SVM?

Support Vector Machine finds the boundary that separates classes with the largest possible margin.


What is KNN?

K-Nearest Neighbors classifies a sample by looking at the majority class of its K closest samples.


What is Naive Bayes?

It is a probability-based classifier that uses Bayes' theorem. It assumes features are independent.


What is K-Means clustering?

It groups data into K clusters by moving cluster centers until each point is close to its nearest center.


What is PCA?

Principal Component Analysis reduces the number of features while keeping most of the information (variance).


What is an ensemble method?

It combines multiple models to get better results than a single model. Examples are bagging, boosting, and voting.


Bagging vs boosting?

Bagging trains models in parallel on random samples (Random Forest). Boosting trains models one after another, each fixing the previous errors (XGBoost).


What is feature engineering?

Creating or selecting useful input features to help the model perform better.


What is feature selection?

Choosing only the most useful features and removing irrelevant ones.

3

Neural Network Basics

↑ Index
Artificial Intelligence

What is a neural network?

A neural network is a machine learning model inspired by the structure of the human brain. It consists of interconnected neurons organized into layers that learn patterns from data.


What is a perceptron?

The simplest neural unit. It takes inputs, multiplies them by weights, adds a bias, and applies an activation function.


What is a weight and a bias?

Weights decide how important an input is. Bias shifts the output so the model can fit data better.


What is a hidden layer?

A layer between the input and output layers where the network learns features.


What is a fully connected (dense) layer?

A layer where every neuron is connected to all neurons of the previous layer.


What is an activation function?

An activation function introduces non-linearity into a neural network, allowing it to learn complex patterns. Examples include ReLU, sigmoid, and softmax.


Why ReLU instead of sigmoid in hidden layers?

ReLU is computationally simple and generally provides better gradient behavior for deep networks than sigmoid.


What is Softmax?

Softmax converts a set of model outputs into probabilities whose total sum is 1. It is commonly used for multi-class classification.


What is Sigmoid?

Sigmoid converts an input into a value between 0 and 1. It is commonly used for binary classification or independently predicting multiple labels.


Softmax vs Sigmoid?

Softmax is generally used when choosing one class from multiple mutually exclusive classes. Sigmoid is commonly used for binary classification or multi-label classification where multiple labels can be true at the same time.


What is forward propagation?

Passing input through the network layer by layer to get the output.


What is a gradient?

A gradient tells us how the loss changes with respect to the model's parameters. It is used by optimization algorithms to update the parameters.


What is backpropagation?

Backpropagation calculates how much each model parameter contributed to the prediction error and uses gradients to update the parameters.


What is the vanishing gradient problem?

Gradients become very small in deep networks, so early layers learn very slowly.


What is the exploding gradient problem?

Gradients become very large and make training unstable.


What is weight initialization?

Setting the starting values of weights. Good initialization helps training start well.


What is the difference between parameter and hyperparameter?

Parameters are learned automatically during training, such as neural network weights. Hyperparameters are settings chosen before or during training, such as learning rate, batch size, and number of epochs.


What is a parameter count and why does it matter?

It is the total number of learnable weights. Fewer parameters means a smaller, faster model that is easier to deploy.


What are FLOPs?

The number of floating-point operations needed for one forward pass. It measures computational cost.


What is inference time?

The time the model takes to make a prediction for one sample.

4

Training and Optimization

↑ Index
Artificial Intelligence

What is an epoch?

One epoch means the model has processed the entire training dataset once.


What is batch size?

Batch size is the number of training samples processed before the model updates its parameters.


What is learning rate?

Learning rate controls how much the model's parameters are updated during each optimization step. A very high learning rate can make training unstable, while a very low learning rate can make training very slow.


What is an optimizer?

An optimizer is an algorithm used to update the model's parameters to minimize the loss function. Examples include SGD and Adam.


What is Adam?

Adam is an optimization algorithm that combines ideas from momentum and adaptive learning rates. It is widely used for training deep learning models.


What is AdamW?

A version of Adam that applies weight decay correctly. It is widely used for training transformers.


What is gradient descent?

An optimization method that updates parameters in the direction that reduces the loss.


Batch vs mini-batch vs stochastic gradient descent?

Batch uses all data per update. Stochastic uses one sample. Mini-batch uses a small group (like 32) and is the most common.


What is SGD?

Stochastic Gradient Descent. It updates parameters using one sample or a small batch of data at a time.


What is momentum?

It uses past gradients to make updates smoother and faster.


What is a loss function?

A loss function measures how different the model's prediction is from the actual target. The optimizer tries to minimize this loss during training.


What is cross-entropy loss?

Cross-entropy is commonly used for classification problems. It measures the difference between the actual class distribution and the probability distribution predicted by the model.


Why categorical cross-entropy?

Categorical cross-entropy is suitable for multi-class classification where each sample belongs to one class among multiple classes.


What is label smoothing?

Instead of hard labels like 1 and 0, it uses soft labels like 0.9 and 0.1. This stops the model from being overconfident.


What is a learning rate scheduler?

A method that changes the learning rate during training, usually reducing it over time.


What is ReduceLROnPlateau?

It reduces the learning rate when the validation performance stops improving. It can help the model converge more effectively.


What is early stopping?

Early stopping stops training when validation performance stops improving. It can reduce unnecessary training and help prevent overfitting.


What is a checkpoint?

A saved copy of the model at a certain point in training, usually the best one.


What is gradient clipping?

Limiting the size of gradients to avoid exploding gradients. We used this in the thesis paper.


What is hyperparameter tuning?

Searching for the best settings, like learning rate and batch size. Common methods are grid search and random search.


What is an auxiliary classifier?

An extra classifier attached to an inner part of the model. It gives additional training signals and helps stabilize training. We used it in the thesis paper.

5

Overfitting, Regularization and Transfer Learning

↑ Index
Artificial Intelligence

What is overfitting?

Overfitting occurs when a model learns the training data too closely, including noise, and therefore performs poorly on unseen data.


How do you reduce overfitting?

•        Use more training data

•        Data augmentation

•        Dropout

•        Regularization

•        Early stopping

•        Reduce model complexity

•        Cross-validation

•        Proper train-validation-test splitting


What is underfitting?

Underfitting occurs when the model is too simple to learn the important patterns in the data. As a result, it performs poorly on both training and unseen data.


What is the bias-variance tradeoff?

High bias means the model is too simple (underfitting). High variance means the model is too sensitive to training data (overfitting). We aim for a balance.


What is regularization?

Regularization is a technique used to reduce overfitting by preventing the model from becoming unnecessarily complex. Examples include L1/L2 regularization and dropout.


What is L1 vs L2 regularization?

L1 pushes some weights to exactly zero. L2 makes weights small but not zero.


What is weight decay?

A penalty on large weights. It works as regularization to reduce overfitting.


What is dropout?

Dropout randomly deactivates some neurons during training. It helps prevent the model from depending too much on specific neurons and reduces overfitting.


What is batch normalization?

It normalizes the inputs of a layer across the batch. This makes training faster and more stable.


What is layer normalization?

It normalizes across the features of each single sample. It is used in transformers.


Batch norm vs layer norm?

Batch norm depends on batch statistics and is common in CNNs. Layer norm works per sample and is common in transformers.


What is normalization (of input data)?

Normalization scales input values into a consistent range. For example, in our traffic sign paper, pixel values were normalized between 0 and 1.


What is data augmentation?

Data augmentation creates modified versions of training data to increase data diversity. For images, examples include rotation, zoom, shifting, cropping, and flipping.


Why use data augmentation?

It helps the model learn more robust features and can reduce overfitting by exposing the model to different variations of the training data.


What is transfer learning?

Transfer learning means using knowledge learned from one task or dataset as a starting point for another related task. For example, using an ImageNet-pretrained CNN for traffic sign recognition.


What is fine-tuning?

Fine-tuning means taking a pre-trained model and continuing its training on a target dataset so that it adapts to the new task.


What is feature extraction?

Feature extraction means identifying useful patterns or representations from raw data that help the model perform the target task.

6

Data Splitting and Experiment Setup

↑ Index
Artificial Intelligence

What is validation data?

Validation data is used during model development to monitor performance and tune model settings without using the test set.


What is test data?

Test data is used at the end to evaluate how well the final model performs on unseen data.


Why should test data not be used during training?

If the test data influences model training or tuning, the evaluation becomes biased. The test set should represent unseen data.


What is generalization?

Generalization is the ability of a model to perform well on new, unseen data, not just on the training data.


What is data leakage?

Data leakage happens when information from outside the training data, especially validation or test data, unintentionally influences the training process. It can produce unrealistically high performance.


What is cross-validation?

The data is split into K parts. The model trains on K-1 parts and tests on the remaining part, and this repeats K times. It gives a more reliable estimate of performance.


K-fold vs stratified k-fold?

Stratified k-fold keeps the class ratio the same in every fold. It is useful for imbalanced data.


What is stratified splitting?

It splits the data so each subset has the same class proportion as the original dataset. We used this in our thesis paper.


What is a class imbalance problem?

Some classes have many more samples than others. The model may favor the majority class.


How do you handle class imbalance?

Use class-weighted loss, oversampling, undersampling, data augmentation, and better metrics like F1 and recall. We used class-weighted loss in the pneumonia paper.


What is a baseline model?

A simple or standard model used as a reference to show that the proposed model is better.


What is an ablation study?

Removing or changing parts of the model one by one to see how much each part contributes.

7

Evaluation Metrics

↑ Index
Artificial Intelligence

What is accuracy?

Correct predictions divided by total predictions.


Why is accuracy not enough?

With imbalanced data, a model that always predicts the majority class can still get high accuracy. So we also use precision, recall, and F1.


What is precision?

Precision tells us, among all the samples predicted as positive, how many were actually positive.


What is recall?

Recall tells us, among all the actual positive samples, how many were correctly identified by the model.


What is F1-score?

F1-score is the harmonic mean of precision and recall. It provides a balance between precision and recall.


What is a confusion matrix?

A confusion matrix is a table that shows how many samples were correctly and incorrectly classified for each class. It helps us understand which classes the model confuses with each other.


What is TP?

True Positive means the model predicted positive and the actual class was also positive.


What is FP?

False Positive means the model predicted positive, but the actual class was negative.


What is FN?

False Negative means the model predicted negative, but the actual class was positive.


What is TN?

True Negative means the model predicted negative and the actual class was also negative.


What is specificity?

Among all actual negatives, how many the model correctly identified as negative. Formula: TN / (TN + FP).


What is sensitivity?

Another name for recall. It is how many actual positives were found.


Precision vs recall: which is more important?

It depends on the task. In disease screening, recall is more important because missing a patient is dangerous. In spam detection, precision may matter more.


Macro average vs weighted average?

Macro average takes a simple average over classes. Weighted average gives more weight to classes with more samples.


What are top-1 and top-5 accuracy?

Top-1 means the correct class must be the model's first choice. Top-5 means the correct class must be within the model's five best guesses.


What is the ROC curve?

It plots the true positive rate against the false positive rate at different thresholds.


What is AUC?

Area Under the ROC Curve. A value near 1 means a good model. A value of 0.5 means random guessing.

8

CNN and Computer Vision

↑ Index
Artificial Intelligence

What is CNN?

CNN stands for Convolutional Neural Network. It is a deep learning architecture mainly used for image and computer vision tasks.


Why is CNN good for images?

CNN can automatically learn features such as edges, shapes, textures, and patterns from images.


What is a convolution?

A small filter slides over the image and produces a feature map that highlights patterns.


What is a kernel or filter?

A small matrix of learnable weights (like 3×3) used in convolution.


What is a feature map?

The output of a convolution. It shows where a certain pattern was found.


What is stride?

How many pixels the filter moves at each step.


What is padding?

Adding extra pixels around the image border so the output size is kept or controlled.


What is CNN pooling?

Pooling reduces the spatial dimensions of feature maps while retaining important information. Max pooling keeps the maximum value from a local region.


Max pooling vs average pooling?

Max pooling keeps the largest value in a region. Average pooling keeps the average value.


What is global average pooling?

It takes the average of each entire feature map and gives one value per channel. It reduces parameters and overfitting.


What is flatten?

Converting a multi-dimensional feature map into a 1D vector for dense layers.


What is 1D convolution?

Convolution over a sequence, like text or signals. In our ICCIT paper, we used 1D CNN with kernel sizes 3, 5, and 7.


What is VGG?

A CNN with many stacked 3×3 conv layers. It is simple but has a large number of parameters.


What is ResNet?

A CNN that uses skip (residual) connections, which allow very deep networks to train well.


What is a skip connection?

A shortcut that adds a layer's input to its output. It helps solve the vanishing gradient problem.


What is DenseNet?

A CNN where each layer receives features from all previous layers. This encourages feature reuse.


What is EfficientNet?

A CNN family that scales depth, width, and image resolution together in a balanced way.


What is MobileNet?

A lightweight CNN designed for mobile and low-resource devices. It uses depthwise separable convolutions.


What is ImageNet?

A very large image dataset with over 1000 classes. Many models are pre-trained on it.


Image classification vs detection vs segmentation?

Classification labels the whole image. Detection finds objects and their locations. Segmentation labels each pixel.


What is image resizing and why is it needed?

Making all images the same size, because neural networks need a fixed input size.


What is a spatial attention mechanism?

It gives each location in the feature map a weight between 0 and 1, so the model focuses on important regions. We used it in the pneumonia paper.


What is attention gating?

Multiplying features by the attention map so that unimportant areas are suppressed.


What is feature fusion?

Combining features from different sources, usually by concatenation, to get a richer representation.


What is concatenation?

Joining feature vectors together one after another.

9

Sequence Models, Transformers and BERT

↑ Index
Artificial Intelligence

What is an RNN?

A neural network for sequences. It keeps a hidden state that remembers previous inputs.


What is the problem with RNN?

It struggles with long sequences because of vanishing gradients, and it processes tokens one by one, which is slow.


What is LSTM?

An RNN with gates (input, forget, output) that can remember information for a long time.


What is GRU?

A simpler version of LSTM with fewer gates. It is faster to train.


What is BiLSTM?

An LSTM that reads the sequence in both forward and backward directions.


What is a Transformer?

A Transformer is a neural network architecture that uses attention mechanisms to process relationships between different parts of an input. It is widely used in natural language processing and many other domains.


What is self-attention?

Self-attention allows a model to determine which parts of an input are important in relation to other parts of the same input. In simple terms, it helps the model understand the relationship between different words or tokens in the input.


What is multi-head attention?

Multi-head attention uses multiple attention mechanisms, called heads, to learn different relationships or representations from the input simultaneously.


What are Query, Key, and Value in attention?

Query is what a token is looking for. Key is what each token offers. Value is the actual information. Attention compares the Query with Keys to weight the Values.


What is positional encoding?

Extra information added to embeddings so the Transformer knows the order of tokens.


What are the encoder and decoder in a Transformer?

The encoder understands the input. The decoder generates the output.


What is a feed-forward network in a Transformer?

Two dense layers applied to each token after attention to add more non-linearity.


What is a residual connection in a Transformer?

The input of a sublayer is added to its output. This helps stable training.


Why are Transformers better than RNNs?

They process all tokens in parallel, capture long-range relationships using attention, and train faster.


What is BERT?

BERT stands for Bidirectional Encoder Representations from Transformers. It is a Transformer-based language model designed to learn contextual representations of text.


Why is BERT called bidirectional?

Because it considers information from both the left and right context of a token when learning its representation.


What is masked language modeling?

BERT hides some words in a sentence and learns to predict them. This is how BERT is pre-trained.


What is the [CLS] token?

A special token at the start of the input. Its final representation is often used for classification.


What is pooled output in BERT?

A single vector for the whole sentence, usually made from the [CLS] token.


What is BioBERT?

BioBERT is a BERT-based language model that is pre-trained on biomedical text. It is designed for biomedical natural language processing tasks.


What is ClinicalBERT?

A BERT model pre-trained on clinical notes, such as hospital records.


What is DistilBERT?

A smaller and faster version of BERT made by knowledge distillation. It keeps most of the performance.


What is GPT and how is it different from BERT?

GPT is a decoder-based model that generates text left to right. BERT is encoder-based and learns from both directions.


What is a pre-trained language model?

A model trained on a large text corpus, then adapted to a specific task.


Pre-training vs fine-tuning?

Pre-training learns general language knowledge from huge data. Fine-tuning adapts the model to a specific task using a smaller dataset.


What is domain adaptation?

Adjusting a model so it works well in a specific field, like biomedical text.


What is knowledge distillation?

A small "student" model learns to mimic a large "teacher" model. This makes the model smaller.


What is model compression?

Reducing model size using pruning, quantization, or distillation.


What is quantization?

Using lower-precision numbers (like 8-bit instead of 32-bit) to make the model smaller and faster.


What is pruning?

Removing unimportant weights or neurons from a model.

10

Natural Language Processing Basics

↑ Index
Artificial Intelligence

What is NLP?

Natural Language Processing is the field of AI that helps computers understand and generate human language.


What is tokenization?

Splitting text into smaller units (tokens) such as words or subwords.


What is WordPiece tokenization?

A subword method used by BERT. Rare words are split into smaller pieces, so unknown words can still be handled.


What is a vocabulary?

The set of all tokens a model knows.


What are padding and truncation in NLP?

Padding adds special tokens to short sequences. Truncation cuts long sequences to a fixed length (we used 128 tokens).


What is an attention mask?

A tensor that tells the model which tokens are real (1) and which are padding (0).


What is an embedding?

An embedding is a numerical representation of an object such as a word, token, or image feature. It allows the model to work with meaningful numerical representations.


Static vs contextual embeddings?

Static embeddings (Word2Vec, GloVe) give one vector per word. Contextual embeddings (BERT) give different vectors depending on the sentence.


What is Word2Vec?

A method that learns word vectors so similar words are close together.


What is GloVe?

Word embeddings learned from word co-occurrence statistics across a large text corpus.


What is Bag of Words?

Represents text by word counts, ignoring order.


What is TF-IDF?

A score that gives high weight to words that are frequent in one document but rare across all documents.


What is an n-gram?

A sequence of n consecutive words, like a bigram (2 words).


What are stop words?

Very common words like "the", "is", "and" that are sometimes removed.


Stemming vs lemmatization?

Stemming cuts words to a rough root ("running" → "run"). Lemmatization uses a dictionary to get the proper base form ("better" → "good").


What is Named Entity Recognition (NER)?

Finding and labeling names, such as diseases, genes, or drugs, in text.


What is text classification?

Assigning a category label to a text, such as symptom text to a disease.


What is WordNet?

A large English database that groups words into sets of synonyms.


What is synonym replacement in text augmentation?

Replacing words with their synonyms (using WordNet) to create new training samples with the same meaning.


What is random word swap?

Randomly changing the position of words in a sentence to create variation.

11

Explainable AI

↑ Index
Artificial Intelligence

What is XAI?

XAI stands for Explainable Artificial Intelligence. It helps us understand why an AI model makes a particular prediction.


Why is XAI important?

XAI improves transparency and helps researchers understand the model's behavior. It is especially useful in sensitive domains such as healthcare and safety-critical systems.


What is model interpretability?

Model interpretability refers to how easily humans can understand how or why a model produces its predictions.


What is a black-box model?

A model whose internal decision process is hard for humans to understand.


What is a post-hoc explanation?

An explanation created after the model is trained, without changing the model.


What is a model-agnostic method?

A method that works with any model type, such as LIME and SHAP.


Global vs local explanation?

Global explains the overall model behavior. Local explains one single prediction.


What is Grad-CAM?

Grad-CAM generates a heatmap showing the image regions that contributed most to a CNN's prediction.


What is LIME?

LIME explains an individual prediction by perturbing parts of the input and observing how the prediction changes.


What is SHAP?

SHAP explains predictions by giving each feature a score based on its contribution. It is based on Shapley values from game theory.


LIME vs SHAP?

LIME builds a simple local model around one prediction. SHAP gives a fairer, theory-based feature contribution. SHAP is usually slower but more consistent.


What is a gradient-based explanation?

It uses the gradient of the output with respect to the input to see which input parts affect the prediction the most.


What is a heatmap in XAI?

A colored overlay that shows which regions of an image were most important for the prediction.


What does a negative SHAP or LIME score mean?

That feature decreases the probability of the predicted class.


Does explainability mean the model is correct?

No. Explanations show what the model used, not whether it is medically or causally correct.