-3

I am writing software that makes use of a neural net. What makes my network special as compared to others, is the way I train them. Its non standard, its something that I don't want to give away to another company. So I've been thinking about how to protect myself against miss-use / stealing of my neural net training code. The company who is buying this software has about 12 C++ coders hired, while I write solely in C#, and I have doubt that I could keep some parts secret to them, as reverse engineering is likely to occur. When the software i make becomes a success.

So at first I though lets put some secure key in as a requirement to create an instance of this class, and without that drop execution, some sort of licence construction. That sounds nice, but as for neural networks training them is an essential part; training methods should be able to create neural networks. Then a trainer would need a key generator as well...

Then I was thinking how about leaving-out the option to train data. So the other company is only able to load the trained brain. But not to train the neural network, by placing all training related code into a separate .cs file as a partial class. Then I simply develop the neural net class as a whole on my private github. But take out only the snippet without training routines to use in my customer program.
I wonder if this would be a wise thing to do, or if it would result in some anti pattern. ???

one anti pattern for example is maintaining the neural net code.
To "copy" one file of a github project to another project isnt ideal.


This is not a general duplicate of another protections question. This is about a program requiring A+B parts to train, but only A to run it, and not providing the B part.

Peter
  • 137

3 Answers3

4

When a company is buying your software, you will have a contract that states what you deliver and what they can do.

Chances are that what you are planning will cause them to not sign a contract in the first place. They don't get what they want, and they have to work with someone who might come up with other interesting ideas in the future. I would run.

Remember, there's a contract. A company can't just steal things. Most companies don't. And those that do usually get their arse sued off.

gnasher729
  • 49,096
1

Software is a kind of knowledge, and knowledge is extremely difficult to protect.

Can you protect your software with technical means ?

You can't do anything in your code about theft, if it is self-sufficient. Even without the source code, any protection mechanism that you could have implemented, would need some functionality in your code to be managed. Reverse engineering could then find out the details, even decryption key.

The only active technical protection that you could consider would be to make your software dependent on some web service under your control (e.g. training the net as a service), or a physical device that contains a part of your code in an encrypted area (e.g. the "dongle" approach). However both require an extra effort on your side, and might not be accepted by your customer.

Can you legally protect your software ?

On the legal side you may consider to apply for a patent if your invention is brand new and if you're living or making business in one of the rare country that allows software patent. But be aware that huge research efforts are made on machine learning and neural nets, and it is not to be excluded that your invention was already invented by some lab around the world, without you knowing from it.

Another approach is to rely on a restrictive licence agreement to legally forbid the company to misuse your code for another purpose. This should be combined with a non-disclosure agreement that shall enforce legal protection also agains theft of your customer's employee who might walk away with the knowledge. The principle is that the company signs an NDA with you (and this might be independent of the final contract and the financial details), and then commits to organise NDA with anyone who has access to the code.

Legal protection is a theoretical protection, because it'll be up to you to find out any infringement and demonstrate that it'll be a theft, and pay for all the legal expertise, unless you win a trial and get reimbursed. But a serious business partner may have much more incentive in having a good relationship with you and respect the terms of the contract if you add value to his products.

In any case, and especially if it's about big business, for the legal aspects, you'd better consult a qualified legal expert or lawyer in your jurisdiction, rather than relying on personal opinions on some internet forums. (By the way, I'm not a lawyer and this is not a qualified legal advice)

Further reading

  • The software IP detective handbook from Bob Zeidman gives a great introduction on Intellectual Property and related concepts for non-lawyers and software engineers.
Christophe
  • 81,699
1

Create two assemblies. Assembly A contains all of the classes required to use the trained model, but none of the code which trains the model. Assembly B contains only the classes which train models, and nothing else. Assembly B references assembly A.

Deliver assembly A, and keep assembly B to yourself.

Your question and comments makes it sound like you have one "neural net class" which contains the code both for using and training the model. Don't do that. It also sounds like you're thinking of having two versions of the neural net code, one with training functionality and one without training functionality. Don't do that either.

Instead, have a Model class (in assembly A) which contains the code necessary for using the model, but none of the code which is essential to training the model; and have a separate Trainer class (in assembly B) which trains the model by interacting with Model objects. Assembly B should not contain any of the functionality of the Model class.

Sophie Swett
  • 1,349