mlengineersalary.com
section 8.2 : vs SWE

In [36]: # vs_swe.ipynb

ML Engineer vs Software Engineer SalaryPremium math by level. Convergence at senior. When SWE pays more.

Abstract

ML engineers earn approximately 15 to 30 percent more than software engineers at L5 senior level at typical hyperscalers, with the premium widest at junior and principal levels and narrowest at senior IC level. Within software engineering, some specialisations (distributed systems, infrastructure, compilers, GPU systems) command compensation matching or exceeding ML engineer levels at top hyperscalers. The ML premium is largely about specialisation scarcity rather than an inherent superiority of ML over SWE; both fields contain high-compensation specialisations and lower-compensation generalist roles [1].

1 Bands from Levels.fyi, Hired State of Software Engineers, and Robert Half Technology Salary Guide, May 2026.

1.SWE vs MLE by level

table sw-1 : T2 hyperscaler bands

LevelGeneral SWE TCML engineer TCML premium
L3 / Junior$170k - $220k TC$200k - $290k TC+18% to +32%
L4 / Mid$220k - $300k TC$260k - $360k TC+18% to +20%
L5 / Senior$280k - $420k TC$290k - $450k TC+4% to +7%
L6 / Staff$400k - $620k TC$420k - $700k TC+5% to +13%
L7 / Principal$580k - $900k TC$650k - $1.2M TC+12% to +33%

Figure sw-1. T2 hyperscaler SWE vs MLE total compensation by level, May 2026. ML premium is the percentage difference between MLE midpoint and SWE midpoint at each level.

2.The convergence at L5

section sw-2 : substitutability

The ML vs SWE premium is highest at L3 junior level (18 to 32 percent) because the labour supply for ML-trained junior engineers is structurally constrained: few new graduates have meaningful hands-on ML experience, and ML-specific internship programs are competitive. Demand from AI organisations exceeds the junior ML supply, pushing equilibrium compensation up.

At L5 senior level, the premium narrows to 4 to 7 percent because the labour market for senior engineers is substantially more substitutable. A strong senior SWE can transition into ML engineering with 6 to 18 months of focused work, and many do. A strong ML engineer is necessarily also a strong SWE who additionally has ML expertise. The market views these candidates as close substitutes at the senior IC level, and equilibrium compensation reflects this.

At L6 staff and L7 principal levels, the premium widens again (12 to 33 percent at L7). The widening reflects two factors. First, staff and principal senior IC compensation is dominated by individuals with deep specialised expertise that is hard to substitute; for ML-focused staff and principal roles, the ML specialisation premium reasserts itself. Second, the post-2022 frontier-lab compensation inflation has been concentrated at the senior IC level (L6 and L7), so the comparison at these levels is shaped by the frontier-lab market more than the general hyperscaler market.

The implication for engineers earlier in career: the ML specialisation choice does not lock in a permanent compensation advantage; the L5 senior labour market is sufficiently liquid that staying general SWE through to senior level and specialising later is a viable strategy. The strongest compensation advantage comes from being early to a high-demand specialisation (LLM, RLHF, foundation-model engineering) rather than from being ML in general.

3.When SWE pays more than ML

section sw-3 : specialisation reversals

Several SWE specialisations command compensation matching or exceeding ML engineer compensation at top hyperscalers. Senior distributed systems engineers at hyperscaler infrastructure organisations (large-scale storage systems, container orchestration platforms, search infrastructure, ad-serving infrastructure) earn $300,000 to $500,000 total compensation at L5, comparable to or slightly above ML engineer L5 bands. Compilers engineers, kernel engineers, and GPU systems engineers earn similar premium compensation at their respective specialisation niches.

Security engineering is another high-compensation SWE specialisation. Senior security engineers at hyperscalers earn $280,000 to $470,000 total compensation at L5, comparable to ML engineer bands. The labour pool for hyperscaler-scale security engineering is tightly constrained (similar dynamic to ML, but for different reasons), supporting elevated compensation.

The implication: the general "ML pays more than SWE" framing is accurate as a generalisation but hides substantial within-SWE variance. Engineers comparing career choices should look at the specific sub-specialisation rather than at the general SWE vs MLE label. A senior generalist SWE earns less than a senior LLM engineer; a senior distributed systems engineer at a hyperscaler infrastructure org earns comparable to a senior ML engineer at the same employer. The compensation premium is about the specialisation, not the discipline label.

4.FAQ

section sw-4 : common questions

Do ML engineers earn more than software engineers?

Yes, on average, by 15 to 30 percent at L5 senior level at typical hyperscalers. The premium reflects two factors: ML engineering requires both software engineering skills and ML methodology expertise, which is a less common skill combination than SWE skills alone, so equilibrium compensation is higher. ML engineering is also concentrated in fast-growing AI organisations where compensation has inflated faster than other engineering specialisations since 2022. The premium narrows at the senior IC and staff levels and widens again at principal and frontier-lab levels where the ML specialisation premium is largest.

Why does the ML vs SWE premium narrow at the senior level?

At L3 junior level, the premium is largely about scarcity: relatively few new graduates have ML-specific training, so demand for ML-trained juniors exceeds supply. At L5 senior level, the premium narrows because the labour market for senior engineers is more substitutable: a strong senior SWE can transition into ML engineering with focused effort, and a strong ML engineer is a strong SWE who additionally has ML expertise. At L6 staff and L7 principal levels, the premium widens again because the staff and principal senior IC labour market is dominated by individuals with deep specialised expertise that is hard to substitute; for ML-focused staff and principal roles, the ML specialisation premium reasserts itself.

What about software engineer specialisations like distributed systems or infrastructure?

Some SWE specialisations actually exceed ML engineer compensation at the L5 to L7 levels. Senior distributed systems engineers at major hyperscaler infrastructure organisations (large-scale storage systems, container orchestration platforms, search infrastructure, ad-serving infrastructure) earn comparable or higher compensation than equivalent-level ML engineers, because the labour pool for hyperscaler-scale distributed systems work is also tightly constrained. Compilers engineers, kernel engineers, GPU systems engineers, and embedded systems engineers also command premium compensation at their respective specialisation niches. The general SWE-vs-MLE comparison hides substantial variance within both labels.

Are ML engineer jobs growing faster than SWE jobs?

Yes, substantially. BLS Occupational Outlook data shows data scientist (15-2051) employment growth projected at much higher rates than software developer (15-1252) employment growth through 2034, though both are positive. Industry hiring data from LinkedIn, Hired, and Robert Half shows ML-titled job postings growing 30 to 60 percent annually since 2022, while general SWE job posting growth is in the 5 to 15 percent range. The ML hiring growth has been concentrated at AI-focused employers (frontier labs, AI infrastructure unicorns, hyperscaler AI organisations) and represents the post-ChatGPT investment cycle response.

Can a software engineer transition to ML engineering?

Yes, with realistic effort. The most successful SWE-to-MLE transitions in 2024-2026 have been from senior backend or ML infrastructure engineers with strong distributed-systems backgrounds, who have invested 6 to 18 months building hands-on ML capability. Key resources include: foundational deep learning courses (fast.ai, Andrew Ng), modern LLM-era practical training (Hugging Face tutorials, deeplearning.ai short courses), hands-on projects (fine-tuning open-source models, building production RAG systems, contributing to open-source ML tooling), and ideally an internal pivot opportunity at the current employer if the company has an active ML organisation. First-job realistic placement after SWE-to-MLE transition is at applied ML engineering at a unicorn or hyperscaler; frontier-lab placement typically requires longer demonstrated track record.

Should I specialise in ML or stay general SWE for compensation maximisation?

Depends on personal interest and the specific specialisation alternative. ML specialisation provides a 15 to 30 percent compensation premium versus general SWE at hyperscalers, with the premium more pronounced at top-tier AI employers (frontier labs) and at specific sub-specialisations (LLM, RLHF, foundation-model engineering). General SWE provides broader employer optionality, lower exposure to AI-investment-cycle volatility, and access to infrastructure specialisations that match or exceed ML compensation at top hyperscalers. For engineers passionate about ML methodology, the specialisation premium plus the work-content alignment makes the choice clear. For engineers indifferent between ML and broader software engineering, the cost-benefit is closer.

Will the ML engineer premium persist?

The premium has likely peaked but the absolute compensation level is expected to remain elevated through 2026 to 2028. The 2022-2024 inflation cycle was driven by tight labour supply against rapidly growing demand. The 2025-2026 period has shown stabilising compensation rather than further rapid growth. The longer-run question is whether AI investment will continue at current levels (in which case the premium persists) or whether AI investment will normalise to pre-2022 levels (in which case the premium compresses gradually). Even in a compressed-premium scenario, ML engineering is unlikely to fall below general SWE compensation at hyperscalers; the structural skill-stack difference supports some persistent premium.

5.References

  1. Levels.fyi compensation data
  2. Hired State of Software Engineers Report
  3. Robert Half Technology Salary Guide
  4. BLS Occupational Outlook, Data Scientists
  5. BLS Occupational Outlook, Software Developers

Related sections

vs research scientist

The other major track comparison

vs data scientist

Adjacent role comparison

MLOps engineer salary

Platform-engineering-adjacent ML

LLM engineer salary

The specialisation with the largest premium

Career progression

L3 to L7 ladder context

DevOps salary

Sister site, infrastructure SWE comparison