DSMay 17
Fast and Practical Single-Exponential Algorithms for BranchwidthTaiki Kaneda, Yasuaki Kobayashi, Hisao Tamaki
In this paper, we present exact exponential algorithms for computing branchwidth that are fast both in theory and in practice. The running times of these algorithms are single-exponential in the number of vertices. Our basic algorithm is based on a conceptually simple recurrence on vertex sets and computes the branchwidth of an $n$-vertex hypergraph in time $\mathcal{O}^*(4^n)$. This is the first single-exponential time algorithm for hypergraphs. We have two algorithms tailored specifically for graphs. The first algorithm runs in time $\mathcal{O}(3.293^n)$, improving upon the previously best-known running time of $\mathcal{O}(3.4652^n)$ [Fomin-Mazoit-Todinca, DAM 2009]. Moreover, our computational experiment shows that it overwhelmingly outperforms state-of-the-art practical algorithms for computing branchwidth. The second algorithm is a candidate for a theoretical improvement: we conjecture that it runs in time $\mathcal{O}(c^n)$ for some constant $c$ that is smaller than 3.293. In practice, it performs significantly better on some instances that are hard for the first algorithm.
DSDec 10, 2021
Computing Diverse Shortest Paths Efficiently: A Theoretical and Experimental StudyTesshu Hanaka, Yasuaki Kobayashi, Kazuhiro Kurita et al.
Finding diverse solutions in combinatorial problems recently has received considerable attention (Baste et al. 2020; Fomin et al. 2020; Hanaka et al. 2021). In this paper we study the following type of problems: given an integer $k$, the problem asks for $k$ solutions such that the sum of pairwise (weighted) Hamming distances between these solutions is maximized. Such solutions are called diverse solutions. We present a polynomial-time algorithm for finding diverse shortest $st$-paths in weighted directed graphs. Moreover, we study the diverse version of other classical combinatorial problems such as diverse weighted matroid bases, diverse weighted arborescences, and diverse bipartite matchings. We show that these problems can be solved in polynomial time as well. To evaluate the practical performance of our algorithm for finding diverse shortest $st$-paths, we conduct a computational experiment with synthetic and real-world instances.The experiment shows that our algorithm successfully computes diverse solutions within reasonable computational time.
LGMar 9, 2020
Metric Learning for Ordered Labeled Trees with pq-gramsHikaru Shindo, Masaaki Nishino, Yasuaki Kobayashi et al.
Computing the similarity between two data points plays a vital role in many machine learning algorithms. Metric learning has the aim of learning a good metric automatically from data. Most existing studies on metric learning for tree-structured data have adopted the approach of learning the tree edit distance. However, the edit distance is not amenable for big data analysis because it incurs high computation cost. In this paper, we propose a new metric learning approach for tree-structured data with pq-grams. The pq-gram distance is a distance for ordered labeled trees, and has much lower computation cost than the tree edit distance. In order to perform metric learning based on pq-grams, we propose a new differentiable parameterized distance, weighted pq-gram distance. We also propose a way to learn the proposed distance based on Large Margin Nearest Neighbors (LMNN), which is a well-studied and practical metric learning scheme. We formulate the metric learning problem as an optimization problem and use the gradient descent technique to perform metric learning. We empirically show that the proposed approach not only achieves competitive results with the state-of-the-art edit distance-based methods in various classification problems, but also solves the classification problems much more rapidly than the edit distance-based methods.
LGJun 19, 2019
Automatic Source Code Summarization with Extended Tree-LSTMYusuke Shido, Yasuaki Kobayashi, Akihiro Yamamoto et al.
Neural machine translation models are used to automatically generate a document from given source code since this can be regarded as a machine translation task. Source code summarization is one of the components for automatic document generation, which generates a summary in natural language from given source code. This suggests that techniques used in neural machine translation, such as Long Short-Term Memory (LSTM), can be used for source code summarization. However, there is a considerable difference between source code and natural language: Source code is essentially {\em structured}, having loops and conditional branching, etc. Therefore, there is some obstacle to apply known machine translation models to source code. Abstract syntax trees (ASTs) capture these structural properties and play an important role in recent machine learning studies on source code. Tree-LSTM is proposed as a generalization of LSTMs for tree-structured data. However, there is a critical issue when applying it to ASTs: It cannot handle a tree that contains nodes having an arbitrary number of children and their order simultaneously, which ASTs generally have such nodes. To address this issue, we propose an extension of Tree-LSTM, which we call \emph{Multi-way Tree-LSTM} and apply it for source code summarization. As a result of computational experiments, our proposal achieved better results when compared with several state-of-the-art techniques.