1. Introduction
In recent years, the rapid advancement of robotics has driven the widespread deployment of mobile robots across diverse domains, including autonomous navigation, indoor positioning systems, edge computing, and aerial robotics [Reference Deshmukh, Hasamnis, Kulkarni and Bhaiyya1–Reference Xu, Liu, Chen and Shen4]. As a cornerstone of robotic autonomy, Simultaneous Localization and Mapping (SLAM) plays a critical role in constructing accurate environmental representations that enable perception, navigation, and high-level decision-making. Among existing paradigms, visual SLAM has attracted considerable attention due to the favorable characteristics of camera sensors, namely their high information density, low cost, and ease of integration. Numerous systems with enhanced robustness and precision have been developed, significantly improving performance in small-scale environments such as those encountered by indoor service robots and unmanned aerial vehicles [Reference Da, Chen, Song and Lu5–Reference Zhang, He, Yang, Zhu, Wu, Jiao and Yuan8].
Despite these advances, large-scale real-world deployment remains hindered by excessive memory consumption [Reference Kruzhkov, Savinykh, Karpyshev, Kurenkov, Yudin, Potapov and Tsetserukou9]. Recent studies have shown that memory usage can exceed 1 GB within just a few minutes of operation, placing a heavy burden on resource-constrained platforms [Reference Zhang, Dong, Zhang and Liu10]. While most research focuses on improving accuracy or computational speed, memory-efficient design has received comparatively little attention. System scalability is increasingly limited by the accumulation of redundant keyframes and map points, even though only a small subset is essential for reliable localization. Existing sparsification methods, such as K-cover [Reference Zhang and Liu11], reduce redundancy but are typically offline, computationally expensive, and rely on fixed grid partitioning. Moreover, they often sparsify map points primarily based on grid coverage and keyframe association, while overlooking that visual features contribute unequally to mapping and localization.
Visual-inertial SLAM (VI-SLAM) [Reference Puyol, Bobkov, Robertson and Jost12] enhances robustness by fusing camera and inertial measurements, yet this fusion also intensifies memory pressure due to the continuous accumulation of keyframes and 3D points. Although traditional systems adopt a “loose-in, tight-out” strategy to manage state growth, recent approaches like PIPO-SLAM [Reference Ge, Zhang, Wu and Hu13] exhibit strong inertial coupling, which can impede effective keyframe culling. Pose-based representations aim to alleviate redundancy by marginalizing map points. However, most point-based methods still optimize keyframes and map points independently, neglecting their intrinsic interdependence. This decoupled treatment often results in overconstrained pose graphs, sparse and uneven map coverage, and overconfident information accumulation, particularly in large-scale scenarios.
More importantly, most existing memory-efficient SLAM approaches lack a principled mechanism to jointly assess the information value of keyframes and map points. For instance, a seemingly redundant keyframe may still retain highly informative map points, while aggressive sparsification of points can severely undermine the utility of the remaining keyframes. Neglecting this coupling not only diminishes the effectiveness of map compression but also complicates long-term pose-graph optimization: historical observations are either discarded outright or irreversibly marginalized, leading to potential loss of consistency. Consequently, maintaining both real-time performance and estimation accuracy over extended operation remains challenging.
To address these limitations, we propose a memory-efficient SLAM framework tailored for large-scale, long-duration scenarios, with a focus on online local map updating. In contrast to conventional methods that treat keyframes and map points independently, our approach jointly models their mutual dependency and information contribution within a unified optimization framework. By integrating information-theoretic criteria with adaptive sparsification strategies, the system achieves substantial memory savings without compromising localization accuracy or real-time capability. Extensive experiments show that our method reduces average memory usage by more than 65% in indoor environments and over 75% in outdoor settings, while demonstrating superior scalability compared to state-of-the-art systems.
The main contributions of this work are summarized as follows.
-
• This paper presents an information-driven keyframe culling scheme that combines information-gain criteria with high-fidelity prior residual modeling. Normalized information matrices are compared before and after marginalization to quantify each keyframe’s independent contribution to the system’s information entropy. Historical constraints are preserved via residual reconstruction without inducing global coupling, thereby supporting large-scale, long-duration graph optimization.
-
• A nonlinear scoring function is formulated to jointly capture parallax distribution and descriptor distinctiveness and is coupled with a sliding-window sparsification strategy. This design adaptively retains structurally informative map points while removing redundant ones, reducing back-end optimization cost without degrading map fidelity.
-
• An efficient and robust loop detection method is proposed for large-scale environments with sparse map coverage. Loop candidates are selected from a locally co-visible keyframe region and verified through a combination of Bag-of-Words (BoW) similarity and Random Sample Consensus (RANSAC)-based geometric consistency.
The source code is implemented in the Robot Operating System (ROS) framework and is publicly available at https://github.com/xuchuanleikeshi/MES_SLAM.
The remainder of this paper is organized as follows. Section 2 provides an overview of related research work. Section 3 presents a system overview. Section 4 presents the theoretical basis for the method proposed in this paper. Section 5 systematically presents the simulation experiments and real-world experiments for verification. Finally, Section 6 summarizes the entire paper.
2. Related works
2.1. Visual SLAM
Compared to LiDAR and radar, cameras provide rich environmental information at low cost, making them central to SLAM research. Early works [Reference Davison, Reid, Molton and Stasse14–Reference Klein and Murray17] laid the groundwork for visual SLAM. Frontend visual odometry methods [18, Reference Kitt, Geiger and Lategahn19] offered robust alternatives to direct tracking under challenging conditions. LSD-SLAM [Reference Engel, Schöps and Cremers20] introduced semi-dense direct mapping, while the ORB-SLAM series [Reference Campos, Elvira, Rodríguez, Montiel and Tardós21–Reference Mur-Artal and Tardós23] significantly advanced indirect approaches through multi-sensor fusion and global consistency. These systems have established a strong foundation for point-feature-based visual SLAM. However, traditional methods often degrade in low-texture or highly structured environments due to insufficient feature observations. To address this limitation, recent approaches such as VPL-SLAM [Reference Chen, Cao, Hou, Li, Qiu, Chen, Xue, Lu and Pu24], PLP-SLAM [Reference Shu, Wang, Pagani and Stricker25], and SP-SLAM [Reference Cho, Jo and Kim26] incorporate higher-level geometric primitives, including lines and planes, to enhance robustness and environmental adaptability.
2.2. 3D map point management
Memory efficiency is critical for large-scale and long-term SLAM deployment. Prior work [Reference Labbé and Michaud27, Reference Labbé and Michaud28] proposed hierarchical memory architectures inspired by cognitive models, partitioning map data into short-term, working, and long-term components. While effective at controlling memory growth, these methods render offloaded maps inaccessible during loop detection, potentially compromising global consistency.
More recently, Chen et al. [Reference Chen, Zhuang and Wang29] achieved real-time monocular 3D perception on CPU-only devices by combining projective geometry with lightweight 2D detection, substantially reducing memory overhead. MS-SLAM [Reference Zhang, Dong, Zhang and Liu10] further improves scalability via a sliding-window sparsification strategy [Reference Zhang and Liu11], retaining only those points essential for tracking and loop closure. Although this approach preserves accuracy and partial loop capability, it relies on heuristic spatial coverage criteria and does not explicitly evaluate the information contribution of individual map points or their coupling with keyframes.
2.3. Keyframe management
Controlling the scale of bundle adjustment (BA) is essential for backend efficiency. CoLi-BA [Reference Ye, Li, Liu, Cui, Bao and Zhang30] compresses reprojection Jacobians into compact 3D vectors to reduce computational and memory costs. Other studies improve BA robustness under poor initialization [Reference Hong and Zach31, Reference Lee and Civera32], enhancing numerical stability in large-scale problems. A widely adopted strategy limits BA complexity by restricting the number of optimized keyframes and decoupling pose estimation from dense 3D structure, reformulating the problem as pose graph optimization (PGO). For instance, Liu et al. [Reference Liu, Xu, Lu, Wang, Wang, Xiong and Wang33] integrate sparse LiDAR beam adjustment with high-frequency PGO for multi-robot SLAM. While PGO enables real-time performance and scalability, it typically sacrifices accuracy due to the absence of direct 3D observation constraints.
In VI-SLAM, VINS-Mono [Reference Qin, Li and Shen34] uses a fixed-size sliding window for BA and preserves historical constraints through an edge-keeping strategy, complemented by a reduced-degree-of-freedom pose optimizer for global consistency. ORB-SLAM3 reduces computational load by merging redundant keyframes and re-evaluating IMU preintegration; however, it neglects temporal variations in IMU bias, which may introduce inconsistency after fusion. Usenko et al. [Reference Usenko, Demmel, Schubert, Stückler and Cremers35] apply nonlinear marginalization to prune frames within local VIO windows, whereas DM-VIO [Reference v. Stumberg and Cremers36] restricts keyframe creation by tightly coupling new frames to current observations. These methods manage BA complexity either through aggressive frame deletion or constrained keyframe generation.
Recently, PIPO-SLAM [Reference Ge, Zhang, Wu and Hu13] proposed a manifold-based preintegration merging framework that unifies error, covariance, and Jacobian terms into a single formulation, enabling theoretically consistent keyframe removal. However, its reliance on tight inertial coupling limits flexibility in dynamic or long-term scenarios where adaptive culling is required.
Overall, existing memory-efficient SLAM approaches often prioritize either map-point sparsification or keyframe reduction, and many of them rely on heuristic criteria without explicitly quantifying the information contribution of individual components. Moreover, keyframes and map points are frequently treated as loosely coupled entities, which can lead to suboptimal compression decisions and reduced long-term consistency when historical observations are removed or marginalized. To overcome these limitations, the proposed method introduces a unified information-theoretic framework that jointly evaluates the marginal contribution of keyframes and map points by analyzing normalized information matrices before and after marginalization. In addition, high-fidelity prior residuals are leveraged to reconstruct historical constraints and avoid inducing global coupling during aggressive compression. This principled joint sparsification strategy supports real-time operation on resource-constrained platforms while maintaining long-term localization accuracy and remaining compatible with classical SLAM pipelines.
3. System overview
The proposed memory-efficient visual SLAM system integrates sparse prior embedding and nonlinear score-guided sparsification within the ORB-SLAM2 framework [Reference Mur-Artal and Tardós23]. Its overall architecture is depicted in Figure 1.
Illustration of the proposed system framework.

In our implementation, the proposed system supports multiple camera configurations, including monocular, stereo, and RGB-D, enabling rapid deployment across diverse visual sensing platforms. The architecture integrates front-end tracking, local mapping, loop closure detection, global optimization, and map management into a unified framework.
The front end performs visual odometry and selects keyframes based on scene changes. In the local mapping stage, new 3D points are triangulated and refined through local bundle adjustment (BA), after which they are integrated into the global map. To mitigate drift and support self-calibration, the backend employs an enhanced loop closure mechanism followed by global BA, jointly optimizing camera poses and 3D structure to ensure global consistency and accuracy.
A dedicated module handles keyframe selection and map sparsification. It operates asynchronously, periodically evaluating redundancy among neighboring keyframes. For each candidate, the system quantifies its residual transfer rate and preservation of the information matrix to assess both pose estimability and informational value. Candidates deemed redundant in both criteria are removed. Subsequently, the keyframe window is partitioned, and associated map points are classified according to depth uncertainty and descriptor consistency. A linear weighting term is then incorporated into a mixed-integer optimization problem to yield a sparse yet geometrically coherent local map. Finally, the graph structure, edge constraints, and co-visibility are updated, resulting in a more compact and efficient local map.
To improve loop closure robustness under sparse mapping conditions, we introduce a region-based detection strategy. A local region is defined around the current keyframe and its co-visible neighbors, effectively narrowing the search space. Within this region, potential matches are first retrieved via Bag-of-Words (BoW) similarity, followed by feature matching and RANSAC-based geometric verification to estimate relative poses. A loop closure is accepted only if the number of inliers exceeds a predefined threshold, and the resulting constraint is fed into the global optimizer. This design maintains reliable performance even in texture-poor or feature-scarce environments.
Overall, the system enables mobile robots to perform long-term mapping with low memory consumption while preserving real-time operation and high localization accuracy. Implementation details are provided in Section 4.
4. Efficient memory management for visual SLAM
This section first explains how our method removes redundant keyframes through sparse prior embedding while retaining essential observation constraints. The resulting compact set of keyframes then guides the sparsification of local map points within a sliding window, using a nonlinear scoring function to enable joint compression of both keyframes and their associated 3D points. Candidate frames for loop closure are selected from locally co-visible regions. A two-stage detection framework is employed: it first retrieves potential matches based on bag-of-words similarity and then verifies them geometrically using RANSAC. This strategy ensures robust loop closure even under challenging conditions, such as sparse keyframe distributions or large-scale environments.
4.1. Quantifying information contribution via prior residuals
In visual SLAM, the camera trajectory and landmark positions are jointly refined through the bundle adjustment (BA) process. The overall optimization objective can be formulated as the minimization of the following reprojection error cost function:
where
$\mathbf{T}_i \in SE(3)$
denotes the
$i$
-th camera pose,
$\mathbf{p}_j \in \mathbb{R}^{3}$
denotes the
$j$
-th 3D landmark,
$\mathbf{z}_{ij} \in \mathbb{R}^{2}$
is the 2D observation of landmark
$\mathbf{p}_j$
in pose
$\mathbf{T}_i$
, and
$h(\!\cdot \!)$
represents the camera projection function that maps a 3D point into the image plane.
To this end, an increment is applied to the state variables. The objective function can then be approximated as:
Corresponding incremental linear equations:
where
$ x = [T_1, \ldots , T_m, p_1, \ldots , p_n]$
is the state vector to be optimized, and
$ H$
denotes the Newton-type approximation of the Hessian in the corresponding incremental equation. To accelerate the solution, the special block structure of this system is exploited. The vector
$ g$
represents the gradient of the incremental system. Let
$ F$
denote the Jacobian of the residuals with respect to the camera poses, and
$ E_{ij}$
the Jacobian with respect to the
$ j$
-th landmark observed by the
$ i$
-th keyframe. Collecting all such blocks yields the full landmark Jacobian
$ E$
. In both the Gauss–Newton and Levenberg–Marquardt methods, the variables are partitioned into two groups: poses and 3D landmarks. The overall Jacobian is thus structured as
$ J = [F, E]$
.
To marginalize the keyframe pose
$T_k \in SE(3)$
, whose perturbation is represented by the Lie algebra increment
$\delta T_k \in \mathbb{R}^6$
, we apply the Schur complement to its normal equations.
where
$b_{T_k} \in \mathbb{R}^6$
and
$b_P \in \mathbb{R}^{n}$
are the negative gradient vectors corresponding to the keyframe pose
$T_k$
and the map points in
$P$
, respectively. The Hessian matrix is partitioned as
where
$H_{T_k T_k} \in \mathbb{R}^{6 \times 6}$
corresponds to
$T_k$
,
$H_{PP} \in \mathbb{R}^{n \times n}$
captures the block for all remaining variables (i.e., other keyframes and map points), and
$H_{T_k P} \in \mathbb{R}^{6 \times n}$
encodes their coupling. Note that
$H_{P T_k} = H_{T_k P}^\top$
.
After marginalizing
$\delta T_k$
via the Schur complement, the resulting system is:
Specifically,
$H_s$
and
$b_s$
denote the information matrix and vector, respectively, that are added to the system as a result of marginalization. The resulting marginalized information is
\begin{equation} \begin{split} H_s &= H_{PP} - H_{PT_k} H_{T_kT_k}^{-1} H_{T_kP} \\[3pt] b_s &= b_{P} - H_{PT_k} H_{T_kT_k}^{-1} b_{T_k} \end{split} \end{equation}
This operation compresses the observational constraints associated with
$T_k$
into a prior and incorporates it into the retained variables
$P$
within the sliding window, thereby reducing the optimization dimensionality. The marginalization produces a residual term that encodes this prior, which is then added to the bundle adjustment to preserve historical information.
This process (7) introduces only local priors tied to retained variables, avoiding global couplings [Reference Yu, Qiao, Liu, Yin and Shen37] and preserving the sparsity of the Hessian matrix for efficient optimization. Marginalization embeds the influence of removed frames into residuals, eliminating the need to optimize them explicitly. If the information matrix structure remains consistent, the following inequality holds:
Here,
$\|\cdot \|_F$
denotes the Frobenius norm for measuring matrix differences;
$\alpha _H \in [0,1)$
is a scaling factor that controls the allowable information loss during marginalization;
$H_s$
is the resulting prior information matrix; and
$\varepsilon _H$
is a predefined threshold. If the condition holds, keyframe
$T_k$
is deemed redundant and can be safely removed. The observational constraints from
$T_k$
are then embedded into the residuals of associated map points and neighboring keyframes through the prior, preserving its influence on subsequent bundle adjustment and global optimization without explicitly retaining it.
4.2. Adaptive scoring-based map sparsification theory
4.2.1. Depth error uncertainty score
The Triangulated Uncertainty Analysis module in Figure 2 visualizes the impact of camera parallax on triangulation depth error. Two frames,
$C_r$
and
$C_l$
, separated by baseline
$t$
, observe the same 3D point
$P$
. It is evident that a larger camera translation, corresponding to increased parallax, substantially reduces the uncertainty in depth estimation
$\sigma P$
. Triangulation accuracy is thus improved under identical observation conditions.
Illustration of sliding window sparsification based on a comprehensive feature point scoring mechanism.

