Quitting PhD 2 years into a 3-year program I'm currently in a 3-year (European) PhD program in Computer Science/Machine Learning, but I feel like I'm very far behind schedule. I started on a very open-ended project proposal and grant, which I spent my first year reading up on, including taking other courses, TA'ing etc. After the first year, I realized it was a very difficult topic to get anywhere on, and my advisor is also by no means an expert.

For this reason I pivoted to a related subfield of ML that is more mainstream and that I am more comfortable with, and basically started over. Over the past year I've been reading papers, discussing them with people, and trying to get concrete ideas for research. However ideas have been sparse and the ones where I spent time on coding and experiments, they didn't pan out. Now, 2 years into my PhD, I have nothing to show for it. I have no research, no publications, and only some vague ideas on what to work on next. Do I quit? Is it even possible to finish by this point? I'm going to bring this up with my advisor soon, but I would like advice before I do so.
You most probably got into a PhD program with a bad supervisor. This is not your fault. The first option is to talk with your supervisor and see if he thinks there is a chance that you can finish your PhD. Most of the time a PhD is more a social concept than a scientific one: science is hard - if people think that you did things to the best of your ability there is a high chance that they let you graduate with minor results. But be aware that this can set you into a situation of dependence and pressure that can be exploited and might cause mental harm to you. This does depend on your personal relationship to your supervisor. If you think you can go through this period and he is still positive about your projected progress, then stick with it. If not, then start looking for alternatives. There is no shame in starting a second PhD or finding a job in industry. If you openly explain your situation, people will understand. Additionally, doing a PhD is a highly idealistic approach and most people show signs of depression during a situation of hardship. You might want to seek out for additional help if you show signs of depression.