There as a video that showcased it on youtube but i can't find it.
Basically there's a hidden point and tier system in place. Things like killing enemies, not taking damage and headshots award points, things like taking damage and dying subtract points. Based on your point score you get dynamically moved up or down hidden difficulty tiers. The higher your tier the more aggressive the enemies will be, the more damage they will do and the more enemies there will be per encounter. The differences between the highest and lowest tier are actually massive.