Let
$F = \{\, f_j \}_{j=1}^M$
denote the set of keyframes in the current map, and
$P = \{ p_i \}_{i=1}^N$
the set of map points, where
$M$
and
$N$
are the numbers of keyframes and map points, respectively. Within any sliding window, the disparity score of a map point
$p_i$
observed by multiple keyframes is defined as:
\begin{equation} {s_{p,i}} = \sum \limits _{i = 1}^N {\frac {1}{{\left | {{\Gamma _i}} \right |}}\sum \limits _{{c_r},{c_l} \in {\Gamma _i}}^{\left | {{\Gamma _i}} \right | - 1} {\angle ({{\vec c}_r} - {p_i},{{\vec c}_l} - {p_i})} } \end{equation}
where
$\Gamma _i$
denotes the set of keyframes that observe the
$i$
-th 3D map point
$p_i$
,
$\vec {c}_r$
and
$\vec {c}_l$
are the camera positions of keyframes
$f_r$
and
$f_l$
, respectively, and
$\angle (\cdot ,\cdot )$
computes the viewing angle between two rays emanating from the cameras to
$p_i$
. The score
$s_{p,i}$
represents the average viewing angle over all pairs of observing keyframes. A larger score indicates stronger geometric constraints, which helps retain well-constrained points during map sparsification, thereby mitigating scale drift and preserving global map accuracy.
4.2.2. Descriptor consistency constraints
Given a map point
$ p_i$
, the corresponding feature point set across images is denoted as
${\psi _i} = \{ {{\rm {d}}_{i,j}}, {d_{i,j + 1}}, {d_{i,j + 2}}, \ldots , {d_{i,j + {L_i}}} \}$
.
$ L_i$
represents the number of keyframes in which the map point is observed. The feature descriptors corresponding to
$ p_i$
in each keyframe are mapped onto a 2D plane, as shown in the Static Challenge Descriptor Scoring Mechanism module of Figure 2. The spatial compactness of the projected points is used to evaluate the tracking stability of the 3D map point. A scoring metric is then derived based on this compactness and serves as a weight for subsequent map point sparsification. To assess the descriptor stability of map point
$ p_i$
under varying scenes and viewpoints, the descriptor set
$ \psi _i$
is dimensionality-reduced using a PCA-based mapping function
$ f_{\text{PCA}}$
, projecting it onto a 2D plane.
In order to evaluate the stability of the observation descriptors of the map point
$p_i$
in different scenes and perspectives, the descriptor set
$ \psi _i$
is mapped to a two-dimensional plane through the dimensionality reduction function:
The two-dimensional scattered point set
$z_{ij}$
is obtained, and the descriptor aggregation score index
$s_{d,i}$
is further defined as the average Euclidean distance between all mapped two-dimensional point pairs:
\begin{equation} {s_{d,i}} = \frac {2}{{(\left | {{L_i}} \right |(\left | {{L_i}} \right | - 1))}}{\sum \limits _{j = 1}^{\left | {{L_i}} \right |} {\sum \limits _{k = j + 1}^{\left | {{L_i}} \right |} {\left \| {{z_{ij}} - {z_{ik}}} \right \|}_2 }} \end{equation}
Figure 2 illustrates the sliding window sparsification principle, which incorporates descriptor and disparity angle scoring. Tracking quality is assessed by combining descriptor distances from historical keyframes with mapped surface points to evaluate triangulation quality. These scores are nonlinearly weighted (13) to compute a final score
$w_i$
for each point, serving as prior knowledge for subsequent mixed-integer linear programming.
Among them,
$\tanh ( \!\cdot\! )$
is the hyperbolic tangent function, which strengthens the score of high disparity points;
$\sigma (x) = \frac {1}{{1 + {e^{ - x}}}}$
is the sigmoid function, which is used to smooth the normalized descriptor;
$\alpha \in [0,1]$
controls the relative weight of the disparity score and the descriptor score; and
${\beta _1}, {\beta _2} \gt 0$
are the nonlinear scaling factors of the score response.
As shown in Figure 2, the 2D discrete grid sparse map module comprises
$C \times R$
cells that impose discrete linear spatial constraints. Building on the mixed linear space formulation of ref. [Reference Zhang, Dong, Zhang and Liu10], this work incorporates score-based weighting by introducing a reward term for high-scoring map points into the optimization objective:
\begin{equation} \begin{aligned} \mathop {\min }\limits _{x,\,\xi ,\,\phi } \quad & q^T x + \lambda _1 \mathbf{1}^T \xi + \lambda _2 \mathbf{1}^T \phi + \lambda _3 \mathbf{1}^T \varphi \\[3pt] & - \lambda _4 W^T x + \lambda _5 \eta \|x\|_1 + (1 - \eta )x^T x \\[3pt] \text{subject to} \quad & A_1 x \geq K1 - \xi \\[3pt] & A_2 x \geq KP - \varphi \\[3pt] & B x \geq 1 - \phi \\[3pt] & x \in \{0, 1\}^N \\[3pt] & \xi \in \{0, \mathbb{Z}_+\}^{M_1} \\[3pt] & \varphi \in \{0, \mathbb{Z}_+\}^{M_2} \\[3pt] & \phi \in \{0, 1\}^{M_1 \times C \times R} \end{aligned} \end{equation}
where
$\{\lambda _{1}, \lambda _{2}, \lambda _{3}, \lambda _{4}, \lambda _{5}\}$
are weighting coefficients balancing different objectives. Specifically,
$\lambda _{1}$
–
$\lambda _{3}$
constrain geometric consistency, structural stability, and observation completeness within the sliding window;
$\lambda _{4}$
encourages the retention of high-quality map points through the reward vector
$W$
; and
$\lambda _{5}$
combines
$L_{1}$
and
$L_{2}$
regularization to enforce sparsity and smoothness of the solution.
$\eta$
controls the weights of sparsity and smoothness;
$W = \{ w_1, w_2, \ldots , w_N \}$
is the reward vector for each map point; and
$x$
is a binary decision vector indicating whether the
$i$
th map point is retained.
$q$
is a weight vector that controls the sparsity of the entire map.
$\mathbf{1}$
is a matrix alignment vector whose elements are all equal to one.
$\xi$
,
$\varphi$
, and
$\phi$
are relaxation coefficients.
$\xi$
and
$\varphi$
are used to properly relax the minimum number of 3D points observed in each keyframe.
$\phi$
is the minimum number of 3D points corresponding to each mesh.
$K$
is the constraint stiffness coefficient.
$N$
is the number of map points
$P_w$
contained in the window;
$M_1$
is the number of keyframes in the current sliding window
$F_w$
;
$M_2$
is the number of keyframes outside the sliding window
${F_m} \cup {F_n}$
;
$A_1$
is a binary relationship matrix describing the association between map points and keyframes in the sliding window; and
$A_2$
is another binary matrix describing the observation relationship between keyframes and map points outside the sliding window. In order to ensure that highly informative map points are not lost during the elimination process, a dynamic map point elimination threshold is defined:
where
$n_i$
is the number of associated map points in the sliding window, and
$N_i$
is the number of associated maps.
In the proposed sparse scoring optimization, the last three terms of the objective function jointly determine the sparsification behavior under the scoring mechanism. Specifically, the reward term
$-\lambda _{4} W^{T}x$
encourages the retention of high-scoring map points by assigning larger weights to features with higher discriminative power. The regularization term
$\lambda _{5}\eta \|x\|_{1}$
enforces sparsity by penalizing the number of active elements in
$x$
, effectively filtering out low-contribution or redundant map points. Meanwhile, the quadratic term
$(1-\eta )x^{T}x$
introduces smoothness and prevents over-sparsification by maintaining numerical stability in the optimization process. Together, these components achieve a balance between feature selection sharpness and global consistency, leading to a compact yet robust map representation.
$\mathrm{Loop\, Closure\, Detection\, Algorithm}$

