Are neural nets (the weights file) copyrightable?

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

gonzochess75
Posts: 208
Joined: Mon Dec 10, 2018 3:29 pm
Full name: Adam Treat

Re: Are neural nets (the weights file) copyrightable?

Post by gonzochess75 »

hgm wrote: Mon Feb 22, 2021 5:17 pm
gonzochess75 wrote: Mon Feb 22, 2021 4:56 pm The NN weights are not a 'program' and the NNUE backend is not an 'interpreter' in any actual sense other than the fevered imaginations of those looking to find loopholes to violate other people's copyright. The NN weights do not form any sort of program in any theory of computation.
You obviously have never heard of data-flow computers.
They certainly are not Turing complete.
Since when is that relevant?
And the NNUE backend does not provide an abstract computational model.
Actually conventional boolean logic on which digital computer hardware is based (gates and flipflops and such) are special cases of neural networks. (Depending on the threshold and activation funtion single neurons can perform the function of AND and OR gates, and negative weights can emulate inverters. So neural nets in general are as Turing-complete as our PCs. (Which is only nearly so, as memory is finite in all cases.)

That an NNUE doesn't need a Turing-complete interpreter to run it seems irrelevant. There are also computer programs (such as "hello world") which do not need recursion. That doesn't disqualify them as computer programs.
Regardless, it would be irrelevant. The combination of an engine (search) and and NN backend (eval) + NN weights is a whole program and a single complete work. If you take the engine away the weights are useless. If you take the eval away and don't load weights for the NN eval the program, then the eval is useless.
If you take the interpreter away, the JavaScript file becomes useless. If you take all JavaScript files away, the interpreter becomes useless...
If you want to create an NN set of weights and use them in a proprietary program, then don't use GPL'd software to do it. Try actually writing your own engine with your own work. But of course people don't do that because of how difficult it is and what an investment it is. But isn't that what you should expect from someone claiming to provide lots of money in value?
This might be an ethical code by which you could live. But there is no law that enforces it.
Your fevered imagination is putting up nonsense to justify violation of other's copyright. Stringing together words about dataflow computers as non-sequiturs doesn't help your case in the slightest and I wonder why you think it would.
User avatar
hgm
Posts: 28386
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Are neural nets (the weights file) copyrightable?

Post by hgm »

Well, it helps showing to the neutral reader you know zilch about computers, and showing you know zilch about law. You seem a pretty hopeless case, so I would certainly not expect to convince you of anything. You will just keep repeating the same nonsense as a broken record, no matter how often the knowledgeable people haf refuted you with facts.
gonzochess75
Posts: 208
Joined: Mon Dec 10, 2018 3:29 pm
Full name: Adam Treat

Re: Are neural nets (the weights file) copyrightable?

Post by gonzochess75 »

dkappe wrote: Mon Feb 22, 2021 5:22 pm
gonzochess75 wrote: Mon Feb 22, 2021 4:56 pm If you want to create an NN set of weights and use them in a proprietary program, then don't use GPL'd software to do it. Try actually writing your own engine with your own work. But of course people don't do that because of how difficult it is and what an investment it is. But isn't that what you should expect from someone claiming to provide lots of money in value?
Ah, programmers and the law. :)

Leaving aside the question of copyrighting neural networks, if I understand your argument, you are claiming that ChessBase is distributing a proprietary program? Or that because stockfish can be used with a net, that net falls under the GPLv3? Or both?

My understanding is that ChessBase is distributing a slightly modified stockfish and providing the source code. Is that not the case? (We return for the 500th time to the same place.)

You are no doubt aware that there are by now other implementations of NNUE under other licenses? I just ripped out and replaced nnue in a0lite with a MIT licensed version. So now the SF nets, because they can be run in a0lite, fall under the MIT license? That doesn’t seem right. Please explain.
They are not distributing the net with those other engines under those other licenses. They are explicitly distributing it with stockfish which is covered under the GPL and therefore their distribution of it must adhere to the requirements of the GPL or they are violating the copyright of SF developers. The specific manner of their distribution is as a plugin to a GPL'd program and as such they are required to make the sources for that plugin available if SF developers request (and they have) and license it under the GPL or another GPL compatible license like the CC0. To my knowledge they have not done so as the net they are distributing commercially is not the same one they have opened sourced.

This is not that complicated. Sorry you are having tough time understanding.
Last edited by gonzochess75 on Mon Feb 22, 2021 5:50 pm, edited 1 time in total.
dkappe
Posts: 1632
Joined: Tue Aug 21, 2018 7:52 pm
Full name: Dietrich Kappe

Re: Are neural nets (the weights file) copyrightable?

Post by dkappe »

hgm wrote: Mon Feb 22, 2021 5:31 pm Well, it helps showing to the neutral reader you know zilch about computers, and showing you know zilch about law. You seem a pretty hopeless case, so I would certainly not expect to convince you of anything. You will just keep repeating the same nonsense as a broken record, no matter how often the knowledgeable people haf refuted you with facts.
But he did point out that you are “fevered.” Saturday Night Fever?
Fat Titz by Stockfish, the engine with the bodaciously big net. Remember: size matters. If you want to learn more about this engine just google for "Fat Titz".
gonzochess75
Posts: 208
Joined: Mon Dec 10, 2018 3:29 pm
Full name: Adam Treat

Re: Are neural nets (the weights file) copyrightable?

Post by gonzochess75 »

hgm wrote: Mon Feb 22, 2021 5:31 pm Well, it helps showing to the neutral reader you know zilch about computers, and showing you know zilch about law. You seem a pretty hopeless case, so I would certainly not expect to convince you of anything. You will just keep repeating the same nonsense as a broken record, no matter how often the knowledgeable people haf refuted you with facts.
I've written the substantial portion of a top three chess engine and meaningfully contributed to another top ten chess engine with several patches.

I've also written compilers/transcompilers for the Lambda Calculus, the SKI calculus, and even made my own toy Turing Complete languages. All licensed under the GPL btw.

For my day job part of my responsibilities include educating engineers and sales folks on the intricacies and nuances of the GPL/LGPL and commercial licensing for one of the foremost and notable companies who dual license such software. I also work on and have code in many of the devices you likely use in your everyday life including many of the cars on the road, the airplanes you fly in and the devices which might save your life if you find yourself in an emergency room/ICU due to this covid pandemic.

I've been involved with and working on GPL/LGPL software including for the better part of 20 years and have made numerous contributions to the very browser which you are using to read this message!

What have you done?
Last edited by gonzochess75 on Mon Feb 22, 2021 5:43 pm, edited 1 time in total.
dkappe
Posts: 1632
Joined: Tue Aug 21, 2018 7:52 pm
Full name: Dietrich Kappe

Re: Are neural nets (the weights file) copyrightable?

Post by dkappe »

gonzochess75 wrote: Mon Feb 22, 2021 5:32 pm

They are not distributing the net with those other engines under those other licenses. They are explicitly distributing it with stockfish which is covered under the GPL and therefore their distribution of it must adhere to the requirements of the GPL or they are violating the copyright of SF developers. The specific manner of their distribution is as a plugin to a GPL'd program and as such they are required to make the sources for that plugin available if SF developers request (and they have) and license it under the GPL. To my knowledge they have not done so as the net they are distributing commercially is not the same one they have opened sourced.

This is not that complicated. Sorry you are having tough time understanding.
This really is starting to resemble a broken record. From the network test page. https://tests.stockfishchess.org/nns
These networks are freely available for download and sharing under a CC0 license.
What is the CC0?
CC0, “No Rights Reserved”

CC0 enables scientists, educators, artists and other creators and owners of copyright- or database-protected content to waive those interests in their works and thereby place them as completely as possible in the public domain, so that others may freely build upon, enhance and reuse the works for any purposes without restriction under copyright or database law.

In contrast to CC’s licenses that allow copyright holders to choose from a range of permissions while retaining their copyright, CC0 empowers yet another choice altogether – the choice to opt out of copyright and database protection, and the exclusive rights automatically granted to creators – the “no rights reserved” alternative to our licenses.
I’m sorry I’m having such hard time understanding. Reality keeps getting in the way.
Fat Titz by Stockfish, the engine with the bodaciously big net. Remember: size matters. If you want to learn more about this engine just google for "Fat Titz".
Michel
Posts: 2292
Joined: Mon Sep 29, 2008 1:50 am

Re: Are neural nets (the weights file) copyrightable?

Post by Michel »

dkappe wrote: Mon Feb 22, 2021 5:22 pm My understanding is that ChessBase is distributing a slightly modified stockfish and providing the source code. Is that not the case?
As I see it they are distributing a modified SF and another program (the net) which is loaded into SF's address space and which is vital for SF to work properly. With this reasoning the net distributed by ChessBase falls under the GPL (just like a dll would).

People claim that the because the net is not directly executed by the CPU but instead is interpreted by SF it is exempt from the GPL. I do not buy this. I consider the method by which code is translated into actions irrelevant.
Ideas=science. Simplification=engineering.
Without ideas there is nothing to simplify.
gonzochess75
Posts: 208
Joined: Mon Dec 10, 2018 3:29 pm
Full name: Adam Treat

Re: Are neural nets (the weights file) copyrightable?

Post by gonzochess75 »

dkappe wrote: Mon Feb 22, 2021 5:42 pm
gonzochess75 wrote: Mon Feb 22, 2021 5:32 pm

They are not distributing the net with those other engines under those other licenses. They are explicitly distributing it with stockfish which is covered under the GPL and therefore their distribution of it must adhere to the requirements of the GPL or they are violating the copyright of SF developers. The specific manner of their distribution is as a plugin to a GPL'd program and as such they are required to make the sources for that plugin available if SF developers request (and they have) and license it under the GPL. To my knowledge they have not done so as the net they are distributing commercially is not the same one they have opened sourced.

This is not that complicated. Sorry you are having tough time understanding.
This really is starting to resemble a broken record. From the network test page. https://tests.stockfishchess.org/nns
These networks are freely available for download and sharing under a CC0 license.
What is the CC0?
CC0, “No Rights Reserved”
I’m sorry I’m having such hard time understanding. Reality keeps getting in the way.
It is not reality, but your own ignorance that is getting in the way. Try asking yourself... is the CC0 a GPL compatible license? Oh wait it is??!! That means that they've adhered to the GPL just like they must??!!!

But wait, did CB distribute FF2 net under CC0?? NO??!!! Ok, but did they distribute it under any GPL compatible license??!!! Oops. Making sense to your very slow learning process yet???
dkappe
Posts: 1632
Joined: Tue Aug 21, 2018 7:52 pm
Full name: Dietrich Kappe

Re: Are neural nets (the weights file) copyrightable?

Post by dkappe »

Michel wrote: Mon Feb 22, 2021 5:42 pm
dkappe wrote: Mon Feb 22, 2021 5:22 pm My understanding is that ChessBase is distributing a slightly modified stockfish and providing the source code. Is that not the case?
As I see it they are distributing a modified SF and another program (the net) which is loaded into SF's address space and which is vital for SF to work properly. With this reasoning the net distributed by ChessBase falls under the GPL (just like a dll would).

People claim that the because the net is not directly executed by the CPU but instead is interpreted by SF it is exempt from the GPL. I do not buy this. I consider the method by which code is translated into actions irrelevant.
The GPL FAQ is your friend. https://www.gnu.org/licenses/gpl-faq.html
If a programming language interpreter is released under the GPL, does that mean programs written to be interpreted by it must be under GPL-compatible licenses?

When the interpreter just interprets a language, the answer is no. The interpreted program, to the interpreter, is just data; a free software license like the GPL, based on copyright law, cannot limit what data you use the interpreter on. You can run it on any data (interpreted program), any way you like, and there are no requirements about licensing that data to anyone.

However, when the interpreter is extended to provide “bindings” to other facilities (often, but not necessarily, libraries), the interpreted program is effectively linked to the facilities it uses through these bindings. So if these facilities are released under the GPL, the interpreted program that uses them must be released in a GPL-compatible way. The JNI or Java Native Interface is an example of such a binding mechanism; libraries that are accessed in this way are linked dynamically with the Java programs that call them. These libraries are also linked with the interpreter. If the interpreter is linked statically with these libraries, or if it is designed to link dynamically with these specific libraries, then it too needs to be released in a GPL-compatible way.

Another similar and very common case is to provide libraries with the interpreter which are themselves interpreted. For instance, Perl comes with many Perl modules, and a Java implementation comes with many Java classes. These libraries and the programs that call them are always dynamically linked together.

A consequence is that if you choose to use GPLed Perl modules or Java classes in your program, you must release the program in a GPL-compatible way, regardless of the license used in the Perl or Java interpreter that the combined Perl or Java program will run on.
I’ve dump one of my networks in a hex editor and been over the nnue code. I don’t see anywhere where the network is making a call or binding to code in the binary. Is that not correct?
Fat Titz by Stockfish, the engine with the bodaciously big net. Remember: size matters. If you want to learn more about this engine just google for "Fat Titz".
dkappe
Posts: 1632
Joined: Tue Aug 21, 2018 7:52 pm
Full name: Dietrich Kappe

Re: Are neural nets (the weights file) copyrightable?

Post by dkappe »

gonzochess75 wrote: Mon Feb 22, 2021 5:47 pm It is not reality, but your own ignorance that is getting in the way. Try asking yourself... is the CC0 a GPL compatible license? Oh wait it is??!! That means that they've adhered to the GPL just like they must??!!!

But wait, did CB distribute FF2 net under CC0?? NO??!!! Ok, but did they distribute it under any GPL compatible license??!!! Oops. Making sense to your very slow learning process yet???
So now you’re not making an argument, just spicing up your post with lots of punctuation and trying to turn it into a food fight. No point in engaging further.
Fat Titz by Stockfish, the engine with the bodaciously big net. Remember: size matters. If you want to learn more about this engine just google for "Fat Titz".