X-IONet: Cross-Platform Inertial Odometry Network for Pedestrian and Legged Robot

Extracted source text · arXiv 2511.08277

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%2345678901234567890123456789012345678901234567890123456789012345678901234567890
%        1         2         3         4         5         6         7         8

\documentclass[letterpaper, 10 pt, conference]{ieeeconf}  % Comment this line out if you need a4paper
\usepackage{graphicx}
\usepackage[table]{xcolor}
\usepackage{multirow}
\usepackage{amsmath}
\definecolor{MyLightGreen}{HTML}{50F22C}
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{makecell}
\usepackage{xcolor} % 导言区加
\usepackage{subcaption}
\usepackage{cite}
\usepackage{algorithm}    % 提供算法浮动体环境
\usepackage{algpseudocode} % 提供伪代码语法支
\usepackage{amssymb}
\usepackage{adjustbox}


% 定义颜色渐变
\definecolor{light_blue}{rgb}{0.9, 0.95, 1.0}
\definecolor{med_blue}{rgb}{0.75, 0.9, 1.0}
\definecolor{dark_blue}{rgb}{0.5, 0.75, 1.0}
\definecolor{deep_blue}{rgb}{0.3, 0.6, 1.0}
\definecolor{very_deep_blue}{rgb}{0.1, 0.4, 1.0}

%\documentclass[a4paper, 10pt, conference]{ieeeconf}      % Use this line for a4 paper

\IEEEoverridecommandlockouts                              % This command is only needed if 
                                                          % you want to use the \thanks command

\overrideIEEEmargins                                      % Needed to meet printer requirements.

%In case you encounter the following error:
%Error 1010 The PDF file may be corrupt (unable to open PDF file) OR
%Error 1000 An error occurred while parsing a contents stream. Unable to analyze the PDF file.
%This is a known problem with pdfLaTeX conversion filter. The file cannot be opened with acrobat reader
%Please use one of the alternatives below to circumvent this error by uncommenting one or the other
%\pdfobjcompresslevel=0
%\pdfminorversion=4

% See the \addtolength command later in the file to balance the column lengths
% on the last page of the document

% The following packages can be found on http:\\www.ctan.org
%\usepackage{graphics} % for pdf, bitmapped graphics files
%\usepackage{epsfig} % for postscript graphics files
%\usepackage{mathptmx} % assumes new font selection scheme installed
%\usepackage{times} % assumes new font selection scheme installed
%\usepackage{amsmath} % assumes amsmath package installed
%\usepackage{amssymb}  % assumes amsmath package installed

\title{\LARGE \bf X-IONet: Cross-Platform Inertial Odometry Network \\ with Dual-Stage Attention
}


\author{Dehan Shen and Changhao Chen
$^{*}$% <-this % stops a space
\thanks{$^{*}$ Corresponding author.}
\thanks{Dehan Shen is with the Thrust of Intelligent Transportation, The Hong Kong University of Science and Technology (Guangzhou), 511453,  Guangzhou, China (email: dehanshen@hkust-gz.edu.cn)}
\thanks{Changhao Chen is with the Thrust of Intelligent Transportation and Thrust of Artificial Intelligence, The Hong Kong University of Science and Technology (Guangzhou), 511453,  Guangzhou, China (email: changhaochen@hkust-gz.edu.cn)}
}


\begin{document}


\maketitle


\thispagestyle{empty}
\pagestyle{empty}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\begin{abstract}
Learning-based inertial odometry has achieved remarkable progress in pedestrian navigation. However, extending these methods to quadruped robots remains challenging due to their distinct and highly dynamic motion patterns. Models that perform well on pedestrian data often experience severe degradation when deployed on legged platforms.
To tackle this challenge, we introduce X-IONet, a cross-platform inertial odometry framework that operates solely using a single Inertial Measurement Unit (IMU). X-IONet incorporates a rule-based expert selection module to classify motion platforms and route IMU sequences to platform-specific expert networks. The displacement prediction network features a dual-stage attention architecture that jointly models long-range temporal dependencies and inter-axis correlations, enabling accurate motion representation. It outputs both displacement and associated uncertainty, which are further fused through an Extended Kalman Filter (EKF) for robust state estimation. Extensive experiments on public pedestrian datasets and a self-collected quadruped robot dataset demonstrate that X-IONet achieves state-of-the-art performance, reducing Absolute Trajectory Error (ATE) by 14.3\% and Relative Trajectory Error (RTE) by 11.4\% on pedestrian data, and by 52.8\% and 41.3\% on quadruped robot data. These results highlight the effectiveness of X-IONet in advancing accurate and robust inertial navigation across both human and legged robot platforms.
\end{abstract}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{INTRODUCTION}
Inertial navigation estimates ego-motion and position solely from Inertial Measurement Unit (IMU) data. Unlike visual–inertial odometry \cite{VIO, vio2025}, lidar–inertial odometry \cite{LIO, lidar2024, LIO2024}, or GNSS-based localization \cite{GNSS, GNSS2024}, inertial navigation is fully self-contained and does not rely on external signals \cite{Survey}. This independence enables robust performance in visually degraded environments and GNSS-denied settings. However, unavoidable sensor noise causes significant drift during long-term pure-inertial integration, making accurate standalone inertial navigation a long-standing challenge.

Recently, deep learning has shown great potential to enhance inertial odometry. Learning-based methods leverage neural architectures to directly extract motion patterns from IMU signals, effectively constraining dead-reckoning drift and improving state estimation accuracy. These approaches have been applied to pedestrian motion \cite{IONet, TLIO, IMUNet, CTIN, iMoT, RoNIN}, legged robots \cite{learningRobot}, and unmanned aerial vehicles (UAVs) \cite{AirIO, IMO, DIDO, UAV_dead-reckoning}.

Despite promising progress, most existing methods are tailored to a single platform, leaving cross-platform inertial odometry largely unsolved. Although pedestrian and quadruped locomotion share certain characteristics—such as periodicity and gravity-related priors—quadruped motion is considerably more dynamic and diverse. As shown in Fig.~\ref{concept}, quadrupeds perform rapid accelerations and decelerations, lateral and backward movements, and highly non-periodic maneuvers, producing complex inertial signatures absent in human motion. Moreover, inertial motion cues are inherently multi-scale and multi-dimensional; existing architectures struggle to extract and fuse such features effectively, resulting in inaccurate displacement predictions. These challenges call for new neural architectures that capture both long-range temporal dependencies and cross-axis correlations in IMU data.  

%IMUs also play a central role in robotic proprioception \cite{Embodied_Navigation_Survey}: by measuring linear acceleration and angular velocity at high frequency, they provide reliable motion data for state estimation, complementing vision sensors during fast motions or in visually degraded environments.

\begin{figure}
    \centering
    \captionsetup{font=small}
    \includegraphics[width=\linewidth]{concept.png}
    \caption{Cross-Platform Inertial Odometry Network for pedestrians and quadruped robots. The temporal and frequency-domain visualizations reveal distinct differences between pedestrian and quadruped inertial signals.}
    \label{concept}
\end{figure}

%Despite these advances, research on deep learning–based inertial odometry is limited on certain platform. The research on cross-platform is less explored.While pedestrian and quadruped motion share certain characteristics—such as periodicity, exploitable motion priors, and gravity cues from inertial measurements—their dynamics differ markedly. As shown in Fig.~\ref{concept}, quadruped robots exhibit highly dynamic behaviors, including sudden accelerations or decelerations, lateral motions, and even backward movements, which introduce challenges not present in pedestrian motion. In addition, the distinct motion pattern of various platform cause the motion feature of inertial data hard to be modelled, which require new neural network that can capture the motion feauter in different levels and dimensions.

To address these challenges, we propose \textbf{X-IONet} (\textbf{Cross}-Platform \textbf{I}nertial \textbf{O}dometry \textbf{Net}work), a novel and generalizable deep learning framework for inertial odometry estimation across both human and quadruped robotic platform. X-IONet incorporates a rule-based expert selection module that routes IMU data to specialized expert networks based on platform characteristics. Each expert network adopts a dual-stage attention–based displacement prediction model, capturing long-range temporal dependencies via temporal self-attention and inter-axis relationships via dimensional self-attention. The network predicts motion displacement and corresponding uncertainty, and integrates these estimates into an Extended Kalman Filter (EKF) for robust motion state estimation. Extensive experiments on public pedestrian datasets and a newly collected quadruped dataset show that X-IONet achieves state-of-the-art accuracy, exhibits strong cross-platform generalization, and maintains robustness under aggressive and irregular motion patterns.

