It's based off your native intellect stat regardless of gear boosts to proficiencies. If you are using headband of Intellect but run Int sub-10 to boost your other stats in character creation, the game will still take that native -1 penalty in rolls regardless of your Int being 17 through the headband.