“People like him should be the face of Bulgaria. Precisely the people who invent things no one could imagine,” says Prof. Martin Vechev of today's guest.
Dr. Veselin Raychev is the only Bulgarian whose doctoral thesis has made the world's top three of the year across all fields of computer science. What's more, with it he founded an entire new field that is booming today—the idea of artificial intelligence writing computer code.
He created the startup DeepCode, which uses machine learning to make computer programs more secure. The company was acquired by Snyk, and our guest remains at the head of its AI division.
His career began at Google, and thanks to him Google Maps still recommends our routes today with algorithms bearing Bulgarian names. In recent years he has been invited to become a professor at MIT, Stanford and other renowned universities. Yet he chose to tie his professional future to INSAIT, the Bulgarian Institute for Computer Science, Artificial Intelligence and Technology in Sofia, a project with the power to change the entire ecosystem of our IT industry.
“Vesko is not just a talent, he built himself into one, which is worth a great deal,” Prof. Vechev says of him. “With a lot of drive, hard work, pleasure and satisfaction he achieved everything and kept his innate modesty. As I told the CEO of Snyk when they were buying DeepCode: ‘If you have Vesko, you have nothing to worry about. People like him are a handful in the whole world.’ Some time later he told me: ‘Looks like you were right!’”
What does the researcher think of the latest big news from the world of artificial intelligence? Does all the noise around the subject help or hurt, and which important decisions is it time for us to make? Why, even from afar, does he never stop caring about what happens in Bulgaria, and what does he see as the path to a better future for the country? What made him leave an impressive career at Google to carry on in the world of science?
– Let's start from far back: how did you end up at Google?
– In quite an interesting way. I was doing my bachelor's degree at Sofia University, and Google back then was a fledgling company looking for young talent. Most other big companies in the US at the time hired only from their own market, but Google needed to grow faster and opened its doors.
I competed in informatics olympiads, and a Romanian, also a former olympian, had contacted our coach, Prof. Krasimir Manev, asking him to recommend people, so he sent me and one other student. They interviewed us and we started an internship—we were among the first interns from Bulgaria in Silicon Valley.
In those days most of my university classmates went to the States on summer work-and-travel jobs. A third of all students went, to earn a few thousand dollars, which was an awful lot of money then. We, on the other hand, went on an internship designed to lure us into staying to work there. Instead of working 15 hours a day and sleeping in cramped dorms, we were paid insane money for the time. And all the while they just kept showing us how good it was.
I think it's because they managed to hire so many people from all over the world back then that they grew so fast. And gradually more and more Bulgarians started coming.
– You worked longest on the Google Maps team, rising to team lead. I read that the platform still uses an algorithm called Koprivshtitsa—named after a historic Bulgarian mountain town—which you created. Is that really so? What is it?
– It is. One of the key things is to precompute a great many routes for using urban and intercity transit, and to calculate where the best possible transfer points are. Those transfers are then stored, so that when a user comes along, the algorithm finds an answer much faster.
At the time there were many sites trying to find transit routes, but they were rather slow and unpleasant to use, even in a relatively small city. In the meantime
with our algorithms Google answers instantly, and you can easily and comfortably move the destination or the starting point, change the query.
Even now it's hard for anyone who isn't Google to do route finding that efficiently. It takes a very serious investment to create algorithms that can be used efficiently.

– What about working at Google would an outsider never guess?
– I wouldn't say there's some crazy difference. Of course, there are endlessly bad companies, but if we're talking about a company that builds something meaningful, in the end it's done in a pretty similar way. The huge Silicon Valley conglomerates, like Oracle, Intel, Apple or Google, work with lots of small teams. And each small team largely decides for itself how it wants to be managed. So Google can be a terrible place to work on some teams and a very good one on others.
I don't think there's any great miracle. But it matters a lot that the company's leaders, at least ten or so years ago when I worked there, really wanted it to be strongly driven by engineers with real data, not just by marketing or a single CEO.
There are many successful teams there, like the one that created TensorFlow, and at the same time there are teams doing absolute nonsense. Around 150,000 people work at Google; it's only natural to expect that at least a few thousand of them are extremely inefficient.
– What made you turn to academia? Most people who start a career keep going with it; they rarely go back to science…
– The biggest difference is that Google pays very well, and you have to get used to telling yourself: “I'm going to give up three quarters of my income.” But at that point I had no wife, no kids, no thousand things to pay off, so it wasn't that scary. Once you make that transition, giving up the little luxuries, at some point you realize things aren't so bad.
Besides, I thought: okay, Google was considered the best employer back then, and it's certainly still near the top of the rankings now. If one day I look at my résumé and it says “worked at Google for 5 years” or “for 10 years,” what's the difference? None. Many people now have 15 years there, but in my view
that's not to their credit—it means they've done the same thing for half their career.
– Still, you chose to go into science rather than, say, another company. And you changed direction too, choosing machine learning and the now famous artificial intelligence.
– Yes, I had an unspoken idea that we generate huge amounts of computer code and could use it for machine learning. It's interesting that today all the projects, such as
ChatGPT, are so good because they've learned from a huge amount of computer code
and were then further trained with questions. A neural network is trained on code, then people start giving it logic problems that, from a distance, seem to have nothing to do with code, and it turns out to be very good. Logical reasoning comes to a large extent from code—that's a very interesting result.

