Before changing the code base I would try to write an nn.Module or autograd.Function to see, if the method works as expected.
Even though it will most likely be slower, you could quickly implement it and run a few tests.
One issue I expect is that if you just swap the addition to a subtraction and the multiplication to a division, the new bias could just be the negation of the old one and the weights the reciprocal.
Anyway, I’m not familiar with your use case, but I would still recommend to try your idea first on the Python side.