MetaIntermediateGuide

The Algorithms Behind Meta Ads: Andromeda, GEM, Lattice, and How They Actually Fit Together (2026)

Meta ads is not one algorithm. It is a retrieval engine (Andromeda), a foundation model (GEM) that teaches hundreds of ranking models (Lattice, ARM), and an auction on top. Where each one sits, what each one reads from your account, and how to diagnose performance by stage.

Updated September 25, 202616 min read

"the algorithm changed" is the most common explanation for a meta account going sideways, and the least useful. meta ads is not one algorithm. it is a pipeline of at least four named systems, each reading different things from your account, each updated on its own schedule. this guide maps the whole stack so you can tell which layer is actually hurting you.


what the meta ads stack actually is

every time someone opens a feed, meta runs a multi-stage pipeline in well under a second. the stages, in order:

1. retrieval (andromeda). selects a few thousand candidate ads out of tens of millions of eligible ones. meta's own description: retrieval is "tasked with selecting ads from tens of millions of ad candidates into a few thousand relevant ad candidates" (meta engineering, december 2024). if your ad is not retrieved, nothing downstream ever sees it.

2. ranking (lattice, the adaptive ranking model, and hundreds of vertical models taught by gem). scores the few thousand candidates on how likely this specific person is to take your optimization action, right now, given everything they have already seen. ranking is where most of meta's ai investment since 2023 has gone.

3. auction. combines the ranking prediction with your bid and an ad quality term. meta's documented formula is total value = bid x estimated action rate + ad quality and relevance. the highest total value wins the impression, not the highest bid. for conversion campaigns, estimated action rate is effectively estimated click rate x estimated click-to-conversion rate.

4. delivery and pacing. learning phase, budget pacing, frequency caps. this is the only layer most 2022-era guides describe, and they describe it as if it were the whole system.

here is what most guides get wrong: they treat andromeda, gem, and lattice as three names for one "new algorithm." they are different systems at different stages with different inputs. the mapping:

systemstageannouncedwhat it reads from your account
andromedaretrievaldec 2024, full rollout oct 2025creative content (image, video, audio, copy), creative diversity, placement eligibility
latticeranking architecturemay 2023, still expanding surfaces in 2026conversion signal across all your objectives and surfaces jointly
gemfoundation model that teaches the ranking modelsrolled out 2025, detailed nov 2025long user event sequences across facebook and instagram, plus organic engagement
adaptive ranking model (arm)ranking runtimeinstagram q4 2025, expanding 2026user context and intent, to decide how much model to spend on a request
auctionbiddingalwaysbid, budget, bid strategy, estimated action rate, ad quality

the fundamental shift: from hundreds of small models to one brain teaching everything

before 2023: meta ran "hundreds of deep neural network models" that each optimized one objective on one surface (meta ai, may 2023). a purchase model for instagram feed. a lead model for facebook stories. each learned only from its own slice of data. your reels performance told the feed model nothing.

lattice (2023): consolidated those into one unified architecture, a "deep and hierarchical ensemble network model, built on top of a transformers backbone" with trillions of parameters trained across thousands of data domains. the point was joint learning across objectives and surfaces. meta reported roughly 8% ads quality improvement on instagram in testing, later restated as "increased ad quality by almost 12% and increased ad conversions by up to 6%" (meta for business, march 2025).

andromeda (2024): rebuilt the retrieval stage from scratch, because generative creative tools made the number of ads explode. meta said more than a million advertisers used its genai tools to create more than 15 million ads in a single month. retrieval had to get 10,000x more complex to handle it.

gem (2025): the big one. gem is "the largest foundation model for recommendation systems in the industry, trained at the scale of large language models" (meta engineering, november 2025). two things make it different from everything before:

  • it models sequences. it reads "sequences of up to thousands of events" per user across facebook and instagram, including organic engagement, and predicts what the right next ad is given everything already seen.
  • it does not serve ads directly. it is too expensive to run per request. instead it teaches "hundreds of user-facing vertical models" through a teacher-student setup meta says is 2x as effective as standard knowledge distillation. lattice-based rankers, the adaptive ranking model, and retrieval models are all students.