4.3. Loop closure detection
In this paper, an enhanced loop closure detection method based on the bag-of-words model and map point observation relationships is employed, with the detailed procedure outlined in Algorithm1.
For each candidate keyframe, descriptor matching between the candidate and the current keyframe yields a set of 2D–3D correspondences
$\{(\mathbf{X}_k,\mathbf{x}_k)\}_{k=1}^N$
, where each
$\mathbf{X}_k\in \mathbb{R}^3$
is the 3D position of a map point expressed in the map (or candidate keyframe) coordinate system and
$\mathbf{x}_k\in \mathbb{R}^2$
is its observed image coordinate in the current keyframe (in pixels). We denote the relative transform from the 3D point frame to the current camera frame by
$T=[R\mid t]\in SE(3)$
(so that a point is mapped as
$X_c=R\mathbf{X}_k+t$
). The predicted image location is
$\hat {\mathbf{x}}_k=\pi (X_c)$
, where
$\pi (\!\cdot \!)$
denotes the camera projection including intrinsics (and distortion if applicable).
A RANSAC-based PnP procedure is used to obtain a robust initial estimate and the inlier set
$\mathcal{I}$
(using a reprojection threshold
$\epsilon$
in pixels). Given the inliers, the pose is refined by minimizing the robust reprojection error:
where
$\rho (\!\cdot \!)$
is a chosen robust loss (e.g., Huber). The residuals are expressed in pixels; a successful loop is accepted if
$|\mathcal{I}|$
exceeds a validation threshold. Note that PnP requires at least three non-degenerate 2D–3D correspondences and can be ill-conditioned in (near-)planar scenes.
The integration of Bag-of-Words (BoW) similarity for initial appearance-based candidate selection with robust geometric verification effectively balances efficiency and accuracy. Specifically, BoW-based filtering significantly reduces computational overhead, while subsequent geometric verification enforces spatial consistency, thereby enhancing robustness against false correspondences.
5. Experimental results and analysis
This section presents experiments conducted on both real-world datasets and real-world scenarios to validate the effectiveness of the proposed method.
5.1. Dataset-based experimental analysis
5.1.1. Dataset and experimental settings
The proposed system is evaluated on three widely used benchmark datasets: EuRoC [Reference Burri, Nikolic, Gohl, Schneider, Rehder, Omari, Achtelik and Siegwart38], KITTI [Reference Geiger, Lenz and Urtasun39], and 4Seasons [Reference Wenzel, Wang, Yang, Cheng, Khan, von Stumberg, Zeller and Cremers40], which collectively cover challenging indoor and large-scale outdoor scenarios.
-
• EuRoC: Indoor MAV sequences characterized by rapid motion, varying illumination, and texture-poor regions, used to evaluate system robustness under constrained sensing conditions.
-
• KITTI: Large-scale urban driving sequences featuring long trajectories and significant viewpoint changes, primarily used to assess scalability and memory consumption over time.
-
• 4Seasons: Long-term outdoor sequences captured across diverse seasons and weather conditions (including day/night and adverse weather), enabling evaluation of robustness to appearance variation and sustained operation over extended durations.
All experiments are conducted at a fixed frame rate of 20 Hz on a desktop platform equipped with an Intel Core i5-13400F CPU (2.5/4.6 GHz) and 16 GB of RAM, running Ubuntu 20.04.6 LTS (64-bit) without GPU acceleration.
5.1.2. Experimental indicator evaluation
We adopt standard trajectory accuracy metrics and memory efficiency indicators to comprehensively evaluate system performance.
For localization accuracy, we compute the Absolute Trajectory Error (ATE) and Relative Pose Error (RPE) between the estimated trajectory and ground truth, following the definitions in ref. [Reference Sturm, Engelhard, Endres, Burgard and Cremers41]. These metrics allow quantitative comparison with state-of-the-art methods such as ORB-SLAM3; any observed accuracy differences are interpreted in the context of our method’s emphasis on long-term memory efficiency.
For resource efficiency, we monitor the number of keyframes and map-point memory usage throughout execution. Two normalized metrics are introduced for quantitative analysis:
-
• Cumulative memory growth rate:
$\Delta M_{\text{cr}} = \dfrac {M_T - M_0}{N_k}$
(MB per keyframe), -
• Unit-trajectory memory consumption:
$\Delta M_{\text{pm}} = \dfrac {M_T - M_0}{L}$
(MB per meter),
where
$M_0$
and
$M_T$
denote memory usage (in MB) at system initialization and termination, respectively,
$N_k$
is the total number of keyframes, and
$L$
is the ground-truth trajectory length (in meters).
5.1.3. System memory consumption
Table I summarizes the number of keyframes
$N_{k}$
and map points
$N_{m}$
in the global map across all sequences. Experiments on EuRoC, KITTI, and 4Seasons show ORB-SLAM3 retains more keyframes and points due to a lack of redundancy control. The proposed method outperforms others by jointly optimizing keyframe removal and map sparsification, effectively preventing information explosion. In contrast, other methods reduce either keyframes or points alone, limiting resource control. Thus, the proposed approach achieves superior system resource management.
Number of optimized keyframes and map points maintained by various methods per sequence, compared to ORB-SLAM3 as a baseline.

