AI Contributions Policy Proposal

Rationale

There are more frequent pull requests that have been mostly generated by AI, where it’s not disclosed and the author may not fully understand what they are contributing.

Code review and maintenance has always been a big bottleneck. With AI contributions that the contributor does not fully understand themselves, this puts an even bigger burden on reviewers. Worst case, reviewers are effectively talking to an AI through a game of telephone.

There is value in educating new developers to grow the project, also when it would have been faster for the reviewer to make the changes themselves (with or without AI). For this reason, reviewers should know if they are working together with a human, so they can decide when they want to make this effort.

On the other hand, AI assisted code review and checks based on our guidelines on developers.blender.org have the potential to lighten the burden for reviewers, or help fix bugs and improve stability. So there are ways contributors can help make this a positive for the project.

Example Policies

Proposed Policy

This is based on the Fedora policy (CC BY-SA 4.0) with some things that are not relevant to Blender left out, and the third paragraph added by me. The wording is more formal than our other guidelines on developer.blender.org, and this could be tweaked. But it’s a starting point for discussion.

This a proposed policy for Blender development, regarding code and issues on projects.blender.org and related documents like code.blender.org or devtalk.blender.org posts. The wording effectively covers documentation and translation as well.

Generative AI for images and assets are not part of this, It makes more sense to use art created using Blender and other open source creative tools, and copyright concerns seem harder to verify than code.

  • You may use AI assistance for contributing to Blender development with code and text, as long as you follow the principles described below. You should not contribute AI generated images and 3D assets. The principles apply to the entirety of contributions including code, images and other files.

  • Accountability: You must take the responsibility for your contribution. Contributing to Blender means vouching for the quality, license compliance, and utility of your submission. All contributions, whether from a human author or assisted by large language models (LLMs) or other generative AI tools, must meet the project’s standards for inclusion. The contributor is always the author and is fully accountable for the entirety of these contributions.

    You must understand and manually review code, designs, bug reports, descriptions and comments you submit, and carefully test the resulting functionality and fixes for code contributions. Your own effort should provide significant value beyond the output of tools.

  • Transparency: You must disclose the use of AI tools when a significant part of your contribution, descriptions or comments are taken from a tool. You should disclose the other uses of AI tools, where it might be useful. Routine use of assistive tools for e.g. correcting grammar, spelling or translation does not require disclosure.

    Disclosures are made where authorship is normally indicated. For contributions tracked in git, use an Assisted-by: commit message trailer. For other contributions, disclosure may be a note in the design document, issue description or comment.

  • Decision Making: AI tools may be used to assist human reviewers by providing analysis and suggestions. You must not use AI as the sole or final arbiter in making a substantive or subjective judgment on a contribution.

If reviewers strongly suspect a contribution does not follow this policy, they reserve the right to close the pull request or issue without review.

Proposed Policy (v2)

With advances in AI tools it has become easier to generate and contribute code, documentation and designs. However quality is often poor, and reviewers and maintainers already lack the time to handle all contributions.

For the health of the project, contributions must follow these rules, and (with few exceptions) these guidelines too. This policy applies to code, documentation and design contributions for Blender development, as well as bug reports and comments. It does not apply to Blender extensions.

If reviewers strongly suspect a contribution does not follow this policy, they reserve the right to close the pull request or issue without review.

Rules

  • You must take the responsibility for your contribution. Contributing to Blender means vouching for the quality, license compliance, and utility of your submission. All contributions, whether from a human author or tool generated, must meet the project’s standards for inclusion. The contributor is always the author and is fully accountable for the entirety of these contributions.

  • You must understand and manually review code, designs, bug reports, descriptions and comments you submit, and carefully test the resulting functionality and fixes for code contributions. Do not pass along tool generated output without reading or understanding it yourself.

  • You must disclose the use of AI tools when a significant part of your contribution, descriptions or comments are taken from them. Add an Assisted-by: trailer in commit messages and pull request descriptions. Only humans can be commit authors or listed as Co-authored-by:.

