InterviewStack.io LogoInterviewStack.io

Neural Networks and Optimization Questions

Covers foundational and advanced concepts in deep learning and neural network training. Includes neural network architectures such as feedforward networks, convolutional networks, and recurrent networks, activation functions like rectified linear unit, sigmoid, and hyperbolic tangent, and common loss objectives. Emphasizes the mechanics of forward propagation and backward propagation for computing gradients, and a detailed understanding of optimization algorithms including stochastic gradient descent, momentum methods, adaptive methods such as Adam and RMSprop, and historical methods such as AdaGrad. Addresses practical training challenges and solutions including vanishing and exploding gradients, careful weight initialization, batch normalization, skip connections and residual architectures, learning rate schedules, regularization techniques, and hyperparameter tuning strategies. For senior roles, includes considerations for large scale and distributed training, convergence properties, computational efficiency, mixed precision training, memory constraints, and optimization strategies for models with very large parameter counts.

EasyTechnical
114 practiced
You observe training loss keeps decreasing while validation loss increases after a few epochs. Provide a prioritized checklist of steps you would take to diagnose and fix this overfitting issue in a neural network training pipeline.
HardTechnical
123 practiced
As a senior ML engineer, you must decide platform trade-offs between a high-level training API that abstracts distributed details and a low-level framework that gives researchers fine-grained control. Propose a platform design that balances both needs, describe priority features, rollout strategy, and metrics to measure success.
EasyTechnical
65 practiced
Implement the forward pass for a single-hidden-layer feedforward neural network in Python using NumPy. Given:
- X: NumPy array with shape (batch_size, input_dim)- W1: weights shape (input_dim, hidden_dim)- b1: bias shape (hidden_dim,)- W2: weights shape (hidden_dim, output_dim)- b2: bias shape (output_dim,)
Use ReLU for the hidden layer and return logits of shape (batch_size, output_dim). Do not use deep learning frameworks; ensure correct broadcasting and vectorized ops. Provide code that handles general shapes and batch sizes.
HardTechnical
71 practiced
Compare first-order optimizers (SGD with momentum, Adam) with second-order or approximation methods (L-BFGS, K-FAC). Discuss per-iteration cost, memory requirements, suitability for large neural networks, convergence speed, and practical scenarios where second-order methods may be advantageous.
EasyTechnical
67 practiced
What is gradient clipping? Describe the difference between clipping by global norm and clipping by value. Explain situations where gradient clipping helps (e.g., RNNs) and potential drawbacks.

Unlock Full Question Bank

Get access to hundreds of Neural Networks and Optimization interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.