The future of browsers and artificial intelligence. Zen in Yandex.Browser

    In the future, it seems to us that all popular browsers will go beyond the programs for opening web pages and will learn to better understand the people who use them. Today I will tell you how we see this future as an example of a personal Zen feed in Yandex Browser, which is now available to users of Windows, Android and iOS. Despite its apparent simplicity, Zen is based on fairly sophisticated technology. I will tell you a little about how this is implemented with us, where and why we used traditional machine learning, and where - neural networks and artificial intelligence, and I will be grateful for your opinion on this approach.





    The recommendations are well known to everyone who actively uses the network. Online stores offer similar products. Online cinemas recommend movies. Music, books, games, applications - in any niche you can find examples of such solutions. In the modern world, where the amount of information is growing exponentially, recommendations help people find something new and interesting.

    Yandex has always specialized in search. In the broad sense of the word. Search for answers to your questions. Search for the best route. And even finding a free taxi near you. About two years ago, we had another idea. To teach a machine to search the network for content that would be interesting to a particular person. Personalized search, where the query is not words, but interests. From this idea, the tape of recommended Zen content was born.

    Zen


    Zen is an endless stream of content that is formed based on the interests of a particular person. We want to help users find interesting content, and publishers - targeted traffic (clicking on the recommendations opens the material on the source site). Usually, stories about new products begin with a description of ideology and product strategy, and here I recommend that you read Roman kukutz Ivanov's post on the Yandex blog , and you and I will immediately move on to the most important thing for Habr, technology. Moreover, they are the ones that distinguish Zen in Yandex.Browser from any other browser (and not only) analogues.



    By the way, an attentive reader may recall that the first experiments with Zen were carried out in 2015 on the page zen.yandex.ru. Why has the recommendation feed now become part of the Browser? This time I will answer the question a bit later.

    The basis of Zen is the recommender technology Disco, developed in Yandex and has already found application in Yandex.Music and Yandex.Market. The word "disco" is consonant with the English word discovery, which means "discovery of the new" and well describes the essence of technology.

    The simplified logic of the work of Disco in the case of Zen looks like this:



    Let's start from the very beginning, with the initial data, which have yet to somehow turn into factors.

    Where do recommendations begin?


    Before advising a person, one must understand his interests and preferences. Zen uses Yandex’s knowledge of the websites people visit for this. Thanks to this knowledge, many new Zen users will be able to immediately see a personalized recommendations feed without the need to configure anything. But sometimes they are not enough. One could try to solve this problem with the help of a tape oriented to the average person. But we know that such a person does not exist in reality (which was well shown by the example of the American air force). Therefore, we went the other way and suggested that people independently limit their interests. These settings do not have their own name, but inside we call them “Onboarding”.



    It is important to understand that Onboarding is not an obligatory stage of initial settings, but only a backup option for those who definitely have nothing to offer. The recommendations feed immediately after going through Onboarding can be quite different from the collections formed after several weeks of active use of Zen. These settings are already available to Yandex.Browser users for Android and iPhone. For Windows will be available soon (but for now you can use a temporary solution ).

    Knowledge of human interests is only half of the necessary information. In order to recommend something, you first need to find something. Typically, recommendation services solve this problem in a primitive way - they form a limited catalog of RSS feeds of interest. In the case of Zen, there are no such restrictions. Search robots are looking for any material. This can be either author publications from popular blogs, or quality stories from forums or videos from YouTube. This is what we call the "wild web." The main thing is that the site is not abandoned and the page contains a sufficient amount of useful content.

    So, on the one hand, we have knowledge about the favorite publications of millions of users, on the other hand, the full power of the Yandex global search index. The most “simple” remains. Teach a car to build recommendations.

    Types of recommendation systems


    In the history of recommender technologies, two of their main types are well known: filtering by content and collaborative filtering. Let's start with the first one, which is based on comparing the contents of recommended objects. For example, I propose to consider films. If two films belong to the same genre, and the user has already praised one of them, then with a certain probability it is possible to advise him and the second. And here it’s interesting to recall the online movie theater Netflix, which increased the number of genres from several hundred to tens of thousands , among which you can even find “Cult Horror with Evil Children”. Most of these genres are hidden from viewers' eyes and are used only to build recommendations.



    In our case, there are no genres. To conclude that a web page is in the best interests of a person, you need to compare its content with known patterns. Moreover, this should be done by a computer that needs to not only read the material, but also understand its meaning. And the only way to solve this problem accurately enough is to use Yandex's experience in the field of artificial intelligence.

    NLP + CV


    When it comes to artificial intelligence, many users imagine SkyNet wanting to enslave humanity. Fortunately, the future is not predetermined and everything is in our hands. But seriously, the AI ​​developments are already helping us solve complex problems. The ability of a machine to read, see and, most importantly, understand meaning opens up great prospects.

    Natural language processing (Natural Language Processing, NLP) and computer vision (Computer Vision, CV) - Two widely used in Zen direction of the field of artificial intelligence.



    When we talk about recommendations, we mean materials that would be quite close in their semantic content to the user's samples. In other words, the machine must read two texts and conclude whether they are close in meaning or not. Exactly this is what we learn to do. A specially trained neural network converts the text into a vector, which contains the meaning of the text. Two texts can be written using different words and even in different languages, but they will have one meaning. Comparing these vectors, we can with a certain probability predict human interest in new material. By the way, if the vectors almost coincide, then this already speaks of a semantic duplicate (rewriting text or different articles about the same event), which we are fighting in the tape.

    Another approach to NLP that the Zen team is working on is automatically labeling any text. Think of the Netflix example and tens of thousands of genres. So it is here. Classification of publications using labels helps to improve the accuracy of the final recommendations.

    Working with computer vision is generally similar to NLP. Only instead of reading text does the machine learn to “look” and understand the meaning of the image. In addition to the direct application in the recommendations, computer vision has other tasks in Zen. For example, thumbnails of pictures are far from always conveniently scaled, and they have to be cropped, and computer vision helps to find people in pictures and saves them from the fate of Ned Stark from Game of Thrones.

    Computer vision is also used to find text in pictures. Some sites like to duplicate the title as an image. In the tape, it does not look so beautiful, therefore, such pictures are revealed and are not used as thumbnails. There is still such an inexplicable concept as the “quality” of a picture. The machine learns to select on the site those images that people like best, and uses them as all the same thumbnails.

    SVD


    Above, I told you about the approach to the construction of recommendations, which is based on filtering by the content of objects. Now it's time to think about collaborative filtering. This approach is based on the idea that similar people like similar objects. In this case, you do not need to know the properties of the recommended objects, it is enough to collect statistics on how they correspond to the interests of users. On the example of films, it may look like this:



    Based on already known estimates, you can identify patterns in the behavior of different people and try to predict the reaction to a new film. At the mathematical level, for the application of collaborative filtering, various algorithms were invented, about which my colleague Mikhail Royzner spoke well at one time on Habré .

    In the case of Zen, we use collaborative filtering (or rather the SVD algorithm) to predict a person’s interest in a particular site as a whole. This information complements the recommendations built for individual materials using artificial intelligence (NLP + CV). It allows you to filter out excessive noise and identify non-trivial patterns (say, it may turn out that people who are interested in Habr and stories from Picabu read “N + 1” more often than others).

    To summarize. Using the source data about sites and users, we use the technologies for processing natural language, computer vision and the SVD algorithm to form a set of various factors that characterize a person’s interests in certain sites / materials.



    The accuracy of the final recommendations directly depends on the quantity and variety of the source data, therefore, many of our other knowledge are used as factors. For example, Yandex’s knowledge about a particular site or page, information about how a person uses Zen, his feedback in the form of clicks, “more of this” and “less of this”, location and even time of day. The total number of individual factors that we put in the system of recommendations is estimated in the thousands. The complexity of the system reaches such a level that algorithms alone are not enough. We need a technology that will itself calculate the ideal formula for building the final tape. And here we came in handy Yandex experience in the field of machine learning.

    Matrixnet


    The term "machine learning" appeared back in the 50s. It means an attempt to teach a computer to solve problems that are easy for a person, but it is difficult to formalize the way to solve them. As a result of machine learning, a computer may exhibit behavior that was not explicitly incorporated into it.

    Every day, our search engine answers millions of queries, many of which are non-repeatable. Therefore, it is impossible to write a program in which each request is provided and for each request the best answer is known. The search system must be able to make decisions on its own, that is, it must choose from millions of documents the one that best meets the user. To do this, teach her to learn.

    Since 2009, Yandex Search has been using its own Matrixnet machine learning method. Using it, you can build a very long and complex ranking formula that takes into account many different factors and their combinations. In addition, the Matrixnet itself determines a different sensitivity for different values ​​of the ranking factors. This technology is quite universal, therefore later found application not only in Yandex, but also in the European Center for Nuclear Research .

    The ability of a computer to take into account thousands of factors and independently seek the best solution is something without which it is impossible to build a modern recommendation system. That is why Matrixnet was taken as a basis when creating its own recommender technology.

    The result of the work of the MatrixNet is exactly what the user sees in the Zen feed. From the side of developers there are no rules like “If a person loves A, then we recommend him B”. All such regularities are born and constantly change inside the MatrixNet. And the more data he has, the more accurate the recommendations. That is why Zen is part of Yandex.Browser, and not a standalone web service or application. It is more difficult for a separate application to understand the interests of a user who, after two or three days, may simply stop launching it. For Zen magic and machine learning to take full effect, they need to be actively used, or at least regularly held close by. And the browser, as a single point of access to the Internet, is best suited for this. Of course, any user can refuse to use Zen in the Browser.

    In this post, I told you about how the personal recommendations feed is formed in Yandex.Browser, and why Zen is not just another “news feed”, but the result of the work of serious technologies. Developments in the field of artificial intelligence are already helping the machine understand the meaning of content and human interests. But this is only the beginning. Who knows, maybe one day computers will understand us better than ourselves?

    Also popular now: