GoCoMA: Hyperbolic Multimodal Representation Fusion for Large Language Model-Generated Code Attribution
This paper introduces GoCoMA, a multimodal framework that leverages hyperbolic geometry to fuse code stylometry and binary pre-executable artifact images for accurately attributing LLM-generated code to its source model, outperforming existing unimodal and Euclidean baselines.
Original paper licensed under CC BY 4.0 (http://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 a detective trying to figure out who wrote a specific piece of code. In the past, if a human wrote it, you could look for their "handwriting"—maybe they always use specific variable names, put spaces in certain places, or comment in a unique way.
But now, Large Language Models (LLMs) like ChatGPT or Copilot are writing code that looks almost identical to human writing. It's like a master forger who can perfectly mimic your handwriting. This creates a big problem: Who wrote this? Is it a human, or is it an AI? And if it's an AI, which AI?
This is where a new tool called GoCoMA comes in. Think of GoCoMA as a high-tech forensic scanner that doesn't just look at the "handwriting" (the text), but also looks at the "fingerprint" left on the machine when the code is compiled.
Here is how it works, broken down into simple concepts:
1. The Two Clues: The Script and the Footprint
GoCoMA looks at two different things at the same time:
- The Script (Source Code): This is the text the programmer (or AI) wrote. It's like reading a story. It tells you the meaning and the style of the writing.
- The Footprint (Binary Image): When code is turned into a program a computer can run, it gets compiled into a "binary" file (a bunch of 1s and 0s). GoCoMA takes this messy binary file and turns it into a picture.
- The Analogy: Imagine you have a handwritten letter. The "Script" is the words on the page. The "Footprint" is the paper itself. Even if two people write the same words, the paper might have different textures, ink smudges, or fiber patterns based on the machine that printed it. GoCoMA turns the binary file into a picture to see these "machine textures."
2. The Problem with Normal Math (Euclidean Space)
Usually, when computers try to combine these two clues (the text and the picture), they use standard math (Euclidean space).
- The Analogy: Imagine trying to organize a library where the books are arranged in a flat, 2D grid. If you have a few books, it's fine. But if you have millions of books with complex relationships (like a family tree), a flat grid gets crowded. You can't easily show that "Chapter 1" is the parent of "Chapter 2" without making the shelves huge and messy.
- In this flat math, the subtle differences between different AI models get "squashed" together, making them hard to tell apart.
3. The Solution: Hyperbolic Space (The Poincaré Ball)
GoCoMA uses a special kind of math called Hyperbolic Geometry.
- The Analogy: Imagine a mushroom or a fractal tree. In this shape, the center is small, but as you move outward, the space expands exponentially.
- You can put the "big ideas" (like the general style of an AI) near the center.
- You can put the "tiny details" (like specific byte patterns in the binary image) far out on the edges.
- Because the space grows so fast at the edges, you can fit millions of unique details without them bumping into each other. This allows GoCoMA to keep the "big picture" and the "tiny details" perfectly organized.
4. The Magic Glue: GCSA Fusion
Once the clues are in this special "mushroom-shaped" math space, GoCoMA uses a special glue called Geodesic Cosine Similarity Attention (GCSA).
- The Analogy: Imagine you have a detective looking at the "Script" and another looking at the "Footprint." In normal math, they just shout their findings at each other. In GoCoMA, they are in a room where the walls curve. This curvature helps them instantly understand how the "Script" relates to the "Footprint."
- It calculates the "distance" between the text style and the binary image pattern in a way that respects their hierarchy. It realizes: "Ah, this specific text style usually comes from this specific binary pattern."
5. The Result: Who Wrote It?
After combining these clues in this special curved space, GoCoMA projects the answer back to normal math so a computer can make a final decision.
Why is this better?
- Old methods (just looking at text) often get confused because AIs are good at mimicking text.
- New methods (just looking at the binary image) are okay, but they miss the context.
- GoCoMA combines both. It realizes that while an AI might copy a human's words, it leaves a unique "machine fingerprint" in the compiled binary that is very hard to fake.
The Bottom Line
The researchers tested GoCoMA on two huge sets of code. They found that by looking at both the words and the machine picture, and by using curved math to organize the clues, they could identify which AI wrote the code with 90%+ accuracy.
This is a huge step forward for software security. It means we can finally trace vulnerable code back to the specific AI that generated it, helping us fix security holes and solve licensing mysteries. It's like giving the police a super-powered magnifying glass that sees both the ink and the paper fibers simultaneously.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.