NextFin News - China's technology giants just handed investors the clearest evidence yet that the artificial-intelligence boom is becoming a margin story, not just a revenue story. Baidu's second-quarter net income fell to RMB2.3 billion as its advertising business contracted 19% and AI infrastructure spending climbed, sending its Nasdaq-listed shares down 12.7% on August 18. Hours later, Xiaomi reported adjusted profit of RMB6.2 billion, a 42.6% year-over-year collapse driven by soaring memory-chip costs - yet its Hong Kong shares closed 1.16% higher, buoyed by electric-vehicle deliveries that jumped 28.2%. Together, the two results frame the central tension now pressing on Chinese tech: growth is arriving, but the bill for it is arriving faster.
The Quarter in Two Numbers
Baidu's second quarter was a tale of two businesses moving in opposite directions. Total revenue slipped 4% year over year to RMB31.3 billion, missing the roughly RMB32.0 billion consensus tracked ahead of the print. The drag was familiar: online marketing revenue, the legacy advertising engine that once funded everything else, fell 19% to RMB13.1 billion. But the offset was no longer a rounding item. Revenue from Baidu Core's AI-powered Business rose 25% to RMB12.5 billion, now accounting for half of Baidu General Business revenue. Within it, AI Cloud Infra grew 50% to RMB7.3 billion, and GPU Cloud - the public-compute layer riding the generative-AI wave - surged 283%, accelerating from 184% growth in the prior quarter.
The market's verdict was unforgiving. Baidu's ADR closed at $90.87, a 12.73% decline, after falling as much as 9.34% in premarket trading. The sell-off reflects more than a single-quarter miss: net income attributable to Baidu came in at just RMB2.3 billion, a 7% net margin, while other income dropped to RMB184 million from RMB4.9 billion a year earlier as fair-value gains on long-term investments dried up. Cost of revenue rose 4% year over year to RMB19.1 billion, driven explicitly by AI Cloud business costs, even as total revenue fell 4%. In plain terms: Baidu spent more to make less - for now.
Xiaomi's numbers tell a parallel story with a different ending. Revenue fell 6.1% year over year to RMB108.9 billion - the second straight quarterly contraction - while adjusted net profit slumped 42.6% to RMB6.2 billion, the third consecutive quarterly decline in profitability. Reported net profit fell 20.3% to RMB9.5 billion. The culprit sat squarely in the smartphone supply chain. On the earnings call, the company's finance chief was explicit about the pressure:
The continued significant increase in memory cost has had an overall impact on the smartphone industry.
Xiaomi's smartphone gross margin compressed to 8.5%, down from 9.3% for the first half of 2026, even as the company pushed average selling prices to a record high and shifted its mix toward premium models, where high-end phones accounted for a record 32.1% of its mainland China smartphone sales in the quarter.
Yet Xiaomi's shares rose 1.16% to HK$26.18. The divergence from Baidu's rout is the story's sharpest hook: investors rewarded Xiaomi because its electric-vehicle business delivered 104,199 units in the quarter, up 28.2% year over year, generating RMB24.9 billion in revenue from the Smart EV, AI and new-initiatives segment - a 17.1% increase that partly absorbed the smartphone shock. Smartphone shipments, by contrast, fell 26% year over year to 31.2 million units, the steepest decline among the top five global vendors.
The combination matters. Two of China's most visible tech names reported on the same day. Both saw profits slide. Both cited the same macro force - the rising cost of compute, whether in memory chips for handsets or AI infrastructure for the cloud. And both are now spending heavily to stay in the race: Xiaomi's R&D climbed 18.9% year over year to RMB9.2 billion, with AI-related investments accounting for nearly 30% of first-half spending, while Baidu's R&D stood at RMB4.6 billion as it continued to fund its AI build-out. This is not an isolated China story. Across the sector, capital intensity is becoming the price of admission: Alibaba has pledged more than $53 billion in AI investment over several years, and Tencent said it plans to at least double spending to more than $5.2 billion in 2026. The question is no longer whether Chinese tech can grow. It is whether that growth can remain profitable once the AI and chip bills are paid.
The AI Bill Comes Due
Baidu's quarter exposes the mechanics of a company mid-transition. For years, the investment case rested on a simple arbitrage: use high-margin search advertising to fund AI research until the AI businesses could stand on their own. That arbitrage is now under pressure from both sides.
The advertising side is weakening structurally, not cyclically. Online marketing revenue's 19% decline is not a one-quarter blip tied to the macro; it reflects a sustained migration of advertiser budgets toward short-video platforms and AI-native commerce channels where Baidu is a follower, not a leader. The business that generated the cash is now shrinking at a double-digit pace - and it is the same business that must fund the build-out.
On the AI side, growth is real but capital-intensive. GPU Cloud revenue up 283% sounds like the kind of number that should lift a stock. But GPU compute is a low-margin, capex-heavy business: Baidu must buy or build the accelerators, power the data centers, and depreciate the hardware, all before software monetization catches up. The margin profile of a cloud-compute dollar is simply not the margin profile of a search-ad dollar. As the revenue mix shifts from one to the other, reported margins compress even if execution is flawless.
Management's defense is that operating cash flow remained positive for a fourth consecutive quarter at RMB3.4 billion, and that the company has returned $259 million to shareholders through buybacks since the start of the first quarter. Those are signs of discipline. They do not change the direction of the margin bridge. Non-GAAP operating income was RMB3.8 billion, a 12% non-GAAP operating margin - down from the 15% to 17% range the company has guided investors to expect in healthier quarters. Baidu's chief executive, Robin Li, acknowledged the pressure while framing it as the cost of a deliberate pivot: "While our online marketing business remains under pressure, the growing momentum in our core AI-powered Business reaffirms Baidu's transition from an internet-centric company to an AI-first company." The transition is real. The margin cost of it is now visible.
The Memory Squeeze
Xiaomi's problem has a name and a price ticker. Memory is a commodity cycle, and this cycle has been ferocious. TrendForce data put first-quarter DRAM contract-price increases at 90% to 95% quarter over quarter, with second-quarter gains of 50% to 60%. Samsung reportedly raised its DRAM average selling price more than 90% in the first quarter and is now negotiating a third consecutive increase of up to 20% for the third quarter, with LPDDR - the memory variant used in phones - potentially facing even steeper hikes. For a handset maker running an 8.5% gross margin, a component whose price doubles inside six months is not a headwind; it is an existential math problem.
The transmission mechanism is direct and brutal. A smartphone's bill of materials is dominated by memory and displays. When DRAM and NAND prices double, a handset maker with single-digit gross margin has almost no room to absorb the hit. Xiaomi did the only things available: it raised prices, which pushed smartphone average selling prices to a record high, and it shifted its product mix toward premium models. That mitigation bought time, not relief. Smartphone gross margin still fell to 8.5%, and shipments dropped 26% year over year. The company is caught in a classic cost-push bind: raise prices and lose volume, hold prices and lose margin. It chose a bit of both.
The critical difference from Baidu is that Xiaomi's cost pressure is externally priced and visibly cyclical. Memory is a traded commodity with a well-documented cycle. And there are early signs the peak growth rate is in: TrendForce projects conventional DRAM contract prices rising 13% to 18% quarter over quarter in the third quarter of 2026, with NAND up 10% to 15% - substantial increases, but a marked deceleration from the blistering pace of the first half. Weaker consumer demand and tougher year-over-year comparisons are expected to moderate the increases further. If that holds, Xiaomi's margin compression has a visible exit ramp.
Cyclical Wave Meets Structural Shift
Here is the call that determines how an investor should read these two earnings reports: the memory squeeze is cyclical; the AI margin squeeze is structural. They are hitting at the same time, which is why the headlines look similar, but they will not resolve the same way.
The evidence for the cyclical read on memory is straightforward. Commodity cycles mean-revert because high prices destroy demand and pull in supply. Notebook and smartphone vendors are already cutting production plans as costs feed through to retail prices - Gartner projected in February that the combined rise in DRAM and SSD costs would push average smartphone prices up 13% versus 2025, in what it called the steepest device-shipment contraction in over a decade. Three historical cycles anchor the call: the 2017-2018 DRAM supercycle, which saw contract prices more than double before collapsing over the following eighteen months; the 2021-2022 shortage, which normalized within four quarters once consumer demand rolled over; and the 2023 trough, which bottomed as inventory cleared. Each followed the same sequence - price spike, demand destruction, capacity response, normalization. The current cycle is in the demand-destruction phase.
The AI capex cycle is different. It is a regime shift in the industry's cost base that will not revert on its own. Once a search engine, a cloud provider, or a handset ecosystem commits to AI features as table stakes, the spending does not come back out. The models must be retrained, the inference capacity must scale with usage, and the talent must be retained. This is not inventory that can be worked down; it is a new fixed-cost layer on the income statement. Baidu's AI-powered Business crossing 50% of general-business revenue is not a milestone that reduces spending - it is a milestone that locks it in.
The two forces interact in a way that makes the next few quarters look worse before they look better. Memory costs compress handset margins just as AI features - on-device large language models, AI photography, voice agents - become mandatory differentiators that raise the bill of materials further. Xiaomi is paying the memory bill and the AI bill in the same quarter. So is every Android competitor. One bill will ease. The other will not.
What the Market Is Pricing - and What It Isn't
The market reaction to the two reports is itself a data point, and it reveals an expectation gap. Baidu fell 12.7%. Xiaomi rose 1.16%. Both profits slid. The difference is that Baidu's miss came with a deterioration in the cash cow - advertising down 19% - while Xiaomi's miss came with a growth engine - EVs up 28% - that investors are willing to pay for.
But the conventional read - "Xiaomi's EV story offsets the phone weakness" - may be too kind. The EV segment, for all its delivery growth, remains an operating loss of RMB2.6 billion in the quarter, funded by smartphone profits that are themselves shrinking. The cross-subsidy works only as long as the phone business can generate enough cash. If memory costs stay elevated for another two quarters, that cross-subsidy becomes the vulnerability, not the shield.
Conversely, the market may be underpricing Baidu's optionality. GPU Cloud growing 283% off an already high base is not a vanity metric - it is evidence that Chinese enterprises are committing real workloads to Baidu's stack. The company's Apollo Go robotaxi unit has reached 28 cities and accumulated more than 350 million autonomous kilometers, including 240 million fully driverless kilometers, with commercial operations now live in Dubai and open-road testing underway in London. These are long-dated assets. The market is discounting them at a distress rate because the near-term advertising weakness is visible and the AI margin is not yet visible.
The second-order implication is the one most investors are missing. This is not just a China story. It is a signal about what the AI transition does to profitability across the entire technology sector. When compute becomes the binding constraint - whether it is GPU capacity for a cloud provider or memory for a handset maker - the companies that own or control the compute capture the margin, and the companies that consume it see theirs compressed. Baidu is trying to be both. Xiaomi is, for now, a consumer.
The Counter-Thesis
The strongest case against this reading is that both squeezes are transitory, and that today's margins are the trough, not the new normal. On memory, the evidence is already arriving: contract-price increases are decelerating, and smartphone vendors are renegotiating. If DRAM and NAND contract prices flatten or fall in the fourth quarter, Xiaomi's gross margin could rebound sharply, the way it did after the 2021-2022 cycle normalized.
On AI, the bull case is that monetization follows adoption with a lag, and that Baidu's margin compression is the cost of building a platform that will price like software, not hardware, once scale is reached. Baidu's management has argued exactly this, pointing to AI Applications revenue growing 3% to RMB2.5 billion and AI-native marketing services holding approximately flat at RMB2.6 billion as the early signs of a software layer that will eventually carry cloud-like margins. The company's move toward a dual-primary listing in Hong Kong - the application has been acknowledged by the exchange, with a shareholder vote scheduled for August 26 - would also broaden its investor base and lower its cost of capital at a time when funding AI infrastructure is expensive.
This counter-thesis is credible on memory and plausible on AI - but it requires two things to go right at once. Memory must normalize quickly, and AI monetization must arrive before the advertising decline erodes the funding base. If either leg fails, the margin compression extends beyond a single bad quarter.
The falsifying signal is specific. If Baidu's non-GAAP operating margin - 12% this quarter - expands above 15% over the next two quarters while Core AI-powered Business revenue growth stays above 40%, and if DRAM contract prices for smartphone-grade memory fall quarter over quarter in the fourth quarter of 2026, then the squeeze is cyclical and transitory, and this analysis is wrong. If instead Baidu's margin stays below 12% while AI revenue growth remains above 40%, the structural-margin-compression thesis is confirmed: growth is being bought at a permanently higher cost of capital.
What Comes Next
The mechanics cash out into a clear asymmetry. The beneficiaries of this environment are the companies that control the compute - memory suppliers with pricing power, cloud-infrastructure owners, and the AI-stack providers that can charge for inference. The exposed are the companies in the middle: handset assemblers and advertising-funded internet platforms that must consume expensive compute to stay relevant but cannot fully pass the cost through.
Split by time horizon, the picture diverges. In the short term - the next two quarters - sentiment will remain fragile. Memory costs are still rising, albeit more slowly, and advertising budgets in China remain cautious. Baidu's stock has already repriced 12.7% in a day; further downside is possible if the third quarter shows no stabilization in online marketing.
In the medium term - six to twelve months - the fundamental picture hinges on two data points: whether memory contract prices actually decelerate as projected, and whether Baidu's AI revenue growth can outrun its margin compression. If both happen, today's levels will look like a buying opportunity. If only one happens, the stocks stay range-bound.
In the long term - beyond a year - the structural call dominates. The companies that emerge from this cycle with AI capabilities embedded in their core products and a sustainable margin profile will compound. The ones that spent heavily without achieving monetization will find their cash cows depleted. This is a shakeout, not a pause.
Three scenarios frame the path. The base case: memory prices decelerate as projected, Xiaomi's smartphone margin recovers toward the low double digits through 2027, Baidu's advertising stabilizes in the low-single-digit decline range, and AI revenue keeps growing above 30% while margins remain compressed. Under this scenario, both stocks trade in a range as investors wait for proof of monetization. The upside case: memory prices fall faster than expected, EV deliveries at Xiaomi accelerate past 150,000 units per quarter, and Baidu's GPU Cloud growth stays above 100% while operating leverage kicks in - both stocks re-rate higher. The downside case: memory stays tight through 2027, advertising declines accelerate, and AI capex continues to outrun revenue - margins compress further and both names test their 52-week lows.
What to watch, concretely: Baidu's online marketing revenue in the third quarter (stabilization or further decline), Xiaomi's smartphone gross margin (recovery toward 10% or continued compression), DRAM and NAND contract-price surveys for the fourth quarter, and both companies' capital-expenditure guidance for 2027. The single most important number is Baidu's non-GAAP operating margin - if it does not expand from 12% within two quarters while AI revenue keeps growing, the market's patience will run out.
The AI boom was sold as a margin-expansion story. What Baidu and Xiaomi just reported is the first honest look at the invoice. Growth is real. So is the cost. The question for the rest of the year is which one compounds faster.
Explore more exclusive insights at nextfin.ai.
