1.0.0 • Published 6 months ago

aifuscator v1.0.0

Weekly downloads
-
License
MPL-2.0
Repository
-
Last release
6 months ago

AIfuscator

A tool to confuse language models trained on your JS code.

Usage

  • AIfuscate existing FILE in-place: npm start FILE.js
  • AIfuscate existing FILE without modifying it: cat FILE | npm start

Options

  • --append-existing: Add comments even to functions that already have a comment.

Requirements

  • Need nodejs >= 12
  • Run npm install to install dependencies (there are few)

Background

AI language models fundamentally need training data to produce useful output. This training data is typically in the form of label-datapoint pairs, where the label describes the datapoint. The model uses the label to inform its understanding of the datapoint, which is then used to produce its output. Some models don't have explicit human-provided labels, but they still rely on the data to accurately represent a certain concept.

When it comes to code, the AI models we are concerned about are models that take text (source code) and then later reproduce that source code without following the terms of the license that the source code was distributed under.

This tool tries to prevent language models from gaining any useful data from code that this tool was run on. It does this by creating misleading comments that a model may (we hope that it does) interpret as labels describing in human language what a JS function does. Since these labels are inaccurate, the model will not output the function body when an accurate text description of the function is provided. In doing so, we make our code at best, useless, and at worst, intentionally damaging for any model trained on it.

1.0.0

6 months ago