← Stripe Interview Insights

Stripe·Machine Learning Engineer·Technical Phone Screen·Senior

Senior
May 2026

Summary

Stripe ML Engineer interview with a multi-task regression design question. The problem was well-scoped but had enough moving parts that it's easy to look shallow if you only hit the obvious points.

Questions Asked (1)

Q1

You're training a single model with a shared backbone and two regression heads. One target is always non-positive (e.g. ranging from -10,000 to 0) and the other is always non-negative (e.g. 0 to 50). How do you design the preprocessing and training objective? Walk through how you'd normalize each target, handle the sign constraint, combine the losses, and reverse the transforms at inference.

System DesignTechnical Trade-offsAlgorithms & Data Structures
Author's notes

This looked like a normalization question on the surface and I nearly treated it that way.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the business context and data distributions, then propose separate normalization for each target (e.g., min-max scaling for the non-positive target and standardization for the non-negative target). Use appropriate output activations (softplus for non-negative, negated softplus for non-positive) and combine losses with uncertainty-based weighting. Finally, describe how to invert the transforms at inference to produce predictions in the original units.

Pro tip: Mention that you would monitor per-task loss scales during training and dynamically adjust weights (e.g., using uncertainty weighting) to prevent one task from dominating, and always validate that the inverse transforms are correctly applied to avoid off-by-a-sign errors.

1. Clarify requirements and data

Ask about the business meaning of each target, their distributions, and whether the sign constraints are strict or just observed. Confirm if the ranges are fixed or can vary.

2. Normalize each target separately

For the non-positive target, shift and scale to a symmetric range (e.g., divide by 10,000 to get [-1,0] or use min-max to [-1,0]). For the non-negative target, standardize or min-max scale to [0,1] or [-1,1].

3. Design output layers with sign constraints

Use a softplus activation for the non-negative head and a negated softplus for the non-positive head, ensuring outputs respect the sign. Alternatively, predict in unconstrained space and apply the constraint via a transformation.

4. Combine losses with appropriate weighting

Use a weighted sum of losses (e.g., MSE or Huber) on the normalized targets. Consider uncertainty-based weighting (Kendall et al.) or dynamic weight adjustment to balance tasks.

5. Invert transforms at inference

Reverse the normalization (e.g., multiply by 10,000 and negate for the non-positive target; inverse standardize for the non-negative target) to produce predictions in the original units.

Key Points to Mention

  • Separate normalization for each target due to different scales and signs
  • Use of softplus and negated softplus activations to enforce sign constraints
  • Loss combination strategies: fixed weights, uncertainty weighting, or GradNorm
  • Importance of reversing normalization at inference to maintain interpretability
  • Potential need for clipping or bounding to avoid extreme predictions
  • Monitoring per-task loss and gradient norms to ensure balanced training

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.