in plain english: gem learns what a conversion journey looks like across the whole platform, then pushes that knowledge down into every model that actually touches your ads. this is why meta describes it as "the central brain."

adaptive ranking model (2026): the serving trick that makes llm-scale ranking affordable. instead of running the same model for every request, arm routes each request to a heavier or lighter model based on "a person's context and intent" (meta engineering, march 2026). people who look likely to click and convert get the expensive model. everyone else gets the cheap one.

the shape of the whole thing: one foundation model at the top, learning from everything. below it, specialized models at each stage, refreshed by what the foundation model learned. the practical consequence is that your account is no longer evaluated one objective, one surface, one ad at a time. it is evaluated as a set of sequences across the whole platform.


what this broke in existing accounts

1. per-placement and per-objective optimization strategies

lattice and gem learn jointly across surfaces. excluding reels or stories "because they don't convert" now removes training data the ranking models were using to predict your feed conversions. meta's q4 2025 sequence-learning update explicitly added instagram organic engagement data to the ads model (meta newsroom, january 2026). accounts with heavily pruned placements got quieter signal at exactly the moment the model started needing more of it.

2. evaluating ads in isolation

gem optimizes sequences, not impressions. the question it answers is "what is the right next ad for this person," not "is this ad good." turning off a top-of-funnel ad because its own attributed roas looks weak can remove the first step of a sequence that was ending in purchases attributed to a different ad. this is the mechanism behind the 30 to 50% roas drops advertisers reported after aggressive pruning in late 2025.

3. thin conversion signal at the ranking stage

every ranking model is trained on optimization events. meta's learning-phase threshold is still roughly 50 optimization events per ad set within 7 days. below that, the vertical models serving your ads are working off noise. the arm change makes this worse: the heavy model is routed to high-intent users, so weak-signal ad sets lose precisely the auctions that were worth winning.

4. creative volume without creative difference

andromeda groups visually similar ads under shared entity ids at retrieval. twenty headline variations of one image compete as one candidate. this is a retrieval-stage failure, so no amount of bid or budget adjustment at the auction stage fixes it. see the andromeda guide for the full treatment.

5. performance shifts that match no announcement

gem teaches student models surface by surface. gem launched on reels first in 2025, the adaptive ranking model on instagram only in q4 2025, lattice's stories consolidation in q4 2025. an account can see instagram improve and facebook stall for a quarter with no visible change. practitioners kept looking for a setting that changed. nothing changed on their side. the models serving one surface got smarter before the models serving another.

6. benchmarks that age in months

meta scaled gem's training compute 4x in twelve months (meta engineering, august 2026) and now uses an autonomous agent to generate and test ranking-model changes, which it says produced a 5x increase in engineering output (meta engineering, march 2026). the ranking layer changes faster than any agency benchmark deck can be updated. a cpa target derived from h1 2025 data is describing a different system.


the data

all figures below are meta's own reported results unless noted. treat them as self-reported and directionally useful, not as controlled studies.

retrieval (andromeda), meta engineering, december 2024:

  • 10,000x increase in retrieval model complexity
  • +6% recall improvement in retrieval
  • +8% ads quality improvement on selected segments
  • over 100x improvement in feature extraction latency, over 3x inference throughput

ranking architecture (lattice), meta ai may 2023 and meta for business march 2025:

  • ~8% ads quality improvement on instagram in initial testing
  • later: almost 12% ad quality improvement and up to 6% conversion improvement
  • q4 2025: consolidating facebook stories surfaces into lattice, with backend improvements, produced a 12% increase in ads quality

foundation model (gem), meta engineering, november 2025:

  • 4x more efficient at driving ad performance gains for a given amount of data and compute
  • +5% ad conversions on instagram and +3% on facebook feed in q2 2025
  • 16x more gpus, 23x effective training flops, 1.43x model flops utilization
  • q3 2025: doubled the performance benefit per unit of data and compute

q4 2025 ranking update, meta newsroom, january 2026:

  • doubled gpus training the ads ranking model, new sequence-learning architecture
  • +3.5% ad clicks on facebook, over 1% conversion gain on instagram
  • new runtime model on instagram feed, stories, and reels: +3% conversion rate

