25 votes

Who owns the code? If ChatGPT's AI helps write your app, does it still belong to you?

Tags: chatgpt

20 comments

  1. [9]
    WittyPat
    Link
    If I write my own code and that snippet already exists on stack overflow or some open source project, is it no longer my code even though there's only a few ways to accomplish some tasks? I know...

    If I write my own code and that snippet already exists on stack overflow or some open source project, is it no longer my code even though there's only a few ways to accomplish some tasks?

    I know it's a touchy topic, however I see ChatGPT as a tool to do something I already did faster. I've always used stack overflow or open source projects as inspiration for implementations I need in my applications. If there are solutions out there that have been tried and tested by hundreds or thousands of people, then why wouldn't I want to use it. Even if these sources didn't exist, I'm sure I would eventually come up with a similar solution so it goes back to the question before: if I write a piece of code that already exists, is that code not mine?

    19 votes
    1. [4]
      Kitahara_Kazusa
      Link Parent
      In theory I'm pretty sure this is the case. With how Stack Overflow works, you are free to copy any code you like from it, on the condition that whatever code you copy is now released under the...

      If I write my own code and that snippet already exists on stack overflow or some open source project, is it no longer my code even though there's only a few ways to accomplish some tasks?

      In theory I'm pretty sure this is the case. With how Stack Overflow works, you are free to copy any code you like from it, on the condition that whatever code you copy is now released under the Creative Commons license. I'm not sure how actively this is enforced, and my guess would be that it isn't enforced at all, but the way the laws are written if you copy anything substantial from Stack Overflow then you are obligated to release it under Creative Commons license.

      AI written code is different, because even if you don't have the copyright to it, you also are not under any obligation to release it to anyone. In practice it would function like a trade secret, you don't want to release it to the public because it could give them a competitive advantage over you, but if it does get out to the public then there's nothing you can do to legally stop them from using it.

      However this would only apply to the sections of the code that were actually written by the AI, any manual work that you did, such as fixing errors or arranging smaller segments of AI generated code together, would still be covered by copyright, according to the latest US court rulings.

      3 votes
      1. [3]
        WittyPat
        Link Parent
        Not sure how this would ever be enforced. Goes back to my statement before that for some tasks there are only a limited way to do them, like if (a > b) { ... } Am I under the creative commons...

        Not sure how this would ever be enforced. Goes back to my statement before that for some tasks there are only a limited way to do them, like

        if (a > b) {
          ...
        }
        

        Am I under the creative commons license because that snippet exists on stack overflow? Am I stealing a trade secret because they incorporate some of that logic?

        You can say in return that it could be limited to a combination of multiple snippets. At that point, is it a certain percentage of similarity to infringe? Take a calculator app for example, under any these rules we're saying there can only be one calculator implementation.

        That's why I have trouble siding with the creators of the code as I'm sure even the creators took it from someone else and iterated on it to make it slightly better or fit a niche use case.

        3 votes
        1. Kitahara_Kazusa
          Link Parent
          Ultimately it is up to the copyright courts to decide what counts as substantial, and what is just common sense that anyone can re-use.

          Ultimately it is up to the copyright courts to decide what counts as substantial, and what is just common sense that anyone can re-use.

          4 votes
        2. sparksbet
          Link Parent
          There's a concept in copyright law called the merger doctrine that is pretty relevant for examples like this (and most stack overflow answers imo). The gist is this it's already a thing in...

          There's a concept in copyright law called the merger doctrine that is pretty relevant for examples like this (and most stack overflow answers imo). The gist is this it's already a thing in copyright law that you can't copyright ideas, only expressions of ideas (e.g., I can copyright my painting of a horse but I can't copyright the idea of painting a horse). But sometimes the expression of an idea is so limited that it's indistinguishable from the idea itself.

          For instance, there's a fairly small number of ways to write Python code to double every character in a string, so I can't copyright my code doing that (at least not on its own) because that's essentially indistinguishable from copyrighting the idea of doubling every character in a string.

          3 votes
    2. userexec
      Link Parent
      I know it's not ownership in general, but with Github Copilot at least, they're pretty explicit that they don't own what Copilot suggests, which is a nice start. I checked out the filter and it...

      I know it's not ownership in general, but with Github Copilot at least, they're pretty explicit that they don't own what Copilot suggests, which is a nice start.

      1. Ownership of Suggestions and Your Code.
        GitHub does not claim any ownership rights in Suggestions. You retain ownership of Your Code.
      1. Responsibility for Your Code.
        You retain all responsibility for Your Code, including Suggestions you include in Your Code or reference to develop Your Code. It is entirely your decision whether to use Suggestions generated by GitHub Copilot. If you use Suggestions, GitHub strongly recommends that you have reasonable policies and practices in place designed to prevent the use of a Suggestion in a way that may violate the rights of others. This includes, but is not limited to, using all filtering features available in GitHub Copilot.
      1. Defense of Third Party Claims.
        If your Agreement provides for the defense of third party claims, that provision will apply to your use of GitHub Copilot. Notwithstanding any other language in your Agreement, any GitHub defense obligations related to your use of GitHub Copilot do not apply if (i) the claim is based on Code that differs from a Suggestion provided by GitHub Copilot, or (ii) you have not enabled all filtering features available in GitHub Copilot.

      I checked out the filter and it seems pretty straightforward in what it's going to blot out:

      GitHub Copilot includes a filter which detects code suggestions that match public code on GitHub. When the filter is enabled, GitHub Copilot checks code suggestions with their surrounding code of about 150 characters against public code on GitHub. If there is a match or near match, the suggestion will not be shown to you.

      I'm not sure I'd even bother filtering with its current level of suggestions, though. It's not suggesting entire modules or even entire functions unless they're pretty simple, obvious ones that I was about to type anyway. Most of its suggestions are small and localized enough that I can't imagine it ripping off some full-on licensed implementation of something all in one go.

      I appreciate how up-front they are about the terms, and I've really enjoyed using it so far. As I've described it to other people, it hasn't eliminated any of the skill checks in my job, but it has actually alleviated a whole bunch of time checks. I freaking love it for boring tasks like generating a bunch of repetitive test data.

      2 votes
    3. Sisyphu5
      Link Parent
      Similar to math problems. A math book will provide simple solutions and proofs without attribution, but anything clever or significant is attributed to someone who came up with it first (or at...

      Similar to math problems. A math book will provide simple solutions and proofs without attribution, but anything clever or significant is attributed to someone who came up with it first (or at least published it first). I think the same way about the code snippets ChatGPT can come up with.

      1 vote
    4. asdfjackal
      Link Parent
      To take that metaphor a step further, if I look through the source code of some popular library to help me learn best practices and common patterns of a new language I'm learning, does every...

      To take that metaphor a step further, if I look through the source code of some popular library to help me learn best practices and common patterns of a new language I'm learning, does every program I write in that language have to share the license of that library? Do I have to attribute credit to the authors of every tutorial I've followed when I use the concepts I learned there? As long as it is not literally copying huge snippets from libraries, which I've seen it done exactly zero times without someone engineering the prompt to do so, I think we're probably good, right?

  2. [3]
    Comment deleted by author
    Link
    1. [2]
      carsonc
      Link Parent
      I think there is a "specific" in that document that bears highlighting: So, simply because a program incorporates AI-generated material, even a lot of it, doesn't change authorship. (Caveat: I am...

      I think there is a "specific" in that document that bears highlighting:

      In other cases, however, a work containing AI-generated material will also contain sufficient human authorship to support a copyright claim. For example, a human may
      select or arrange AI-generated material in a sufficiently creative way that “the resulting work as a whole constitutes an original work of authorship.”

      So, simply because a program incorporates AI-generated material, even a lot of it, doesn't change authorship. (Caveat: I am a casual programmer, have never thought about copyright of code, and am unlikely to ever have need to.)

      4 votes
      1. sparksbet
        Link Parent
        I think the idea is that anything written solely by an AI is definitionally not copyrightable, so you could reuse it wholesale without violating copyright law, because OpenAI or whoever doesn't...

        I think the idea is that anything written solely by an AI is definitionally not copyrightable, so you could reuse it wholesale without violating copyright law, because OpenAI or whoever doesn't own any copyright on the AI-generated code. But if you change things about the AI code or combine it with other things, you may end up with something that is sufficiently a work of your own authorship that you own the copyright, which would not be the case if you just used the AI-generated code.

        3 votes
  3. [4]
    introspect
    Link
    I don't know if the author was using the same ChatGPT that we're using, but ChatGPT cannot reliably write a fully working function, much less modules, without the human touch (extensive...

    But you've used ChatGPT to write a few modules, and linked that resulting code into your app.

    I don't know if the author was using the same ChatGPT that we're using, but ChatGPT cannot reliably write a fully working function, much less modules, without the human touch (extensive modifications; strenuous staring-at-IDE-and-find-subtle-bugs, etc.).

    Even if they own everything their AI had helped with, how would the enforce that? "We found line 475 of your myFirstProject.cpp has 6 tokens matching your usage of our AI on December 17th of 2022"? What if it's a coincidence?

    10 votes
    1. [2]
      Comment deleted by author
      Link Parent
      1. zielperson
        Link Parent
        This is actually an interesting point. As python is more human readable than other languages, the syntax might follow "normal" language patterns, enabling an LLM to create this easier. So now we...

        This is actually an interesting point.

        As python is more human readable than other languages, the syntax might follow "normal" language patterns, enabling an LLM to create this easier.

        So now we give it a chatty language like pascal? (Reads like a book, writes like a book)

    2. zielperson
      Link Parent
      YMMV I have experimented a bit with ChatGPT creating code. It has written an entire Python program with GUI, no problems with only a few prompts which was me correcting my specs, and the LLM...

      YMMV

      I have experimented a bit with ChatGPT creating code.

      It has written an entire Python program with GUI, no problems with only a few prompts which was me correcting my specs, and the LLM changing the code.

      It has also failed at another task I tried to have it do - but it still got some way there which made it possible to make a few tweaks and go.

      So I guess first and foremost, this thing can teach you how to word requirements.
      The code is of varying quality, but still takes a load off grunt work.

      3 votes
    3. vxx
      Link Parent
      Keep in mind that ChatGPT is a language model. It does programming tasks quite well for basically calculating what word is the most likely to come next based on context and stored information....

      Keep in mind that ChatGPT is a language model. It does programming tasks quite well for basically calculating what word is the most likely to come next based on context and stored information.

      This is just the beginning and not the holy grail, it's actually far from it, but it shows the possible capacity specialised models or AI tools can have in the future.

  4. CuriosityGobble
    Link
    I just couldn't read much of this article. I'll admit that the legality of it may shake out a little differently than this but I'll post a similar question, does a word processor deserve credit if...

    I just couldn't read much of this article. I'll admit that the legality of it may shake out a little differently than this but I'll post a similar question, does a word processor deserve credit if I write a book with it? Does a calculator deserve credit if I prove a theory with it?

    GPT is amazing, but it's still just a tool and as far as I'm concerned, until it can legitimately say that it wants to take credit for something, that I don't think it should get credit for anything beyond the $20 monthly fee to use GPT for.

    2 votes
  5. the9tail
    Link
    There’s a huge difference between ChatGPT writing generally about a topic and it writing something after you have given it detailed instructions on what you want, then going through iterations to...

    There’s a huge difference between ChatGPT writing generally about a topic and it writing something after you have given it detailed instructions on what you want, then going through iterations to refine it and then you applying it elsewhere.

    It’s a tool - and it isn’t perfect. If it was perfect, then there might be a case for it owning something but it’s clearly not.

    1 vote
  6. AaronNight
    Link
    From my point of view, if I use IDE to write code, the result does not belong to JetBrains or Microsoft. Same with AI assistents. I consider it as a tool that helps me to shape result code, but...

    From my point of view, if I use IDE to write code, the result does not belong to JetBrains or Microsoft. Same with AI assistents. I consider it as a tool that helps me to shape result code, but not to solve problems that need creative solutions.

    I'm curious, what if in a prompt text I'll ask AI to add license of it's choice, and the license will be free, could I use the result output as a part of program?

    1 vote
  7. akselmo
    Link
    I dont see any point using these copy-paste bots in the first place. Makes things faster? With speed often comes bugs.

    I dont see any point using these copy-paste bots in the first place. Makes things faster? With speed often comes bugs.

  8. Leftbones
    Link
    The way I see it, if ChatGPT wrote the code, you don't own the code. If ChatGPT wrote your entire application, you don't own that application, you merely published it. Since ChatGPT only knows...

    The way I see it, if ChatGPT wrote the code, you don't own the code. If ChatGPT wrote your entire application, you don't own that application, you merely published it. Since ChatGPT only knows what it learns from other people, what you're essentially doing is copy/pasting code from Stackoverflow to make something work.

    However, this assumes that ChatGPT can even write anything functional without human intervention. In my experience, it can't do that very well at all. I do use ChatGPT when I'm writing code, but only when I have some specific issue that I can't find by searching on my own. I'll ask it for an example, study the code it gives me to understand how it's done, then write it in my way. It's helpful for that, especially because if I don't understand part of the code, I can ask it for clarification.

    I think AI is an extremely valuable tool for programmers, but I don't think it should (or ever will) replace them.