Evaluation of cumulative and trajectory-normalized memory growth rates for various methods per sequence, compared to ORB-SLAM3 as a baseline.

Table II reports system memory consumption across sequences. The results demonstrate that the proposed method outperforms MS-SLAM and PIPO-SLAM in memory efficiency, showing lower memory growth rates and reduced consumption per trajectory length on the EuRoC, KITTI, and 4Seasons datasets. MS-SLAM employs a hybrid approach based on linear optimization and feature-grid constraints, which can cause optimization failures and memory spikes. PIPO-SLAM removes about 40% of keyframes but retains substantial observation data, leading to high memory use during global optimization. In contrast, the proposed method effectively mitigates excessive memory consumption in large-scale indoor and outdoor mapping. It maintains backend optimization solvability under loose constraints by preserving the information matrix and assessing map point confidence during sparsification. This ensures consistently low memory growth and minimal fluctuations across sequences. The proposed method avoids the sharp memory spikes seen in PIPO-SLAM, enhancing robustness and suitability for embedded deployment.
5.1.4. System execution time
Figure 3 presents the computational time consumption of the system across different sequences. The runtime of the proposed method is comparable to that of MS-SLAM, whereas PIPO-SLAM and ORB-SLAM3 require on average 25.12% more time. This difference is primarily due to the need to maintain a large number of redundant 3D map points
$N_{m}$
and feature points from keyframes
$N_{k}$
during system operation. ORB-SLAM3, in particular, maintains significantly more keyframes and map points compared to the proposed method (as shown in Table I), resulting in a higher-dimensional Hessian matrix during local bundle adjustment and a consequent sharp increase in time complexity. By employing matrix consistency-based pruning and a score-driven sparsification strategy, the proposed method reduces both the resource overhead and the dimensionality of the optimization problem, thereby ensuring real-time performance.
5.1.5. Localization accuracy
Table III presents a comparative evaluation of the average mapping accuracy achieved by different SLAM systems across three representative sequences. In outdoor scenarios, the proposed method yields ATE values that are approximately 0.7 m (4Seasons) and 0.45 m (KITTI) higher than those of ORB-SLAM3, while the discrepancy on the EuRoC sequence is limited to 0.02 m, indicating comparable performance in small-scale, information-rich environments. Overall, the mapping accuracy of the proposed approach remains within 5% of the reference methods across all datasets, and the relative pose error (RPE) exhibits consistently small variations among all evaluated approaches.
In terms of SLAM localization accuracy, the ATE primarily reflects the availability of long-range geometric constraints and reliably triangulated landmarks. In large-scale outdoor datasets such as KITTI and 4Seasons, extended trajectories, sparse loop closures, and degraded visual conditions reduce feature reliability. As a result, many historical keyframes contribute little marginal information and are pruned by the proposed information-driven sparsification. This joint reduction of keyframes and map points weakens long-baseline constraints, leading to a moderate increase in ATE. Nevertheless, consistency is preserved through the effective retention of informative residuals, which prevents unbounded drift – as evidenced by the stable long-term performance on 4Seasons. In contrast, the EuRoC dataset features a compact indoor environment with frequent viewpoint overlap and strong inertial constraints. Under these conditions, most visual observations are highly redundant, yet essential geometric information is retained even under aggressive sparsification, resulting in an ATE difference of only 0.02 m compared to ORB-SLAM3. Overall, the observed ATE variations reflect a controlled trade-off between global optimality and long-term scalability rather than system instability. Meanwhile, consistently low RPE across all datasets confirms that local mapping accuracy is effectively preserved.
Comparative analysis of average trajectory accuracy among different approaches across three sequences.

