InterviewStack.io LogoInterviewStack.io

Model Architecture Selection and Tradeoffs Questions

Deals with selecting machine learning or model architectures and evaluating relevant tradeoffs for a given problem. Candidates should explain how model choices affect accuracy, latency, throughput, training and inference cost, data requirements, explainability, and deployment complexity. The topic covers comparing architecture families and variants in different domains such as natural language processing, computer vision, and tabular data, for example sequence models versus transformer based models or large models versus lightweight models. Interviewers may probe metrics for evaluation, capacity and generalization considerations, hardware and inference constraints, and justification for the final architecture choice given product and operational constraints.

HardTechnical
149 practiced
Write a Python utility using PyTorch (optionally torch.fx) that, given an nn.Module and a representative input tensor, estimates per-layer parameter counts and MACs for convolutional and linear layers and prints a table: layer name, type, params, estimated MACs, and percent of total. Describe limitations and assumptions of your approach and how it might misestimate real runtime cost.
HardTechnical
84 practiced
Design an experimental framework to quantify how different model architectures affect fairness across demographic groups for a loan-approval classifier. Specify which architectures to compare, datasets and sampling strategies, fairness metrics (equalized odds, demographic parity, calibration), statistical tests to detect differences, and mitigation strategies at the architectural level (adversarial debiasing, constrained optimization, representation learning).
HardSystem Design
87 practiced
Design a production pipeline to support continuous model retraining and architecture evolution: automated data collection, drift detection, candidate generation (hyperparameters and architecture variants), offline validation, canary deployment, online A/B evaluation, rollback, and model lineage/versioning. Explain how you would decide when a new architecture is worth promoting to production while minimizing risk and cost.
EasyTechnical
104 practiced
Discuss practical implications of increasing depth versus increasing width in neural network architectures. When does adding more layers help versus increasing layer width? Include effects on representational power, optimization stability, training time, and inference performance, and provide production-relevant examples such as ResNet residual depth increases versus wider MLPs.
MediumTechnical
84 practiced
Implement in Python a function simulate_sparse_attention(n, k, global_every=16, seed=None) that returns an (n, n) boolean mask indicating which attention positions each token attends to. The mask should include k nearest neighbors on each side and one global attention location every global_every tokens. Describe complexity and assumptions. Use numpy and keep the implementation clear and testable.

Unlock Full Question Bank

Get access to hundreds of Model Architecture Selection and Tradeoffs interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.