TOKYO -- In a clandestine room located in a basement of an office building in Tokyo's Otemachi business district, the future of artificial intelligence is being conceived and shaped.

Inside, a row of five yellow-colored robots are learning to carry out orders that are challenging for any machine, even one armed with cutting-edge AI. But the robots grow smarter as they repeatedly try to do what they are told, learning by trial and error in the process.

"OK, get the teddy bear now," a researcher instructed the robots through a microphone, and the machines moved their arms and picked up the cuddly, plush toys from boxes that also contained cellphones, tubes, coins and other objects.

This top-secret lab belongs to Preferred Networks, an AI-startup headquartered in the building. Another room in the basement contains miniature cars -- equipped with deep learning technologies that help them learn how to move around without colliding -- and simulators for self-driving vehicles. It is visited frequently by engineers from Toyota Motor. In August 2017, Toyota invested 10.5 billion yen ($95.4 million) in Preferred Networks to add to the 1 billion yen the auto giant had already plowed into the company.

It was one of the biggest investments Toyota had ever made in a Japanese startup. The automaker plunked down the money for Preferred Networks' "deep learning" technology, an AI technique that mimics the workings of human neural networks in processing data to enable computers to learn by example to recognize specific patterns.

In Preferred Networks’ lab, miniature cars equipped with deep learning technologies move around inside a course. The cars eventually learned how to move around without colliding. (Courtesy of Preferred Networks)

In the wake of Japan's largest initial public offering of the year -- flea market app Mercari -- investors are eagerly searching for the next big startup success story. Before its blockbuster listing this week, Mercari was one of only two unicorns -- private companies worth $1 billion or more -- in Japan, according to CB Insights.

The other is Preferred Networks, with a valuation of more than $2 billion.

Amid intensifying global competition for dominance in the AI sector, Preferred Networks is focusing its research and development resources on deep learning. The deep learning framework it has developed and a powerful pool of in-house talent has made the artificial intelligence software developer the leading AI evangelist in Japan.

Preferred Networks, founded in 2014, is led by Toru Nishikawa, president, and Daisuke Okanohara, vice president, who were in the same class at the University of Tokyo and rivals in programming. The 100-person engineering team works on such AI projects as autonomous driving and automatic cancer diagnosis.

The Nishikawa-Okanohara duo are drawing comparisons with the two men who founded Sony in 1946 and expanded it into a global giant in consumer electronics: Akio Morita and Masaru Ibuka.

Preferred Networks Chief Business Officer Junichi Hasegawa, who previously worked at Sony, believes that Nishikawa, 35, and Okanohara, 36, are today's Morita-Ibuka team, likening the AI startup to the storied company that redefined consumer electronics after it was founded soon after the end of World War II.

While a sophomore at the University of Tokyo, Nishikawa was struck by Okanohara's talent and thought he would be no match for his classmate. Okanohara started reading academic papers while he was still an elementary school student and his thesis won the university's President's Award, which is granted to excellent research achievement. He has also been certified as a "Super Creator" under a government-backed program to promote innovation in information technology.

Nishikawa, himself a talented programmer who takes part in world programming contests, hit it off with Okanohara as they discussed their research and career ambitions. The two shared the dream of starting a technology business. That dream came true earlier than expected. When Nishikawa decided to launch a tech company during his first year of master's studies, he proposed the idea to Okanohara.

In 2006, Nishikawa, Okanohara and four others established Preferred Infrastructure, a developer of natural-language processing programs and search engines. While the group were experts in computer programming, they were students with little knowledge about business. Their new company failed to make money and came to the brink of collapse. Nishikawa, who was the company's president, saw his savings dwindle to 600 yen (about $5.40). He had to live on cabbage until the company was saved by orders from customers introduced by a venture capital company with which he was acquainted.

Okanohara was not content with what they were doing. "I was always thinking about how we could beat Google and Microsoft," he recalled. There was clearly no way they could compete with Google in search-engine technology, but Okanohara refused to believe they had no chance of beating the global titan because he knew trends in the information technology sector changed every 10 to 15 years -- meaning a leading company may fail to remain competitive in a new IT era.

A paradigm shift in the sector actually began in 2012, when the University of Toronto and Google dazzled the world with their new image recognition technologies based on deep learning. Okanohara and Nishikawa realized their future lay in AI, which they were convinced would explode in the near future.

While their new deep learning venture still had no sales rep, the duo now had a person they could rely on for the business side of their startup -- Hasegawa, who came to Preferred Infrastructure from Sony in 2011.

When he visited Preferred Infrastructure's office near the University of Tokyo, Hasegawa immediately recognized Okanohara as the kind of "genius" he had not seen at Sony. Hasegawa was also impressed by Nishikawa, a man of few words who seemed to understand the essence of computer technology.

Hasegawa decided to bet on the potential of the two young researchers and quit Sony, where he had worked for 25 years, and joined the new company.

In March 2014, Nishikawa and Okanohara turned their attention away from Preferred Infrastructure -- the search engine business they had started and which had finally taken off -- and established Preferred Networks with several colleagues from Preferred Infrastructure, including Hasegawa.

Toyota is interested in deep learning as the potential driving force of its development of autonomous vehicle technology, and its partnership with Preferred Networks began with a casual message Hasegawa sent in 2014 to Kenichi Murata, an engineer he knew well.

"I recently launched a new company," he wrote. Murata was one of Hasegawa's colleagues at Sony and who was then involved in the development of connected cars at Toyota.