Guidelines

  • Your own effort should provide significant value beyond the output of tools. If you are merely acting as an intermediary between the tool and reviewer, this is likely a waste of the reviewer’s time . They could have been using the tool directly or could have chosen different priorities.

  • Primarily think of tools as a way to improve the quality of your contributions and the Blender project, rather than a way to work faster or go beyond your expertise. If a tool does part of the work for you, that means you have more time for careful testing, and thinking through design and corner cases. Additionally, these tools are able to perform in depth code reviews. For this reason, the quality bar for AI generated contributions is higher than other contributions.

  • Write your own descriptions and comments (even if your English is not perfect). The developer community needs to have human to human interactions and build trust, and this is impossible without talking to a real person. This also helps you to think through things.

  • Do not solve Good First Issues with AI. These are meant as a learning experience and require time investment from reviewers, which is wasted on AI.

  • If generated code is not clearly an extension to or refactoring of existing code, expect extra scrutiny and potential rejection due to copyright risk.

47 Likes

Beside of Assisted-by: i don’t see anything we can actually control in this rules.

Until there is no some AI model with guarantee that idea of designs created by it are not copyright of something from internet but fully its own development we can’t accept any of AI assisten contibution for more than two loops.

Right now any AI’ contribution feels like feature request sent to chat instead of to rcs. And i dont see how someone can learn and grow in doing things themself if even simple things are vibe coded. So you cant progress from begin and cant just start from something hard with AI.

1 Like

While i have nothing against AI, there’s quite a distance between

“i used ai cause it saved me a bunch of repetitive typing, it’s essentially spicy code completion”

and

“i yolo’d the whole thing, i have no idea what any of this stuff does”

I’m pretty sure the whole reason for having this policy is the noise the latter category generates.

Which makes me wonder : do we need a specific AI policy there? All of these policies kinda boil down to the same thing, people have to be able understand/explain their changes, and the contribution has to be compatible with our license, but.. honestly that is/should be expected from everyone even if they are not using AI.

So the only thing that could be in an AI policy is the disclosure, but honestly, it’s easy to lie on the internet, there’s no way for any of us to prove ai was or wasn’t used in a specific contribution, so it’s kinda pointless.

and then there’s the fact, that the people who make the “yolo” style contributions are not very likely to read a policy page on our developer documentation.

So while i’m not against having an ai policy, i kinda feel the regular contributor policy should already cover most of these points. so no specific ai policy is required.

3 Likes

I think there are few reasons the policy is useful:

  • For core developers and reviewers, it is good to clarify if they can submit or accept AI generated code at all when it meets the standards..
  • For low effort contributions, it helps to have a simple link people can be pointed to and not go into discussions.
  • When the contributor discloses that they used AI, reviewers can avoid the work of trying to confirm their suspicions or help just in case it’s a human contribution.
  • If open source projects in general have these policies and it becomes common knowledge, I think that will discourage low effort contributions to some extent.
  • Some people have good intentions and are genuinely not aware of the problem with their contributions, and may just need a nudge to adjust their methods.
7 Likes

in that case there’s nothing wrong with the policy as is, i personally like the clear wording mesa has a bit better but i’ll admit, it’s splitting hairs.

2 Likes

I think it’s less about the amount of code and more the type of change.

For example, I added support in Cycles for storing some attributes as half float to save memory, and had AI do an initial implementation. There were 200 lines of straightforward changes that just did the same thing as existing data types, adding extra conditionals, enum items, etc.

But also 20 line were added to convert from float to half float with support for denormals, inf and nan. For that I could not determine the copyright (or correctness easily), so I replaced it with an implementation from a source with a known compatible license. A human implementing and contributing this could have copied from an incompatible source too.

So some judgement is needed when accepting code like this.

2 Likes

Speaking as an artist whose primary tool is Blender, I mostly post my art in communities that are anywhere from leery of to outright hostile towards generative AI (considerations mainly being stolen data used to train, excessive environmental impacts, and economic impacts including artists being replaced by their own stolen remixed art & computer component prices driven up by AI data centers). The analytical AI in Blender’s denoising (etc) isn’t usually considered an issue, but I’ll always include in the colophon what software I used (Blender most often gets pride of place) and that no generative AI was used in making my art.

If I can’t post that no generative AI was used in making an artwork with Blender? I’d largely have to stop using Blender. I doubt I’m the only artist who’ll have that problem.

Given how much volunteer work goes into making Blender I know better than to ask for a “NO Generative AI in our code ever!” guarantee, there’s no practical way to be sure of that. But official policy making clear that generative AI contributions (art, code, whatever) are unwelcome? I’d appreciate that.

8 Likes

This example only reflect the difference of use of calculator by elementary school student and professional matematician. And my problem is that part of new developers near to school one.

1 Like