The main contributions of this paper are as follows:
\begin{itemize}
    \item We propose X-IONet, a generalizable cross-platform inertial odometry network that estimates displacement and uncertainty from raw IMU data, enabling robust localization for pedestrian and quadruped robots.
    \item We introduce a novel displacement prediction network with dual-stage attention mechanism that hierarchically captures multi-scale temporal dependencies and inter-axis correlations in inertial signals, providing a more expressive and physically consistent representation for inertial odometry estimation.
    \item We conduct comprehensive evaluations on both pedestrian and quadruped datasets, demonstrating that X-IONet generalizes across distinct motion patterns and achieves state-of-the-art performance in inertial navigation tasks.
\end{itemize}




%\subsection{Traditional Model-based Inertial Odometry}

%Inertial data from Micro-Electro-Mechanical Systems (MEMS) are often affected by multiple error sources, leading to an exponential growth of positioning errors over time\cite{1998strapdown1,1998strapdown2}. Pedestrian Dead Reckoning (PDR)\cite{PDR} based on gait estimation and Zero-Velocity Update (ZUPT)\cite{ZUPT} can mitigate this accumulated error by leveraging prior kinematic models of human walking to estimate trajectories. Since quadruped robots exhibit motion patterns similar to those of humans, they can also benefit from such motion priors.
%However, the complexity and diversity of human and quadruped robot motion make it challenging for these methods to establish a universal model for inertial navigation.

%\subsection{Learning-based Inertial Odometry}
%\textbf{Neural networks with EKF.} 
%\textbf{Kalman filtering and sensor fusion.} 
%\textbf{Pedestrian inertial navigation.} 

\section{RELATED WORK}
Recent years have witnessed rapid progress in deep learning–based inertial odometry, where data-driven neural networks are trained to directly model inertial signals for accurate motion state estimation.

IONet \cite{IONet} first demonstrated the feasibility of learning motion patterns directly from raw inertial data using recurrent neural networks. RoNIN \cite{RoNIN} further advanced this direction by proposing three end-to-end frameworks based on Residual Networks (ResNet) \cite{ResNet}, Long Short-Term Memory (LSTM) networks \cite{LSTM}, and Temporal Convolutional Networks (TCN) \cite{TCN}, and also released a large-scale dataset for pedestrian inertial navigation. With the success of Transformer architectures in natural language processing \cite{BERT} and computer vision \cite{ViT}, CTIN \cite{CTIN} introduced a Transformer-based model for inertial data, enabling global motion pattern modeling through dynamic attention computation. Building upon this idea, iMoT \cite{iMoT} incorporated local self-attention and convolutional layers, improving the extraction of fine-grained local motion features. Beyond attention mechanisms, RIO \cite{RIO} introduced rotationally equivariant networks for self-supervised pose estimation, while EqNIO \cite{EqNIO} learned rotation-invariant displacement priors through canonical frame mapping. \cite{LieEvent}proposed using Lie Events as an alternative to conventional raw IMU data as inputs to the Neural Differential Pose (NDP) model. \cite{Liyan}modeled the dominance of different signals under various motion patterns and generated virtual training samples based on this modeling, thereby alleviating the problem of insufficient labeled data. These advances highlight the rapid pace of innovations in neural network technologies for pedestrian inertial odometry. However, applying deep learning–based inertial odometry to quadruped robots has been far less explored, particularly under the constraint of relying solely on IMU measurements.

The Extended Kalman Filter (EKF) is a widely used extension of the classical Kalman Filter for nonlinear systems, where local linearization is performed through a first-order Taylor expansion. Early works applied EKF to quadruped robot state estimation by fusing IMU and kinematic data. For example, \cite{RobotEKF} fused IMU and hexapod kinematics but assumed that three legs remained in contact with the ground, limiting generality. Later, \cite{MultisensorRobot} combined IMU, joint encoders, and foot-contact sensors within an EKF, while \cite{multiIMURobot} proposed mounting additional IMUs on the legs and fusing them with body-mounted IMU and encoder data, enabling more accurate estimation of both body and foot states. While effective, these methods depend on multiple heterogeneous sensors, which increase hardware and computational complexity. 

TLIO \cite{TLIO} bridged learning and filtering by feeding neural network–predicted displacement and uncertainty into an EKF, significantly improving the robustness of IMU-only odometry. This paradigm has since been extended to pedestrian and UAV navigation \cite{AirIO, DIDO, IMO}, demonstrating the benefits of combining data-driven models with probabilistic filtering. In the quadruped domain, \cite{learningRobot} integrated neural network–based state predictions with joint encoder measurements within an EKF for improved estimation. However, the approach relied heavily on encoder data and introduced little innovation in network design, which reduces generality and practical deployment.

\begin{figure*}[!htbp]
    \centering
    \captionsetup{font=small}
    \includegraphics[width=\linewidth]{framework.png}
    \caption{Overall framework of the proposed X-IONet framework. The raw inertial data are rotated using the attitude estimated by EKF and then fed into a rule-based expert selection network to identify the motion platform. The data are routed to a displacement prediction network to regress displacement and uncertainty. The predicted results are refined through the EKF to achieve accurate and robust cross-platform inertial odometry.}
    \label{fig:overall framework}
\end{figure*}


\section{METHODOLOGY}
%This section introduces our proposed X-IONet framework. The framework mainly consists of three components: the motion type classifier, the X-IONet displacement prediction network, and the filter. Fig.~\ref{fig:overall framework} shows an overall framework of the X-IONet framework. We design a classification network that classifies the input data type using a convolutional neural network and routes it to the corresponding pre-trained model of the displacement prediction network, enabling cross-platform odometry (see Section A). We introduce a displacement prediction network with a dual-stage attention mechanism to jointly capture temporal and inter-dimensional dependencies for precise motion estimation (see Section B). In addition to temporal dependencies, inter-dimensional dependencies within the inertial data are also crucial for accurate motion modeling. Last, we incorporate an Extended Kalman Filter (EKF)-based state estimation module that fuses the network predictions to refine and optimize the final state estimation (see Section C).

This section presents the proposed X-IONet framework, which consists of three key components: (i) a rule-based expert selection network, (ii) a displacement prediction network, and (iii) an Extended Kalman Filter (EKF)–based state estimator. The overall pipeline is shown in Fig.~\ref{fig:overall framework}. First, the expert selection network identifies the motion platform via a lightweight 1-D convolutional classifier and routes the IMU sequence to the appropriate pre-trained expert model (Section~\ref{sec:classifier}). Then, the displacement prediction network estimates motion displacement and uncertainty using a dual-stage attention architecture that jointly captures temporal and inter-axis dependencies (Section~\ref{sec:displacement}). Finally, an EKF integrates the predicted displacement and uncertainty to refine global state estimation (Section~\ref{sec:EKF}).

\subsection{Rule-based Expert Selection Network}
\label{sec:classifier}
Human and quadruped motion generate distinct inertial signatures. To enable cross-platform deployment, we introduce a rule-based expert selection network consisting of a 1-D CNN classifier and a platform-aware routing module. Given an IMU sequence, the classifier predicts the platform type, and the routing module directs the sequence to the corresponding expert model trained for that platform.

\textbf{Classification network.} 
The classification network adopts a 1-D convolutional structure to identify the platform type.
The input $\mathcal{X} \in \mathbb{R} ^{6 \times T \times f }$ represents a segment of IMU data, where $T$ denotes the time window and f denotes the sampling frequency. Each time step includes six features—three from the gyroscope ($\boldsymbol{\omega}\in \mathbb{R}^3$) and three from the accelerometer ($\mathbf{a}\in \mathbb{R}^3$).

Feature extraction is performed using a three-layer stacked 1-D convolutional block, where each layer is formulated as:

\begin{equation}
\boldsymbol{\mathcal{X}}_{n+1}=MaxPool(relu(BN(Conv1d(\boldsymbol{\mathcal{X}}_n))))
\end{equation}

where $\boldsymbol{\mathcal{X}}_n$ is the input for each layer, and it is the IMU data segment in the first layer. $Conv1d$ is the 1-D convolution operation; $relu( \cdot  )$ is an activation function; $BN( \cdot  ) $ is batch normalization; $MaxPool( \cdot  )$ is a max pooling layer. 

All convolutional layers use Kaiming normal initialization to ensure stable signal propagation and prevent gradient vanishing or explosion.
After the final convolutional layer, adaptive average pooling produces a fixed-length feature vector, which is then fed into a fully connected layer to generate the prediction logits for two classes.

