paper-with-me

Papers

CV4Code: Sourcecode Understanding via Visual Code Representations

2022-05-11 · Ruibo Shi, Lili Tao, Rohan Saphal, Fran Silavong, Sean J. Moran

We present CV4Code, a compact and effective computer vision method for sourcecode understanding. Our method leverages the contextual and the structural information available from the code snippet by treating each snippet as a two-dimensional image, which naturally encodes the context and retains the underlying structural information through an explicit spatial representation. To codify snippets as images, we propose an ASCII codepoint-based image representation that facilitates fast generation of sourcecode images and eliminates redundancy in the encoding that would arise from an RGB pixel representation. Furthermore, as sourcecode is treated as images, neither lexical analysis (tokenisation) nor syntax tree parsing is required, which makes the proposed method agnostic to any particular programming language and lightweight from the application pipeline point of view. CV4Code can even featurise syntactically incorrect code which is not possible from methods that depend on the Abstract Syntax Tree (AST). We demonstrate the effectiveness of CV4Code by learning Convolutional and Transformer networks to predict the functional task, i.e. the problem it solves, of the source code directly from its two-dimensional representation, and using an embedding from its latent space to derive a similarity score of two code snippets in a retrieval setup. Experimental results show that our approach achieves state-of-the-art performance in comparison to other methods with the same task and data configurations. For the first time we show the benefits of treating sourcecode understanding as a form of image processing task.

📄 PDF Abstract BibTeX arXiv:2205.08585

Code (0)

등록된 구현이 없습니다.

Tasks

Lexical AnalysisRetrieval

Methods 이 논문이 사용한 방법론

Attention 설명 없음
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Dense Connections Dense Connections, or Fully Connected Connections, are a type of layer in a deep neural network that use a linear operation where every input is connected to every output…
Position-Wise Feed-Forward Layer 설명 없음
Adam 설명 없음
BPE Byte Pair Encoding, or BPE, is a subword segmentation algorithm that encodes rare and unknown words as sequences of subword units. The intuition is that various word…
Residual Connection 설명 없음

Similar Papers 제목 키워드 기반

Neural sequence labeling for Vietnamese POS Tagging and NER

2018-11-09 · Duong Nguyen Anh, Hieu Nguyen Kiem, Vi Ngo Van

This paper presents a neural architecture for Vietnamese sequence labeling tasks including part-of-speech (POS) tagging and named entity recognition (NER). We applied the model described in \cite{lample-EtAl:2016:N16-1} …

named-entity-recognitionNamed Entity RecognitionNamed Entity Recognition (NER)NER+4

HMMs for Unsupervised Vietnamese WordSegmentation

2019-05-16 · Ba-Long Bui, Thi-Trang Nguyen, Huu-Hoang Nguyen, Kiem-Hieu Nguyen

Word segmentation is an important problem in nat-ural language processing. Most of previous works on Vietnameseword segmentation are supervised learning. In this paper, wepropose an unsupervised method for Vietnamese wor…

Segmentation

RaP-Net: A Region-wise and Point-wise Weighting Network to Extract Robust Features for Indoor Localization

2020-12-01 · Dongjiang Li, Jinyu Miao, Xuesong Shi, Yuxin Tian 외

Feature extraction plays an important role in visual localization. Unreliable features on dynamic objects or repetitive regions will interfere with feature matching and challenge indoor localization greatly. To address t…

Indoor LocalizationVisual Localization

Tuna-2: Pixel Embeddings Beat Vision Encoders for Multimodal Understanding and Generation

2026-04-27 · Zhiheng Liu, Weiming Ren, Xiaoke Huang, Shoufa Chen 외 arxiv

Unified multimodal models typically rely on pretrained vision encoders and use separate visual representations for understanding and generation, creating misalignment between the two tasks and preventing fully end-to-end…

Image Generation

Harmonizing Visual Representations for Unified Multimodal Understanding and Generation

2025-03-27 · Size Wu, Wenwei Zhang, Lumin Xu, Sheng Jin 외

Unifying visual understanding and generation within a single multimodal framework remains a significant challenge, as the two inherently heterogeneous tasks require representations at different levels of granularity. Cur…

Image GenerationQuantization