Regardless of how the code was written I don’t think you need to be worried too much as it has no bearing on how the art is created as long as no LLM is included in blender itself.. That said, as a coder I feel the same about AI. I worry about the energy use, I think it’s the world’s biggest plagiarism machine. I worry about it changing my profession as a coder in a way I don’t really like where I change from a creative problem solver info someone who just checks the output of a robot. And I really dislike that you need an account with some evil empire , which makes open source coders loose our independence again just as we more or less wrestled free from the grip of the closed source compiler makers.

On the other hand, some uses of AI in coding are basically search&replace on steroids, where you let the machine just do the gruntwork boilerplate code and add the interesting bits yourself. Even then I worry about the energy use and the effect AI will have on society but I don’t think blender can really afford to not use allow that kind of AI because a whole new generation of coders will not want to work without it.

9 Likes

Pretty much agree to what @Baardaap wrote. The amount of AI that is shoved into every nook and cranny at the moment would pretty much eliminate any program from being used if anyone wanted to go 100% artificially clean. That’s like eating nothing processed ever again. We are already too far to make it feasible, unfortunately. I also dislike aynthing AI for all the obvious reasons (mostly theft by large companies who want profit and control, environmental issues, RAM costs a month of income now …).

I think having an AI policy is important. Even if it maybe changes not much in practice it makes it clear that anyone who contributes to Blender has to be aware of and take responsibility for its use. There is a difference between allowing and not caring. A policy sets the boundaries that people need to know and can’t say they were unaware of, later.

8 Likes

If somebody’s using anti-AI-art rhetoric to pushback on any digital art then using generative AI code in Blender is handing them ammunition. That having been said, although I think that awareness of the issues Blender artists are facing needs to be considered in forming this AI policy (that’s why I brought it up), it’s too nebulous to base a solid “Blender coders shouldn’t use generative AI code because it hurts Blender artists” on. “Is digital art really art?” has been fought for decades, seemed firmly settled on the “yes of course it is” side, and is now getting dragged back with variations on “we can all tell my clay sculpture that I vidded making in front of my mother with my own hands with clay I dug up out of a field isn’t AI, how can we be sure about what you ‘sculpted’ in Blender?” I don’t think anybody needs this topic going into the “What is art?” weeds.

Blender advocacy relies strongly on the ethics of using free open source programs. The Blender interrelated companies are carefully structured so big-money donations can be accepted without giving corporate interests untoward influence over Blender’s development, for one example. That we can reliably show the employees and volunteers who make Blender are fairly treated is another example. So it’s a practical consideration, if people are less likely to trust Blender then they’re less likely to use it and/or less likely to support it. Although I appreciate brecht citing the AI policies of other FOSS projects, these are fast-moving issues and variations on “they do it, we can too” aren’t alleviating my concerns — the more digital asbestos is allowed into Blender’s code, the harder it’s going to be to dig out later.

If some Blender coders refuse to code without free the-code-almost-writes-itself generative AI tools from “some evil empire” then nanny-nag purity-policing isn’t going to prevent it, and the requirement that a human must understand and be responsible for each contribution should at least improve the situation. But at minimum we need some understanding that, given the massively expensive resources going into them these “free” tools can’t stay free for long, and relying on them is gonna bite. Whatever can be done to officially discourage generative AI code in Blender I’d appreciate.

There’s a big difference between ‘generative AI code’ (code doing generative AI) and ‘code generated with AI’ (which is what this discussion is about).

I don’t really think the core blender team is planning to add generative AI inside blender itself.

I wholeheartedly agree there!

6 Likes

The discussion seem to be derailing to a different topic than the original RFC.

The thing is: it doesn’t really matter what we think of the AI tools, gen-AI etc. There are contributors with the different mindset from ours, and we can’t really do anything about it than to have a policy to help us saving time. From this perspective what I like is:

  • The proposal does not forbid using tools
  • It does request transparency
  • It leaves us right to simply close the PR if we feel it is a waste of our time

The latter one is something that I feel Mesa wording is lacking. The good actors would not follow any guidelines, and having some tool for developers and moderators to shut down wasteful conversation (without sparking “why did you close the PR” discussion) sounds more than reasonable to me.

15 Likes

Thanks!