(a)–(c) Represent the overall system operation time consumption on the KITTI, EuRoC, and 4Seasons datasets, respectively.

5.2. Experiments on real robot platform
In the subsequent real-world experiments, we further validate the effectiveness of the proposed method in both indoor and large-scale outdoor environments using an embedded mobile robot platform.
5.2.1. Platform configuration for experiments
Experiments were conducted on an embedded mobile robot platform (Figure 4(a)) to evaluate the proposed SLAM system’s capability for long-term, large-scale mapping in both indoor and outdoor environments.
The platform is configured as follows:
-
• Onboard computer: Raspberry Pi 4 Model B (64-bit ARM Cortex-A72 @ 1.5 GHz), running Ubuntu 18.04 (64-bit) and ROS Melodic. The full SLAM pipeline executes entirely onboard in real time, with all pose estimates published via the ROS tf framework for synchronization.
-
• Perception: Orbbec Astra S binocular camera, capturing RGB images at 1280 × 720 resolution. The nominal frame rate is 30 Hz but adjusted per environment:
-
– Outdoor: 15 Hz (average robot speed: 2.41 m/s);
-
– Indoor: 30 Hz (average robot speed: 1.12 m/s).
The lower outdoor frame rate balances perception robustness and computational load on the embedded platform, while the higher indoor rate accommodates tighter spaces and frequent viewpoint changes.
-
-
• Motion control: Handled by an STM32F407 microcontroller and D50A motor driver, ensuring stable velocity during long-term navigation. This subsystem operates independently of the SLAM computation.
-
• Monitoring: Processed map and trajectory data are streamed over Wi-Fi to a remote laptop (Intel i7-9750H) for real-time visualization and online monitoring.
All components operate without GPU acceleration, and the system runs fully online with no offline post-processing.
Experimental setup and experimental scenarios for the proposed method. (a) Shows the embedded mobile robot and portable PC, while (b) Depicts the experimental environment, which includes a laboratory, parking lot, and campus road.

