Baidu (NASDAQ:BIDU) and Alphabet's (NASDAQ:GOOG) (NASDAQ:GOOGL) Google both develop artificial intelligence technologies like machine learning, deep learning, and neural networks. Both companies use those AI technologies to crunch data from their similar ecosystems, which include market-leading search engines, cloud services, streaming media platforms, voice assistants, and smart speakers.

Yet Baidu's ecosystem is mostly limited to China, while Google dominates most other markets. In terms of diversification, growth, scale, profitability, and resilience to macro headwinds, Google easily beats Baidu as a long-term investment. But if we only focus on the AI market, Baidu could actually be the stronger play. Here are three reasons why:

The back of a robot's head shatters.

Image source: Getty Images.

1. Its CEO is euphoric about AI

Unlike tech pundits who issue bleak warnings about AI, Baidu's founder and CEO Robin Li is a self-described "optimist" in regards to AI technologies.

Last October, Li told the South China Morning Post that AI "will not destroy human beings but will give people eternal life," since "everything every person has said and done, even people's memories, emotions and consciousness" can be stored on the cloud.

Li claims that accumulating all that data would enable machines to "learn people's way of thinking" and allow generations to communicate "across time and space" to solve problems. Li also doesn't seem concerned about privacy issues. At the China Development Forum in early 2018, Li predicted that most Chinese citizens would be willing to "exchange privacy for safety, convenience, or efficiency."

Alphabet CEO Sundar Pichai is less optimistic. In 2018, Pichai decided against renewing Project Maven, an AI image recognition contract for the Pentagon and dropped out of the running for the Pentagon's $10 billion JEDI cloud contract. Pichai cited ethical concerns in both cases and published "ethical" guidelines for Google's AI technologies that same year.

In late 2018, Pichai told The Washington Post that the public's concerns about AI were "very legitimate," and tech companies needed to monitor AI technologies with an "agency of its own." Those statements strongly indicate that Google will take more measured steps into the AI market than Baidu.

2. Its relationship with the government

Chinese and American tech companies have very different relationships with their home countries' governments. The Chinese government keeps its tech companies on a short leash and frequently dictates their censorship practices.

A digital map of a brain.

Image source: Getty Images.

However, the Chinese government also encourages companies like Baidu, Alibaba (NYSE:BABA), and Tencent (OTC:TCEHY) to accelerate the development of their AI technologies -- which China considers crucial infrastructure tools and key ways to reduce its dependence on American technologies.

Back in 2017, China's Ministry of Science and Technology actually split the first wave of open AI technologies between Baidu, Alibaba, Tencent, and iFlytek. It assigned Baidu to the development of self-driving cars, Alibaba to smart cities, Tencent to digital healthcare, and iFlyTek to voice recognition. Baidu also launched a state-backed engineering laboratory for deep learning technologies like computer vision, machine hearing, biometric identification, and human-computer interactions.

Google doesn't enjoy a comparable relationship with the U.S. government. The Federal Trade Commission previously fined Google over privacy violations on YouTube, and the Department of Justice launched an antitrust probe into the tech giant last year. The House Judiciary Committee also recently grilled Pichai over allegations of political bias in Google's search results.

Simply put, Google and the U.S. government won't be on the same page anytime soon. Meanwhile, the Chinese government clearly wants Baidu to strengthen its AI technologies -- and that support could give it an edge against its western rival.

3. It just beat Google in one of the toughest AI fields

Baidu's aggressive investments in AI -- which include its driverless platform Apollo, DuerOS voice assistant, and Xiaodu smart speakers -- are clearly paying off.

In a recent head-to-head contest in natural language processing -- which requires 10-100 times as many parameters as image-based learning models -- Baidu's Ernie (Enhanced Representation through Knowledge Integration) model beat Google's Bert (Bi-directional Encoder Representations from Transformers) model.

That's just one test, but it strongly indicates that Baidu's optimistic, aggressive, and state-supported AI strategy is turning it into a "best in breed" player as Google grapples with ethical conflicts, a suspicious public, and an uncooperative government.

The bottom line

For now, the softness of Baidu's core advertising business in China makes it a weaker overall investment than Google. However, the expansion of its AI ecosystem could eventually diversify its top line away from ads and ensure its long-term survival. Google needs to clearly define its AI strategy soon, otherwise the business could simply tread water and suffer the same fate as its listless cloud business.