Are neural nets (the weights file) copyrightable?

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

Moderators: hgm, Dann Corbit, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
User avatar
hgm
Posts: 25860
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

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

Post by hgm » Tue Feb 23, 2021 12:22 pm

syzygy wrote:
Tue Feb 23, 2021 11:56 am
NN weights are not like that. At best they express a program's functionality, which is not copyrightable.
I don't think so. Java byte code expresses the functionality of a Java program. A .exe file expresses the functionality of the corresponding C program. Yet the .jar and .exe files inherit the copyrights of the source code they were derived from.

It would be perfectly allowed to distribute a .exe file that does have the same functionality as a copyrighted program of others. As long as it achieves that functionality in another way, which cannot mechanically created from that other copyrighted program.

A neural net is the implementation of an algorithm just as much as Java byte code is.

syzygy
Posts: 4974
Joined: Tue Feb 28, 2012 10:56 pm

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

Post by syzygy » Tue Feb 23, 2021 12:33 pm

hgm wrote:
Sun Feb 21, 2021 6:56 pm
gonzochess75 wrote:
Sun Feb 21, 2021 6:42 pm
I contend that:

1) NNUE nets are not copyrightable.
2) If they are copyrightable, then they are clearly subject to the GPLv3 with Stockfish.

I don't think there is any way to get around that. I think the most likely reality is #1 full stop.
I suppose you mean one or the other here.

Well, 1 seems wrong. The NNUE weights represent chess knowledge, which could have been painstakenly collected by the creator of the net, through selecting what to offer as training material. As such they are the result of an intellectual effort, and thus count as intellectual property. To which copyright law then automatically applies.
"Painstakingly" is unrelated to copyrightability.
A manually crafted evaluation function is certainly a human-made collection of chess knowledge, but if the collection was made with the sole aim of improving playing strength rather than expressing some sort of free creativity, there is no copyright involved. (Writing down the source code to implement the evaluation function can involve some free creativity in the selection of variables names, etc.)

NNUE nets are almost certainly not copyrightable.
2) seems also completely wrong. 'Clearly' here only seems to mean 'because I think and say so', but have no factual legal basis.

In copyright law things are released under the licence stipulated by the copyright holder.
The most you could claim is that it is illegal to link the FF2 net with Stockfish, because they have incompatible license.
Here I agree. Plus, I don't see a problem with linking to Stockfish at runtime. An NNUE net, if copyrightable, is not a derived work of Stockfish even if it was specifically designed for use in Stockfish. There is simply no copyrightable material from Stockfish present in an NNUE net. (Linus is right, Stallman is wrong.)

syzygy
Posts: 4974
Joined: Tue Feb 28, 2012 10:56 pm

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

Post by syzygy » Tue Feb 23, 2021 12:39 pm

gonzochess75 wrote:
Sun Feb 21, 2021 8:06 pm
hgm wrote:
Sun Feb 21, 2021 7:57 pm
Animated movies nowadays are output of a computer program. That doesn't mean they are free of copyrights...
But those are the works of human authors and creative works. They're also not derivative works of GPL'd software. But suit yourself to a double standard.
The question is who makes the creative choices that are perceptible in the final product. For a computer-generated animated movie, that will normally still be a human. For an NNUE net, I don't see any such creative choices that are perceptible when watching the engine play.

syzygy
Posts: 4974
Joined: Tue Feb 28, 2012 10:56 pm

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

Post by syzygy » Tue Feb 23, 2021 12:41 pm

brianr wrote:
Sun Feb 21, 2021 8:38 pm
gonzochess75 wrote:
Sun Feb 21, 2021 8:06 pm
But those are the works of human authors and creative works. They're also not derivative works of GPL'd software. But suit yourself to a double standard.
Training a basic net from instructions is fairly straightforward, although there are many quite exacting steps. Carefully testing and measuring its strength is also required and not trivial to do properly and accurately. At net a very roughly 3,000 Elo can be done in a week or less if you have done it before. However, each additional 100 Elo gets increasingly difficult. Training a net that is competitive with the top tier nets is extremely difficult. And, there is about as much art as there is science, some of which must be creative to find some new approaches that improve strength. So, nets are certainly the result of human authors.
But, as you say, the goal is to improve strength. Innovations in Formula 1 cars aren't copyrightable if they aim to increase the car's performance rather than its aesthetics.

User avatar
towforce
Posts: 10778
Joined: Wed Mar 08, 2006 11:57 pm
Location: Birmingham UK

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

Post by towforce » Tue Feb 23, 2021 12:46 pm

Two steps:

1. without doubt, a neural net weight file is software

2. software can be copyrighted

As far as I'm concerned, that's that.

I do think that in the case of FF2, a challenge could be made to the copyright on the basis that it's not original work - that's a different issue. I genuinely don't know what the outcome of such a challenge would be. However, I don't think anyone is going to make such a challenge: those who don't want to spend time doing research, want a product that's ready to use, don't mind (or don't know) that Chessbase is making a bit of a fool out of them, and who want a brand name, will pay. Others won't.
Writing is the antidote to confusion

syzygy
Posts: 4974
Joined: Tue Feb 28, 2012 10:56 pm

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

Post by syzygy » Tue Feb 23, 2021 12:46 pm

hgm wrote:
Mon Feb 22, 2021 12:54 pm
Some people here seem to think so. Even worse, all engines that have been developed on PCs running Windows are owned by MicroSoft. And those on Mac by Apple.