Sorry to be unclear, “code generated with AI” is what I’ve been referring to, didn’t mean to suggest that Blender’s gonna be doing generative AI art. That having been said, there’s a fruit of the poisonous tree issue here: to someone trying to avoid supporting the harms caused by generative AI it makes little difference if Blender itself is making generative AI art, or is now made with code generated by AI. Both contribute to environmentally wasteful / economically impactful outcomes to the benefit of “some evil empire”.

I don’t want to either, but I’m no purist — my objections to using generative AI tools (art, code, whatever) are because of the harms they cause, without those harms I personally have no objections. Yet I need to be able to say that the art I post was, so much as feasible, ethically made. Blender has been considered a particularly ethical tool compared to anything else in its field, one I’ve been happy to say I use and support. I’d rather that wasn’t damaged by the inclusion of “code generated with AI”.

3 Likes

@KickAir_8p it’s not quite as clear of a line to draw for code as it is with AI art, take something like this for instance;

create-declaration-and-definition-different-files

Should we required people disclose that they used productivity aid like that? Should we ban it from the blender code base all together? How would you even tell it was used just by looking at a PR ?

I’ll be real upfront here: this is a trap, what you see above has been available for decades and virtually all developers have used it in one form or another, it’s decisively not AI (this existed long long before ai was ai) but the AI we have today is fully capable of doing these same things with the exact same results. And there is no way to tell from the final code.

What we want to discourage is people people submitting low effort PR’s that will take a unreasonable amount of time from the blender side in code review to get in an acceptable condition. I don’t think blender or anyone else should be in the business of mandating what productivity tools people may or may not use. Especially since there is no way to tell from the final code, maintaining a list of blessed productivity tools and cursed tools, making people pinky swear that they didn’t use any of the cursed ones just isn’t feasible and will just make people obfuscate that perhaps a cursed one was used.

12 Likes

Yeah, agreeing that banning “code generated with AI” isn’t something that Blender development has the resources to attempt, or can be practically done — what brecht has in the OP is (IMHO) as much as can be and with solid reasoning underlying it.

I think that what needs to be added is some sort of statement of . . . well, not “intent”, but something that says (in better language than I can come up with) that generative AI contributions (art, code [including “code generated with AI”], whatever) aren’t welcome in Blender, it’s preferred that they aren’t used here, but since they can’t effectively be prevented then this (see OP) is how they’ll be handled. Something that threads the particularly difficult needle of show-willing to do the right thing on this given the unavoidable limits of making free open source software with volunteers and employees paid with donations.

2 Likes

I’ve been dabbling at building add-ons for myself and a community of friends, at first following the usual path, and lately using ChatGPT as an assistant, mostly to avoid wasting time trying to coax search engines into getting me to the answers to my questions, or to better understand Blender’s API docs. I’m not happy about that, but I have my limits.

I’d say a reason to be open about the use of AI, at least in an “it’s mostly AI-generated code, I don’t quite know what I’m doing” sense, is to forewarn about the quality of the code and especially the ability to improve and maintain it. In my experience so far, ChatGPT, when generating Python code for Blender, tends to make a lot of mistakes due to Blender’s fast evolving API leading it to offer results that don’t fit the intended target version, if not plain suggesting things that don’t exist. And when things work one doesn’t have any guarantee of having followed best practices, neither Python’s or Blender’s.

6 Likes

I made an account to comment on this thread. I’m a Blender user for many years.

I am confused why many of my fellow software engineers seem to acknowledge the ethical issues with image generation but not with code generation. In my opinion, no AI generated or AI ‘assisted’ code should be merged into Blender. All of the same issues exist with code generation as image generation (violation of license, environmental and cultural issues ). Yes people may hide it, but in my opinion this should be the stated policy.

If for some reason you want to allow AI-generated code, transparency that it was used should be non-negotiable. We do not want to culturally normalize surreptitious use of generative AI.

8 Likes

Can only speak for my self, but it’s pure pragmatism

You cannot tell the difference between AI in a capable programmers hands, and code written by a capable programmer, unlike AI art where it’s generally blatantly obvious, there are not tell tale signs in code.

Given that fact, how exactly would you imagine we enforce said ban? a sacred super true pinky swear?

I wouldn’t call my self pro-AI, but i’m realistic enough to accept that the cat is out of the bag here, and you can’t realistically ban it, it’ll just make people lie about that is was used.

Now what we can detect, and what is costing us a bunch of time that could be spend elsewhere is : AI Slop generated by not so capable programmers which is what this proposal is aiming to address.

12 Likes