Towards Effective In-context Cross-domain Knowledge Transfer via Domain-invariant-neurons-based Retrieval

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Yan, Jianzhi, Li, Zhiming, Liu, Le, Yuan, Zike, Chen, Shiwei, Pan, Youcheng, Tang, Buzhou, Xiang, Yang, Sun, Danny Dongning
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866908941733068800
author Yan, Jianzhi
Li, Zhiming
Liu, Le
Yuan, Zike
Chen, Shiwei
Pan, Youcheng
Tang, Buzhou
Xiang, Yang
Sun, Danny Dongning
author_facet Yan, Jianzhi
Li, Zhiming
Liu, Le
Yuan, Zike
Chen, Shiwei
Pan, Youcheng
Tang, Buzhou
Xiang, Yang
Sun, Danny Dongning
contents Large language models (LLMs) have made notable progress in logical reasoning, yet still fall short of human-level performance. Current boosting strategies rely on expert-crafted in-domain demonstrations, limiting their applicability in expertise-scarce domains, such as specialized mathematical reasoning, formal logic, or legal analysis. In this work, we demonstrate the feasibility of leveraging cross-domain demonstrating examples to boost the LLMs' reasoning performance. Despite substantial domain differences, many reusable implicit logical structures are shared across domains. In order to effectively retrieve cross-domain examples for unseen domains under investigation, in this work, we further propose an effective retrieval method, called domain-invariant neurons-based retrieval (\textbf{DIN-Retrieval}). Concisely, DIN-Retrieval first summarizes a hidden representation that is universal across different domains. Then, during the inference stage, we use the DIN vector to retrieve structurally compatible cross-domain demonstrations for the in-context learning. Experimental results in multiple settings for the transfer of mathematical and logical reasoning demonstrate that our method achieves an average improvement of 1.8 over the state-of-the-art methods \footnote{Our implementation is available at https://github.com/Leon221220/DIN-Retrieval}.
format Preprint
id arxiv_https___arxiv_org_abs_2604_05383
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Towards Effective In-context Cross-domain Knowledge Transfer via Domain-invariant-neurons-based Retrieval
Yan, Jianzhi
Li, Zhiming
Liu, Le
Yuan, Zike
Chen, Shiwei
Pan, Youcheng
Tang, Buzhou
Xiang, Yang
Sun, Danny Dongning
Artificial Intelligence
Large language models (LLMs) have made notable progress in logical reasoning, yet still fall short of human-level performance. Current boosting strategies rely on expert-crafted in-domain demonstrations, limiting their applicability in expertise-scarce domains, such as specialized mathematical reasoning, formal logic, or legal analysis. In this work, we demonstrate the feasibility of leveraging cross-domain demonstrating examples to boost the LLMs' reasoning performance. Despite substantial domain differences, many reusable implicit logical structures are shared across domains. In order to effectively retrieve cross-domain examples for unseen domains under investigation, in this work, we further propose an effective retrieval method, called domain-invariant neurons-based retrieval (\textbf{DIN-Retrieval}). Concisely, DIN-Retrieval first summarizes a hidden representation that is universal across different domains. Then, during the inference stage, we use the DIN vector to retrieve structurally compatible cross-domain demonstrations for the in-context learning. Experimental results in multiple settings for the transfer of mathematical and logical reasoning demonstrate that our method achieves an average improvement of 1.8 over the state-of-the-art methods \footnote{Our implementation is available at https://github.com/Leon221220/DIN-Retrieval}.
title Towards Effective In-context Cross-domain Knowledge Transfer via Domain-invariant-neurons-based Retrieval
topic Artificial Intelligence
url https://arxiv.org/abs/2604.05383