– Prof. Vechev writes that you were in fact the first researcher to head in the direction of generating code with neural networks. Now it's all the rage…
– The early research went in that direction. I think we're still working on very interesting things related to code. One of the interesting questions: right now every product is integrating artificial intelligence. When I open my editor, the algorithm can already describe to me what's happening in the code, generate a human description based on what it sees.
But what's the problem? I think we'll see it over the next few months.
It actually creates more work for people instead of easing it.
How pleased will I be that AI describes my code if it means I'll read more than before? If until now I read the code to understand what's going on, now I read descriptions and then I'll still say to myself: “Let me look at the code, this part isn't quite clear.”
There's a lot of noise around the subject, but the most important thing for a researcher is to be persistent. There are certain things we want to achieve, we work on them and, as far as we can, we ignore the marketing.
Take styling a web page, for example. CSS is a downright brilliant language—I can describe declaratively how a website should look. The problem is that if a button isn't exactly where I want it, there begins a whole round of fiddling and hunting for different fixes. Can artificial intelligence solve problems like that? That would be interesting. And it's exactly these issues that take the most time. Otherwise, if I ask it to write basic CSS on a blank page, it will do brilliantly.
There's still a lot of work to do before artificial intelligence can do more things. That said, the progress is undoubtedly enormous.
– But quite a few companies already think that many people will become redundant. Even the giants admit they'll automate a large part of their processes. In the software world specifically, I think it's already possible for fewer people to be more productive thanks to this kind of technology.
– I'd say it's more of a market reaction. One of the reasons most companies are laying people off is that
productivity dropped drastically after everyone started working from home.
And the balance has to be restored somehow. I don't think artificial intelligence will lead to fewer engineering positions, say, within a year.
– Do you think it's a good thing that thanks to ChatGPT more people have learned about these technologies—how far they've come, how advanced they are? These topics are discussed much more now, but most often in extremes…
– It's good that people are talking. But really, when you go to one of the extremes, like predictions, the result can't be right. There have always been solutions that improved the productivity of engineers, and of people in general. One extreme says: everything is becoming so efficient, why should our children be smart at all, can't they just live their lives? AI will replace them… I don't think it will happen that way. The other extreme: absolutely nothing changes because of artificial intelligence.
Five years ago there were plenty of predictions that the profession of long-haul trucker was doomed, that truckers would be the first to be replaced by automation. There are many advantages to a truck not being driven by a person—it can travel 24 hours a day, it doesn't need such a big cab. But it turns out things move more slowly than people imagine. And now this new artificial intelligence, which comes from natural language,
in no way changes the dead end that self-driving cars are stuck in.
At least for a few years. It's not an endless dead end, they will get out of it, but it takes time. If I had to advise my own kids whether to become truckers, I probably wouldn't. But someone who is one right now will most likely retire without any problem.

