Are neural nets (the weights file) copyrightable?

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

Moderator: Ras

User avatar
towforce
Posts: 12518
Joined: Thu Mar 09, 2006 12:57 am
Location: Birmingham UK
Full name: Graham Laight

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

Post by towforce »

syzygy wrote: Fri Feb 26, 2021 9:06 pmI guess the relevant condition is c). But c) merely requires me to distribute "the whole of the work". What is a "work" is defined by copyright law. SF and an NNUE net zipped together are two works, not one.

This is where the section of the GPL FAQ I linked in an earlier post was good - it explained this very well. Let me explain it in my own way, though:

Suppose there was a phone app for the weather: the part in the phone is the UI, and the weather forecast is obtained by a web service request to a server. The program on the phone would clearly be a different program to the one on the web server. Me putting the phone software under GPL would not oblige the owner of the program running on the server to put that program under GPL.

Other examples they gave of one program using another program as a service included pipes, command prompt etc.

Now take a look at Stockfish NNUE: it is VERY clear that the NN is part of the program. If you fork the program and amend the NN, the NN will STILL be under GPL. There are cases you could argue about, but in this case, from the section of the GPL that I linked previously, there's no room for discussion: the NN and its weights are part of the forked program, and are covered by the GPL.
Human chess is partly about tactics and strategy, but mostly about memory
syzygy
Posts: 5742
Joined: Tue Feb 28, 2012 11:56 pm

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

Post by syzygy »

gonzochess75 wrote: Fri Feb 26, 2021 9:50 pm
syzygy wrote: Fri Feb 26, 2021 9:44 pm
gonzochess75 wrote: Fri Feb 26, 2021 9:14 pm
syzygy wrote: Fri Feb 26, 2021 9:06 pm... What is a "work" is defined by copyright law. SF and an NNUE net zipped together are two works, not one.
This is I think where we part ways and the fundamental disagreement that we're arguing over. The GPL explicitly defines what it means by a combined work as anything not meeting the definition of mere "aggregate."
I still don't see where it does that. Condition c) does not mention "aggregate". Nor does it say that it applies to a "compilation" that include the Program or a work based on it.

Condition c), to make sense at all, necessarily must use "work" in the sense in which it is used in copyright law, since otherwise it would be ridiculous to state that "This License will therefore apply, ..., to the whole work, and all its parts". The license on SF ("This License") cannot apply to the NNUE net if the NNUE net is not part of the same "work" as the modified SF. Zipping them together does not make them part of the same "work".
Do you believe the NNUE weights are:
  • "by their nature extensions of the covered work"
or
  • "combined with it such as to form a larger program"
Where the weights are distributed with a GPL'd engine regardless the packaging?
So what if the zip file wouldn't be an "aggregate"? The GPLv3 does not attach any legal consequence to it. This is the point.
syzygy
Posts: 5742
Joined: Tue Feb 28, 2012 11:56 pm

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

Post by syzygy »

Michel wrote: Fri Feb 26, 2021 9:52 pm
syzygy wrote: Fri Feb 26, 2021 9:44 pm
gonzochess75 wrote: Fri Feb 26, 2021 9:14 pm
syzygy wrote: Fri Feb 26, 2021 9:06 pm... What is a "work" is defined by copyright law. SF and an NNUE net zipped together are two works, not one.
This is I think where we part ways and the fundamental disagreement that we're arguing over. The GPL explicitly defines what it means by a combined work as anything not meeting the definition of mere "aggregate."
I still don't see where it does that. Condition c) does not mention "aggregate". Nor does it say that it applies to a "compilation" that include the Program or a work based on it.

Condition c), to make sense at all, necessarily must use "work" in the sense in which it is used in copyright law, since otherwise it would be ridiculous to state that "This License will therefore apply, ..., to the whole work, and all its parts". The license on SF ("This License") cannot apply to the NNUE net if the NNUE net is not part of the same "work" as the modified SF. Zipping them together does not make them part of the same "work".

The other text you cited doesn't impose any extra conditions beyond a), b), c) and d).
As I understand it when they say “This License will therefore apply, ..., to the whole work, and all its parts” is that if this conflicts with the licence of one of the parts you cannot distribute.
Then it should have said that the other parts have to be distributed under the GPLv3 (or a compatible license). And it should not have used "work" if it didn't mean "work".
Michel
Posts: 2292
Joined: Mon Sep 29, 2008 1:50 am

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

Post by Michel »

To me it is quite clear that SF together with the net is one work since SF uses the net as a library. I don’t think it matters what copyright law says about this. What’s relevant is how the GPL defines it.
Last edited by Michel on Fri Feb 26, 2021 10:00 pm, edited 1 time in total.
Ideas=science. Simplification=engineering.
Without ideas there is nothing to simplify.
User avatar
towforce
Posts: 12518
Joined: Thu Mar 09, 2006 12:57 am
Location: Birmingham UK
Full name: Graham Laight

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

Post by towforce »

towforce wrote: Fri Feb 26, 2021 9:52 pmThis is where the section of the GPL FAQ I linked in an earlier post was good - it explained this very well. Let me explain it in my own way, though:

Suppose there was a phone app for the weather: the part in the phone is the UI, and the weather forecast is obtained by a web service request to a server. The program on the phone would clearly be a different program to the one on the web server. Me putting the phone software under GPL would not oblige the owner of the program running on the server to put that program under GPL.

Other examples they gave of one program using another program as a service included pipes, command prompt etc.

Now take a look at Stockfish NNUE: it is VERY clear that the NN is part of the program. If you fork the program and amend the NN, the NN will STILL be under GPL. There are cases you could argue about, but in this case, from the section of the GPL that I linked previously, there's no room for discussion: the NN and its weights are part of the forked program, and are covered by the GPL.

Here's the relevant FAQ section of the GPL 3 license - link.
Human chess is partly about tactics and strategy, but mostly about memory
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 »

syzygy wrote: Fri Feb 26, 2021 9:55 pm
gonzochess75 wrote: Fri Feb 26, 2021 9:50 pm
syzygy wrote: Fri Feb 26, 2021 9:44 pm
gonzochess75 wrote: Fri Feb 26, 2021 9:14 pm
syzygy wrote: Fri Feb 26, 2021 9:06 pm... What is a "work" is defined by copyright law. SF and an NNUE net zipped together are two works, not one.
This is I think where we part ways and the fundamental disagreement that we're arguing over. The GPL explicitly defines what it means by a combined work as anything not meeting the definition of mere "aggregate."
I still don't see where it does that. Condition c) does not mention "aggregate". Nor does it say that it applies to a "compilation" that include the Program or a work based on it.

Condition c), to make sense at all, necessarily must use "work" in the sense in which it is used in copyright law, since otherwise it would be ridiculous to state that "This License will therefore apply, ..., to the whole work, and all its parts". The license on SF ("This License") cannot apply to the NNUE net if the NNUE net is not part of the same "work" as the modified SF. Zipping them together does not make them part of the same "work".
Do you believe the NNUE weights are:
  • "by their nature extensions of the covered work"
or
  • "combined with it such as to form a larger program"
Where the weights are distributed with a GPL'd engine regardless the packaging?
So what if the zip file wouldn't be an "aggregate"? The GPLv3 does not attach any legal consequence to it. This is the point.
This is where we disagree I guess. To me that section is clearly saying that the previous terms in that very section don't apply to a mere "aggregate". The obvious and straightforward reading is that they do apply if you don't meet the definition of mere "aggregate." I think this is the legal reading as well.
User avatar
towforce
Posts: 12518
Joined: Thu Mar 09, 2006 12:57 am
Location: Birmingham UK
Full name: Graham Laight

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

Post by towforce »

Michel wrote: Fri Feb 26, 2021 9:59 pm To me it is quite clear that SF together with the net is one work since SF uses the net as a library. I don’t think it matters what copyright law says about this. What’s relevant is how the GPL defines it.

Exactly: as I explained - the net is being used as part of the code - not as a service from another piece of code. Also, SF combines them into one code base.
Human chess is partly about tactics and strategy, but mostly about memory
syzygy
Posts: 5742
Joined: Tue Feb 28, 2012 11:56 pm

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

Post by syzygy »

towforce wrote: Fri Feb 26, 2021 9:52 pm Now take a look at Stockfish NNUE: it is VERY clear that the NN is part of the program. If you fork the program and amend the NN, the NN will STILL be under GPL. There are cases you could argue about, but in this case, from the section of the GPL that I linked previously, there's no room for discussion: the NN and its weights are part of the forked program, and are covered by the GPL.
But it is wrong to look at this with programmer's eyes.

Copyright on source code does not protect the functionality of the program but only its expression as a piece of text (in so far as there is any remaining creativity of the human author in the functionality's expression -- something that would seem to be lacking in the case of an NN). Two pieces of text with their own copyrights remain two pieces of text with their own copyrights if the program routines they implement communicate through pipes or whatever.
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 »

syzygy wrote: Fri Feb 26, 2021 9:57 pm Then it should have said that the other parts have to be distributed under the GPLv3 (or a compatible license). And it should not have used "work" if it didn't mean "work".
Your problems with the GPL are then fundamental. If we used your reading that would mean every dynamic library linked to a GPL'd program would not be considered part of a combined work. This would make the GPL effectively the same as the LGPL.

The reasons to believe that the GPL is not the same as the LGPL are:

1) There are numerous court cases where the GPL has been upheld and in particular with regard to linking to shared libraries
2) Those court cases have amassed 100's of millions of dollars in penalties for the side caught violating the GPL
3) Entire industries of fortune 500's would be completely upturned overnight if your reading prevailed

That's why I'm confident that the GPL is not effectively the same as the LGPL.
syzygy
Posts: 5742
Joined: Tue Feb 28, 2012 11:56 pm

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

Post by syzygy »

gonzochess75 wrote: Fri Feb 26, 2021 10:00 pmThis is where we disagree I guess. To me that section is clearly saying that the previous terms in that very section don't apply to a mere "aggregate". The obvious and straightforward reading is that they do apply if you don't meet the definition of mere "aggregate." I think this is the legal reading as well.
In my reading, the drafter of the GPLv3 made the incorrect assumption that a compilation would be a "work" and would therefore in principle be covered by the Program's copyright. If that assumption were correct, the aggregate paragraph exempts certain cases from the GPL. But the assumption is not correct, and the drafter loses.