Code summarization aims to generate natural language descriptions of source code, facilitating programmers to understand and maintain it rapidly. While previous code summarization efforts have predominantly focused on...
详细信息
Code summarization aims to generate natural language descriptions of source code, facilitating programmers to understand and maintain it rapidly. While previous code summarization efforts have predominantly focused on method-level, this paper studies file-level code summarization, which can assist programmers in understanding and maintaining large source code projects. Unlike method-level code summarization, file-level code summarization typically involves long source code within a single file, which makes it challenging for Transformer-based models to understand the code semantics for the maximum input length of these models is difficult to set to a large number that can handle long code input well, due to the quadratic scaling of computational complexity with the input sequence length. To address this challenge, we propose SparseCoder, an identifier-aware sparse transformer for effectively handling long code sequences. Specifically, the SparseCoder employs a sliding window mechanism for self-attention to model short-term dependencies and leverages the structure message of code to capture long-term dependencies among source code identifiers by introducing two types of sparse attention patterns named global and identifier attention. To evaluate the performance of SparseCoder, we construct a new dataset FILE-CS for file-level code summarization in Python. Experimental results show that our SparseCoder model achieves state-of-the-art performance compared with other pretrained models, including full self-attention and sparse models. Additionally, our model has low memory overhead and achieves comparable performance with models using full self-attention mechanism. Furthermore, we verify the generality of SparseCoder on other code understanding tasks, i.e., code clone detection and code search, and results show that our model outperforms baseline models in both tasks, demonstrating that our model can generate better code representations for various downstream tasks. Our
Anomaly detection is a crucial task in various domains. Most of the existing methods assume the normal sample data clusters around a single central prototype while the real data may consist of multiple categories or s...
详细信息
Emergency management and evacuation efficiency is important to ensure the safety of faculty and students in college. Teaching buildings are typically of multiple stories. When classes are in session, a teaching buildi...
详细信息
Graphs with heterophily have been regarded as challenging scenarios for Graph Neural Networks (GNNs), where nodes are connected with dissimilar neighbors through various patterns. In this paper, we present theoretical...
Graphs with heterophily have been regarded as challenging scenarios for Graph Neural Networks (GNNs), where nodes are connected with dissimilar neighbors through various patterns. In this paper, we present theoretical understandings of heterophily for GNNs by incorporating the graph convolution (GC) operations into fully connected networks via the proposed Heterophilous Stochastic Block Models (HSBM), a general random graph model that can accommodate diverse heterophily patterns. Our theoretical investigation comprehensively analyze the impact of heterophily from three critical aspects. Firstly, for the impact of different heterophily patterns, we show that the separability gains are determined by two factors, i.e., the Euclidean distance of the neighborhood distributions and pE [deg], where E [deg] is the averaged node degree. Secondly, we show that the neighborhood inconsistency has a detrimental impact on separability, which is similar to degrading E [deg] by a specific factor. Finally, for the impact of stacking multiple layers, we show that the separability gains are determined by the normalized distance of the lpowered neighborhood distributions, indicating that nodes still possess separability in various regimes, even when over-smoothing occurs. Extensive experiments on both synthetic and real-world data verify the effectiveness of our theory. Copyright 2024 by the author(s)
With the development of image restoration technology based on deep learning,more complex problems are being solved,especially in image semantic inpainting based on ***,image semantic inpainting techniques are becoming...
详细信息
With the development of image restoration technology based on deep learning,more complex problems are being solved,especially in image semantic inpainting based on ***,image semantic inpainting techniques are becoming more ***,due to the limitations of memory,the instability of training,and the lack of sample diversity,the results of image restoration are still encountering difficult problems,such as repairing the content of glitches which cannot be well integrated with the original ***,we propose an image inpainting network based on Wasserstein generative adversarial network(WGAN)*** the corresponding technology having been adjusted and improved,we attempted to use the Adam algorithm to replace the traditional stochastic gradient descent,and another algorithm to optimize the training used in recent *** evaluated our algorithm on the ImageNet *** obtained high-quality restoration results,indicating that our algorithm improves the clarity and consistency of the image.
Large language models (LLMs) are widely applied in various natural language processing tasks such as question answering and machine translation. However, due to the lack of labeled data and the difficulty of manual an...
详细信息
knowledge-driven dialogue (KDD) is to introduce an external knowledge base,generating an informative and fluent response. However, previous works employ different models to conduct the sub-tasks of KDD, ignoring the c...
详细信息
We revisit multi-agent asynchronous online optimization with delays, where only one of the agents becomes active for making the decision at each round, and the corresponding feedback is received by all the agents afte...
详细信息
Traditional ResNet models suffer from large model size and high computational complexity. In this study, we propose a self-distillation assisted ResNet-KL image classification method to address the low accuracy and ef...
Traditional ResNet models suffer from large model size and high computational complexity. In this study, we propose a self-distillation assisted ResNet-KL image classification method to address the low accuracy and efficiency issues in image classification ***,we introduce depthwise separable convolutions to the ResNet network and enhance the model’s classification performance by improving the design of activation functions, using TReLU instead of traditional ReLU. Secondly,we enhance the model’s perception of features at different scales by incorporating multi-scale convolutions for the fusion of residual layers and attention mechanism layers. To reduce the model’s parameter count, we combine feature distillation with logic distillation and optimize the model layer by layer through selfdistillation, while applying pruning techniques multiple times to reduce its size. Finally, To assess the efficacy of our methodology, we conduct experimental evaluations on public datasets CIFAR-10, CIFAR-100, and STL-10. The results show that the improved ResNet-KL network achieves an accuracy improvement of 1.65%, 2.72%, and 0.36% compared to traditional ResNet models on these datasets, respectively. Our method obtains better classification performance with the same computational resources, making it promising for applications in tasks such as object classification.
While third-party libraries provide benefit to software systems, they also bring unique challenges. It often happens that developers need to replace some already-used libraries with other functionality-equivalent libr...
详细信息
ISBN:
(数字)9798350330663
ISBN:
(纸本)9798350330670
While third-party libraries provide benefit to software systems, they also bring unique challenges. It often happens that developers need to replace some already-used libraries with other functionality-equivalent libraries. However, it is not easy to find a relevant candidate from overwhelming libraries. Despite several approaches have been proposed to mine library migrations from historical data, the study of library recommendation from the perspective of both open-source projects and third-party libraries is lacking. Therefore, conducting such research may assist developer better select suitable third-party libraries. In this paper, we propose a multi-metric ranking with label correlations (MMRLC) algorithm, which can recommend libraries holistically from the both perspectives. Not only does it mine library migrations from existing software data, MMRLC further leverages label correlations of libraries in Maven Central Repository to make recommendations. To demonstrate the usefulness, three popular algorithms were conducted on a benchmark dataset for comparison. The results show that our approach can recommend libraries with precision @ 1 of 0.8454 and recall @20 of 0.9301. Moreover, to demonstrate the generality, we select 366 libraries and resort to TagWiki to generate the related library labels, and the results show that our approach still has comparable performance.
暂无评论