\textbf{Expert selection module.}
A lightweight selection module is implemented based on the output of the classification network. The network generates prediction logits that are converted into probabilities via a softmax function, yielding a platform category and its confidence score—class 1 for human and class 0 for quadruped robot.
A simple if–else rule then directs each IMU sequence to its corresponding pre-trained displacement estimation expert network.
This design is computationally efficient and provides an effective means for generalizing inertial odometry across heterogeneous motion platforms.

\subsection{Displacement Prediction Network}
\label{sec:displacement}
Inertial odometry regresses motion states from sequential IMU measurements. Since accelerations and angular velocities along each axis are correlated yet heterogeneous, capturing both temporal and inter-axis dependencies is essential for accurate motion estimation. Inspired by Crossformer~\cite{Crossformer}, we design a dual-stage attention enhanced motion feature encoder–decoder architecture to jointly learn these dependencies.

\textbf{Embedding layer.} Given an inertial sequence $\boldsymbol{\mathcal{X}} \in \mathbb{R} ^{6 \times L }$ of length $L$, we first partition it into equal sub-segments of length $L_{seg}$ for each dimension. The $i$-th segment of the $j$-th dimension, $\boldsymbol{\mathcal{X}}^{seg}_{i,j}$, is linearly projected and augmented with a learnable positional embedding:

\begin{equation}
    \boldsymbol{h}_{i,j} = \boldsymbol{H\mathcal{X}}^{seg}_{i,j}+\boldsymbol{E}^{pos}_{i,j}
\end{equation}

where $\boldsymbol{H}\in \mathbb{R} ^{d_{model} \times L_{seg} }$ is the projection matrix and $\boldsymbol{E}^{pos}_{i,j}\in \mathbb{R}^{d_{model}}$ is the positional encoding.

\textbf{Motion Feature Encoder with Dual-Stage Attention.} The resulting 2D feature tensor $\boldsymbol{Y} \in \mathbb{R}^{N \times D \times d_{model}}$ (with $N$ segments and $D$ dimensions) is processed through two successive attention stages:
\begin{itemize}
    \item Temporal Self-Attention: Multi-head self-attention is applied independently to each dimension to capture long-range temporal dependencies:
    \begin{equation}
        Attention(Q,K,V)=softmax\left ( \frac{QK^{T}}{\sqrt{d_{k}} }  \right ) V
    \end{equation}
    \item Dimensional Self-Attention: Multi-head self-attention is then performed across dimensions to model inter-dimensional relationships.
    A lightweight router~\cite{Crossformer} selects the most relevant dependencies, reducing computational costs.
\end{itemize}

This dual-stage attention mechanism yields a representation $\boldsymbol{Z} \in \mathbb{R}^{N \times D \times d_{model}}$ that effectively encodes both temporal and cross-dimensional motion dynamics for inertial odometry estimation.

The encoder consists of $N$ layers, each merging every two adjacent temporal features (except for the first layer) to obtain coarser temporal representations. Each layer applies the dual-stage attention module to extract multi-scale temporal and dimensional features, enabling hierarchical motion understanding.
After encoding, we obtain multi-resolution representations $\boldsymbol{Y}^{enc, 0}$, $\boldsymbol{Y}^{enc, 1}$, ..., $\boldsymbol{Y}^{enc, N}$($\boldsymbol{Y}^{enc, 0}=\boldsymbol{H}$), where higher layers capture long-term dynamics and lower layers retain fine-grained motion details.

\textbf{Multiscale Feature Decoder with Cross-Attention.} The decoder mirrors the encoder with $N+1$ layers. The input to the initial decoder layer is a learnable positional embedding $E^{dec}$, while subsequent layers take the output of the preceding decoder layer as input. Each layer first processes its input through the dual-stage attention module and then performs cross-attention with the corresponding encoder features. The fused representation is refined via an MLP and layer normalization, and the final decoder output is passed through a fully connected layer to regress the 3D displacement and its associated covariance.

\textbf{Uncertainty-aware training with Huber–Gaussian loss.} To achieve robust regression with uncertainty modeling, we employ a Huber-Gaussian loss proposed in \cite{AirIO}:
\begin{equation}
    \mathcal{L} = \mathcal{L}_{Huber} + \lambda\mathcal{L}_C
\end{equation}
%where $\text{Huber}{\delta}$ is the Huber loss function:
where the $\lambda = 1e^{-4}$. The Huber function is defined as
\begin{equation}
    \mathcal{L}_{Huber} = \begin{cases}
\frac{1}{2}(\boldsymbol{\hat{d}}_{i} - \boldsymbol{d}_{i})^2 & \text{if } |\boldsymbol{\hat{d}}_{i} - \boldsymbol{d}_{i}| \leq \delta \\
\delta \cdot|\boldsymbol{\hat{d}}_{i} - \boldsymbol{d}_{i}| - \frac{1}{2}\delta^2 & \text{otherwise}
\end{cases}
\end{equation}

\begin{equation}
\mathcal{L}_{C} = \frac{1}{2} (\boldsymbol{\hat{d}}_{i} - \boldsymbol{d}_{i})\hat{\Sigma} _{i}^{-1}(\boldsymbol{\hat{d}}_{i} - \boldsymbol{d}_{i})^T + \frac{1}{2}ln(det\hat{\Sigma}_i) 
\end{equation}
where the $\delta = 0.005$, $\boldsymbol{\hat{d}}_{i}$ and $\boldsymbol{d}_{i}$ denote the predicted and ground-truth displacements and $\hat{\Sigma} _{i}$ is $3 \times 3$ covariance matrix.

This formulation provides robustness to outliers via the Huber loss, while the Gaussian likelihood term enables uncertainty-aware weighting of predictions. The Huber-Gaussian loss approximates the Mean Squared Error (MSE) for small errors, ensuring fitting accuracy, and transitions to a linear penalty for large errors, effectively mitigating the impact of outliers. This characteristic contributes to more stable training and better generalization in cross-platform scenarios. Compared to the loss function used in \cite{TLIO}, the Huber-Gaussian loss simultaneously optimizes both the size of prediction errors and the accuracy of uncertainty estimation, leading to more stable statistical consistency of the uncertainty (Section~\ref{sec:Uncertainty}).

%\begin{figure}
    %\centering
    %\includegraphics[width=\linewidth]{网络.png}
    %\caption{Over framework of X-IONet Displacement Prediction Network. Segments are processed by a Dual-Stage Attention module to capture both temporal and inter-dimensional dependencies. In the encoder, each layer applies temporal and dimensional attention mechanisms and adjacent segments are merged at the end of each layer. In the decoder, each layer takes the output from the previous layer as input, applies Dual-Stage Attention, and connects with the corresponding encoder layer through Cross-Attention to fuse multi-scale features.}
    %\label{fig:placeholder}
% \end{figure}

\subsection{EKF-Based State Estimation}
We employ the Extended Kalman Filter (EKF) for state estimation, integrating the output of the displacement prediction network with the state optimization process.
\label{sec:EKF}
\subsubsection{State Model}
The filter state vector is defined as: $\boldsymbol{S} = (\boldsymbol{\lambda_1}, \dots, \boldsymbol{\lambda_n}, \boldsymbol{x})$. The historical state vector $\boldsymbol{\lambda}_{i}(i=1, \ldots, n)$ contains pose information from $n$ past moments, and $\boldsymbol{x}=\left(\mathrm{_{i}^{w}R},\mathrm{^{w}}\boldsymbol{v},\mathrm{^{w}}\boldsymbol{p}, b_{g}, b_{a}\right)$ represents the current state. Where $\mathrm{_{i}^{w}}\mathrm{R} \in SO(3)$ is the rotation matrix from the inertial frame to the world frame; $\boldsymbol{\mathrm{^{w}}v}$ and $\boldsymbol{\mathrm{^{w}}p}$ are the velocity and position in the world frame; $b_{g} $ and $b_{a} $ are the biases of the gyroscope and accelerometer. The EKF uses an error state representation:
\begin{equation}
    \tilde{\boldsymbol{\lambda}}_{i}=(\tilde{\boldsymbol{\theta}}_{i}, \delta {\tilde{\boldsymbol{p}}_{i}})
\end{equation}
\begin{equation}
    \tilde{\boldsymbol{x}}=(\tilde{\boldsymbol{\theta}}, \delta{\tilde{\boldsymbol{v}}}, \delta{\tilde{\boldsymbol{p}}}, \delta{\tilde{b}_{g}}, \delta{\tilde{b}_{a}})