adaptive ranking model, meta engineering, march 2026:

  • +3% ad conversions and +5% click-through rate for targeted users on instagram since q4 2025

multi-stage sequence architecture (llatte), meta engineering, august 2026:

  • +6% conversions on instagram, +3% conversions on facebook, +3.5% ad clicks on facebook
  • performance follows "a log-linear relationship with respect to compute," the same scaling law pattern as language models

what advertisers actually experienced (independent data):

  • confect.io analysis of 115.7 billion impressions, $834 million in spend, 3,014 advertisers across 73 countries in 2025: overall ecommerce roas down 7% post-andromeda, top-third performers down 31%
  • meta q2 2026 8-k filing: ad impressions +14% year over year, average price per ad +12% year over year, ad revenue $59.4 billion (sec.gov)

read those two rows together. meta's models are producing single-digit percentage lifts per quarter at the platform level. prices per ad are rising double digits per year. the platform-level gains are real, and they are being captured by meta and by the advertisers whose accounts feed the models well. everyone else pays more for the same or less.


what changed in 2026 specifically

january 2026: meta disclosed the q4 2025 ranking update: doubled training gpus, new sequence-learning architecture, instagram organic data feeding the ads model. also reported that advertisers using incremental attribution saw a 24% increase in conversions versus the standard attribution model, with the feature at a multi-billion-dollar annual run-rate seven months after launch.

march 2026: the adaptive ranking model was detailed publicly. it had been live on instagram since q4 2025 and is expanding to facebook feed, reels, and other surfaces through 2026. same month, meta published its ranking engineer agent, an autonomous system that proposes, trains, and evaluates ranking-model changes.

july 2026: meta published work on hierarchical interest representation for deep-funnel optimization (meta engineering, july 2026). the system processes "multimodal advertiser and product content" through llms to build interest tokens that feed gem, andromeda, and the adaptive ranking model. translation: your catalog, product descriptions, and landing page content are becoming ranking inputs, not just creative.

august 2026: two engineering posts. one on doubling gem's training efficiency and scaling training compute 4x in twelve months. one on the llatte multi-stage architecture: an offline user model that precomputes embeddings from thousands of user events, plus an online ranking model that adds fresh signals and the specific ad candidate at request time.

ongoing: meta ai chat interactions began feeding ad personalization on december 16, 2025 (eu and uk excluded). advantage+ shopping qualification dropped to 25 conversions per week from 50, per multiple 2026 industry roundups. the trend in every one of these changes is the same: more signal in, more compute on it, more of the decision made by the model rather than by your settings.


what actually works now

1. diagnose by stage, not by symptom

when performance drops, work out which layer is failing before touching anything.

  • impressions collapsed, cpms spiked, reach shrank: retrieval problem. look at creative count, creative similarity, placement eligibility.
  • impressions fine, ctr fine, conversion rate fell: ranking problem. look at optimization event volume, event match quality, conversion event choice.
  • impressions and conversions fine, cpa rose: auction problem. look at bid strategy, cost caps, competitive density in your vertical.
  • everything fine on one surface and broken on another: rollout timing. hold and measure for 14 days before rebuilding.

most accounts apply auction-layer fixes (bids, budgets) to retrieval-layer problems (creative). it never works.

2. feed the ranking layer dense, clean signal

the ranking models are only as good as the optimization events they train on. non-negotiables:

  • 50 or more optimization events per ad set per 7 days. if you cannot hit that, consolidate ad sets or temporarily optimize one step up the funnel.
  • event match quality at 6 or above, ideally 7 or above. capi with deduplication. see the meta attribution setup guide.
  • send real purchase values. value-based ranking is only possible if the value is there.
  • turn on incremental attribution where eligible. it is the ranking signal meta is actively steering toward.

3. stop pruning placements

cross-surface learning means every placement is training data for every other placement. run advantage+ placements. if a surface genuinely cannot convert for you (app-only product, region restriction), exclude it once and leave it. do not toggle placements weekly as a performance lever.

4. build sequences on purpose

gem is scoring "the right next ad." give it a sequence to work with inside one ad set: problem-aware hooks, product demos, proof and objection handling, offer. measure the ad set and the campaign, not individual ads. an ad with weak attributed roas that sits at the front of a converting sequence is doing its job.

