This one is quite simple; Although generic.attack_knockback is a perfectly valid attribute, it can only be used as a base attribute for mobs, and does not currently work with items.
/give @p minecraft:stick{AttributeModifiers:[{AttributeName:"generic.attack_knockback",Name:"generic.attack_knockback",Amount:10,Operation:0,UUID:[I;5,5,5,5],Slot:"mainhand"}]} 1
The command above gives the nearest player a stick which increases Attack Knockback by 10, however, when using the stick as a weapon, the extra knockback does not apply, although the description does say "+10 Attack Knockback".
Linked issues
Attachments
Comments

Also relates to MC-138868.

Yes it is the same bug. I gave this stick to a skeleton that can pick up loot command: /summon minecraft:skeleton ~ ~1 ~ {CanPickUpLoot:1b} And the attribute worked. So the attribute on items has exactly the same issue that it only works on mobs.
[media]
This is probably the same issue as MC-180199.