Artificial intelligence (AI) is radically reshaping industries and redefining the limits of technology. More than a science fiction trope, AI has emerged as an exciting investment theme disrupting traditional business models and standards.

We asked three Motley Fool contributors to dig up their best ideas for investing in the long-term future of AI. They turned the spotlight on two stocks from the semiconductor industry and one expert in network security services. Read on to see how Lam Research (LRCX -0.28%), Lattice Semiconductor (LSCC 5.31%), and Cloudflare (NET -0.23%) are poised to take advantage of the AI industry's booming growth.

A robot in a classic thinker's pose, chin resting in its robotic hand.

Image source: Getty Images.

Lam Research is looking ahead to an AI-led "boom" on the horizon

Billy Duberstein (Lam Research): Most people equate high-tech semicap equipment company Lam Research with the memory market; unfortunately, that market is in one of its worst-ever downturns right now, and Lam Research's earnings are dropping in 2023.

But some may not realize that Lam has done a good job of cultivating its leading-edge logic business too over the past few years. Moreover, the leading-edge foundries are all about to shift to a new type of transistor structure, and that transition could be highly beneficial to Lam, as well as its rivals. Given that AI will be a huge consumer of both leading-edge chips as well as memory, the AI-led recovery from the post-pandemic bust could be highly favorable for Lam's outlook.

In terms of this technology transition, leading-edge foundries are transitioning from a FinFET transistor architecture, with the gate touching three sides of the source transistor, to a Gate-all-around (GAA) structure, in which transistors are stacked vertically and can therefore be touched on all four sides by the gate, increasing control and power efficiency.

This production of GAA chips will be more intensive for selective etch and atomic-layer deposition, which are the machines that Lam makes. Management believes that for every 100,000 wafer starts per month in the industry, that's an incremental $1 billion revenue opportunity for etch and deposition players to grab, increasing the market share per wafer for etch and deposition manufacturers relative to the semicap equipment industry overall.

Currently, Samsung is producing chips using gate-all-around for the 3nm node, with plans to ramp up next year. Meanwhile, industry leader Taiwan Semiconductor Manufacturing (TSM -0.34%) will use GAA on its 2nm node beginning in 2025.

Currently, memory spending as a percentage of the industry is also at an all-time low. Yet artificial intelligence applications will require a huge amount of memory in the future. As AI begins to eat up a greater proportion of memory spend, that business should eventually recover in 2024 or 2025, giving another tailwind for Lam.

With the memory recovery and transition to GAA chips kicking in in 2024 or so, you can see how things are setting up for another "boom cycle" for Lam following the 2022 bust. While Lam's stock has risen handily off its bottom, the stock trades for only 17 times earnings and is still below its late 2021 highs.

For those who have followed the stock, you would know that these highly cyclical names tend to rise before their earnings do. Given that we are at or near the bottom of this semiconductor cycle, it still looks like an opportune time to invest in this long-term market-beater.

An unsung hero in the performance and security of AI applications

Anders Bylund (Cloudflare): If network performance-boosting and security-tightening expert Cloudflare (NET -0.23%) doesn't strike you as a major player in the AI business, you're not looking hard enough.

You see, AI systems such as ChatGPT and Dall-E need protection from network attacks. Some hackers seem to get a kick out of bringing popular services to their knees through distributed denial of service (DDoS) attacks. Others want to figure out how to use premium services for free, and perhaps resell them for a profit. These are just two examples of the many security threats facing any online business, and Cloudflare is a leading provider of security tools to mitigate these attacks.

In fact, the company already wraps most of the leading generative AI services in DDoS-busting network proxies, including OpenAI's ChatGPT. Ironically, Cloudflare's attack-thwarting systems use its own machine learning tools to identify and defeat new attack types.

On top of that, Cloudflare also offers a global network of edge computing servers that come with pre-trained deep learning tools and other AI goodies.

Now, Cloudflare isn't a cheap stock by any stretch of the imagination, trading at 21 times sales and 165 times earnings today. However, those lofty valuation multiples give you access to an accelerating growth story with robust cash profits:

NET Revenue (TTM) Chart

NET Revenue (TTM) data by YCharts

So if you're interested in Cloudflare's profitable security services, you have a choice to make. You can either accept the market risk that comes with a high buy-in price, or hold your horses to buy this volatile stock on the next price dip instead. Either way, you'll be investing in the future of AI applications and the security tools needed to keep them running.

A small chip stock betting on energy efficiency

Nicholas Rossolillo (Lattice Semiconductor): Over the past decade, the FPGA (field programmable gate array) semiconductor market has been consolidated, sparked by multiple FPGA acquisitions by Intel and culminating with AMD's purchase of FPGA giant Xilinx in early 2022. As far as publicly traded pure plays on FPGA chips, Lattice Semiconductor is the last name left standing.

But what is an FPGA chip exactly, and what's it to AI? FPGAs are non-application-specific chips that can be calibrated to a custom use "in the field" -- be it in a data center, communications network, an automobile, or a factory. Historically, they've also been used to test and validate a new chip system before sending it to mass production. A deep level of software programming has been needed to make use of FPGAs, but Lattice has been building its own suite of software tools to make its chips easier to use.

In a new era of AI and complex software systems, FPGAs have been in high demand. They can be affordable to deploy across a myriad of industries, and they're also power efficient. It's precisely the reason AMD wanted to get its hands on Xilinx, and this same trend is lifting Lattice Semi higher too. Lattice sales were up 22% year over year to $184 million to kick off 2023.

Also of note, despite its diminutive size, Lattice generated a very healthy operating profit margin of 32% in Q1. The company has big aspirations for the years to come as it anticipates plenty more growth from new product launches (data centers, vehicle tech, industry automation) and steadily boosts its profit margins along the way.

One primary issue, though, is valuation. The stock trades for a premium 57 times trailing-12-month earnings per share (EPS), or 39 times expected full-year 2023 EPS. Overpaying could be a risk to future investment returns. Nevertheless, I'm optimistic about the company's potential from AI and other high-performance computing use cases, and like its position as the last FPGA pure-play out there. To mitigate the high price tag, I recently started dollar-cost-averaging to build a larger position over the course of the next year.