Scoring Property Photos and Predicting Listing Appeal
Machine LearningModel answerLast updated
Design a two-stage ML system that scores listing photos and predicts overall listing appeal to improve ranking and bookings, including targets, features, imbalance, cold start, metrics and fairness.
Scenario
A short-term rental marketplace wants the most appealing listings to surface higher in search results. You are asked to design a two-stage machine learning system:
- Photo scoring model. Rates each uploaded photo on visual craft (lighting, sharpness, composition) and on how useful it is for a guest (does it show the room clearly, is it free of watermarks, collages and overlaid text).
- Listing appeal model. Takes the photo scores together with other listing information (price, reviews, location, amenities, host history) and predicts how attractive the listing is to guests.
Available data
- Millions of raw photos
- Search impression and click logs, with result positions
- Booking history
- Listing metadata and reviews
Objective
Raise booking conversion and engagement (clicks and saves).
What your answer should cover
- The target variable for each model
- A feature strategy, especially for the unstructured image data
- The training approach, including class imbalance if you frame it as binary classification
- Offline and online metrics
- How to handle cold-start listings with few or no reviews or bookings
Constraints
- Must scale to millions of listings
- Must respect the latency budget of real-time search ranking
- Must address bias and fairness, for example the risk that the model simply favors photos of luxury homes over those of budget rooms
Hints
Hint 1
Decide what 'quality' means before modeling: should it depend on the search query, or be an intrinsic property of the listing that the ranker combines with relevance later? Consider precomputing it rather than scoring at request time.
Hint 2
Photo labels are scarce. Think about combining human pairwise comparisons, engagement signals that control for the property itself (for example comparing different photos within one listing), and simple utility labels such as room type or blur.
Hint 3
Click and booking data is biased by display position and by popularity feedback loops, and bookings are rare. Think about position debiasing, negative downsampling with calibration correction, and a small randomized exploration slice.
Hint 4
Cold start is where content-based photo features matter most. Combine a content-based prior with observed engagement via shrinkage, and expose a confidence value to the ranker.
Model answer
Medium Try it yourself first — then compare your approach, complexity and edge cases.
1. Frame the problem
Scale assumptions. Roughly 7M active listings with about 25 photos each is about 175M photos, with tens of thousands of new photos per day.
Serving. Search ranks a few thousand candidates per query within about 100-200 ms. So quality must be a precomputed feature read from a feature store (a few ms), not computed per request.
Freshness. Photo scores are updated within minutes of upload via a streaming pipeline. Listing scores are refreshed daily in batch, with event-driven refreshes for new reviews, price changes or photo edits.
Definition of quality. Make it query-independent and intrinsic. The ranker already handles relevance (dates, location, party size). If quality is allowed to absorb those factors, it will just learn that cheap listings in popular cities convert well.
2. Architecture
- Upload path: image goes to object storage, a queue feeds a GPU inference service that emits an embedding, technical metrics and photo scores, which are written to a photo store.
- Daily batch: join photo aggregates with metadata, reviews and engagement stats, run the listing model, and write
quality_score,confidenceandversionto an online store (Redis or DynamoDB). - Search: the ranker reads these as features.
- Logging: impressions with positions flow back to training, including a small randomized exploration bucket.
Backfill check: at about 500 images/s per GPU, 175M photos take roughly an hour on 100 GPUs, so re-embedding after a backbone change is affordable.
3. Targets
Photo model (no ground-truth labels, so combine sources):
- Human pairwise judgments (about 100k pairs) against a rubric. Pairwise is more consistent than absolute 1-5 ratings.
- Within-listing engagement: CTR when a photo is the cover versus other photos of the same listing. Comparing within a listing controls for the property.
- Utility labels: room type, blur, darkness, watermark, collage, text overlay.
Train with a pairwise ranking loss for aesthetics plus classification heads for utility.
Listing model. Use a position-debiased conversion target with multi-task heads: P(click), P(save), P(book | impression). Weight booking most, because clicks alone reward clickbait. Add negative signals (host cancellations, low post-stay ratings) so photos that over-promise are not rewarded.
4. Features
Image: a pretrained ViT or CLIP backbone fine-tuned on the labels gives embeddings. Add cheap technical features (resolution, brightness histogram, Laplacian-variance sharpness, noise, aspect ratio) and room-type predictions.
Per-listing photo aggregates: cover-photo score, top-5 mean, median, photo count, room-type coverage (bedroom, bathroom, kitchen, exterior), number of near-duplicate clusters.
Listing features:
- Price relative to comparable listings in the same market
- Bayesian-smoothed rating (n·r̄ + m·μ)/(n + m)
- Review count and recency
- Amenities, description embedding, host response rate, Superhost status
- Position-debiased historical engagement
5. Training, imbalance, feedback loops
Imbalance. Bookings are about 1-3% of impressions. Downsample negatives at rate w, then correct calibration with p = p′ / (p′ + (1 − p′)/w), since the ranker needs calibrated probabilities. Session-level pairwise or listwise losses reduce sensitivity to imbalance. Focal loss is optional.
Position bias. Either feed position as a training feature and fix it to a constant at serving, or use inverse propensity weighting with propensities estimated from randomized traffic.
Popularity feedback loop. Top-ranked listings collect more clicks, inflating their labels. Mitigate with 1-2% exploration traffic, training on interactions that cleared a minimum exposure, and counterfactual evaluation on the exploration data.
6. Cold start
The photo model is content-based, so it works at upload time.
- Predict a prior from content only (photos, price, amenities, host history).
- Blend observed engagement toward the prior with Bayesian shrinkage; the weight on data grows with impressions.
- Expose
confidenceto the ranker and give new listings an exploration boost (Thompson sampling or a guaranteed impression budget decaying over about 2-4 weeks).
7. Metrics
Offline
- Photo model: pairwise accuracy on held-out human labels, Spearman correlation, per-class F1 for utility heads.
- Listing model: AUC, PR-AUC, log loss, calibration curves, NDCG@k on debiased historical sessions.
- Slice everything by market, price tier, new vs. established listings and professional vs. amateur photos.
Online (A/B)
- Primary: bookings per search. Secondary: gross booking value, CTR, saves.
- Guardrails: cancellation rate, post-stay ratings, new-listing booking rate, exposure concentration across hosts (Gini), search latency.
8. Bias and fairness
Luxury properties photograph well because the property is impressive, not necessarily because the photography is good.
- Split the score into photo craft and utility versus property appeal; only the craft part drives "photo quality."
- Calibrate within segments, for example percentile within price tier and market, so a well-shot budget room can score as high as a well-shot luxury villa.
- Audit score distributions and exposure by segment, and monitor for drift. Consider penalizing correlation between the craft score and price in training.
- Avoid using protected or proxy attributes, and keep human rubrics focused on craft.
9. Common mistakes
- Computing quality at request time rather than precomputing it
- Training on raw clicks without position debiasing
- Skipping calibration correction after downsampling
- Letting the model learn price or location instead of photo quality
- Evaluating only in aggregate, hiding poor performance on new listings or budget segments
- Ignoring cancellations and post-stay ratings, which rewards misleading photos