Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About BNY hiring for Data Science roles
BNY, formerly known as BNY Mellon, is an American financial services company known for custody, asset servicing, clearing, treasury services and investment management. It is one of the oldest banks in the United States. In India its centres in Pune and Chennai hire software engineers, data analysts, risk professionals and operations roles that support global clients.
For Data Science roles, this BNY practice set focuses most on Python for Data Science (6), Computer Vision (5), MLOps and Model Deployment (5), Feature Engineering (5). It has 5 easy, 28 medium, 7 hard questions, so you can start easy and work up to the harder ones.
Company type
Banking & finance
Headquarters
New York, USA
Main India offices
Pune, Chennai
BNY Data Science interview process
Online assessment (aptitude + coding)
Technical interview
Managerial round
HR round
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for BNYStart practicing
3 QUESTIONS FREESign up to unlock the full question bank and track your progress.Unlock every question and answer, then continue practising company-wise and package-wise.
✓ 3 questions free • Unlock the rest in seconds
01
What is the difference between a star schema and a snowflake schema?
A star schema has a central fact table, like sales with amounts and foreign keys, surrounded by denormalised dimension tables such as product, customer and date. A snowflake schema normalises dimensions further, for example product links to a separate category table. Star schemas need fewer joins and are faster and simpler for analysts. Snowflake schemas save storage and reduce duplication but make queries more complex.
02
Your product image classifier works on studio catalogue photos but fails on photos users take with their phones. Why, and what do you do?
This is domain shift: user photos have clutter, blur, poor lighting and odd angles that the model never saw. Collect and label a sample of real user photos and evaluate on them separately. Add augmentation for blur, noise, colour jitter, rotation and random crops, and fine-tune on a mix of studio and real images. Monitor accuracy on user photos in production, since that is the distribution that matters.
03
Write Python code to find the top 3 most similar documents to a query using cosine similarity on embeddings.
Raising the threshold improves precision but lowers recall. Fraud detection leans to recall, while spam filters often prefer precision; choose by the cost of each error.
06
You must classify support messages into 40 categories, but some categories have only 20 examples. What do you do?
Start with a pretrained sentence embedding model plus a simple classifier, or fine-tune a small transformer with class weights. For the rare categories, try few-shot approaches such as SetFit or an LLM with examples in the prompt, and generate or collect more examples. Merge categories that are rarely distinguishable. Report per-class F1 rather than overall accuracy, and route low-confidence predictions to a human queue.
07
What are dataclasses in Python and why are they useful in data projects?
A dataclass, created with the @dataclass decorator, automatically generates __init__, __repr__ and __eq__ from annotated fields. It is a clean way to hold structured records such as a training config with learning rate, batch size and paths. Options like frozen=True make instances immutable, and default values reduce boilerplate. Compared with plain dictionaries, dataclasses give attribute access, type hints and clearer errors when a field is misspelled.
It computes the gradient of the loss with respect to every weight by applying the chain rule backwards through the network, so gradient descent can update them.
10
Pandas: find the top 3 products by revenue in each region.
Use the provider's structured output or JSON schema mode when available, which constrains the output to your schema. Otherwise, describe the exact schema in the prompt with an example, and use low temperature. Always parse and validate the response in code, for example with Pydantic, and on failure retry with the error message included. Keep schemas small and flat, and use enums for fields with fixed values.
12
Write SQL to compute week-1 retention by signup week.
WITH signups AS (
SELECT user_id, DATE_TRUNC('week', signup_date) AS cohort, signup_date
FROM users
), active AS (
SELECT DISTINCT s.user_id, s.cohort
FROM signups s
JOIN events e ON e.user_id = s.user_id
AND e.event_date >= s.signup_date + INTERVAL '7 day'
AND e.event_date < s.signup_date + INTERVAL '14 day'
)
SELECT s.cohort, COUNT(*) AS users,
ROUND(100.0 * COUNT(a.user_id) / COUNT(*), 1) AS week1_retention_pct
FROM signups s
LEFT JOIN active a ON a.user_id = s.user_id
GROUP BY s.cohort
ORDER BY s.cohort;
Recursive feature elimination trains a model, ranks features by importance or coefficient size, removes the weakest ones, and repeats until the desired number remains. RFECV picks the number of features using cross-validation. It considers features together rather than one at a time. The downsides are high compute cost on large data and unstable results when features are correlated, so check stability across folds.
14
Your classifier scores 98 percent on validation, but Grad-CAM shows it focuses on a watermark rather than the object. What is happening?
The model has learned a shortcut: the watermark correlates with the label in your dataset, perhaps because images of one class came from a single source. It will fail when that correlation breaks. Remove or crop the watermarks, rebalance sources across classes, and create a validation set from different sources. Keep using saliency maps and slice-based evaluation to catch other spurious cues such as backgrounds or text.
Use filter methods (correlation, chi-square), wrapper methods (RFE), embedded methods (Lasso, tree importance) and domain knowledge, validating each choice with cross-validation.
16
What is the difference between iterators and iterables in Python?
An iterable can produce an iterator (it has __iter__); an iterator has __next__ and remembers its position. A for-loop calls iter() on the iterable and then next() repeatedly.
17
Write a scikit-learn ColumnTransformer that preprocesses numeric and categorical columns.
U-Net is an encoder-decoder network. The encoder downsamples to capture context, and the decoder upsamples back to full resolution to produce a per-pixel mask. Skip connections copy encoder feature maps to the matching decoder level, so fine spatial detail lost during downsampling is recovered. It works well with limited labelled data, which made it the standard for medical imaging and industrial defect segmentation, and it is also the backbone of many diffusion models.
Situation: a shelf-detection model plateaued at low accuracy. Task: find out why and fix it. Action: I reviewed 500 errors and found that a third were labelling mistakes, with inconsistent boxes for partly hidden products. I rewrote the guidelines with visual examples, had a second annotator review hard images and relabelled the worst batch. Result: mAP rose by 9 points without changing the model, and labelling rework dropped sharply.
21
You need to extract fields from scanned invoices that come in hundreds of different layouts. How would you design it?
Fixed templates will not scale to hundreds of layouts. Start with preprocessing: deskew, denoise and detect text regions. Run OCR to get words with their positions. Then use a layout-aware document model, or a vision-language model, to map words to fields like invoice number, GSTIN and total. Add validation rules, such as GSTIN format and line items summing to the total, and send low-confidence documents to human review.
22
What is the difference between one-hot, label and ordinal encoding?
One-hot encoding creates a binary column per category and suits nominal data like city for linear models. Label encoding maps categories to integers arbitrarily; it is fine for tree models but implies a false order for linear models. Ordinal encoding also uses integers but in a meaningful order, like low, medium, high mapped to 0, 1, 2. Choose based on whether categories have a natural order and which model you use.
23
What should you log for a production prediction service?
For each request, log a request ID, timestamp, model version, input features or a hash of them, the prediction and score, and latency. Log errors and fallback use separately. Do not log raw personal data unless needed and allowed; mask it. Aggregate these logs into dashboards for traffic, latency percentiles, error rate and score distribution. Joining logged predictions with later outcomes gives the data for monitoring and retraining.
24
Write a FastAPI endpoint that serves predictions from a saved scikit-learn model.
Situation: a team wanted an LLM to categorise transactions into 12 fixed categories. Task: recommend an approach. Action: I benchmarked an LLM against a gradient boosting model on labelled history, comparing accuracy, latency and cost per million records. The classic model matched accuracy at a fraction of the cost and ran in milliseconds. Result: we shipped it and used the LLM only for the few low-confidence cases.
26
What is stratified sampling in a train-test split?
Stratified splitting keeps the class proportions the same in the training and test sets. If 5 percent of customers churn, both sets will have about 5 percent churners. Without it, a small or imbalanced dataset can give a test set with very few positives and unstable metrics. In scikit-learn you pass stratify=y to train_test_split or use StratifiedKFold for cross-validation.
27
Write a Python function to split a long text into overlapping chunks by word count for a RAG index.
Discriminative models learn P(y given x) directly (logistic regression, SVM). Generative models learn the joint P(x, y) and can generate data (Naive Bayes, GANs).
30
Describe a production incident with a model and how you handled it.
Situation: one morning our recommendation model started showing the same five products to all users. Task: restore service and find the cause. Action: I rolled back to the previous model version within 20 minutes, then traced the issue to an upstream table that had arrived empty, so all user features were defaults. Result: we added data volume checks before scoring and a blameless postmortem. Rollback readiness saved us that day.
31
Most of your products sell zero units on most days, with occasional sales. Which forecasting approach suits this?
This is intermittent demand, and standard models like ARIMA forecast a small constant that is useless for stocking. Croston's method and its SBA variant forecast the size of non-zero demand and the interval between sales separately. Alternatives are aggregating to weekly level, or using a global gradient boosting model with Tweedie or Poisson loss. Evaluate with MAE or MASE, not MAPE, because zero actuals break percentage errors.
32
What do ACF and PACF plots tell you about a time series?
The ACF plot shows correlation between the series and its own lags, including indirect effects through intermediate lags. The PACF shows the correlation at each lag after removing the effect of shorter lags. For a stationary series, a PACF that cuts off after lag p suggests an AR(p) term, and an ACF that cuts off after lag q suggests an MA(q) term. Spikes at lag 7 or 12 reveal weekly or yearly seasonality.
33
Explain exponential smoothing and the Holt-Winters method.
Simple exponential smoothing forecasts with a weighted average of past values where weights decay exponentially, so recent points matter more. Holt's method adds a smoothed trend component. Holt-Winters adds a seasonal component as well, either additive or multiplicative. Each component has a smoothing parameter between 0 and 1 that is fitted to the data. These models are fast, easy to explain and strong baselines for retail and demand data.
34
Write Python code to compute the haversine distance between customer and store locations.
WITH rev AS (
SELECT category, product_id, SUM(price * qty) AS revenue
FROM order_items
GROUP BY category, product_id
), ranked AS (
SELECT *, ROW_NUMBER() OVER (PARTITION BY category ORDER BY revenue DESC) AS rn
FROM rev
)
SELECT category, product_id, revenue
FROM ranked
WHERE rn <= 3;
Covariance shows the direction of a relationship but depends on units. Correlation is covariance scaled to −1…+1, so it shows direction and strength and is unit-free.
37
What is the difference between probability and likelihood?
Probability fixes the parameters and asks how likely different data are, for example the chance of 7 heads in 10 tosses if the coin is fair. Likelihood fixes the observed data and asks how plausible different parameter values are, for example which coin bias best explains 7 heads. The likelihood function is not a probability distribution over parameters. Maximum likelihood estimation picks the parameter value that maximises it.
38
Write Python code that validates prediction requests with Pydantic before passing them to a model.
Because of the GIL, threads in CPython do not run Python bytecode in parallel. Threads are fine for I/O-bound work like calling APIs or reading many files. For CPU-bound work like feature computation on chunks, multiprocessing or joblib runs separate processes on separate cores. The cost is process start-up time and copying data between processes. Many NumPy and Pandas operations already release the GIL internally, so measure before adding complexity.
It normalises layer inputs per mini-batch and then rescales them, stabilising and speeding up training and allowing higher learning rates.
Tips to crack the BNY Data Science interview
Learn what custody and asset servicing mean, since these are core BNY businesses and often discussed with candidates.
Revise Java or Python, SQL, OOP and DBMS concepts, and practise easy to medium coding problems.
Prepare a clear explanation of your projects, highlighting testing, documentation and teamwork, which suit regulated banking environments.
Keep a one-minute story ready for every project on your CV: problem, your part, tools, result.
Practise the hard questions on this page aloud; BNY interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the BNY Data Science interview?
Candidates usually go through 4 stages: Online assessment (aptitude + coding); Technical interview; Managerial round; HR round. The exact rounds change with the role, team, location and your experience, so confirm the process with the recruiter.
Which topics should I prepare for the BNY Data Science interview?
This practice set leans on Python for Data Science (6), Computer Vision (5), MLOps and Model Deployment (5), Feature Engineering (5). Revise those first, then practise explaining one or two of your own projects end to end, because most BNY interviewers ask you to walk through real work.
Are these the exact questions asked at BNY?
No. These are curated practice questions that match the skills and difficulty usually tested in banking & finance interviews like BNY's. They are not a leaked or verified list of past questions.
Where does BNY hire Data Science professionals in India?
BNY has large teams in Pune, Chennai. Openings and locations change often, so check the BNY careers page and filter by city and experience.