Are neural nets (the weights file) copyrightable?

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

Moderator: Ras

Michel
Posts: 2292
Joined: Mon Sep 29, 2008 1:50 am

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

Post by Michel »

hgm wrote: Thu Feb 25, 2021 7:48 pm They also did not make a conventional evaluation in a DLL.
Distributing SF with a non freely distributable net is almost the same I think (the net can be viewed as a library).
Ideas=science. Simplification=engineering.
Without ideas there is nothing to simplify.
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 »

Ckappe wrote: Wed Feb 24, 2021 10:32 pm But the argument that an NN-weight file (or any huge parm-file binary ) can be copyrighted similar to an art-image, song, or design is most likely shot down pretty hard by any skilled IP-lawyer, regardless of your "interpretation" of the GPL FAQ.
Uff, you haven’t bothered to read my past posts. In a different domain, a medical device, an IP law firm offered my client the opinion that a pretrained model could probably be copyrighted, but that it had yet to be tested in court.

If you want to make a yet another contrarian post, go ahead, but I’m done with you.
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".
User avatar
towforce
Posts: 12514
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 »

I'm sure you're all DYING to know where I'm at right now! :)

1. I stand by my previous position, which was that NNs and their weights are software, and thus can be copyrighted

2. For me, the most important part of the GPL FAQ is this - link. From this, it is clear to me that even if Chessbase have put the NN weights into a separate file, they are still part of the same program, because:

a. the technical reasons given - it's not used like a separate program would be (command line to start the program when needed or a service request of some type). In the case of a file of weights, they're going to be loaded into an NN, which is 100% STONE COLD CERTAINLY part of the program.

b. they are part of the program in the original program (StockFish) in every possible way

So I am moving to the following position: NNs and their weights can be copyrighted, but as they are part of a GPL program that has been modified, they should be published.

The FAQ makes it clear that one can charge for GPL software - but the sources must be provided if requested. As pointed out by others, the Chessbase charge covers more than the right to run the FF2 software. But for the topic of this thread, I think that the GPL license puts CB under an obligation to allow free access to their NN weights file.
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 »

towforce wrote: Fri Feb 26, 2021 12:23 am I'm sure you're all DYING to know where I'm at right now! :)

1. I stand by my previous position, which was that NNs and their weights are software, and thus can be copyrighted

2. For me, the most important part of the GPL FAQ is this - link. From this, it is clear to me that even if Chessbase have put the NN weights into a separate file, they are still part of the same program, because:

a. the technical reasons given - it's not used like a separate program would be (command line to start the program when needed or a service request of some type). In the case of a file of weights, they're going to be loaded into an NN, which is 100% STONE COLD CERTAINLY part of the program.

b. they are part of the program in the original program (StockFish) in every possible way

So I am moving to the following position: NNs and their weights can be copyrighted, but as they are part of a GPL program that has been modified, they should be published.

The FAQ makes it clear that one can charge for GPL software - but the sources must be provided if requested. As pointed out by others, the Chessbase charge covers more than the right to run the FF2 software. But for the topic of this thread, I think that the GPL license puts CB under an obligation to allow free access to their NN weights file.
Welcome to the fold towforce. I still stand by my opinion that the weights cannot be copyrighted, but if so they are just like any other sources to SF and must be released under a GPL compatible license. Note: that was the exact premise and conclusion of the original post in this thread.
Dann Corbit
Posts: 12792
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

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

Post by Dann Corbit »

And I stand by my opinion that I do not know if weights can be copyrighted.
That opinion, along with $4.80 can get you a nice caramel macchiato at Starbucks.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
Michel
Posts: 2292
Joined: Mon Sep 29, 2008 1:50 am

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

Post by Michel »

  • So a NNUE net is a library written in a mathematical language for which SF happens to include an interpreter. It is really a library since it delivers an estimate for something that can be measured. So it is nothing like a painting or music.
  • As such if a the net is distributed with SF (to make a modified work) it has to be under a GPL compatible licence (per the GPL faq).
  • It seems the GPL cannot apply to a net because the GPL itself says it is only applicable to source code. But this does not relieve the net from having to be GPL compatible. And I am sure that being not freely distributable is GPL incompatible.
  • So it seems to me that by distributing SF with a non freely distributable net, ChessBase is committing a GPL violation.
Ideas=science. Simplification=engineering.
Without ideas there is nothing to simplify.
User avatar
towforce
Posts: 12514
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 »

I think that the more closely one reads the GPL FAQ, the more it looks as though FF2's weights file is covered by the GPL, and I think that this will come to be the view that most impartial people (I put myself in that category: I have no interest (in the legal sense) in Chessbase, I am not planning to use FF2 whether it's free or paid, and I agree with the point that if you buy FF2, you get a lot more than the StockFish program) will gravitate to.

So whether or not a weights file can be copyrighted is probably not important in this case.