\end{equation}
Where $\tilde{\boldsymbol{\theta}}=\log _{SO3}(\mathrm{R} \hat{\mathrm{R}}^{-1})$ represents the rotational error. $\delta{\tilde{\boldsymbol{v}}}, \delta{\tilde{\boldsymbol{p}}}, \delta{\tilde{b}_{g}}, \delta{\tilde{b}_{a}}$ represent the errors in velocity, position, and bias, respectively.

\begin{table*}[!htbp]
  \centering
  \captionsetup{font=small}
  \caption{Results comparison of different models on Go2 dataset.}
  \label{tab:results}
  \small
  \renewcommand{\arraystretch}{1.3}
  \setlength{\tabcolsep}{5.3pt}
  \begin{tabular}{c|cc|cc|cc|cc|cc|cc|cc}
    \toprule
    \multirow{2}{*}{Model} & 
    \multicolumn{2}{c|}{Easy 01} & 
    \multicolumn{2}{c|}{Easy 02} & 
    \multicolumn{2}{c|}{Medium 01} & 
    \multicolumn{2}{c|}{Medium 02} & 
    \multicolumn{2}{c|}{Hard 01} & 
    \multicolumn{2}{c|}{Hard 02} &
    \multicolumn{2}{c}{Average}\\
    \cmidrule(lr){2-3} \cmidrule(lr){4-5} \cmidrule(lr){6-7} \cmidrule(lr){8-9} \cmidrule(lr){10-11} \cmidrule(lr){12-13} \cmidrule(lr){14-15}
    & ATE & RTE & ATE & RTE & ATE & RTE & ATE & RTE & ATE & RTE & ATE & RTE & ATE & RTE \\
    \midrule
    RoNIN-ResNet
    & \cellcolor{green!35} 2.43
    & \cellcolor{green!35} 1.57
    & \cellcolor{green!15} 1.98
    & \cellcolor{green!5} 1.82
    & \cellcolor{green!5} 4.23
    & \cellcolor{green!5} 2.13
    & \cellcolor{green!5} 3.89
    & \cellcolor{green!5} 1.83
    & \cellcolor{green!20} 2.07
    & \cellcolor{green!25} 1.35
    & \cellcolor{green!5} 7.08
    & \cellcolor{green!5} 3.00
    & \cellcolor{green!5} 3.62
    & \cellcolor{green!15} 1.95 \\
    RoNIN-TCN
    & \cellcolor{green!25} 4.7
    & \cellcolor{green!0} 3.96
    & \cellcolor{green!5} 2.39
    & \cellcolor{green!5} 2.22
    & \cellcolor{green!15} 2.98
    & \cellcolor{green!10} 2.11
    & \cellcolor{green!20} 1.64
    & \cellcolor{green!5} 1.45
    & \cellcolor{green!5} 4.88
    & \cellcolor{green!00} 3.03
    & \cellcolor{green!20} 5.05
    & \cellcolor{green!25} 1.98
    & \cellcolor{green!5} 3.61
    & \cellcolor{green!00} 2.46 \\
    RONIN-LSTM
    & \cellcolor{green!30} 2.67
    & \cellcolor{green!15} 2.46
    & \cellcolor{green!20} 1.58
    & \cellcolor{green!20} 1.26
    & \cellcolor{green!10} 3.32
    & \cellcolor{green!15} 1.44
    & \cellcolor{green!5} 3.36
    & \cellcolor{green!10} 1.41
    & \cellcolor{green!5} 4.85
    & \cellcolor{green!5} 2.69
    & \cellcolor{green!00} 8.08
    & \cellcolor{green!00} 3.23
    & \cellcolor{green!00} 3.98
    & \cellcolor{green!5} 2.08 \\
    TLIO
    & \cellcolor{green!20} 3.34
    & \cellcolor{green!30} 1.92
    & \cellcolor{green!10} 2.13
    & \cellcolor{green!10} 1.72
    & \cellcolor{green!30} 1.27
    & \cellcolor{green!35} 0.82
    & \cellcolor{green!25} 1.62
    & \cellcolor{green!30} 0.76
    & \cellcolor{green!45} \textbf{1.27}
    & \cellcolor{green!30} 1.18
    & \cellcolor{green!30} 3.66
    & \cellcolor{green!30} 1.76
    & \cellcolor{green!30} 2.22
    & \cellcolor{green!35} 1.37 \\
    IMUNet
    & \cellcolor{green!5} 3.93
    & \cellcolor{green!10} 2.57
    & \cellcolor{green!25} 1.45
    & \cellcolor{green!25} 1.18
    & \cellcolor{green!35} 0.90
    & \cellcolor{green!30} 0.84
    & \cellcolor{green!35} 0.57
    & \cellcolor{green!35} 0.66
    & \cellcolor{green!00} 5.39
    & \cellcolor{green!5} 2.96
    & \cellcolor{green!5} 6.75
    & \cellcolor{green!15} 2.40
    & \cellcolor{green!25} 3.17
    & \cellcolor{green!25} 1.77\\
    MobileNet 
    & \cellcolor{green!30} 2.67
    & \cellcolor{green!15} 2.32
    & \cellcolor{green!5} 2.58
    & \cellcolor{green!15} 1.46
    & \cellcolor{green!00} 4.28
    & \cellcolor{green!00} 2.49
    & \cellcolor{green!00} 4.20
    & \cellcolor{green!00} 2.27
    & \cellcolor{green!25} 1.59
    & \cellcolor{green!20} 1.46
    & \cellcolor{green!15} 6.00
    & \cellcolor{green!15} 2.02
    & \cellcolor{green!10} 3.56
    & \cellcolor{green!5} 2.07 \\
    MnasNet 
    & \cellcolor{green!0} 7.53
    & \cellcolor{green!5} 3.71
    & \cellcolor{green!30} 1.19
    & \cellcolor{green!30} 1.09
    & \cellcolor{green!20} 2.38
    & \cellcolor{green!20} 1.26
    & \cellcolor{green!30} 0.98
    & \cellcolor{green!20} 1.08
    & \cellcolor{green!10} 4.61
    & \cellcolor{green!10} 2.37
    & \cellcolor{green!25} 3.97
    & \cellcolor{green!00} 2.07
    & \cellcolor{green!20} 3.45
    & \cellcolor{green!20} 1.93 \\
    EfficientNet 
    & \cellcolor{green!10} 3.46 
    & \cellcolor{green!25} 2.03 
    & \cellcolor{green!35} 0.90 
    & \cellcolor{green!35} 0.94 
    & \cellcolor{green!25} 1.41 
    & \cellcolor{green!25} 1.08 
    & \cellcolor{green!25} 1.77 
    & \cellcolor{green!15} 1.13 
    & \cellcolor{green!15} 3.33 
    & \cellcolor{green!15} 2.09 
    & \cellcolor{green!35} 2.23 
    & \cellcolor{green!35} 1.32 
    & \cellcolor{green!35} 2.18 
    & \cellcolor{green!30} 1.43 \\
    CTIN 
    & \cellcolor{green!15} 3.42
    & \cellcolor{green!20} 2.04
    & \cellcolor{green!0} 3.22
    & \cellcolor{green!0} 3.00
    & \cellcolor{green!5} 4.26
    & \cellcolor{green!5} 2.21
    & \cellcolor{green!10} 2.49
    & \cellcolor{green!25} 1.00
    & \cellcolor{green!25} 1.78
    & \cellcolor{green!45} \textbf{1.04}
    & \cellcolor{green!10} 6.07
    & \cellcolor{green!10} 2.85
    & \cellcolor{green!15} 3.54
    & \cellcolor{green!10} 2.03 \\
    \textbf{Ours}                            
    & \cellcolor{green!45} \textbf{0.85}
    & \cellcolor{green!45} \textbf{0.84}
    & \cellcolor{green!45} \textbf{0.84}
    & \cellcolor{green!45} \textbf{0.91}
    & \cellcolor{green!45} \textbf{0.82}
    & \cellcolor{green!45} \textbf{0.45}
    & \cellcolor{green!40} \textbf{0.50}
    & \cellcolor{green!45} \textbf{0.29}
    & \cellcolor{green!40} 1.36
    & \cellcolor{green!40} 1.05
    & \cellcolor{green!45} \textbf{1.47} 
    & \cellcolor{green!45} \textbf{1.16} 
    & \cellcolor{green!45} \textbf{1.03}
    & \cellcolor{green!45} \textbf{0.84} \\
    \bottomrule
  \end{tabular}
\end{table*}

