JGJun Gao

Jun Gao

*This is an algorithmically generated author record based on publicly available information.

Current Organizations / Institutes

The organizations/institutes from the scholar's latest article

Previous Organizations / Institutes

The organizations / institutes from the scholar's other articles in the past ten years


Jun Gao has a total of 88 co-authors. Here are the top co-authors by number of shared publications:


Latest Publications

  • Open Access

    AdaCAS: Balancing Efficiency and Effectiveness for Table Union Search via Adaptive Column Aspect Selection

    by Ermu Qiu, Tianyi Chen, Chenhao Xu, Yaofeng Tu, Jun Gao

    In data integration, Table Union Search (TUS) retrieves tables suitable for union operations with a given query table. This task fundamentally relies on efficient and effective column similarity measurements. Recent studies model columns using fine-grained aspects such as number, pattern, and semantics to capture diverse information. However, as data volume expands, the growing heterogeneity and diversity of columns significantly raises the cost of encoding and searching all aspects during preprocessing and query stages. To address these challenges, we propose AdaCAS, a novel retrieval framework that balances efficiency and effectiveness for TUS via ada ptive c olumn a spect s election. First, we introduce a self-supervised aspect selection model that learns optimal aspect combinations from column statistics using an active-learning-based sampling strategy. Second, we design a cost-aware allocation mechanism to balance index expressiveness and preprocessing overhead. Third, we develop an early-stop query strategy that prioritizes indices with lower dimensionality and cardinality for fast ranking. Experimental results on real-world table collections show that our method achieves 4.3x speedup in preprocessing and 4.7x speedup in query execution over the state of the art, with peak acceleration exceeding 30x for certain queries. Notably, it consistently improves MAP@k by 1.5%, highlighting its ability to balance retrieval efficiency and effectiveness.

  • Open Access

    ER-RAG: Enhance RAG with ER-Based Unified Modeling of Heterogeneous Data Source

    by Yikuan Xia, Jiazun Chen, Yirui Zhan, Suifeng Zhao, Linke Wang, Suchen Liu, Weipeng Jiang, Chaorui Zhang, Wei Han, Bo Bai, et al.

    Retrieval-Augmented Generation (RAG) enhances the reliability of large language models (LLMs) by integrating external evidence for question-answering tasks. However, when supporting evidence is scattered across heterogeneous data sources ( e.g., web pages, databases, and knowledge graphs), current RAG methods based on dedicated retrieval modules for each source face limitations like resource inefficiency in training modules, complex interaction among different sources, and lack of effective source selection. To address these challenges, we propose ER-RAG, a novel framework that allows efficient and effective evidence utilization. By observing that the evidence access patterns are restricted in RAG systems, ER-RAG introduces unified APIs based on the classic entity-relationship (ER) modeling to standardize the data access to heterogeneous data sources. ER-RAG then generates a chain of unified APIs to locate the desired evidence in a two-stage generation process, in which a direct preference optimization-tuned module first identifies optimal sources, and a dedicated module then generates API chains based on selected sources’ schema. Experiments show ER-RAG with an 8B LLM backbone performs comparably to commercial RAG pipelines using state-of-the-art LLMs. ER-RAG also outperforms other hybrid source competitors by 3.1% in LLM score and speeds up retrieval by 5.5X.

  • BQSched$^{+}$: A generalizable RL-based scheduler for varying batch concurrent queries

    by Chenhao Xu, Chunyu Chen, Jinglin Peng, Jiannan Wang, Jun Gao

  • Open Access

    MoEPlan: A Lazy Learned Query-Selection Optimizer via Mixture of Optimizer Experts

    by Suchen Liu, Jun Gao, Yinjun Han, Yang Lin

    Learned plan-selection optimizers combine the conventional and learned approaches by generating diverse candidate plans through multiple optimizers and selecting the best via value models. However, these eagerly-generated plans incur high optimization overhead, as they require multiple invocations of the native optimizer. In this article, we propose MoEPlan, which learns a routing policy to select top- \( k \) experts (different optimizers) via query embedding and learnable parameters, avoiding pre-generation of candidate plans. Our approach integrates two optimization strategies: (1) a virtual ideal expert to guide the best plan selection through learned plan similarities, and (2) a query-irrelevant expert sampling strategy to balance the training cost and effectiveness of selected plans in the first round of expert selection. Furthermore, we design a two-phase training process: the first phase pre-trains the model with complete expert feedback, while the second phase filters the full expert pool to yield a promising subset and refines the selection to pinpoint the optimal expert. Experimental studies show that MoEPlan, with only two plans generated, takes less inference time, while still producing more efficient plans than other learned plan-selection optimizers.

  • Open Access

    Divo: Learning a Stable and Effective Query Optimizer with a Diverse Workload

    by Tianyi Chen, Jun Gao, Yaofeng Tu, Yang Lin, Mo Xu, Yinjun Han

    Learned query optimizers (LQOs) have shown remarkable progress in recent years. Despite achieving competitive performance compared with traditional methods, current LQOs struggle to retain stability and generate efficient plans when exposed to workloads with substantial diversity, presenting a major challenge in real-world deployment. Divo is a learned query optimizer designed to overcome performance degradation observed in training on diverse workloads. First, Divo proposes a template-evolving query generator to provide diverse queries for sufficient training. By modifying and combining query templates, the query generator synthesizes 3,000 informative new queries with fidelity to existing workloads. Second, Divo establishes a two-phase model training pipeline to enhance RL training with numerous plans collected in advance. We collected over 100,000 plans from public workloads and diverse generated queries to form static experiences, which are effectively leveraged on various training workload configurations to enhance Divo's plan generation through augmenting auxiliary components. Third, Divo proposes a diversity-aware loss function to learn from diversified input queries stably. By learning to predict probability distributions of latencies, Divo flexibly handles various queries and tolerates inconsistent ground truth latencies from training queries. We evaluate Divo's performance on PostgreSQL using a complicated mixed workload of JOB, DSB, Extended JOB, Stack, and generated queries, with three different training and testing workload configurations split by template. Experiments demonstrate Divo's advantage on total execution latency with a 1.3× speedup relative to PostgreSQL, which is 14.9× better than six existing LQOs on average.


  • Open Access

    HW-GNN: Homophily-Aware Gaussian-Window Constrained Graph Spectral Network for Social Network Bot Detection

    by Zida Liu, Jun Gao, Zhang Ji, Li Zhao

    Social bots are increasingly polluting online platforms by spreading misinformation and engaging in coordinated manipulation, posing severe threats to cybersecurity. Graph Neural Networks (GNNs) have become mainstream for social bot detection due to their ability to integrate structural and attribute features, with spectral-based approaches demonstrating particular efficacy due to discriminative patterns in the spectral domain. However, current spectral GNN methods face two limitations: (1) their broad-spectrum fitting mechanisms degrade the focus on bot-specific spectral features, and (2) certain domain knowledge valuable for bot detection, e.g., low homophily correlates with high-frequency features, has not been fully incorporated into existing methods. To address these challenges, we propose HW-GNN, a novel homophily-aware graph spectral network with Gaussian window constraints. Our framework introduces two key innovations: (i) a Gaussian-window constrained spectral network that employs learnable Gaussian windows to highlight bot-related spectral features, and (ii) a homophily-aware adaptation mechanism that injects domain knowledge between homophily ratios and frequency features into the Gaussian window optimization process. Through extensive experimentation on multiple benchmark datasets, we demonstrate that HW-GNN achieves state-of-the-art bot detection performance, outperforming existing methods with an average improvement of 4.3% in F1-score, while exhibiting strong plug-in compatibility with existing spectral GNNs.

  • Open Access

    SSCard: Substring Cardinality Estimation using Suffix Tree-Guided Learned FM-Index

    by Yirui Zhan, Wen Nie, Jun Gao

    Accurate cardinality estimation of substring queries, which are commonly expressed using the SQL LIKE predicate, is crucial for query optimization in database systems. While both rule-based methods and machine learning-based methods have been developed to optimize various aspects of cardinality estimation, their absence of error bounds may result in substantial estimation errors, leading to suboptimal execution plans. In this paper, we propose SSCard, a novel S ub S tring Card inality estimator that leverages a space-efficient FM-Index into flexible database applications. SSCard first extends the FM-Index to support multiple strings naturally, and then organizes the FM-index using a pruned suffix tree. The suffix tree structure enables precise cardinality estimation for short patterns and achieves high compression via a pushup operation, especially on a large alphabet with skewed character distributions. Furthermore, SSCard incorporates a spline interpolation method with an error bound to balance space usage and estimation accuracy. Additional innovations include a bidirectional estimation algorithm and incremental update strategies. Extensive experimental results in five real-life datasets show that SSCard outperforms both traditional methods and recent learning-based methods, which achieves an average reduction of 20% in the average q-error, 80% in the maximum q-error, and 50% in the construction time, compared with second-best approaches.

  • Open Access

    LLM4Hint: Leveraging Large Language Models for Hint Recommendation in Offline Query Optimization

    by Suchen Liu, Jun Gao, Yinjun Han, Yang Lin

    Query optimization is essential for efficient SQL query execution in DBMS, and remains attractive over time due to the growth of data volumes and advances in hardware. Existing traditional optimizers struggle with the cumbersome hand-tuning required for complex workloads, and the learning-based methods face limitations in ensuring generalization. With the great success of Large Language Model (LLM) across diverse downstream tasks, this paper explores how LLMs can be incorporated to enhance the generalization of learned optimizers. Though promising, such an incorporation still presents challenges, mainly including high model inference latency, and the substantial fine-tuning cost and suboptimal performance due to inherent discrepancy between the token sequences in LLM and structured SQL execution plans with rich numerical features. In this paper, we focus on recurring queries in offline optimization to alleviate the issue of high inference latency, and propose \textbf{LLM4Hint} that leverages moderate-sized backbone LLMs to recommend query optimization hints. LLM4Hint achieves the goals through: (i) integrating a lightweight model to produce a soft prompt, which captures the data distribution in DBMS and the SQL predicates to provide sufficient optimization features while simultaneously reducing the context length fed to the LLM, (ii) devising a query rewriting strategy using a larger commercial LLM, so as to simplify SQL semantics for the backbone LLM and reduce fine-tuning costs, and (iii) introducing an explicit matching prompt to facilitate alignment between the LLM and the lightweight model, which can accelerate convergence of the combined model. Experiments show that LLM4Hint, by leveraging the LLM's stronger capability to understand the query statement, can outperform the state-of-the-art learned optimizers in terms of both effectiveness and generalization.


  • DeepNM: Incremental Graph Matching Based on Sinkhorn Similarity

    by Yikuan Xia, Jiazun Chen, Xinchi Li, Jun Gao

    Graph matching is a critical task with diverse real-world applications. Current cutting-edge methodologies incorporate GNN (Graph Neural Network) combined with incremental anchor refinement, calculating the matching similarity directly via node embeddings. However, the direct similarity computation based on aggregated embeddings from GNN may obscure the distinctiveness of nodes within a localized region. In addition, the possible wrongly added anchor pairs in the iterations and the lack of capturing the relationships to anchors may further affect the performance. In order to tackle these challenges, this paper proposes a method named DeepNM, which attempts to find node matching based on their neighbors’ similarities. Specifically, DeepNM introduces a Sinkhorn-based similarity on a node’s neighborhood’s embeddings, which serves as both a training loss and a matching metric tailored to the graph matching problem. Additionally, we demonstrate that the Sinkhorn-based similarity, which relies on common neighbor statistics, is highly resilient to inaccurately identified anchor pairs within the context of incremental graph matching. Our comprehensive experiments on synthetic and real-world datasets demonstrate that DeepNM, compatible with the incremental graph matching paradigm, excels particularly well at matching graphs where common neighbors provide good matches. Applying the DeepNM pipeline to real social networks results in a 6% improvement, and applying the Sinkhorn similarity on knowledge graphs results in an average improvement of 1.7% over the best baseline.


  • Open Access

    BQSched: A Non-intrusive Scheduler for Batch Concurrent Queries via Reinforcement Learning

    by Chenhao Xu, Chunyu Chen, Jinglin Peng, Jiannan Wang, Jun Gao

    Most large enterprises build predefined data pipelines and execute them periodically to process operational data using SQL queries for various tasks. A key issue in minimizing the overall makespan of these pipelines is the efficient scheduling of concurrent queries within the pipelines. Existing tools mainly rely on simple heuristic rules due to the difficulty of expressing the complex features and mutual influences of queries. The latest reinforcement learning (RL) based methods have the potential to capture these patterns from feedback, but it is non-trivial to apply them directly due to the large scheduling space, high sampling cost, and poor sample utilization. Motivated by these challenges, we propose BQSched, a non-intrusive Scheduler for Batch concurrent Queries via reinforcement learning. Specifically, BQSched designs an attention-based state representation to capture the complex query patterns, and proposes IQ-PPO, an auxiliary task-enhanced proximal policy optimization (PPO) algorithm, to fully exploit the rich signals of Individual Query completion in logs. Based on the RL framework above, BQSched further introduces three optimization strategies, including adaptive masking to prune the action space, scheduling gain-based query clustering to deal with large query sets, and an incremental simulator to reduce sampling cost. To our knowledge, BQSched is the first non-intrusive batch query scheduler via RL. Extensive experiments show that BQSched can significantly improve the efficiency and stability of batch query scheduling, while also achieving remarkable scalability and adaptability in both data and queries. For example, across all DBMSs and scales tested, BQSched reduces the overall makespan of batch queries on TPC-DS benchmark by an average of 34% and 13%, compared with the commonly used heuristic strategy and the adapted RL-based scheduler, respectively.