I think your question is quite specific, and to my knowledge only applicable to one institution.
By mentioning "IMG" and "research", I get the sense that you are referring to the unusual positions at UCSD that seem to be set aside for IMGs and for research track. I am not the PD at UCSD and I don't know anything about those programs, but my guess is that here is how they might work--those codes all are "A" codes in the NRMP system (the DR one is called A0, the research is A1, and IMG is A2). My guess (again, my program doesn't use these unusual ancillary codes) is that UCSD has it set up with NRMP to consider the A1 and A2 lists as secondary to the DR A0 list, with spots that "revert" back to the A0 list if unfilled.
I'm not exactly sure what order these tracks are set to run in the Match--meaning I don't know if the computer fills the A0 list first or the A1 or A2 list first. But here is one scenario of how it might work assuming A0 got filled last (after A1 and A2).
The Match looks at the A1 list, where UCSD has ranked all the candidates they really liked as research people. IF it turns out that UCSD has an unfilled A1 "research" spot or spots, because everyone on UCSD's research list actually ended up preferring to go elsewhere and matched elsewhere, then the unfilled spots "revert" to the A0 list--meaning that those spots get added to the A0 number. Same is true for the people that UCSD puts on the "IMG" list--so UCSD only has to put in the stellar IMGs that they are interested in, and any unfilled spots in their A2 IMG list will "revert" back to their A0 list. Then the computer matches up the A0 list with the number of designated spots (5) + reverted spots (possibly 0, but up to 4).
It's a little complicated, but actually quite clever, because UCSD can choose to only rank the best and brightest IMGs in their A2 IMG list, and the most attractive research people on their A1 research list, without worrying about what to do if their chosen candidates don't Match--because those spots "revert" back to the A0 list.
Click on "Program Tracks" below to review a brief blurb from NRMP that mentions that programs with these "tracks" set up a "reversion in the R3 system, if necessary, to guard against the program being unfilled".
Program Tracks
So, don't worry about UCSD. They will fill their research/IMG spots.
Now, if your question is about IR and DR--those are 2 different residencies, so they don't have a "reversion" system for that. Currently this isn't an issue for IR programs--did any not fill in the past? I haven't looked closely at that, but I suspect not.