The mastery may be linked to the enemies you defeat with the attack, I haven't tried it that much but one of the newer ones I found is much higher than my first one. This could be due to using that weapon more, but I know I killed one of the minibosses with a special attack.
I feel like a similar system was used in Portrait of Ruin, which upgraded based on the XP from the enemy killed by the attack. In other words, using it to 'hurt' enemies would never advance it's level, but beating them down and using the special for the final blow, you could rake in the XP.
Nirwanda: Well in my case opnly techniques that i actually perform get added to my list despite the onscreen text implying the technique has been written unpon reading it...
This seems to be the case until you perform that special attack. Once you read it, you can check back in your archive or whatever it's called. If you have one of those weapons, performing the attack should add it to your techniques, randomly finding the special attack should do the same.