\subsubsection{State Propagation}
Extended Kalman Filter propagates the current state $\boldsymbol{x}$ using inertial data and a kinematic model:
\begin{equation}
\mathrm{^{w}_{i}\hat{R}_{n+1}}=\mathrm{_{i}^{w}\hat{R}_{n}}\exp _{S O 3}((\boldsymbol{\omega}_{n}-\hat{\boldsymbol{b}}_{g_{n}})\Delta t)
\end{equation}
\begin{equation}
^{\mathbf{w}}\hat{\boldsymbol{v}}_{n+1}=\mathbf{^{w}}\hat{\boldsymbol{v}}_{n}+\mathbf{^{w}}\boldsymbol{g} \Delta t+\mathbf{_{i}^{w}} \hat{\mathbf{R}}_{n}(\boldsymbol{a}_{n}-\hat{\boldsymbol{b}}_{a_{n}})\Delta t
\end{equation}
\begin{equation}
^{\mathbf{w}} \hat{\boldsymbol{p}}_{n+1}=\mathbf{^{w}} \hat{\boldsymbol{p}}_{n}+\frac{1}{2}\Delta t(^{\mathbf{w}}\hat{\boldsymbol{v}}_{n+1} + \mathbf{^{w}}\hat{\boldsymbol{v}}_{n})
\end{equation}
\begin{equation}
\hat{b}_{g_{(n+1)}}=\hat{b}_{g_{n}}+\sigma_{g_{n}}
\end{equation}
\begin{equation}
\hat{b}_{a_{(n+1)}}=\hat{b}_{a_{n}}+\sigma_{a_{n}}
\end{equation}

Where $\exp _{SO3}$ is the exponential map for the rotation group, and $\Delta t$ is the sampling period of the inertial data. $\boldsymbol{g}$ represents the gravity acceleration in the world frame. $\sigma$ donates Gaussian-distributed noise. The propagation of the error state is represented by a linearized matrix:
\begin{equation}
    \boldsymbol{\hat{x}}_{n+1}=\boldsymbol{A}_{n}^{x} \boldsymbol{\tilde{x}}_{n}+\boldsymbol{B}_{n}^{x} \boldsymbol{n}_{n}
\end{equation}
Where $\boldsymbol{n}_{k}$ is a vector containing all noise, and $\boldsymbol{A}_{k}^{x}$ , $\boldsymbol{B}_{k}^{x}$ are the state transition matrix and noise input matrix, respectively. The covariance propagation model is:
\begin{equation}
    \boldsymbol{P_{n+1}}=\boldsymbol{A}_{n}\boldsymbol{P}_{n}\boldsymbol{A}_{n}^{T}+\boldsymbol{B}_{n}\boldsymbol{W}_{n}\boldsymbol{B}_{n}^{T}
\end{equation}
where $P_{n}$ and $W_{n}$ denote the covariance matrices of the system
state and the noise at time $n$, respectively.
\subsubsection{State Update}
The measurement function $h(X)$ is:
\begin{equation}
h(\boldsymbol{X}) =\mathbf{R}^T(\mathbf{^{w}}\boldsymbol{p}_j-\mathbf{^{w}}\boldsymbol{p}_i)=\boldsymbol{\hat{d}}_{ij} + \boldsymbol{\sigma}_{ij}
\end{equation}
where $\mathbf{R}^T$ represents the transformation that converts the displacement difference in the world frame to the local frame. 
The corresponding Jacobian matrix is given by:
\begin{equation}
\mathbf{H}_{\theta_{i}}=\frac{\partial{h(\boldsymbol{X})}}{\partial{\tilde{\theta}_i}} = \mathbf{\hat{R}}^T\lfloor\mathbf{^w}\boldsymbol{p}_j - \mathbf{^w}\boldsymbol{p}_i\rfloor_{\times}
\end{equation}
\begin{equation}
\mathbf{H}_{\delta\tilde{\mathbf{p}}} =\frac{\partial{h(\boldsymbol{X})}}{\partial{\delta\tilde{p}_j}} = \mathbf{\hat{R}}^T
\end{equation}

Using the measurement Jacobian matrix $\mathbf{H}$ and the covariance $\boldsymbol{\Sigma}$ output by the neural network, the Kalman gain $\mathbf{K}$ is calculated to update the state $\mathbf{S}$ and covariance:
\begin{equation}
\mathbf{K} = \boldsymbol{P}\mathbf{H}^T(\mathbf{H}\boldsymbol{P}\mathbf{H}^T + \hat{\boldsymbol{\Sigma}}_{ij})^{-1}
\end{equation}
\begin{equation}
\mathbf{S} \leftarrow \mathbf{S} \oplus \left(\mathbf{K}(h(\mathbf{S}) - \hat{\boldsymbol{d}}_{ij})\right)
\end{equation}
\begin{equation}
\mathbf{P} \leftarrow (\boldsymbol{I} - \mathbf{K}\mathbf{H})\boldsymbol{P}(\boldsymbol{I} - \mathbf{K}\mathbf{H})^T + \mathbf{K}\hat{\boldsymbol{\Sigma}}_{ij}\mathbf{K}^T
\end{equation}
where $\oplus$ denotes the addition operation on the $SO(3)$ group when updating pose state variables, while other state variables use ordinary addition.



\section{EXPERIMENT}


\begin{table}[!htbp]
  \centering
  \captionsetup{font=small}
  \caption{Results comparison of different models on RoNIN dataset.}
  \label{tab:results}
  \small
  \renewcommand{\arraystretch}{1.25} % 增加行高
  \setlength{\tabcolsep}{11pt} % 调整列间距
  \begin{tabular}{c|cc|cc}
    \toprule
    \multirow{2}{*}{Model} & \multicolumn{2}{c|}{RoNIN\_seen} & \multicolumn{2}{c}{RoNIN\_unseen} \\
    \cmidrule(lr){2-3} \cmidrule(lr){4-5}
    & ATE & RTE & ATE & RTE \\
    \midrule
    RoNIN-ResNet & \cellcolor{green!30} 4.11 & \cellcolor{green!25} 3.28 & \cellcolor{green!30} 5.26 & \cellcolor{green!30} 4.62 \\
    RoNIN-TCN & \cellcolor{green!25} 4.31 & \cellcolor{green!10} 5.02 & \cellcolor{green!15} 6.74 & \cellcolor{green!10} 5.10 \\
    RONIN-LSTM & \cellcolor{green!10} 6.19 & \cellcolor{green!15} 4.56 & \cellcolor{green!10} 7.61 & \cellcolor{green!5} 5.87 \\
    TLIO & \cellcolor{green!15} 4.74 & \cellcolor{green!20} 3.96 & \cellcolor{green!20} 6.11 & \cellcolor{green!25} 4.75 \\
    IMUNet & \cellcolor{green!5} 6.56 & \cellcolor{green!0} 5.90 & \cellcolor{green!0} 8.35 & \cellcolor{green!5} 6.02 \\
    MobileNet & \cellcolor{green!0} 6.89 & \cellcolor{green!15} 5.09 & \cellcolor{green!5} 8.80 & \cellcolor{green!0} 6.96 \\
    MnasNet & \cellcolor{green!35} 3.96 & \cellcolor{green!35} 2.80 & \cellcolor{green!25} 6.08 & \cellcolor{green!15} 5.03 \\
    EfficientNet & \cellcolor{green!20} 4.59 & \cellcolor{green!20} 3.46 & \cellcolor{green!15} 6.25 & \cellcolor{green!20} 4.84 \\
    CTIN & \cellcolor{green!20} 4.34 & \cellcolor{green!30} 3.08 & \cellcolor{green!35} 5.25 & \cellcolor{green!35} 4.54 \\
    \textbf{Ours} & \cellcolor{green!45} \textbf{3.10} & \cellcolor{green!45} \textbf{2.42} & \cellcolor{green!45} \textbf{4.79} & \cellcolor{green!45} \textbf{4.05} \\
    \bottomrule
  \end{tabular}
\end{table}

\subsection{Experiment Setup}
\subsubsection{Datasets}
We evaluated the proposed method on both pedestrian and quadruped robot inertial datasets.
For pedestrians, we adopted RoNIN \cite{RoNIN}, a large-scale, high-quality dataset containing over 42.7 hours of IMU data with ground-truth trajectories. We followed the official training, validation, and test splits. The test set is divided into Seen and Unseen categories, with 32 trajectories each, corresponding to subjects included in or excluded from the training set, respectively.

For quadruped robots, we collected a dataset using the Unitree Go2 EDU platform, as shown in Fig.~\ref{fig:frame}. Ground-truth trajectories and the rotation ${}^{w}_{b}\mathbf{R} \in SO(3)$ between the IMU frame and the world frame were obtained via LiDAR odometry from an onboard Unitree L1 LiDAR. Since the robot’s IMU orientation is unknown relative to the body frame, we mounted an iPhone 14 Pro Max on top of the robot and performed attitude calibration. We obtained the rotation relationship ${}^{b}_{i}\mathbf{R} \in SO(3)$ between the IMU frame and the robot body frame. The phone’s IMU provided inertial measurements at 100 Hz, which were resampled to 200 Hz along with the ground-truth trajectories using linear interpolation. We recorded three difficulty levels—Easy, Medium, and Hard—each containing 10 sequences with a total duration of 1.5 hours. The data were split into training, validation, and test sets at a ratio of 3:1:1.
%The Easy set includes stable motions such as walking, turning, and U-turns. The Medium set introduces occasional dynamic motions, such as sudden acceleration, deceleration, or abrupt stops. The Hard set consists of highly dynamic behaviors, including braking, lateral translation, obstacle crossing, frequent direction switching, and jumping. This diverse dataset enables rigorous evaluation of cross-platform generalization.

\begin{figure}[!htbp]
    \centering
    \captionsetup{font=small}
    \includegraphics[width=1.05\linewidth]{Frame.png}
    \caption{The quadruped robot used in the experiments.}
    \label{fig:frame}
\end{figure}

\begin{figure*}[!htbp]
    \centering
    \captionsetup{font=small}
    \includegraphics[width=0.85\linewidth]{trajectory.png}
    \caption{Trajectory comparisons of partial experimental results. The top three trajectory plots illustrate the comparisons of different methods on the Go2\_Easy\_01, Go2\_Medium\_02, and Go2\_Hard\_02, while the bottom three plots correspond to the RoNIN\_a037\_1, RoNIN\_a038\_2, and RoNIN\_a044\_2. In the figures, darker and thicker trajectories indicate a closer match to the ground-truth motion paths. Each image highlights selected regions with magnified details to better illustrate the differences among the methods.}
    \label{fig:placeholder}
\end{figure*}


\subsubsection{Baseline}
We compared our method with a wide range of state-of-the-art inertial odometry approaches, including:

\begin{itemize}
    \item End-to-end Inertial Odometry: RoNIN\_TCN\cite{RoNIN}, RoNIN\_LSTM\cite{RoNIN}, RoNIN\_ResNet\cite{RoNIN}.
    \item Transformer-based Inertial Odometry: CTIN\cite{CTIN}.
    \item EKF-integrated Inertial Odometry: TLIO\cite{TLIO}.
    \item Lightweight Inertial Odometry: IMUNet\cite{IMUNet}, EfficientNet\cite{IMUNet}, MobileNet\cite{IMUNet}, and MnasNet\cite{IMUNet}.
\end{itemize}


\subsubsection{Metrics}
We evaluated performance using Absolute Trajectory Error (ATE) and Relative Trajectory Error (RTE).

ATE measures global trajectory accuracy as the root-mean-square distance between aligned estimated and ground-truth positions:
\begin{equation}
ATE = \sqrt{\frac{1}{N} \sum_{i=1}^{N} \| \mathbf{p}_i^{\text{est}} - \mathbf{p}_i^{\text{gt}} \|^2}
\end{equation}
RTE quantifies local drift by comparing estimated and ground-truth displacements within 1-minute time windows:
\begin{equation}
RTE = \sqrt{\frac{1}{M} \sum_{k=1}^{M} \| (\mathbf{p}_{k+\Delta t}^{\text{est}} - \mathbf{p}_k^{\text{est}}) - (\mathbf{p}_{k+\Delta t}^{\text{gt}} - \mathbf{p}_k^{\text{gt}}) \|^2}
\end{equation}

\subsubsection{Training Details}

We adopted a sliding-window strategy, segmenting 200 Hz IMU data into 1-second windows. Training used the Adam optimizer with a batch size of 128, a learning rate of $1\text{e-}4$, and up to 100 epochs. All experiments were conducted on an NVIDIA RTX 4090 GPU.

\subsection{Evaluation Across Quadruped Robots and Pedestrians}
Table I presents the performance comparison between X-IONet and various baseline methods on the self-collected Go2 quadruped robot dataset. The experimental results show that X-IONet achieved the lowest errors in five out of six test scenarios and obtained the second-lowest error in the Hard 01 scenario, highlighting its robustness to diverse motion patterns of quadruped robots. Furthermore, in terms of average errors across all motion scenarios, X-IONet reduced ATE and RTE by 52.8\% and 41.3\%, respectively, compared with the strongest baseline method, further confirming its advantage in dynamic state estimation tasks. 
%X-IONet’s rule-based expert selection network effectively adapts to quadruped-specific motion patterns; its dual-stage attention resists errors from sudden inertial signal changes in high dynamics;  EKF suppresses cumulative drift, ensuring robustness.

Table II presents the performance comparison on the RoNIN pedestrian dataset. The experimental results show that X-IONet achieved state-of-the-art average performance under both Seen and Unseen testing conditions. Compared with the strongest baseline method, X-IONet reduced ATE and RTE by 14.3\% and 11.4\%, respectively. These results further confirm that the cross-platform design of X-IONet does not compromise performance on pedestrian scenarios, avoiding overfitting to specific gait patterns while maintaining competitive accuracy on human inertial navigation.

Fig. 4 illustrates the trajectory comparisons between X-IONet and baseline methods in several test scenarios. As shown in the figure, X-IONet produces trajectories that are consistently closer to the ground truth in both quadruped robot and pedestrian tasks, demonstrating its superior accuracy in inertial odometry and the effectiveness of its cross-platform design.

\subsection{Ablation Study}
We conduct ablation experiments to quantify the contribution of each key component in X-IONet.

%\subsubsection{Contribution of Key Components}
\begin{itemize}
    \item \textbf{W/O Dual-Stage Attention Mechanism:} Removing dimensional attention and retaining only temporal attention significantly degrades performance.
    \item \textbf{W/O Hierarchical encoder-decoder architecture:} Eliminating the hierarchical structure forces the decoder to attend only to the final encoder layer.
    \item \textbf{W/O Extended Kalman Filter:} Using raw network outputs without EKF refinement leads to larger drift.
    \item \textbf{W/O Uncertainty in Loss Function:} Replacing the Huber–Gaussian loss with a standard Mean Squared Error (MSE) ignores uncertainty learning.
\end{itemize}

\begin{table}[!htbp]
  \centering
  \captionsetup{font=small}
  \caption{Results comparison  with and without critical components.}
  \label{tab:results}
  \small
  \renewcommand{\arraystretch}{1.5}
  \setlength{\tabcolsep}{3pt}
  \resizebox{\linewidth}{!}{%
  \begin{tabular}{l|cc}
    \toprule
    \multirow{2}{*}{Model} & \multicolumn{2}{c}{RoNIN\_Seen} \\
    \cmidrule(lr){2-3} 
    &ATE&RTE \\
    \midrule
    Ours & 3.10 & 2.42 \\
    Ours w/o Dual-Stage Attention Mechanism  
        & 4.65 \textcolor{red}{\scriptsize($\uparrow$1.55)} 
        & 3.37 \textcolor{red}{\scriptsize($\uparrow$0.95)}  \\
    Ours w/o Hierarchical Encoder-Decoder Architecture  
        & 3.32 \textcolor{red}{\scriptsize($\uparrow$0.22)} 
        & 2.63 \textcolor{red}{\scriptsize($\uparrow$0.21)}  \\
    Ours w/o Extended Kalman Filter Module
        & 3.41 \textcolor{red}{\scriptsize($\uparrow$0.31)} 
        & 2.89 \textcolor{red}{\scriptsize($\uparrow$0.47)}  \\
    Ours w/o Uncertainty in Loss Function
        & 3.73 \textcolor{red}{\scriptsize($\uparrow$0.63)} 
        & 3.01 \textcolor{red}{\scriptsize($\uparrow$0.59)}  \\
    \bottomrule
  \end{tabular}
}
\end{table}

The experimental results in Table 3 show that after removing the Dual-Stage Attention Mechanism, the ATE and RTE metrics increased by 50.0\% and 39.3\%, respectively. This result confirms that capturing cross-dimensional dependencies via the Dual-Stage Attention is significantly effective in improving the performance of inertial positioning. If the cross-dimensional dependencies are not fully utilized, the accuracy and stability of trajectory prediction will be significantly constrained.

After removing the hierarchical encoder-decoder architecture and applying cross-attention only once in the decoder, the ATE and RTE metrics increased by 7.1\% and 8.0\%, respectively. This result indicates that the architecture can effectively leverage multi-scale information, thereby enhancing the performance of trajectory prediction.