Toyota had set up a task force in 2006 to develop self-driving cars. Hasegawa believed that the connected car project Murata was involved with should be linked to Toyota's efforts to develop an autonomous driving system, which requires AI as its core technology. Murata immediately told Ken Koibuchi, the chief of Toyota's self-driving car project, about Preferred Networks.

It was soon after that when Google threw down the gauntlet to established automakers by unveiling its self-driving car project.

Toyota understood the importance of AI for the future of automobiles. The automaker had started research in autonomous driving in the 1990s, before the dawn of the AI era, but the project was moving ahead at a snail's pace without drawing much attention within the company, according to Koibuchi.

Then came the artificial intelligence explosion.

In 2012, a team of University of Toronto researchers won a world-leading image recognition contest with an astonishing performance by using deep learning, which is concerned with algorithms that learn as humans do instead of doing tasks with step-by-step programming. That same year, Google succeeded in creating a computer model based on the deep learning technique that could teach itself to recognize cats.

Those achievements created a buzz among researchers and opened the door to self-driving vehicles.

Around that time, Koibuchi, keenly aware of Toyota's lack of knowledge in the field of computer science, started looking beyond the company's pool of intellectual resources.

Then came Preferred Networks, which revealed plans in October 2014 to cooperate with Toyota on the development of self-driving cars.

While both companies remain mum about the details of their joint efforts, the fruit of their partnership is beginning to become visible in Toyota's self-driving vehicles, according to sources. They say that the speed at which images captured by cameras and radars on the vehicles are analyzed has increased sharply.

Autonomous driving technology, however, is not the only prize Toyota is going after in its alliance with Preferred Networks. Another goal is a better system to analyze big data collected by connected cars. Toyota also envisions smart factories driven by Preferred Networks' technology.

A group of about 100 researchers at Preferred Networks is playing a key role in the ongoing transformation of the car manufacturing system that has made Toyota a global auto giant. But Toyota is far from the only company that has recognized the value of Preferred Networks' deep learning breakthrough.

Fanuc is looking to give robots intelligence by working with Preferred Networks. (Photo by Masayuki Kozono)

Nippon Telegraph and Telephone, Fanuc and Hitachi are among the Japanese companies interested in what Preferred Networks is doing. Earlier this year, Preferred Networks, Hitachi and Fanuc each provided 10 million yen to jointly set up Intelligent Edge System, a company focused on developing AI-driven next-generation control systems. The venture's goal is a futuristic factory armed with an AI-based self-learning capability and a network of robots and control equipment all connected with each other.

Nvidia, seen as a key player in autonomous driving, Intel and other foreign technology powerhouses have also acknowledged the high level of Preferred Networks' deep learning innovation and have proposed alliances with the Japanese startup. Even Microsoft, which has open-sourced its own framework for neural networks, has sought to team up with it.

Preferred Networks offers Chainer, an open-source neural network framework that is the brainchild of a 30-year-old engineer, Seiya Tokui.

In early 2015, Tokui, who had come to Preferred Networks about a year earlier, had a beef with deep learning frameworks that were available at that time. He found them to be not as easy to use as he wanted. Deep learning frameworks are infrastructure software based on a system of mathematical formulas and commands that offers building blocks for deep learning algorithms through a high-level programming interface. In general personal computer technology, they are analogous to operating systems.

Deep learning imitates the workings of the human brain to learn to detect specific patterns in vast amounts of information. Since a deep learning system can learn to exclude unnecessary information, it gets smarter at an accelerating speed.

In the human brain, electric signals travel through synapses connecting neurons. Similarly, deep learning frameworks enable complicated mathematical formulas and commands to create programs that are intertwined like synapses.

Tokui was using about three frameworks that were available at the time, but he felt that they all had as many shortcomings as advantages. He decided to take a shot at developing a deep learning framework on his own. After working on an outline for about three months while discussing the plan with his colleagues, he hit upon an idea of creating a new framework that would be easy to use for any AI researcher.

He began tapping frenetically on a keyboard to get what was inside his head onto a computer. "Well, I did it as a kind of a hobby," Tokui said. He completed Chainer in about just 10 days, three years after he finished his master's degree at the University of Tokyo.

Okanohara, who leads Preferred Networks' engineering team, was surprised at the level of refinement and sophistication of Tokui's work and immediately made a key strategic decision. He decided to publish the new framework as open-source software to be offered free instead of trying to turn it into a product for sale. Okanohara said he recognized the new framework's great potential to build a new future for the company.

The idea was that the framework could become the industry standard if it was offered as open-source software, although that entailed the risk of throwing away opportunities to make money.

In June 2015, Preferred Networks open-sourced Chainer under a strategy aimed at establishing itself as the provider of a key standard technology for deep learning.

Google responded to Preferred Networks' move by unveiling its own deep learning framework, TensorFlow, five months later. But Preferred Networks' head start in state-of-the-art AI research, where speed counts, proved a significant advantage.

During that five-month period, Chainer established itself as a major deep learning framework, at least in Japan. Tokui focused his development efforts on industrial versatility and usability, and that strategy has worked. Chainer has become a powerful magnet that has attracted U.S.-based AI juggernauts to the fledgling company in Tokyo.

Nishikawa makes no secret of his ambitious goal. "We want to lead the world in the next big technology that will come after personal computers and smartphones," he said.

The dominant player in the field that Preferred Networks has to challenge in its bid to become a world-leading AI company is again Google.

But Okanohara is unfazed by the prospect of battling the tech behemoth. "We are working to win, and I think we can," he said. "Let me say, in five years."