The experimental environments include a student laboratory building, campus roads, and an outdoor parking lot, as shown in Figure 4(b), with detailed scene information provided in Table IV. The laboratory features corridors and student labs with sparse textures and varying lighting conditions, while the outdoor scenes involve dynamic objects and natural illumination changes. These scenarios enable a comprehensive evaluation of the proposed method with respect to mapping efficiency, memory management, and robustness under challenging conditions.
Summary of experiment environments: lab00–lab02 (Indoor) and PK00–PK01, road00–road01 (Outdoor).

Comparison of the number of keyframes and map points maintained by different systems in real-world scenarios, where ORB-SLAM3 is used as the baseline.

Cumulative system memory growth and memory consumption per unit of trajectory length in real-world applications, where ORB-SLAM3 is used as the baseline.

As direct ground-truth trajectories were unavailable, sensor data were recorded during robot operation and processed offline using Adaptive Monte Carlo Localization (AMCL), which provides accurate pose estimates without requiring strict map alignment.
5.2.2. System memory consumption
Tables V and VI summarize the system’s resource consumption and memory usage in real-world scenarios. Figures 5 and 6 show the overall memory trends during mapping and the 3D point cloud results, respectively. This study compares the proposed method with three existing state-of-the-art approaches. As shown, the proposed method maintains a reduced number of keyframes and map points across various environments compared to current SLAM methods. According to Table VI, the proposed method achieves significantly lower cumulative and trajectory-based memory growth than ORB-SLAM3, with nearly a 10% improvement over MS-SLAM and PIPO-SLAM. This efficiency is attributed to the method’s use of redundant keyframe merging and map point sparsification, which reduce redundancy in both the keyframe database and 3D map representation. As a result, the proposed method maintains a much smaller global map and keyframe set than classical ORB-SLAM3, while also achieving better memory management performance than MS-SLAM and PIPO-SLAM. These results demonstrate that the proposed method is well-suited for embedded robotic platforms by effectively addressing high memory usage that can impair real-time operation.
Comparison of system memory consumption curves in real scenarios: (a)–(c) Indoor scenes, (d)–(e) Parking lots, and (f)–(g) Campus roads.

Map results in real-world environments considering keyframe and map point variations. Subfigures (a), (c), (e), (g), (i), (k), and (m) Show results obtained by the proposed method, while (b), (d), (f), (h), (j), (l), and (n) Display results from ORB-SLAM3. Specifically, (a)–(f) Correspond to an indoor laboratory scene, (g)–(j) Depict an outdoor parking lot, and (k)–(n) Illustrate a campus road environment. In the zoomed-in views of each scene, red rectangles highlight the number of visualized keyframes, and black dots represent the 3D point cloud maps.