– My older son is 5 and wants to be a carpenter. It seems like a good idea to me; it's getting harder and harder to find craftsmen, unlike front-end developers.
The project you've been working on in recent years is related to security, and that's an important topic—many specialists expect advances in AI to cause serious problems, to make breaches much easier. How does your venture tackle those problems?
– The project I work on finds security holes. Everyone is starting to use automatic code writing, thanks to various plugins that generate it. But that code isn't always secure. So our solution is installed right in the editor itself, and it immediately, at the very moment of generation, detects whether there's a problem. Then it offers a suggestion for how it can be fixed.
– What kinds of problems does it detect?
– All the most common threats, for example SQL injection—when someone using a website wants to manipulate the queries to the database so that it gets altered in a nasty way. There are ways to protect yourself, by not letting user data go into the query directly. Another example is so-called XSS—cross-site scripting—where, through malicious code, the attacker can do whatever they want: steal the user's account, gain full control. Again, there are ways to prevent it. And there are many other kinds of attacks, such as denial of service—DoS. That's when a website is hit with a huge number of requests it can't answer.
– Most projects already go through static code analysis tools. How are the ones you develop with neural networks better?
– One improvement is that the results appear directly, as you write the code, whereas most static analysis projects require at least a compilation. The other difference is that
we usually find many more bugs than other projects and have fewer false positives.
– You're also heavily involved with the INSAIT institute, and you care about Bulgarian politics. Why do you care what happens in Bulgaria when you haven't lived here for a long time?
– I have many relatives in Bulgaria. We haven't stopped being Bulgarian citizens, in any way. We fly to Sofia often; there are so many things that keep us tied there. Besides, I believe there's potential for many positive things to happen.
– What stops them most often? We all get angry at politics—does it all come down to that?
– No, I don't think so. I've thought a lot about what Bulgaria's real problem is. We see how politics leads to negative selection—precisely the most incompetent people go into it. One of the reasons is natural: if someone has no other skills, they'll fight tooth and nail to stay in it.
Whereas how would I fight, in the political sense? I'd curse on Facebook.
The biggest problem, in my view, is the sheer number of fakes, of knockoffs. Starting with politics and going all the way to everything else.
What irritates people most about INSAIT is that it's not something that vanishes in six months—we held two conferences, called in the media, and that was it. On the contrary, exceptional people are coming to build. How can something that everyone expects to be a sham suddenly turn out to be real, a huge opportunity?

– I still can't quite believe it's real that the state and the universities could come together like this, and that business would value it. It's just a big exception…
– I don't expect the state to help; it's enough for it to be at a level where it doesn't get in the way. This thing will succeed if business is interested in it. But when we see who is currently putting money earned from real business into INSAIT, it becomes clear that
this venture can raise the business bar in Bulgaria very high. It will create a lot of added value.
Right now the market, even in IT, is very tough, because there aren't enough startups with added value. Sofia, a city of a million and a half, can't have just 10 that are doing well. There should be 500.
– All the more so since we have potential, for instance in terms of talent. But almost all of us work for outsourcing service companies, which means the added value goes to someone abroad.
– To change this, to establish the idea that business in Bulgaria should have high added value, there has to be something like INSAIT. There have to be strong educational institutions at every level. At the high school level we already have quite a few good ones—private and public. Then, when you get to university, let's say Sofia University maintains a good level in computer science.
Then suddenly everything disappears. When halfway through their bachelor's degree everyone goes off to work for service companies and nobody keeps developing, the whole market turns into that. It's fine for someone who does something completely different—they can go to one of the coding academies for a year and start working.
But these companies depend on things abroad. They may decide to cut costs, and of course external contractors are first in line.
The way to have working businesses in Bulgaria is for more startups to emerge and grow.
We're in a position where something has to be done in that direction, and that's INSAIT. It doesn't start out huge—three people here, two people there—but it has potential. There's some starting capital and a lot of people who want it to succeed. We'll see how far it goes…
– I really hope it works out! Going back to artificial intelligence, what's the next big news you expect?
– Over the next year I expect it to become a much more accessible tool for everyone. What we're seeing right now is one or two players controlling everything, with OpenAI at the top. Within a year, anyone with a slightly more powerful graphics card will be able to run such systems on their own computer.
– And we're only just going to find out what they can do…
– The most interesting part isn't getting an answer to a single question. That will stay, certainly—just as everyone has used Google until now, there will be new solutions. But I think the more important trend can be seen in image generation. First came DALL·E—I type in text and get a very interesting picture. But very soon it was followed by an open-source model called Stable Diffusion, which completely changed the world. You can download a version, fine-tune it yourself, and then tell it not just “make me a photo of a dog jumping and catching a frisbee,” but have it be your very own dog.
There will always be things that aren't possible with a given model, and such questions are becoming more and more interesting. Artificial intelligence as some global thing isn't as interesting as having a version of it right next to you that you can talk to.
– Many people say there's no longer any point in learning to program, but it seems that right now it makes sense to learn the basics so you can take advantage of these possibilities.
– Yes, at the moment it's not a bad thing to be able to do it. It's quite easy, and there's a low financial barrier. If you're able to program, you should be able to write Python, read a hundred or so lines of code and know linear algebra and differential equations.
– That's how interesting startups take shape. From the people who'll think of the less conventional applications… Thank you so much for the conversation!