However, I am still mystified that people think that a file of NN weights could not be copyrighted: it seems obvious to me that it can, and I am struggling to see the opposite point of view. Does anyone dispute either of the following two facts?

1. an NN is software

2. a set of NN weights is source code

I'm hoping not to get into a big argument about this, I'd just like to understand.
Human chess is partly about tactics and strategy, but mostly about memory
Michel
Posts: 2292
Joined: Mon Sep 29, 2008 1:50 am

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

Post by Michel »

towforce wrote: Fri Feb 26, 2021 10:23 am I think that the more closely one reads the GPL FAQ, the more it looks as though FF2's weights file is covered by the GPL, and I think that this will come to be the view that most impartial people (I put myself in that category: I have no interest (in the legal sense) in Chessbase, I am not planning to use FF2 whether it's free or paid, and I agree with the point that if you buy FF2, you get a lot more than the StockFish program) will gravitate to.

So whether or not a weights file can be copyrighted is probably not important in this case.

However, I am still mystified that people think that a file of NN weights could not be copyrighted: it seems obvious to me that it can, and I am struggling to see the opposite point of view. Does anyone dispute either of the following two facts?

1. an NN is software

2. a set of NN weights is source code

I'm hoping not to get into a big argument about this, I'd just like to understand.
I agree that a NN is code (a library) but:

Source code in the GPL is defined as the preferred format to modify the work. One does not modify a NN by directly modifying the weights. So the weights do not constitute source code in the sense of the GPL and one can argue that there is no well defined concept of source code for a NN. In addition the GPL states that it can (only?) be applied to works for which the concept of source code is meaningful.

Moreover it has been argued here that based on general principles of copyright law there should be no copyright for object code, but copyright law makes an exception in this case so that object code inherits the copyright of the source code it was derived from. I have no opinion on this but if this is true then NN's are not copyrightable (which means that they are automatically GPL compatible and freely distributable).

In any case I think a net distributed with SF must be under a GPL compatible license (if a license applies to it), but this can probably not be the GPL itself (which is not all that relevant).
Ideas=science. Simplification=engineering.
Without ideas there is nothing to simplify.
User avatar
towforce
Posts: 12514
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 10:53 am
towforce wrote: Fri Feb 26, 2021 10:23 am I think that the more closely one reads the GPL FAQ, the more it looks as though FF2's weights file is covered by the GPL, and I think that this will come to be the view that most impartial people (I put myself in that category: I have no interest (in the legal sense) in Chessbase, I am not planning to use FF2 whether it's free or paid, and I agree with the point that if you buy FF2, you get a lot more than the StockFish program) will gravitate to.

So whether or not a weights file can be copyrighted is probably not important in this case.

However, I am still mystified that people think that a file of NN weights could not be copyrighted: it seems obvious to me that it can, and I am struggling to see the opposite point of view. Does anyone dispute either of the following two facts?

1. an NN is software

2. a set of NN weights is source code

I'm hoping not to get into a big argument about this, I'd just like to understand.
I agree that a NN is code (a library) but:

Source code in the GPL is defined as the preferred format to modify the work. One does not modify a NN by directly modifying the weights. So the weights do not constitute source code in the sense of the GPL and one can argue that there is no well defined concept of source code for a NN. In addition the GPL states that it can (only?) be applied to works for which the concept of source code is meaningful.

Moreover it has been argued here that based on general principles of copyright law there should be no copyright for object code, but copyright law makes an exception in this case so that object code inherits the copyright of the source code it was derived from. I have no opinion on this but if this is true then NN's are not copyrightable (which means that they are automatically GPL compatible and freely distributable).

So I think a net distributed with SF must be under a GPL compatible license (if a license applies to it), but this can probably not be the GPL itself (which is not all that relevant).

But in any case FF2 either constitutes a GPL violation or else is at least freely distributable.

Thank you - that's a good, clear answer. It looks as though the GPL is not ideal for computer generated code then.

My opinion, then, is that it's going to be difficult to apply the GPL to either computer generated code or computer generated art. Going back the the new Rembrandt (link), although it hasn't been tested in a court, the legal view expressed in that article is that the company that commissioned a piece of work would be able to claim a copyright on it (in this case, a work of art). On that basis, leaving aside GPL completely (because, as you've pointed out, GPL doesn't yet have anything to say about code that doesn't have well-defined source code), an NN, and hence its weights, could be copyrighted.
Human chess is partly about tactics and strategy, but mostly about memory
User avatar
towforce
Posts: 12514
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 »

The view at opensource stackexchange is that the GPL probably doesn't cover an NN - link.

It's a more difficult question than it looks!

Given what Chessbase have actually done, which is:

1. put the NN weights into a separate file

2. put a weaker set of NN weights into the freely available version

...it looks as though somebody at Chessbase has read the second response on that actual page.
Human chess is partly about tactics and strategy, but mostly about memory