Yet another Silicon Valley veteran has left a post at a major Chinese tech firm.

Artificial-intelligence researcher Andrew Ng announced he has resigned from Beijing-based Baidu after less than three years at the company, a major setback for the search giant’s AI ambitions. His departure marks the second instance of a high-profile foreign hire leaving a Chinese company this year, and arrives as Baidu struggles to find new sources of income.

Ng revealed his departure on a short post on Medium. He writes that he’s “confident that Baidu will continue to flourish,” adding:

“I joined Baidu in 2014 to work on AI. Since then, Baidu’s AI group has grown to roughly 1,300 people, which includes the 300-person Baidu Research. Our AI software is used every day by hundreds of millions of people. We have had tremendous revenue and product impact, through the many dozens of AI projects that support our existing businesses in search, advertising, maps, take-out delivery, voice search, security, consumer finance and many more. We have also used AI to develop new lines of business. My team birthed one new business unit per year each of the last two years: autonomous driving and the DuerOS Conversational Computing platform. We are also incubating additional promising technologies, such as face-recognition (used in turnstiles that open automatically when an authorized person approaches), Melody (an AI-powered conversational bot for healthcare) and several more. As the principal architect of Baidu’s AI strategy, I am proud to have led the incredible rise of AI within the company.”

Ng joined Baidu in May 2016 from Coursera, the online education company that he helped found. Before that, he worked on the Google Brain project at Google, which taught computers to recognize images of cats. He remains one of the world’s leading experts on artificial intelligence—his personal page at Stanford lists his name among dozens of papers published between 1995 and 2012.

Yet Ng’s departure comes as Baidu’s strength as a company begin to sag. Revenue for ads from its search engine has stalled recently, due to increased competition from Alibaba, which also makes money from advertisements, and Tencent, which has slowly but steadily introduced advertisements into its mammoth chat app WeChat.

The company’s foray into artificial intelligence, like that of Google, remains a long-term investment that has yet to yield immediate financial returns. Its self-driving cars remain in trial phase, with its core technology still not yet deployed for consumers. Duer, a Siri-esque voice assistant, remains about as popular as its US-based analogs.

These efforts will almost certainly remain a core focus for Baidu in the future. In January the company named Qi Lu, a former Microsoft executive and fellow AI researcher, as its new COO.

Ng’s hire in 2014 marked an unusual instance of a Chinese internet company poaching major talent from Silicon Valley. He joined the company months after Hugo Barra, one of the key figures behind Google’s Android operating system, joined Chinese smartphone maker Xiaomi. At the time, such hires seemed to suggest that products and services from China’s tech giants might soon be just as ubiquitous overseas as they are in China. Years later, however both Baidu and Xiaomi remain influential mostly in their home markets and not so much elsewhere. In January, Barra announced he would leave Xiaomi for Facebook.

Baidu referred Quartz to a tweet when asked for comment on Ng’s departure.

Image by Nvidia Corporation on Flickr, CC-BY-2.0.