In real life output of a program is never covered by copyrights on that program. So it is not really relevant what license the Stockfish NNUE training tools (or MS Word, or the C compiler) have.
Unless the output contains copyrightable material from the program generating the output. Programs like yacc therefore make an exception for such material (which is easy to do: just license that material without any restrictions on its use).

chrisw
Posts: 3866
Joined: Tue Apr 03, 2012 2:28 pm

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

Post by chrisw » Tue Feb 23, 2021 12:47 pm

hgm wrote:
Tue Feb 23, 2021 12:22 pm
syzygy wrote:
Tue Feb 23, 2021 11:56 am
NN weights are not like that. At best they express a program's functionality, which is not copyrightable.
I don't think so. Java byte code expresses the functionality of a Java program. A .exe file expresses the functionality of the corresponding C program. Yet the .jar and .exe files inherit the copyrights of the source code they were derived from.
This is true, the .exe data and the source code it was derived from are (more or less) interconvertible.

Assuming the source is written by human hand and has a degree of creativity then it is copyrightable, and the interconvertable exe data also has that copyright.

Same applies to digitised music, artwork and so on, the original creativity can be pulled back out of it again. Sheet music from an MP3 file and so on.

But, and I didn’t see it mentioned here as yet, neural network data can’t be back-converted to anything, code or otherwise, created by human hand. It’s a one-way street, irreversible, and the data <==> code equivalence on which the copyright argument depends does not exist. No copyright on NN data.

It would be perfectly allowed to distribute a .exe file that does have the same functionality as a copyrighted program of others. As long as it achieves that functionality in another way, which cannot mechanically created from that other copyrighted program.

A neural net is the implementation of an algorithm just as much as Java byte code is.

syzygy
Posts: 4974
Joined: Tue Feb 28, 2012 10:56 pm

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

Post by syzygy » Tue Feb 23, 2021 12:50 pm

hgm wrote:
Tue Feb 23, 2021 12:22 pm
syzygy wrote:
Tue Feb 23, 2021 11:56 am
NN weights are not like that. At best they express a program's functionality, which is not copyrightable.
I don't think so. Java byte code expresses the functionality of a Java program. A .exe file expresses the functionality of the corresponding C program. Yet the .jar and .exe files inherit the copyrights of the source code they were derived from.
This is an interesting issue.

Either the bytecode is protected by the copyright on the source code simply because the law says so.

Or the bytecode is only protected insofar as some of the creative choices made when writing the source code are still visible from the bytecode.

I'm not sure which position is the right one (and whether the answer is the same in the US and in the EU). But it does not help NN weights.

syzygy
Posts: 4974
Joined: Tue Feb 28, 2012 10:56 pm

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

Post by syzygy » Tue Feb 23, 2021 12:58 pm

towforce wrote:
Tue Feb 23, 2021 8:59 am
I think that a set of NN weights would be like "chess advice": if I were to write, "Take your opponent's pieces, promote your pawns, and then trap your opponent's king", if nobody else had said that using those words, then I would be able to copyright them.
But you would have copyright only on that particular string of words, not on the advice itself. Express the advice in a different way, and you escape the copyright. There is no doubt that "chess advice" is free of copyright.

And you have copyright on that particular string of words only in so far as you have used some creative freedom in expressing it. Your example might barely pass the threshold (or it might not... for you to try in court).

An NNUE net expresses chess advice as a series of numbers. There is no human using his or her free creativity to select those numbers (and even if a human would somehow do so, the creativity would not be visible from the resulting series of numbers, so it would still not count).

So there is no copyright on NNUE weights.
Precedent: a lot of the ideas for Dan Brown's book "Da Vinci Code" came from "Holy Blood, Holy Grail", but the authors of the original book failed in their attempt to sue because no actual expressions from the original had been used - just ideas.
Indeed.

User avatar
towforce
Posts: 10778
Joined: Wed Mar 08, 2006 11:57 pm
Location: Birmingham UK

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

Post by towforce » Tue Feb 23, 2021 1:09 pm

syzygy wrote:
Tue Feb 23, 2021 12:58 pm
towforce wrote:
Tue Feb 23, 2021 8:59 am
I think that a set of NN weights would be like "chess advice": if I were to write, "Take your opponent's pieces, promote your pawns, and then trap your opponent's king", if nobody else had said that using those words, then I would be able to copyright them.
But you would have copyright only on that particular string of words, not on the advice itself. Express the advice in a different way, and you escape the copyright. There is no doubt that "chess advice" is free of copyright.

And you have copyright on that particular string of words only in so far as you have used some creative freedom in expressing it. Your example might barely pass the threshold (or it might not... for you to try in court).

An NNUE net expresses chess advice as a series of numbers. There is no human using his or her free creativity to select those numbers (and even if a human would somehow do so, the creativity would not be visible from the resulting series of numbers, so it would still not count).

So there is no copyright on NNUE weights.
Precedent: a lot of the ideas for Dan Brown's book "Da Vinci Code" came from "Holy Blood, Holy Grail", but the authors of the original book failed in their attempt to sue because no actual expressions from the original had been used - just ideas.
Indeed.

A good precedent would be IBM PC clones: the PC was made out of "standard parts" (as opposed to IBM proprietary parts), so soon companies wanted to make their own version of it. Some of the system level software was proprietary, but clone manufacturers were allowed to write their own version of it, providing it was done in a "clean room": the developers were only allowed to know the functional requirements of the software - they were not allowed to see ANY of the original code. They succeeded - and the chances are very slim that anyone using an Intel architecture PC/laptop today are using one manufactured by IBM.

You said there is no copyright on NNUE weights, but NNUE weights are very obviously software, and software can be copyrighted.
Writing is the antidote to confusion

Post Reply