After removing the Extended Kalman Filter (EKF) module, the ATE and RTE metrics increased by 9.1\% and 19.4\%, respectively. This result demonstrates that the EKF can effectively optimize the state estimation process, thereby enhancing the robustness of the entire inertial odometry system.

When MSE is used as the loss function instead of the Huber-Gaussian loss, the ATE and RTE metrics increased by 20.3\% and 24.4\%, respectively. This result indicates that if the displacement prediction network only tries to make the predicted values as close as possible to the true values while ignoring uncertainty modeling during training, the prediction accuracy of the entire framework will be significantly reduced.

\subsection{Why the Huber–Gaussian loss?}
\label{sec:Uncertainty}

\begin{table}[ht]
  \centering
  \captionsetup{font=small}
  \caption{Comparison of the consistency of learned covariance. 3$\sigma$ Coverage is defined as "the proportion of samples where the actual error falls within the range of (3 $\times$) the standard deviation of uncertainty". The closer this proportion is to 100\%, the higher the statistical consistency between the uncertainty estimation and the actual error.}
  \label{tab:Ablation 3}
  \tiny  % 固定字体大小
  \renewcommand{\arraystretch}{1.5}
  \setlength{\tabcolsep}{3pt}
  \begin{adjustbox}{width=0.8\linewidth,center}  % 宽度占页面一半,并居中
    \begin{tabular}{l|cc}
      \toprule
      Loss Function & 3$\sigma$ Coverage \\
      \midrule
      Huber–Gaussian Loss & 99.2\% \\
      Loss Function in TLIO\cite{TLIO} & 98.7\% \\
      \bottomrule
    \end{tabular}
  \end{adjustbox}
\end{table}

Compared to the staged "MSE + maximum-likelihood" training used in TLIO~\cite{TLIO}, the Huber–Gaussian loss enhances robustness, stability, and uncertainty accuracy. The Huber term suppresses outlier influence and prevents the model from artificially inflating uncertainty, while the Gaussian likelihood maintains statistical consistency between predicted uncertainty and true error. 

Table~\ref{tab:Ablation 3} compares uncertainty consistency under both loss functions. The TLIO loss is more sensitive to outliers (e.g., sudden IMU disturbances), causing more samples to exceed the $3\sigma$ bound. In contrast, the Huber term attenuates outlier effects, improving coverage by keeping more samples within the $3\sigma$ range. This demonstrates that the Huber–Gaussian loss yields more stable and reliable uncertainty estimates.

\subsection{Effectiveness of the Rule-Based Expert Selection Network}
\begin{figure}[!htbp]
    \centering
    \captionsetup{font=small}
    \begin{minipage}[t]{0.23\textwidth}
        \centering
        \includegraphics[width=\textwidth]{Ablation_2.png}
        \label{fig:Ablation 1}
    \end{minipage}
    \hfill
    \begin{minipage}[t]{0.23\textwidth}
        \centering
        \includegraphics[width=\textwidth]{Ablation_1.png}
    \end{minipage}
    \caption{The trajectory of the quadruped robot predicted using the pedestrian model.}
\end{figure}


\begin{table}[!htbp]
  \centering
  \captionsetup{font=small}
  \caption{Comparison of results with and without classifer.}
  \label{tab:Ablation 2}
  \small
  \renewcommand{\arraystretch}{1.5}
  \setlength{\tabcolsep}{3pt}
  \resizebox{\linewidth}{!}{%
  \begin{adjustbox}{width=0.9\linewidth,center}
  \begin{tabular}{l|cc}
    \toprule
    \multirow{2}{*}{Model} & \multicolumn{2}{c}{RoNIN\_Seen} \\
    \cmidrule(lr){2-3} 
    &ATE&RTE \\
    \midrule
    Ours & 3.10 & 2.42 \\
    Ours w/o Motion Type Classifer  
        & 3.47 \textcolor{red}{\scriptsize($\uparrow$0.37)} 
        & 2.72 \textcolor{red}{\scriptsize($\uparrow$0.3)}  \\
    \bottomrule
  \end{tabular}
  \end{adjustbox}
}
\end{table}


Human and quadruped motion patterns differ substantially in dynamics and inertial characteristics, causing models trained on one domain to fail on the other. As shown in Fig.~5, applying a human-trained model to quadruped data results in severe trajectory distortion.

We evaluate whether direct mixed-domain training can replace expert selection. After jointly training on pedestrian and quadruped data, performance on pedestrian tests still drops—ATE and RTE degrade by 11.9\% and 12.4\%, respectively (Table~\ref{tab:Ablation 2}). These results indicate that naive joint training cannot achieve true cross-platform generalization. In contrast, the proposed rule-based classifier effectively routes IMU data to specialized experts, providing a simple and reliable mechanism for cross-platform inertial odometry.


\section{CONCLUSIONS}

This paper presented X-IONet, a cross-platform inertial odometry framework. By extracting frequency-domain features via discrete wavelet transform and fusing them with temporal signals, the network captures temporal, frequency, inter-variable, and local dependencies. The model regresses displacement and uncertainty, which are refined with an Extended Kalman Filter (EKF) for robust state estimation.
Extensive experiments on both the RoNIN pedestrian dataset and a newly collected Unitree Go2 quadruped dataset demonstrated state-of-the-art performance. X-IONet reduced ATE and RTE by 14.3\% and 11.4\% on RoNIN, and by 52.8\% and 41.3\% on Go2, compared with the best existing methods. Ablation studies confirmed the effectiveness of the dual-stage attention mechanism, frequency-domain input, and EKF refinement. In addition, a rule based front-end classification module enabled robust cross-platform generalization across humans and robots.
Future work will extend this framework to a wider range of robotic platforms and investigate multimodal sensor fusion to further enhance generalization, robustness, and long-term autonomy.

\addtolength{\textheight}{-12cm}   % This command serves to balance the column lengths
                                  % on the last page of the document manually. It shortens
                                  % the textheight of the last page by a suitable amount.
                                  % This command does not take effect until the next page
                                  % so it should come on the page before the last. Make
                                  % sure that you do not shorten the textheight too much.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\bibliographystyle{IEEEtran}
\bibliography{Mybib}


\end{document}

