The news of a secret research lab fits into a larger narrative about Apple’s deeper and more expensive focus on research and development. Neil Cybart of Above Avalon, a subscription blog focused on Apple, noted that Apple “is on track to spend $14 billion on R&D in FY2018, nearly double the amount spent on R&D just four years ago” and also pointed out that “The $14 billion of R&D expense that Apple will spend in FY2018 will be more than the amount Apple spent on R&D from 1998 to 2011.”

Those are incredible numbers for any company, but the scale of the R&D output even for Apple is exceptional. Even more notably, Apple’s R&D expenses as a percentage of revenue have been steadily increasing over the past few years and are projected to reach a decade high of 5.3% this year despite higher revenues, according to Cybart.

The more interesting observation though is that Apple has traditionally avoided having to do the sorts of expensive R&D work involved in areas like chip design and display manufacturing. Instead, the company’s focus has traditionally been on product development and integration, areas that certainly aren’t cheap, but are less expensive than bringing say a new LCD technology to market.

Apple doesn’t produce wireless modems or power management systems for its phones, instead using components from companies like Qualcomm, as in the iPhone X. Even highly touted features like the iPhone X’s screen aren’t designed by Apple, but instead are designed and manufactured by others, which in the case of the screen was Samsung Display. Apple’s value-add was integrating the display into the phone (that edgeless screen) as well as writing the software that calibrated the color of the screen and ensured its exceptional quality.

For years, that integration-focused R&D model has been a win-win for Apple. The company can use the best technology available at low prices due to its negotiating leverage. Plus, the R&D costs of those components can be amortized not just against iPhones, but all other devices using the technology as well. That meant Apple put its resources behind high-value product development, and could maintain some of the best margins in the hardware industry by avoiding some of the costlier research areas required for its products.

That R&D model changed after Apple bought P.A. Semi almost exactly a decade ago for $278 million. Apple moved from an R&D strategy focused on product development to increasingly owning the key hardware components of its devices. No where is that more visible than in the processing cores at the center of the iPhone. The A11 Bionic processor in the iPhone X, for instance, is completely custom-designed by Apple, and manufactured by TSMC.

Indeed, the processor is an obvious place to start vertically integrating, since it provides so much of the other functionality of the device and also has a large influence on battery life. The FaceID feature, for instance, is powered by a “neural engine” component of the A11 chip.

There is a direct line between creating differentiated features that consumers recognize and are willing to shell out top dollar for, and building out the sorts of custom components that Apple has shied away from in the past. The display is obviously a critical point of differentiation, and so it shouldn’t be surprising that Apple increasingly wants to bring that technology in-house so it can compete better with Samsung.

Alright, so Apple is spending more on R&D to increase differentiation – sounds great. Indeed, one narrative of these expenses is that Apple is investing from a position of strength. Through its sheer force of will, it has become one of the most valuable companies in the world, and it dominates many of the markets in which it competes, most notably smartphones. It has incredible brand loyalty with a millions of customers, and it sees an opportunity to expand into new device categories like automotive in order to continue growing and owning more markets. In other words, it is expanding R&D to propel growth.

The more negative view is that Apple is struggling to maintain its hold on a shrinking smartphone industry, and the increasing R&D spend is really a defensive maneuver designed to protect its high sale prices (and thus margins) against significantly cheaper competitors who offer nearly equivalent functionality. Apple’s custom hardware powers its exclusive features, and that creates the differentiation needed to sustain revenues going forward.

There is truth in both narratives, but one thing is for certain, the margin pressure on Apple is increasing. While everyone is making educated guesses at iPhone X sales, many analysts believe that sales have been, and will continue to be weaker than expected, driven by the device’s high cost. If that is true, then higher prices will not be able to offset higher research and developments costs, and the combination will put more of a vice grip on Apple’s future smartphone innovation than the company has previously experienced.

It seems obvious that a company with hundreds of billions of dollars on the balance sheet should just be investing more of that into R&D initiatives like microLED. But analysts care not just about top-line revenue, but also the margins of that revenue. Apple’s increasing spend and declining unit sales portend tougher financial questions for the company going forward.