How to read a research paper with too many references to previous works? I am a CS undergrad student who is just getting started with research and reading papers. My mentor has asked me to read a few papers. While reading I noticed that every few lines there are references to previous papers being cited and the entire paper just builds on the previously described architectures and then adds something new to it.

In such cases, if I start reading the cited ones (and there are many mentioned over and over again), I am afraid I might get stuck into a loop of such repetitions and never get to the main idea. How should my approach be ?

My mentor wants me to thoroughly understand the ideas stated here because we are going to be implementing those soon albeit with modifications. I know of the 3-pass approach but that does not solve my particular problem.

Note that my particular doubt is not on how long should reading take. I can see many resources explaining that very well already. So I don't think this is a duplicate of them.
What you are describing is pretty normal in academia. People take on old and existing work, and build upon it. 

There are typically several reasons for citing prior studies, thus the impact of each individual citation might (and usually does) vary as well. I reckon this is all quite new to you. In your case if you can understand the work presented in the paper without diving into the citations, then just do that and ignore the references for the time being. You can always trace back to specific (read: not all) references later on to fill in any potential gaps in your understanding.

If you cannot grasp the why or the how, then my suggestion is to pay more attention to the introduction section, checking out the important (often recurring) references, and then re-reading the introduction. You should get a fairly good idea of what the paper is really about this way.

Another approach could be to try to discuss the paper with your supervisor or someone else who might be able to judge it better (any grad students or TAs?)