% Generated by IEEEtran.bst, version: 1.14 (2015/08/26)
\begin{thebibliography}{10}
\providecommand{\url}[1]{#1}
\csname url@samestyle\endcsname
\providecommand{\newblock}{\relax}
\providecommand{\bibinfo}[2]{#2}
\providecommand{\BIBentrySTDinterwordspacing}{\spaceskip=0pt\relax}
\providecommand{\BIBentryALTinterwordstretchfactor}{4}
\providecommand{\BIBentryALTinterwordspacing}{\spaceskip=\fontdimen2\font plus
\BIBentryALTinterwordstretchfactor\fontdimen3\font minus \fontdimen4\font\relax}
\providecommand{\BIBforeignlanguage}[2]{{%
\expandafter\ifx\csname l@#1\endcsname\relax
\typeout{** WARNING: IEEEtran.bst: No hyphenation pattern has been}%
\typeout{** loaded for the language `#1'. Using the pattern for}%
\typeout{** the default language instead.}%
\else
\language=\csname l@#1\endcsname
\fi
#2}}
\providecommand{\BIBdecl}{\relax}
\BIBdecl

\bibitem{VIO}
R.~Clark, S.~Wang, H.~Wen, A.~Markham, and N.~Trigoni, ``Vinet: Visual-inertial odometry as a sequence-to-sequence learning problem,'' in \emph{Proceedings of the AAAI conference on artificial intelligence}, vol.~31, no.~1, 2017.

\bibitem{vio2025}
J.~Niu, S.~Zhong, X.~Lu, S.~Shen, G.~Gallego, and Y.~Zhou, ``Esvo2: Direct visual-inertial odometry with stereo event cameras,'' \emph{IEEE Transactions on Robotics}, 2025.

\bibitem{LIO}
W.~Xu, Y.~Cai, D.~He, J.~Lin, and F.~Zhang, ``Fast-lio2: Fast direct lidar-inertial odometry,'' \emph{IEEE Transactions on Robotics}, vol.~38, no.~4, pp. 2053--2073, 2022.

\bibitem{lidar2024}
J.~Li, S.~Yuan, M.~Cao, T.-M. Nguyen, K.~Cao, and L.~Xie, ``Hcto: Optimality-aware lidar inertial odometry with hybrid continuous time optimization for compact wearable mapping system,'' \emph{ISPRS Journal of Photogrammetry and Remote Sensing}, vol. 211, pp. 228--243, 2024.

\bibitem{LIO2024}
Z.~Chen, Y.~Xu, S.~Yuan, and L.~Xie, ``ig-lio: An incremental gicp-based tightly-coupled lidar-inertial odometry,'' \emph{IEEE Robotics and Automation Letters}, vol.~9, no.~2, pp. 1883--1890, 2024.

\bibitem{GNSS}
S.~Hosseinyalamdary, ``Deep kalman filter: Simultaneous multi-sensor integration and modelling; a gnss/imu case study,'' \emph{sensors}, vol.~18, no.~5, p. 1316, 2018.

\bibitem{GNSS2024}
X.~Meng, H.~Tan, P.~Yan, Q.~Zheng, G.~Chen, and J.~Jiang, ``A gnss/ins integrated navigation compensation method based on cnn--gru+ irakf hybrid model during gnss outages,'' \emph{IEEE Transactions on Instrumentation and Measurement}, vol.~73, pp. 1--15, 2024.

\bibitem{Survey}
C.~Chen and X.~Pan, ``Deep learning for inertial positioning: A survey,'' \emph{IEEE transactions on intelligent transportation systems}, vol.~25, no.~9, pp. 10\,506--10\,523, 2024.

\bibitem{IONet}
C.~Chen, X.~Lu, A.~Markham, and N.~Trigoni, ``Ionet: Learning to cure the curse of drift in inertial odometry,'' in \emph{Proceedings of the AAAI conference on artificial intelligence}, vol.~32, no.~1, 2018.

\bibitem{TLIO}
W.~Liu, D.~Caruso, E.~Ilg, J.~Dong, A.~I. Mourikis, K.~Daniilidis, V.~Kumar, and J.~Engel, ``Tlio: Tight learned inertial odometry,'' \emph{IEEE Robotics and Automation Letters}, vol.~5, no.~4, pp. 5653--5660, 2020.

\bibitem{IMUNet}
B.~Zeinali, H.~Zanddizari, and M.~J. Chang, ``Imunet: Efficient regression architecture for inertial imu navigation and positioning,'' \emph{IEEE Transactions on Instrumentation and Measurement}, vol.~73, pp. 1--13, 2024.

\bibitem{CTIN}
B.~Rao, E.~Kazemi, Y.~Ding, D.~M. Shila, F.~M. Tucker, and L.~Wang, ``Ctin: Robust contextual transformer network for inertial navigation,'' in \emph{Proceedings of the AAAI Conference on Artificial Intelligence}, vol.~36, no.~5, 2022, pp. 5413--5421.

\bibitem{iMoT}
S.~M. Nguyen, D.~V. Le, and P.~Havinga, ``imot: Inertial motion transformer for inertial navigation,'' in \emph{Proceedings of the AAAI Conference on Artificial Intelligence}, vol.~39, no.~6, 2025, pp. 6209--6217.

\bibitem{RoNIN}
S.~Herath, H.~Yan, and Y.~Furukawa, ``Ronin: Robust neural inertial navigation in the wild: Benchmark, evaluations, \& new methods,'' in \emph{2020 IEEE international conference on robotics and automation (ICRA)}.\hskip 1em plus 0.5em minus 0.4em\relax IEEE, 2020, pp. 3146--3152.

\bibitem{learningRobot}
R.~Buchanan, M.~Camurri, F.~Dellaert, and M.~Fallon, ``Learning inertial odometry for dynamic legged robot state estimation,'' in \emph{Conference on robot learning}.\hskip 1em plus 0.5em minus 0.4em\relax PMLR, 2022, pp. 1575--1584.

\bibitem{AirIO}
Y.~Qiu, C.~Xu, Y.~Chen, S.~Zhao, J.~Geng, and S.~Scherer, ``Airio: Learning inertial odometry with enhanced imu feature observability,'' \emph{arXiv preprint arXiv:2501.15659}, 2025.

\bibitem{IMO}
G.~Cioffi, L.~Bauersfeld, E.~Kaufmann, and D.~Scaramuzza, ``Learned inertial odometry for autonomous drone racing,'' \emph{IEEE Robotics and Automation Letters}, vol.~8, no.~5, pp. 2684--2691, 2023.

\bibitem{DIDO}
K.~Zhang, C.~Jiang, J.~Li, S.~Yang, T.~Ma, C.~Xu, and F.~Gao, ``Dido: Deep inertial quadrotor dynamical odometry,'' \emph{IEEE Robotics and Automation Letters}, vol.~7, no.~4, pp. 9083--9090, 2022.

\bibitem{UAV_dead-reckoning}
D.~Yang, H.~Liu, X.~Jin, J.~Chen, C.~Wang, X.~Ding, and K.~Xu, ``Enhancing vio robustness under sudden lighting variation: A learning-based imu dead-reckoning for uav localization,'' \emph{IEEE Robotics and Automation Letters}, vol.~9, no.~5, pp. 4535--4542, 2024.

\bibitem{ResNet}
K.~He, X.~Zhang, S.~Ren, and J.~Sun, ``Deep residual learning for image recognition,'' in \emph{Proceedings of the IEEE conference on computer vision and pattern recognition}, 2016, pp. 770--778.

\bibitem{LSTM}
S.~Hochreiter and J.~Schmidhuber, ``Long short-term memory,'' \emph{Neural computation}, vol.~9, no.~8, pp. 1735--1780, 1997.

\bibitem{TCN}
S.~Bai, J.~Z. Kolter, and V.~Koltun, ``An empirical evaluation of generic convolutional and recurrent networks for sequence modeling,'' \emph{arXiv preprint arXiv:1803.01271}, 2018.

\bibitem{BERT}
J.~Devlin, M.-W. Chang, K.~Lee, and K.~Toutanova, ``Bert: Pre-training of deep bidirectional transformers for language understanding,'' in \emph{Proceedings of the 2019 conference of the North American chapter of the association for computational linguistics: human language technologies, volume 1 (long and short papers)}, 2019, pp. 4171--4186.

\bibitem{ViT}
A.~Dosovitskiy, L.~Beyer, A.~Kolesnikov, D.~Weissenborn, X.~Zhai, T.~Unterthiner, M.~Dehghani, M.~Minderer, G.~Heigold, S.~Gelly \emph{et~al.}, ``An image is worth 16x16 words: Transformers for image recognition at scale,'' \emph{arXiv preprint arXiv:2010.11929}, 2020.

\bibitem{RIO}
X.~Cao, C.~Zhou, D.~Zeng, and Y.~Wang, ``Rio: Rotation-equivariance supervised learning of robust inertial odometry,'' in \emph{Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition}, 2022, pp. 6614--6623.

\bibitem{EqNIO}
R.~K. Jayanth, Y.~Xu, Z.~Wang, E.~Chatzipantazis, D.~Gehrig, and K.~Daniilidis, ``Eqnio: Subequivariant neural inertial odometry,'' \emph{arXiv preprint arXiv:2408.06321}, 2024.

\bibitem{LieEvent}
R.~K. Jayanth, Y.~Xu, E.~Chatzipantazis, K.~Daniilidis, and D.~Gehrig, ``Neural inertial odometry from lie events,'' \emph{arXiv preprint arXiv:2505.09780}, 2025.

\bibitem{Liyan}
Y.~Li, Z.~Shi, Y.~Hou, L.~Xie, H.~Chen, Y.~Yan, and E.~Yin, ``Implicit self-augmentation and soft dominance prediction for pedestrian inertial localization,'' \emph{IEEE Transactions on Instrumentation and Measurement}, 2025.

\bibitem{RobotEKF}
P.-C. Lin, H.~Komsuoglu, and D.~E. Koditschek, ``Sensor data fusion for body state estimation in a hexapod robot with dynamical gaits,'' \emph{IEEE Transactions on Robotics}, vol.~22, no.~5, pp. 932--943, 2006.

\bibitem{MultisensorRobot}
M.~Bloesch, M.~Burri, H.~Sommer, R.~Siegwart, and M.~Hutter, ``The two-state implicit filter recursive estimation for mobile robots,'' \emph{IEEE Robotics and Automation Letters}, vol.~3, no.~1, pp. 573--580, 2017.

\bibitem{multiIMURobot}
S.~Yang, Z.~Zhang, B.~Bokser, and Z.~Manchester, ``Multi-imu proprioceptive odometry for legged robots,'' in \emph{2023 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)}.\hskip 1em plus 0.5em minus 0.4em\relax IEEE, 2023, pp. 774--779.

\bibitem{Crossformer}
Y.~Zhang and J.~Yan, ``Crossformer: Transformer utilizing cross-dimension dependency for multivariate time series forecasting,'' in \emph{The eleventh international conference on learning representations}, 2023.

\end{thebibliography}