🚀 AI Interview Questions with Answers (Part 8)
71. What is self-attention in Transformer models?
Self-attention is a mechanism that allows a model to determine how important each word in a sequence is relative to the others.
Instead of processing words one by one, the model looks at the entire sequence simultaneously and assigns attention scores to capture context.
Benefits:
- Understands long-range dependencies
- Processes sequences in parallel
- Improves contextual understanding
---
72. What is the attention mechanism, and how does it work?
The attention mechanism helps a model focus on the most relevant parts of the input while generating an output.
How it works:
1. Calculates attention scores for all input tokens.
2. Assigns higher weights to more relevant tokens.
3. Uses these weighted values to generate better predictions.
It significantly improves performance in NLP, translation, summarization, and image captioning tasks.
---
73. What is transfer learning, and when should it be used?
Transfer learning is a technique where a pre-trained model is reused for a new but related task.
Instead of training from scratch, the existing knowledge of the model is leveraged, reducing training time and improving performance.
Applications:
- Image classification
- Medical imaging
- Object detection
- NLP tasks
- Speech recognition
---
74. What are embeddings in Deep Learning?
Embeddings are dense numerical vector representations of data such as words, images, or documents.
They capture semantic meaning, allowing similar items to have similar vector representations.
Applications:
- Semantic search
- Recommendation systems
- Large Language Models
- Question answering
- Text similarity
---
75. What is fine-tuning, and why is it useful?
Fine-tuning is the process of taking a pre-trained model and training it further on a task-specific dataset.
Benefits:
- Higher accuracy
- Less training time
- Requires less data than training from scratch
- Adapts the model to domain-specific tasks
Example: Fine-tuning BERT for sentiment analysis or GPT for customer support.
---
76. What is multimodal AI, and how does it work?
Multimodal AI is an AI system that can process and understand multiple types of data, such as text, images, audio, and video, within a single model.
Examples:
- Image caption generation
- Visual question answering
- AI assistants that understand both text and images
- Speech-to-text with image understanding
---
77. What are Generative Adversarial Networks (GANs)?
GANs are deep learning models consisting of two neural networks:
- Generator: Creates new synthetic data.
- Discriminator: Determines whether the generated data is real or fake.
Both networks compete during training, producing increasingly realistic outputs.
Applications:
- Image generation
- Face synthesis
- Image enhancement
- Data augmentation
---
78. What are Autoencoders, and what are their applications?
Autoencoders are neural networks designed to learn efficient representations of data by compressing the input into a lower-dimensional form and then reconstructing it.
Applications:
- Data compression
- Noise removal (Denoising)
- Anomaly detection
- Feature extraction
- Dimensionality reduction
---
79. What are diffusion models, and how do they generate images?
Diffusion models generate images by starting with random noise and gradually removing that noise over multiple steps until a realistic image is produced.
Advantages:
- High-quality image generation
- Stable training
- Excellent image diversity
- Better realism than many earlier generative models
Examples include Stable Diffusion and DALL·E.
---
80. What are foundation models, and why are they significant?
Foundation models are large pre-trained AI models trained on massive datasets that can be adapted to many downstream tasks through prompting or fine-tuning.
Examples:
- GPT
- BERT
- LLaMA
- Gemini
- Claude
Advantages: