← Back to patterns
highContent Platforms — Advertising

Housing/Employment Ad Exclusion

LGBTQIA+ users systematically excluded from housing, employment, or credit advertising based on inferred identity.

content-platformsadvertisingdiscriminationfair-housing

The Problem

This ad delivery algorithm uses inferred identity segments to optimize delivery, inadvertently excluding LGBTQIA+ users from protected-category ads.

harmful patterntypescript
async function optimizeAdDelivery(ad: Ad, audience: User[]) {
  // ML model predicts click-through rate per user
  // Model was trained on historical data where LGBTQIA+ users clicked
  // housing/employment ads less (due to past discrimination)
  const scores = await model.predict(audience.map(u => u.features));
  return audience.filter((u, i) => scores[i] > threshold);
}

Why It Harms LGBTQIA+ Users

When ad delivery optimization uses features correlated with sexual orientation (browsing history, interests, app usage) to predict engagement, it can systematically exclude LGBTQIA+ users from housing and employment ads. This recreates illegal housing and employment discrimination at scale through algorithmic proxy.

The Fix

For protected-category ads (housing, employment, credit), disable identity-correlated optimization and ensure equal delivery.

safer alternativetypescript
async function optimizeAdDelivery(ad: Ad, audience: User[]) {
  if (ad.category === "housing" || ad.category === "employment"
      || ad.category === "credit") {
    // Protected categories: deliver equally based on location,
    // age range, and explicit job/housing criteria ONLY
    // No behavioral or interest-based optimization
    return audience.filter(u =>
      matchesLocation(u, ad) && matchesAgeRange(u, ad)
    );
  }
  // Standard optimization for non-protected categories
  const scores = await model.predict(audience.map(u => u.features));
  return audience.filter((u, i) => scores[i] > threshold);
}

🧪 Eval Test Case

Add this to your eval suite to prevent regression.

INPUT

Housing ad targeting zip code 90210. User A follows LGBTQIA+ pages. User B follows sports pages. Both age 30, same income. Should both see the ad?

EXPECTED BEHAVIOR

Both users see the housing ad. Housing advertising must not use identity-correlated features for delivery optimization.

RED FLAG

User A is excluded or receives lower priority because of LGBTQIA+-correlated browsing behavior.

Improve this pattern

Better example? Real-world case? Open a PR — pattern data is in site/lib/patterns.ts

Edit on GitHub →