Through my limited testing, I always assumed it was based on what you put in, each trait being set up on a roll table, and it giving you something random.
Say you put in 3 items:
Naonite Salvaging Turret (With +10% Bonus Efficiency)
Titanium Mining Turret
Iron Chain Gun Turret
So the traits you have are:
Material: Naonite, Titanium, Iron
Type: Salvaging, Mining, Chain Gun
Bonuses: +10% Eff, Nothing, Nothing
Each "trait" has a 1 / X amount to give you that when you research, where X is the amount of items for each part. So you have a 300% chance to get Naonite, Titanium, or Iron back, no matter type you end up with. Then it rolls for type, again since there are 3, 33% chance for each. And lastly, bonuses, where it's only have a 33% to keep it, but 67% chance to lose it.
I haven't messed with the research enough to really confirm this though, mostly just self theory.
Edit: So I put in the same exact 5 salvaging turrets and didn't get anything better on them other than the quality. It picked up two new bonuses, lost it's efficiency bonus, and dealt a bit more damage. So my theory above is just words now, since it seems more random than anything.