5.2.3. Real-time performance
Figure 8 illustrates the map construction time in each scene and the average duration of global bundle adjustment during loop closure. The proposed method achieves consistent visual odometry tracking and efficient backend optimization by incorporating a dedicated sparse management thread for keyframes and map points. This mechanism effectively reduces resource contention caused by the computational overhead of optimizing large-scale keyframe and map point sets. By minimizing the number of keyframes and associated features, the proposed method significantly reduces the computational complexity of system optimization, whether matrix inversion or iterative gradient-based solutions are used. Experimental results in large-scale environments, such as outdoor parking lots with over 20,000
${\rm m}^{2}$
and campus road scenes, demonstrate that the proposed system maintains real-time performance with processing times under 400 s on embedded platforms. These results validate the method’s lower time complexity and improved real-time capability in large-scale scenarios.
5.2.4. Localization accuracy and closed-loop calibration results
Figure 7 intuitively compares the global mapping trajectories and loop closure performance of different SLAM systems in real-world scenarios. Compared with other methods, the proposed approach accurately detects loop closure features and effectively corrects the local camera pose along with its associated map points.
Global mapping trajectories and loop closure performance: (a)–(c) Represent indoor scenarios; (d)–(g) Correspond to outdoor environments.

Mapping accuracy comparison between the proposed method and ORB-SLAM3 in real scenarios.

Comparison of real-time performance in various real-world scenarios: (a) Time consumed by global bundle adjustment using different methods; (b) Overall system runtime across scenes.

Table VII reports the ATE and RPE of the evaluated SLAM methods. Overall, the proposed approach demonstrates strong consistency with ORB-SLAM3 and achieves lower ATE than MS-SLAM and PIPO-SLAM in indoor environments of approximately 1,000 m
$^2$
, where frequent viewpoint overlap provides highly redundant geometric constraints. This performance benefits from the information-driven keyframe selection strategy, which prevents premature removal of structurally informative frames and effectively mitigates trajectory drift. In contrast, in large-scale outdoor environments exceeding 20,000 m
$^2$
and long trajectories such as PK 01 and Road 01 (over 1.5 km), the proposed method exhibits a moderate ATE increase relative to ORB-SLAM3 and MS-SLAM but remains comparable to PIPO-SLAM. This behavior reflects a deliberate design trade-off. While ORB-SLAM3 preserves global accuracy by retaining dense historical keyframes and long-baseline constraints, the proposed framework prioritizes long-term scalability and bounded memory usage through information-driven joint sparsification of keyframes and map points. In visually challenging outdoor settings with weak texture, sparse loop closures, and repetitive structures, historical observations that contribute limited marginal information are selectively removed. This slightly weakens long-range constraints and leads to a modest ATE increase. Nevertheless, high-fidelity prior residual reconstruction preserves information matrix consistency, ensuring bounded global drift and stable long-term operation. Crucially, the RPE remains consistently low across all scenarios, often matching or surpassing ORB-SLAM3. This confirms that local motion estimation and short-term tracking are unaffected by sparsification. In indoor sequences (Lab 00–Lab 02), where frequent viewpoint overlap yields abundant geometric redundancy, the proposed method achieves comparable or improved accuracy, as sparsification effectively removes redundant observations while preserving essential structure. Overall, the slight ATE degradation observed in certain outdoor sequences is not a sign of instability. Rather, it is an expected and acceptable consequence of the framework’s principled focus on memory efficiency, real-time performance, and sustainable operation in large-scale, long-duration deployments.
6. Conclusion
In this paper, we propose a method suitable for long-term localization and mapping of mobile robots, which is highly resistant to information redundancy explosion. The method first introduces a redundant keyframe culling strategy based on information matrix consistency and residual preservation, which quantifies each keyframe’s independent contribution to the system’s information entropy. Additionally, a scoring mechanism integrating feature triangulation and clustering is employed to filter out low-contributing feature points with respect to visual odometry tracking and bundle adjustment optimization, thereby ensuring effective map sparsification within the sliding window. Based on this design, we propose an efficient long-term visual SLAM method based on sparse prior embedding and nonlinear score-guided sparsification. Experimental results on benchmark datasets demonstrate that the proposed method significantly reduces memory consumption while maintaining effective loop closure detection performance. Furthermore, real-world experiments show that the system can perform long-term localization and mapping tasks using only onboard sensors and limited computational resources, without requiring additional measurement infrastructure, thus demonstrating its practical applicability. In the future, further exploration of extending this method to dynamic scene mapping tasks is warranted.
Author contributions
Chuanlei Xu and Yinjie Zhang both conceptualized the research question, method, and experiments. Shuaiyong Li evaluated the feasibility of the experimental methodology and provided constructive suggestions on the manuscript writing. Daoqu Geng is the senior author on this paper. He regularly participated in discussions on the proposed research, method, and results, and he edited the paper.
Financial support
This work was supported in part by the Science and Technology Innovation Key R&D Program of Chongqing(No. CSTB2025TIAD-STX0030), Chongqing Natural Science Foundation Innovation and Development Joint Foundation(No. CSTB2024NSCQ-LZX0035), Science and Technology Research Project of Chongqing Education Commission (No. KJZD-M202300605), New Chongqing Youth Innovation Talent Plan Project (No. CSTB2024NSCQ-QCXMX0053), Special general project for Chongqing’s technological innovation and application development (CSTB2024TIAD-KPX0073, CSTB2024TIAD-KPX0101, CSTB2024TIAD-KPX0027), Yongjiang Program for Young Talents (RC20230107), Chongqing Research Institution Performance Incentive Guidance Special Project (No. CSTB2023JXJL-YFX0013).
Competing interests
The authors declare no conflicts of interest exist.








