paper-with-me

홈 › Papers

What does Transformer learn about source code?

2022-07-18 · Kechi Zhang, Ge Li, Zhi Jin

In the field of source code processing, the transformer-based representation models have shown great powerfulness and have achieved state-of-the-art (SOTA) performance in many tasks. Although the transformer models process the sequential source code, pieces of evidence show that they may capture the structural information (\eg, in the syntax tree, data flow, control flow, \etc) as well. We propose the aggregated attention score, a method to investigate the structural information learned by the transformer. We also put forward the aggregated attention graph, a new way to extract program graphs from the pre-trained models automatically. We measure our methods from multiple perspectives. Furthermore, based on our empirical findings, we use the automatically extracted graphs to replace those ingenious manual designed graphs in the Variable Misuse task. Experimental results show that the semantic graphs we extracted automatically are greatly meaningful and effective, which provide a new perspective for us to understand and use the information contained in the model.

📄 PDF Abstract BibTeX arXiv:2207.08466

Code (0)

등록된 구현이 없습니다.

Tasks

Variable misuse

Similar Papers 제목 키워드 기반

INSPECT: Intrinsic and Systematic Probing Evaluation for Code Transformers

2023-12-08 · Anjan Karmakar, Romain Robbes

Pre-trained models of source code have recently been successfully applied to a wide variety of Software Engineering tasks; they have also seen some practical adoption in practice, e.g. for code completion. Yet, we still …

Code CompletionDiagnosticLanguage Modelling

What an Autonomous Agent Discovers About Molecular Transformer Design: Does It Transfer?

2026-03-30 · Edward Wijaya arxiv

Deep learning models for drug-like molecules and proteins overwhelmingly reuse transformer architectures designed for natural language, yet whether molecular sequences benefit from different designs has not been systemat…

What do language models model? Transformers, automata, and the format of thought

2025-08-26 · Colin Klein arxiv

What do large language models actually model? Do they tell us something about human capacities, or are they models of the corpus we've trained them on? I give a non-deflationary defence of the latter position. Cognitive …

What do Transformers Know about Government?

2024-04-22 · Jue Hou, Anisia Katinskaia, Lari Kotilainen, Sathianpong Trangcasanchai 외

This paper investigates what insights about linguistic features and what knowledge about the structure of natural language can be obtained from the encodings in transformer language models.In particular, we explore how B…

Sentence

Collision Replay: What Does Bumping Into Things Tell You About Scene Geometry?

2021-05-03 · Alexander Raistrick, Nilesh Kulkarni, David F. Fouhey

What does bumping into things in a scene tell you about scene geometry? In this paper, we investigate the idea of learning from collisions. At the heart of our approach is the idea of collision replay, where we use examp…