Testing JSON Schema Instruction Artifacts: Distributional Robustness under Validation-Equivalent Serialization and JSON Mode
This study demonstrates that validation-equivalent JSON Schema serializations can induce statistically significant and practically meaningful changes in language model output distributions, revealing that validation equivalence alone is an insufficient regression oracle for ensuring distributional robustness in deployed systems.
Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are giving a very smart, but slightly literal-minded, robot a set of instructions to build a specific type of sandwich. You write the instructions on a piece of paper. Now, imagine you have a magical stamp that says, "This sandwich recipe is perfect." This stamp checks if you have all the right ingredients (bread, cheese, ham) and if you didn't accidentally leave out the mustard. But here's the catch: the stamp doesn't care about the order in which you wrote the steps. Whether you say "Put the ham on the bread, then the cheese" or "Put the cheese on the bread, then the ham," the stamp gives the same "Perfect" thumbs-up because the final sandwich has the same parts.
In the world of computer science, this "stamp" is called a JSON Schema. It's a rulebook that tells computer programs what a piece of data should look like. When we ask Artificial Intelligence (AI) to write code or organize information, we often give it this rulebook as a set of instructions. The big question researchers have been asking is: If we shuffle the order of the instructions on the paper—without changing the actual rules or the "perfect" stamp—does the AI still build the exact same sandwich? Or does the AI get confused by the new order and serve up something slightly different, even though it still passes the stamp's check? This matters because if the AI changes its mind just because we rearranged the words, it becomes unreliable for important jobs like medical records or financial reports.
This paper is like a detective story where the author, Shengyao Sun, investigates whether the AI's "brain" is sensitive to the order of words in these rulebooks. The study tested this by asking different AI models to solve the same puzzles using the same rulebooks, but with the instructions written in different orders. They didn't just ask once; they asked five times for each version to make sure any changes weren't just random luck. They found that for some AI systems, the order of the words did matter. When the order of the properties (like "name" or "age") was swapped, the AI started giving different answers, even though the answers were still technically "correct" according to the rulebook.
However, the story isn't the same for every AI. The author found that this "order sensitivity" depends entirely on which specific AI system you are using. For the "Sonnet" and "Qwen" systems, the shuffling caused noticeable changes in the answers—about 5% to 12% more disagreement than usual. But for the "GPT" and "DeepSeek" systems, the shuffling barely made a difference at all. The study also checked if a special "JSON Mode" (a setting that tells the AI to be extra careful with formatting) would fix the problem. Surprisingly, it didn't; the AI still got confused by the order of words even in this strict mode.
The most important takeaway is that just because a computer program says an instruction set is "valid" or "correct," it doesn't mean the AI will behave the same way if you tweak the formatting. The author suggests that we shouldn't just trust the "stamp" anymore. Instead, we need to treat these instruction sets like software code: we should lock them into a standard order (like always listing ingredients alphabetically) and test them carefully before letting them run in the real world. The study proves that validation is not enough; we need to check if the AI's behavior stays stable when the instructions are rearranged, because for some AIs, the order of words is secretly part of the recipe.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.