5. give retrieval real diversity

this is the andromeda layer. 10 to 20 genuinely different creatives per ad set across format, hook, visual style, and messenger. headline swaps on one image count as one candidate. full details in the andromeda guide.

6. treat product and page content as model input

with hierarchical interest representation, meta runs your advertiser and product content through llms to build interest tokens. clean catalog titles, specific product descriptions, and landing pages that say what the product is and who it is for are now upstream of ranking. generic copy gives the model generic tokens.

7. judge changes on the model's clock

7 days minimum before evaluating any change. 14 days when a surface is behaving differently from the others, because that pattern usually means a staged rollout, not a problem in your account. if you change something and performance moves within 48 hours, you have not learned anything yet.


what to stop doing immediately

  • stop calling every performance change "the algorithm." name the stage.
  • stop excluding placements as a weekly optimization lever
  • stop killing top-of-funnel ads on their own attributed roas
  • stop running ad sets that cannot reach 50 optimization events a week
  • stop fixing retrieval problems with bid and budget changes
  • stop benchmarking against cpa targets set before q4 2025
  • stop treating catalog and landing page copy as a conversion-rate issue only. it is a ranking input now.

the orbit agent instructions

{
  "guide": "meta-ads-algorithm-stack-2026",
  "agent_tasks": {
    "classify_performance_drop_by_stage": {
      "check": "for any ad set with a week-over-week performance change above 20%, compare impressions, cpm, ctr, conversion rate, and cpa trends, then compare the same metrics per placement",
      "flag": "impressions down with cpm up (retrieval), ctr stable with conversion rate down (ranking), conversions stable with cpa up (auction), or one placement diverging while others hold (rollout)",
      "recommend": "name the failing stage to the user and only propose fixes at that stage: creative for retrieval, signal for ranking, bids for auction, wait 14 days for rollout"
    },
    "audit_optimization_event_density": {
      "check": "count optimization events per active ad set over the trailing 7 days",
      "flag": "fewer than 50 events in 7 days for any ad set that has been live more than 7 days",
      "recommend": "consolidate ad sets into one broad ad set or move the optimization event one step up-funnel until volume recovers"
    },
    "audit_placement_exclusions": {
      "check": "list ad sets using manual placements and which surfaces are excluded",
      "flag": "any ad set excluding reels, stories, or any full surface without a documented product or policy reason",
      "recommend": "switch to advantage+ placements so cross-surface learning has full training data"
    },
    "audit_funnel_sequence_coverage": {
      "check": "categorize active creatives in each ad set by funnel role: problem-aware hook, demo, proof or objection handling, offer",
      "flag": "any ad set with fewer than 8 active ads or with zero ads in any funnel role",
      "recommend": "add creatives to fill the missing role and evaluate at the ad set level, not per ad"
    },
    "audit_ranking_signal_quality": {
      "check": "pull event match quality per pixel or dataset, capi deduplication status, whether purchase values are sent, and whether incremental attribution is enabled where eligible",
      "flag": "emq below 6, missing deduplication, purchase events without values, incremental attribution available but off",
      "recommend": "fix capi and values first, then enable incremental attribution, before making any structural changes"
    },
    "monitor_surface_level_divergence": {
      "check": "weekly cpm, ctr, and conversion rate per placement for the last 4 weeks",
      "flag": "one surface moving more than 20% while the others move less than 5%",
      "recommend": "hold changes for 14 days, note the likely staged model rollout, and re-check before rebuilding anything"
    }
  }
}

the bottom line

meta ads is a pipeline: andromeda retrieves, gem teaches, lattice and the adaptive ranking model rank, the auction prices. each stage reads something different from your account. creative feeds retrieval. conversion signal feeds ranking. bids feed the auction.

the accounts winning in 2026 have stopped fighting the stack and started feeding it: diverse creative so retrieval can find them, dense clean signal so ranking can score them, and enough patience to let a staged rollout finish before they react.

name the stage. fix the stage. everything else is guessing.


built by orbit - the performance marketing intelligence layer. questions? jose@orbitllm.com