What, Where, How: Task, Language, Model in Code Representations

Discover how models represent code: which concepts get circuits, where they are, and how they grow. Study on Python and Rust shows universality depends on task.

sábado, 25 de julio de 2026 • 4 min read • Q2BSTUDIO Team

Circuitos específicos por tarea y modelo en código

Artificial intelligence has transformed how we understand and generate code, but do independently trained language models really 'think' the same way when analyzing a program? A recent scientific study addresses this question from a novel perspective: instead of seeking absolute answers, it breaks the problem into three key questions: what concepts receive dedicated circuits, where those circuits are located within the model, and how they grow across layers. The results, obtained by crossing two languages (Python and Rust) with two models (Qwen2.5-Coder-7B and DeepSeek-Coder-V1-6.7B), offer a nuanced view that is highly valuable for development companies like Q2BSTUDIO, which specializes in custom software, cloud services, cybersecurity, and artificial intelligence.

The study reveals that the 'what' — which grammatical concepts deserve dedicated circuits — is set by the task. The models agree with Spearman correlations of 0.638 for Python and 0.673 for Rust, both highly significant. This means that, regardless of language or model, the same structural elements (such as loops, conditionals, or type declarations) receive specialized attention. For a company developing AI agents or automation tools, this convergence is good news: code assistants based on large models consistently prioritize fundamental constructs. However, the 'where' and 'how' are a different story. Circuit location varies drastically by model: Qwen concentrates them in a late band (layers 17-19), while DeepSeek places them in early layers (6-7). This difference is language-independent, suggesting that the model's internal architecture imposes its own processing pattern. In practice, when integrating language models into AWS/Azure cloud solutions, knowing this behavior is critical for optimizing latency and computational resource usage. A model that processes concepts early may be more efficient for real-time syntactic analysis, while one with late processing could be better for long code generation tasks.

The 'how' also depends on the model. Qwen shows an early spike in activation of atomic concepts (like identifiers or literals), while DeepSeek lacks that spike. This has direct implications for cybersecurity: if you want to detect anomalous patterns in source code, a model that 'sees' basic elements from the early layers can identify suspicious deviations more quickly. On the other hand, in BI/Power BI, where large volumes of code are analyzed to extract metrics, understanding how each model decomposes information helps design more efficient processing pipelines.

Another fascinating finding is the language difference. Rust receives two to three times more concept-specific circuits than Python, in both models. This suggests that the complexity of Rust's type and trait system demands a more elaborate representation. Additionally, both models share neurons between languages, but DeepSeek does so 1.94 times more than Qwen, a trend no prior study had predicted. For Q2BSTUDIO, which offers custom software development services across multiple platforms, this information is relevant when choosing the base model for a multi-language code assistant. If the goal is to maximize transfer between Python and Rust, DeepSeek might be more suitable; if sharper specialization is desired, Qwen could offer advantages.

The study also identifies a surprising behavior in the representation of Rust keywords related to types and traits. Qwen groups nine of these keywords into a single neuronal cluster (Jaccard 0.535 vs null 0.112), a semantic dimension invisible in surface syntax. This finding opens the door to new fine-tuning and knowledge representation techniques. In the context of process automation, automatically identifying these clusters allows creating agents that better understand developer intent.

For Q2BSTUDIO, these results reinforce the need for a customized approach in every project. No universal model works the same for all languages and tasks; universality lies in content (what is represented), not in organization (where and how). Therefore, when designing cybersecurity, cloud, or AI solutions, it is essential to conduct comparative tests with different models and languages. Our expertise in AWS/Azure cloud and custom application creation allows us to integrate these scientific advances into practical tools, from code assistants to security analysis systems.

In summary, the research shows that the answer to 'are circuits universal?' is a resounding 'it depends.' Yes for the what, no for the where and how. This knowledge enables companies like Q2BSTUDIO to offer more precise and tailored services, leveraging the strengths of each model and language. Whether through AI agents for automation, BI/Power BI dashboards, or advanced cybersecurity protection, the key lies in understanding how each model thinks to get the most out of technology.

A BREAK?

Play for a moment before you go

OUR SERVICES

How we can help you

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.