This is cumulative across playthroughs. You do not need to win a game, or research all the modules to level 4 in one playthrough.
You do need to research the highest level of all modules at least once.
In order to research, and therefore upgrade, modules you need to find an "Artifact" somewhere on a floor and press X.
Each new module, or upgrade, will take 3 opened doors to complete.
However, when you open the last door on a floor all ongoing research will finish automatically.