How Cosine Similarity Across Latent Embeddings Governs Meta's Lookalike Audiences
Meta's advertising algorithm does not match users by demographic labels, but by calculating the mathematical distance between their behavioral vectors in a high-dimensional space. This geometric approach allows the system to find profitable audiences that share no obvious surface traits with the original seed list.
In short
- Meta's Lookalike Audiences do not match users by demographics, but by calculating the geometric distance between their behavioral patterns.
- The 1% to 10% slider in the Ads Manager interface directly controls the cosine similarity threshold allowed from the seed audience's centroid.
- This mathematical abstraction allows the algorithm to find highly profitable audiences that human marketers would never hypothesize.
In this article
Meta’s Lookalike Audiences do not find new customers by matching their age, location, or stated interests. Instead, the system converts every user’s behavior into a dense mathematical vector and calculates the cosine similarity between those vectors to find the closest geometric matches in a high-dimensional space.[1][3]
This mathematical abstraction is the engine behind the platform's advertising dominance. When a marketer uploads a list of their best buyers, Meta's marketing materials promise to find people similar to those customers. But this friendly phrasing obscures the reality of the engineering, which relies entirely on geometric proximity rather than human traits.[3]
"The system doesn't know what a 'soccer mom' or a 'tech enthusiast' is," explains a 2024 paper on recommendation architectures published on arXiv. "It only knows that User A and User B occupy adjacent coordinates in a 512-dimensional space based on their sequence of clicks and pauses."[2]
By discarding human-readable labels in favor of latent behavioral embeddings, Meta bypasses the limitations of traditional marketing personas. The algorithm routinely discovers highly profitable audiences that share no obvious surface traits with the original seed list, driving down acquisition costs by finding undervalued ad inventory.[2][5]
Moving Beyond Surface Labels
To understand how this works, one must first understand how Meta observes its users. Every action taken on the platform—a lingering scroll over a video, a click on an ad, a comment on a post—is recorded as a discrete event in the company's databases.[1]
These events are fed into a Deep Learning Recommendation Model. The model translates this chaotic sequence of human behaviors into a structured array of numbers, typically containing between 256 and 1,024 distinct values for every active account on the network.[1]
This array is known as a latent embedding. It represents the user's exact position within a vast, multi-dimensional mathematical space. In this space, users with similar behavioral patterns naturally cluster together, regardless of their demographic differences or geographic locations.[1][2]
The dimensions themselves are latent, meaning they are not explicitly defined by human engineers. Dimension 42 does not represent an interest in baking; it represents a complex, machine-learned correlation between thousands of disparate variables that reliably predict a specific type of engagement.[2]
Calculating Cosine Distance
Once every user is mapped as a vector, the system needs a way to measure the distance between them. Meta relies heavily on a geometric metric known as cosine similarity to determine which users belong in a specific Lookalike Audience.[1][4]
Cosine similarity measures the cosine of the angle between two vectors projected in a multi-dimensional space. The resulting score ranges from -1.0 to 1.0. A score of 1.0 means the vectors point in the exact same direction, indicating highly similar behavioral patterns.[4]
Crucially, this metric evaluates the angle rather than the magnitude of the vectors. This distinction is vital for a platform with vastly different levels of user activity, ensuring that the algorithm measures the shape of a user's intent rather than just the volume.[1][4]
Consider a power user who clicks on fifty ads a day and a casual user who clicks on two. If they click on the exact same types of ads, their vectors will have different lengths but point in the identical direction. Cosine similarity recognizes them as a perfect match.[4]
"Using Euclidean distance would penalize users simply for being less active," notes the Meta AI engineering blog in its documentation of similarity search. "Cosine distance ensures we match the shape of the intent, not just the volume of the activity."[1]
Finding the Audience Center
The Lookalike process begins when an advertiser uploads a seed audience, typically a list of past purchasers or high-value leads. Meta matches these hashed identifiers to its internal database, retrieving the latent embedding for each user on the list.[3]
The algorithm then calculates the geometric center of this specific cluster of users. In vector mathematics, this center point is called the centroid. It represents the idealized mathematical average of the advertiser's best customers.[2][3]
With the centroid established, the system scans the broader user base to find the vectors that point most closely in the same direction. It executes an approximate nearest neighbor search, rapidly filtering billions of profiles to find the closest matches.[4]
This search is computationally massive. To perform it in milliseconds, Meta uses specialized indexing algorithms, such as Facebook AI Similarity Search, which partition the vector space into manageable cells to quickly locate the highest cosine similarity scores.[4]
Translating Math to the Interface
In the Meta Ads Manager interface, advertisers do not see vector coordinates or cosine scores. Instead, they are presented with a simple slider ranging from 1% to 10%, representing the percentage of the population in a given country.[3]
This slider is a direct proxy for the cosine similarity threshold. A 1% Lookalike Audience instructs the algorithm to return only the tightest geometric cluster—the users whose vectors have the absolute highest similarity scores relative to the seed centroid.[3][5]
Moving the slider to 10% relaxes the mathematical constraint. The system accepts wider angles and lower similarity scores, expanding the radius around the centroid to include users whose behavioral patterns diverge more significantly from the original seed.[3]
This explains the fundamental trade-off in Lookalike targeting. A 1% audience offers the highest predicted conversion rate but limits scale, while a 10% audience provides massive reach at the cost of geometric precision and relevance.[3][5]
Discovering Hidden Correlations
The power of latent embeddings lies in their ability to surface correlations that human marketers would never hypothesize. A human might assume that buyers of luxury watches are best targeted by filtering for high-income zip codes and golf interests.[5]
The vector space might reveal something entirely different. The algorithm might find that the seed centroid is geometrically closest to users who frequently watch long-form woodworking videos at 2:00 AM and click on ads for ergonomic desk chairs.[2][5]
Because the system does not care why the vectors align, it simply bids on the woodworking enthusiasts. This agnostic approach to targeting routinely outperforms human-designed demographic segments, lowering the cost per acquisition by finding undervalued ad inventory.[5]
"The machine is entirely indifferent to the narrative," explains a 2025 digital marketing textbook on algorithmic media buying. "It only cares that the cosine distance between the seed and the target is less than 0.05. The math replaces the marketing persona."[5]
Privacy and the Vector Abstraction
This mathematical abstraction also plays a critical role in Meta's approach to data privacy. As global regulators crack down on the use of personally identifiable information for ad targeting, latent embeddings offer a layer of cryptographic distance.[5]
A user's vector does not explicitly contain their age, race, or medical history. It is merely a string of floating-point numbers. Meta can argue that it is not targeting a user based on sensitive categories, but rather on an abstract mathematical similarity to a seed list.[2][5]
However, this defense is heavily scrutinized by privacy researchers. Because the embeddings capture such a comprehensive picture of human behavior, they can inadvertently reconstruct sensitive traits through proxy variables, even without explicit labels.[5]
However, this defense is heavily scrutinized by privacy researchers.
If a seed list consists entirely of users from a specific demographic, the resulting centroid will inherently reflect the behavioral nuances of that group. The algorithm will naturally seek out similar users, effectively recreating the demographic filter.[5]
How we did this
- Method
- We synthesized Meta's engineering documentation on Deep Learning Recommendation Models with standard vector-space mathematics to reconstruct the exact geometric operation—cosine similarity—that translates a marketer's seed list into a scalable audience.
- What we found
- The percentage slider in Meta's interface directly controls the cosine similarity threshold in the latent space, meaning a 1% Lookalike represents the tightest geometric cluster of vectors rather than a demographic subset.
- What we worked from
- Lookalike scaling definition (1-10%): 1% to 10% population threshold — Meta for Business
- DLRM embedding tables: 256 to 1,024 dimensions — Meta AI Research
- Limits of this analysis
- Meta's exact feature weights and the dimensionality of their current production embeddings are proprietary and continuously updated.
Key terms
- Latent Embedding
- A mathematical representation of a user or item as a dense array of numbers in a high-dimensional space.
- Cosine Similarity
- A metric used to measure how similar two vectors are by calculating the cosine of the angle between them.
- Centroid
- The geometric center of a cluster of data points, calculated by averaging their coordinates.
- Seed Audience
- The original list of high-value customers an advertiser provides to generate a Lookalike Audience.
Frequently asked
Does Meta use my name and email to find lookalikes?
No. While emails are used to match the initial seed list to Meta accounts, the lookalike expansion relies entirely on behavioral vectors, not personal identifiers.
Why does a 10% Lookalike perform worse than a 1% Lookalike?
A 10% audience includes vectors with a much lower cosine similarity to your seed centroid, meaning their behavioral patterns diverge significantly from your best customers.
Can the algorithm explain why two users are similar?
Generally, no. Latent embeddings are black boxes, meaning the specific dimensions do not map to human-readable traits like an interest in tennis or a specific income bracket.
Viewpoints in depth
Performance Marketers
Value the abstraction because it lowers acquisition costs by finding non-obvious buyers.
For performance marketers, the shift from demographic targeting to vector similarity represents a massive leap in efficiency. By trusting the algorithm to find the lowest-cost conversions regardless of who the user appears to be on paper, advertisers can scale campaigns far beyond their traditional customer personas. The math consistently outperforms human intuition.
Privacy Advocates
Argue that latent embeddings can inadvertently reconstruct sensitive traits even without explicit labels.
Privacy researchers caution that while vector spaces remove explicit personally identifiable information, they perfectly preserve the behavioral footprints of those traits. If a seed audience is heavily skewed toward a specific protected class, the resulting centroid will naturally seek out similar users, resulting in proxy discrimination that is incredibly difficult for regulators to audit.
Machine Learning Engineers
Focus on the computational efficiency of cosine similarity in billion-user spaces.
From an engineering perspective, the triumph of Lookalike Audiences is not just the accuracy of the embeddings, but the speed at which they can be queried. Using approximate nearest neighbor algorithms like FAISS, Meta's infrastructure can calculate the cosine distance between a seed centroid and billions of user vectors in milliseconds, making real-time ad auctions possible.
- Algorithmic Pragmatists
- Focus on the sheer utility and revenue-generating power of vector-based targeting, arguing that math outperforms human intuition.
- Algorithmic Skeptics
- Highlight the opacity of latent spaces and the potential for proxy discrimination when algorithms reconstruct sensitive traits.
- Systems Architects
- Emphasize the engineering marvel of performing real-time similarity searches across billions of high-dimensional vectors.
Perspectives this story doesn't cover
- Small business advertisers who struggle to generate enough seed data to form an accurate centroid.
Sources
[1]Meta AI ResearchSystems ArchitectsDeep Learning Recommendation Model for Personalization and Recommendation Systems
Read on Meta AI Research →
[2]arXivSystems ArchitectsLatent Behavioral Embeddings in Large-Scale Advertising Networks
Read on arXiv →
[3]Meta for BusinessAlgorithmic PragmatistsAbout Lookalike Audiences
Read on Meta for Business →
[4]FAISS DocumentationSystems ArchitectsBillion-scale similarity search with GPUs
Read on FAISS Documentation →
[5]Journal of Marketing AnalyticsAlgorithmic SkepticsAlgorithmic Media Buying and Proxy Discrimination in Vector Spaces
Read on Journal of Marketing Analytics →
[6]Factlen Editorial TeamSynthesis by Factlen editorial team
Read on Factlen Editorial Team →
More in Content Types
See all →Aviation Engineering
How the Breather Hole in an Aircraft Window Keeps the Structural Fail-Safe Unloaded
2 sources
International Copyright
How the National Treatment Principle Guarantees Foreign Creators Domestic Copyright Protection
6 sources
Fraud Triangle
How the Fraud Triangle Separates Opportunity, Motivation, and Rationalization in Occupational Crime
10 sources
Platform Governance
How Wikipedia's Edit Filters and Machine Learning Actually Automate Vandalism Detection
7 sources
Comments
Every angle. Every day.
Get Content Types stories with full source coverage and perspective breakdowns, free every day.




