# 移动最小二乘法

移动最小二乘法（moving least squares，MLS）是一种局部回归方法：它在散乱数据的移动邻域上拟合一个加权最小二乘多项式，并在每个求值点处重新拟合该多项式，从而生成光滑的全局逼近式、一张曲面或一个导数估计。它服务于两个领域：在统计学中，它以局部多项式回归的面目出现；在几何处理与无网格数值方法中，它从点云重建曲面，并在不规则点上构造类有限差分算子。

| 关键事实 | 说明 |
|---|---|
| 产出什么 | 由散乱数据得到的光滑函数、投影曲面，或直接的导数估计<sup>[1](https://www.osti.gov/servlets/purl/782718)</sup> |
| 正式提出 | 兰卡斯特与萨尔考斯卡斯（Lancaster and Salkauskas），《计算数学》（Mathematics of Computation）37 (1981)，141–158<sup>[2](https://doi.org/10.1090/s0025-5718-1981-0616367-1)</sup> |
| 光滑性 | 若权函数为 \( C^{k} \)，则逼近式为 \( C^{k} \)；采用奇异权时逼近式为 \( C^{\infty} \) 且具有插值性<sup>[3](https://doi.org/10.1090/s0025-5718-98-00974-0)</sup><sup> • </sup><sup>[4](http://www.nealen.com/projects/mls/asapmls.pdf)</sup> |
| 精度 | 在拟一致数据上，对能再生 d 次多项式的方法为 \( O(h^{d+1}) \) |
| 图形学中的典型设置 | 多项式次数 3–4，高斯权或温德兰（Wendland）权，支撑半径与点间距挂钩<sup>[5](https://www.cs.tau.ac.il/~dcor/online_papers/papers/points_set_vis01.pdf)</sup><sup> • </sup><sup>[4](http://www.nealen.com/projects/mls/asapmls.pdf)</sup> |
| 主要失效模式 | 矩量矩阵奇异或病态、边界处数值爆炸（IMLS 的条件数接近 \( 2 \times 10^{9} \)）、对间断敏感<sup>[6](https://www.esaim-m2an.org/articles/m2an/pdf/2007/05/m2an0419.pdf)</sup><sup> • </sup><sup>[3](https://doi.org/10.1090/s0025-5718-98-00974-0)</sup> |

## 工作原理

在一个固定的求值点 x 处，MLS 在 m 次多项式空间中最小化一个加权最小二乘泛函：

\[ J_{\mathrm{WLS}}(x) = \sum_{i} \theta(\|x - x_{i}\|) \, \|f(x_{i}) - f_{i}\|^{2}, \]

其中 θ 是一个非负权函数，随到 x 的距离增大而衰减。<sup>[4](http://www.nealen.com/projects/mls/asapmls.pdf)</sup> 求解正规方程可得系数 \( c(x) = A_{\mathrm{WLS}}(x)^{-1} \sum_{i} \theta(d_{i}) b(x_{i}) \cdot f_{i} \)，其中矩量矩阵 \( A_{\mathrm{WLS}}(x) = \sum_{i} \theta(d_{i}) b(x_{i}) \cdot b(x_{i})^{T} \) 必须非奇异。<sup>[4](http://www.nealen.com/projects/mls/asapmls.pdf)</sup>

由于权函数随 x 移动，系数与格拉姆矩阵都依赖于 x，必须在每个求值点处重新计算；即便基由单项式构成，所得的 MLS 函数一般也不是多项式。<sup>[6](https://www.esaim-m2an.org/articles/m2an/pdf/2007/05/m2an0419.pdf)</sup> 全局逼近式可写成 \( s_{u,X}(x) = \sum_{j} a_{j}(x) \cdot u(x_{j}) \)，其中形函数 \( a_{j}(x) \) 依照谢泼德（Shepard）构造，由权重拼装成一个单位分解。<sup>[3](https://doi.org/10.1090/s0025-5718-98-00974-0)</sup><sup> • </sup><sup>[4](http://www.nealen.com/projects/mls/asapmls.pdf)</sup> 取一个奇异权，就迫使拟合插值于数据。<sup>[3](https://doi.org/10.1090/s0025-5718-98-00974-0)</sup>

\( R^{d} \) 中的 MLS 插值式是一个 \( C^{\infty} \) 函数，而且该方法在如下意义上是近乎最优的：其局部误差可由某个局部最佳多项式逼近的误差来界定。<sup>[3](https://doi.org/10.1090/s0025-5718-98-00974-0)</sup> 逼近式的光滑性由权函数支配：若权函数有 k 阶连续导数，则逼近式属于 \( C^{k} \)。<sup>[7](https://www.sciencedirect.com/science/article/pii/S0377042715000199)</sup><sup> • </sup><sup>[4](http://www.nealen.com/projects/mls/asapmls.pdf)</sup>

在精度方面，莱文（Levin）与温德兰给出了勒贝格函数界，对能再生 \(d\) 次多项式的方法给出逼近阶 \(O(h^{d+1})\)，其前提是权具有紧支撑、按填充距离缩放，且数据拟一致。作为基线，常数基的情形给出谢泼德方法——一种逼近阶为 \( O(h) \) 的核方法。

## 具体做法

实践者需要做四项选择。第一是多项式次数：在图形学应用中，3 到 4 次被证明最为有用，既能很好地拟合邻域，又不产生振荡。<sup>[5](https://www.cs.tau.ac.il/~dcor/online_papers/papers/points_set_vis01.pdf)</sup> 第二是权核：标准选择是高斯核 \( \theta(d) = e^{-d^{2}/h^{2}} \) 与温德兰 C2 函数 \( \theta(d) = (1 - d/h)^{4} \cdot (4d/h + 1) \)，后者定义在 \( d \in [0, h] \) 上。<sup>[4](http://www.nealen.com/projects/mls/asapmls.pdf)</sup> 第三是支撑半径：可以是固定支撑，可以是包含固定数目最近邻点的支撑，也可以是由一次辅助 MLS 拟合确定的、光滑变化的半径 δ(x)。只有当影响域内权非零的节点数不少于基函数个数时，矩量矩阵才非奇异；即便如此，加权设计矩阵也必须列满秩，因为矩阵 P 的秩亏同样会导致奇异。<sup>[8](https://doi.org/10.2514/6.2005-1821)</sup>

第四是求值点与线性代数。把基平移到以求值点为中心的局部坐标系中，并按 h 缩放，可以改善条件数，避免大数带来的不稳定。<sup>[4](http://www.nealen.com/projects/mls/asapmls.pdf)</sup><sup> • </sup><sup>[7](https://www.sciencedirect.com/science/article/pii/S0377042715000199)</sup> 对于病态方程组，建议用 QR 分解或奇异值分解求解，而不是 LU 分解。<sup>[6](https://www.esaim-m2an.org/articles/m2an/pdf/2007/05/m2an0419.pdf)</sup><sup> • </sup><sup>[1](https://www.osti.gov/servlets/purl/782718)</sup>

## 起源

这一通用方法由 P. 兰卡斯特与 K. 萨尔考斯卡斯在《由移动最小二乘法生成的曲面》（Surfaces generated by moving least squares methods）一文中提出，载于《计算数学》，1981 年。<sup>[2](https://doi.org/10.1090/s0025-5718-1981-0616367-1)</sup> 特例的出现更早：D. H. 麦克莱恩（D. H. McLain）的《由任意数据点绘制等值线》（Drawing Contours from Arbitrary Data Points，载《计算机杂志》The Computer Journal，1974 年）描述了一个 MLS 特例<sup>[9](https://doi.org/10.1093/comjnl/17.4.318)</sup>；兰卡斯特 1979 年的书章《移动加权最小二乘法》（Moving Weighted Least-Squares Methods），收入《多项式与样条逼近》（Polynomial and Spline Approximation，D. Reidel 出版社，北约高级科学研究所系列 C 卷第 49 卷，第 103–120 页），则是 1981 年那篇论文所依据的早期工作。<sup>[10](https://doi.org/10.1007/978-94-009-9443-0_7)</sup> 在统计学中，同样的思想被称为局部多项式回归。

莱文的《移动最小二乘法的逼近能力》（The approximation power of moving least-squares，载《计算数学》，1998 年）承接博斯（Bos）与萨尔考斯卡斯 1989 年的最优性结果，把 MLS 重新表述在巴克斯–吉尔伯特（Backus-Gilbert）框架之内。<sup>[3](https://doi.org/10.1090/s0025-5718-98-00974-0)</sup><sup> • </sup><sup>[11](https://doi.org/10.1016/0021-9045%2889%2990090-7)</sup> 莱文 2004 年的书章把 MLS 曲面投影算子形式化<sup>[12](https://doi.org/10.1007/978-3-662-07443-5_3)</sup>，而马克·亚历克萨（Marc Alexa）及其同事以《点集曲面》（Point set surfaces，IEEE 可视化会议，2001 年）把 MLS 曲面带入计算机图形学。<sup>[13](https://doi.org/10.5555/601671.601673)</sup>

## 变体

图形学中的变体分为投影型与隐式曲面两类。投影型 MLS 曲面，是在莱文的投影算子下投影到自身的那些点构成的集合<sup>[5](https://www.cs.tau.ac.il/~dcor/online_papers/papers/points_set_vis01.pdf)</sup><sup> • </sup><sup>[12](https://doi.org/10.1007/978-3-662-07443-5_3)</sup>；阿门塔与基尔（Amenta and Kil）用一个显式定义取代了原来的算法式定义，该定义基于由某个向量场确定的直线上能量函数的临界点。<sup>[14](https://doi.org/10.1145/1015706.1015713)</sup> 隐式 MLS（IMLS）曲面是基于 MLS 的符号距离场的零水平集，它建立在沈（Shen）、奥布莱恩（O'Brien）与休查克（Shewchuk）（2004）的隐式曲面之上<sup>[15](https://doi.org/10.1145/1015706.1015816)</sup>，而 IMLS 这一变体则归功于拉维·科卢里（Ravi Kolluri，2005）。<sup>[16](https://cgl.ethz.ch/Downloads/Publications/Papers/2007/Gue07a/Gue07a.pdf)</sup> 加埃尔·盖诺博（Gaël Guennebaud）与马库斯·格罗斯（Markus Gross）（2007）提出的代数点集曲面（APSS）拟合的是代数球面而非平面。<sup>[17](https://doi.org/10.1145/1276377.1276406)</sup> 沙哈尔·弗莱什曼（Shachar Fleishman）、丹尼尔·科恩-奥尔（Daniel Cohen-Or）与克劳迪奥·T·席尔瓦（Cláudio T. Silva）（2005）提出的稳健 MLS（RMLS）把尖锐特征拟合当作统计离群点问题来处理<sup>[18](https://doi.org/10.1145/1073204.1073227)</sup>；A. C. 厄兹蒂雷利（A. C. Öztireli）、G. 盖诺博与 M. 格罗斯（2009）提出的稳健隐式 MLS（RIMLS）则把隐式 MLS 与稳健的非线性核回归结合起来。<sup>[19](https://doi.org/10.1111/j.1467-8659.2009.01388.x)</sup> 格兰德·罗曼·约尔德斯（Grand Roman Joldes）及其同事（2015）提出的修正 MLS（MMLS）对多项式系数施加吉洪诺夫–米勒（Tikhonov-Miller）型正则化，使得二次基可以使用与线性基相同的支撑域大小。<sup>[20](https://doi.org/10.1016/j.amc.2015.05.150)</sup>

在数值方法方面，B. 奈罗勒（B. Nayroles）、G. 图佐（G. Touzot）与 P. 维隆（P. Villon）（1992）的扩散单元法（Diffuse Element Method）引入了扩散导数，即直接从数据计算导数，而不是对逼近式求导<sup>[21](https://doi.org/10.1007/bf00364252)</sup><sup> • </sup><sup>[22](https://num.math.uni-goettingen.de/schaback/research/papers/OGMLSaDD.pdf)</sup>；T. 别利奇科（T. Belytschko）及其同事（1996）的无单元伽辽金法（Element-Free Galerkin method）则是无网格方向的进一步发展。<sup>[23](https://doi.org/10.1016/s0045-7825%2896%2901078-x)</sup>

## 应用

图形学中的主要应用是从扫描点云重建点集曲面。MLS 曲面由一个投影过程定义，该过程的不动点构成曲面；只要点足够接近所表示的曲面，就能保证该曲面是二维流形且 \( C^{\infty} \) 光滑。<sup>[5](https://www.cs.tau.ac.il/~dcor/online_papers/papers/points_set_vis01.pdf)</sup> 该投影是幂等的，因为权重取决于到投影点 q 的距离，而不是到原始点 r 的距离。<sup>[24](https://www.sci.utah.edu/~shachar/Publications/crpss.pdf)</sup>

在科学计算中，MLS 可以在不规则分布的点上求取函数的一阶、二阶和三阶导数，而无需插值到规则网格，并且在间距极不规则时仍能保持精度。<sup>[1](https://www.osti.gov/servlets/purl/782718)</sup> 广义 MLS（GMLS）具有最优收敛阶 \( \|D^{\alpha}u - \hat{D}^{\alpha}u\|_{L^{\infty}} \leq c \cdot h^{m+1-|\alpha|} \|u\|_{C^{m+1}} \)，且计算导数比直接对标准逼近式求导略快。<sup>[22](https://num.math.uni-goettingen.de/schaback/research/papers/OGMLSaDD.pdf)</sup>

## 局限与替代方法

主要失效模式是代数性的。二维情况下使用二次基的经典 MLS 在支撑域内至少需要六个节点，而某些节点分布（例如节点落在两条平行线上）仍会产生奇异的矩量矩阵；若基的次数更高，除非扩大支撑域，否则最小化问题会变得不适定。<sup>[20](https://doi.org/10.1016/j.amc.2015.05.150)</sup> 插值型 MLS 在区域边界处表现不佳，矩阵 R 的条件数会暴涨到约 \( 2 \times 10^{9} \)；引入虚拟点以使用对称权，可以治好这一问题。<sup>[6](https://www.esaim-m2an.org/articles/m2an/pdf/2007/05/m2an0419.pdf)</sup> MLS 在间断附近也力不从心<sup>[3](https://doi.org/10.1090/s0025-5718-98-00974-0)</sup>，并且由于只考虑总残差而容易受变量含误差问题的影响；此外，其预先设定的多项式逼近式妨碍了跨越不连续变量梯度的插值。<sup>[25](https://jacm.scu.ac.ir/article_16360_3434d06cc4cf25246805f5af3fa75df0.pdf)</sup>

朴素投影对每个点的代价为 \( O(N) \)，可借助受 N 体问题解法启发的八叉树式层次方法来加速。<sup>[5](https://www.cs.tau.ac.il/~dcor/online_papers/papers/points_set_vis01.pdf)</sup> 由于系数向量 a(x) 依赖于求值点，导数估计的计算量比与之竞争的响应面方法更大。在一项关于导数响应面的比较研究中，克里金与径向基函数构造给出的结果比 MLS 和全局最小二乘更精确。大卫·莱文、何塞·M·拉蒙（José M. Ramón）、胡安·鲁伊斯-阿尔瓦雷斯（Juan Ruiz-Alvarez）与迪奥尼西奥·F·亚涅斯（Dionisio F. Yáñez）于 2025 年发表在《应用数值数学》（Applied Numerical Mathematics）上的一篇论文提出了数据依赖 MLS（DD-MLS）：它对被 WENO 型光滑性指标标记的节点降权，从而减轻跳跃间断附近的吉布斯现象，同时保持 d 次多项式再生性。<sup>[26](https://doi.org/10.48550/arxiv.2412.02304)</sup>

## References

1. [Moving Least-Squares: A Numerical Differentiation Method for Irregularly Spaced Calculation Points (OSTI/DOE report)](https://www.osti.gov/servlets/purl/782718)
2. [P. Lancaster, K. Salkauskas (1981). Surfaces generated by moving least squares methods. Mathematics of Computation.](https://doi.org/10.1090/s0025-5718-1981-0616367-1)
3. [David Levin (1998). The approximation power of moving least-squares. Mathematics of Computation.](https://doi.org/10.1090/s0025-5718-98-00974-0)
4. [An As-Short-As-Possible Introduction to the Least Squares, Weighted Least Squares and Moving Least Squares Methods (Nealen et al., graphics tutorial)](http://www.nealen.com/projects/mls/asapmls.pdf)
5. [Point Set Surfaces (Alexa et al., IEEE Visualization 2001)](https://www.cs.tau.ac.il/~dcor/online_papers/papers/points_set_vis01.pdf)
6. [Finite difference operators from moving least squares interpolation (Sonar et al., ESAIM: M2AN)](https://www.esaim-m2an.org/articles/m2an/pdf/2007/05/m2an0419.pdf)
7. [Analysis of moving least squares approximation revisited (Mirzaei, Schaback, Dehghan; J. Comput. Appl. Math., 2015)](https://www.sciencedirect.com/science/article/pii/S0377042715000199)
8. [Comparison of Response Surface Construction Methods for Derivative Estimation Using Moving Least Squares, Kriging and Radial Basis Functions](https://doi.org/10.2514/6.2005-1821)
9. [D. H. McLain (1974). Drawing Contours from Arbitrary Data Points. The Computer Journal.](https://doi.org/10.1093/comjnl/17.4.318)
10. [Peter Lancaster (1979). Moving Weighted Least-Squares Methods. .](https://doi.org/10.1007/978-94-009-9443-0_7)
11. [Moving least-squares are Backus-Gilbert optimal (Journal of Approximation Theory, 1989)](https://doi.org/10.1016/0021-9045%2889%2990090-7)
12. [David Levin (2004). Mesh-Independent Surface Interpolation. Mathematics and visualization.](https://doi.org/10.1007/978-3-662-07443-5_3)
13. [Marc Alexa and colleagues (2001). Point set surfaces. IEEE Visualization.](https://doi.org/10.5555/601671.601673)
14. [Nina Amenta, Yong Joo Kil (2004). Defining point-set surfaces. ACM Transactions on Graphics.](https://doi.org/10.1145/1015706.1015713)
15. [Chen Shen, James F. O'Brien, Jonathan R. Shewchuk (2004). Interpolating and approximating implicit surfaces from polygon soup. ACM Transactions on Graphics.](https://doi.org/10.1145/1015706.1015816)
16. [Algebraic Point Set Surfaces (Guennebaud and Gross, SIGGRAPH 2007)](https://cgl.ethz.ch/Downloads/Publications/Papers/2007/Gue07a/Gue07a.pdf)
17. [Gaël Guennebaud, Markus Gross (2007). Algebraic point set surfaces. ACM Transactions on Graphics.](https://doi.org/10.1145/1276377.1276406)
18. [Shachar Fleishman, Daniel Cohen-Or, Cláudio T. Silva (2005). Robust moving least-squares fitting with sharp features. ACM Transactions on Graphics.](https://doi.org/10.1145/1073204.1073227)
19. [A. C. Öztireli, G. Guennebaud, M. Gross (2009). Feature Preserving Point Set Surfaces based on Non‐Linear Kernel Regression. Computer Graphics Forum.](https://doi.org/10.1111/j.1467-8659.2009.01388.x)
20. [Grand Roman Joldes and colleagues (2015). Modified moving least squares with polynomial bases for scattered data approximation. Applied Mathematics and Computation.](https://doi.org/10.1016/j.amc.2015.05.150)
21. [B. Nayroles, G. Touzot, P. Villon (1992). Generalizing the finite element method: Diffuse approximation and diffuse elements. Computational Mechanics.](https://doi.org/10.1007/bf00364252)
22. [On Generalized Moving Least Squares and Diffuse Derivatives (Mirzaei, Schaback, Dehghan)](https://num.math.uni-goettingen.de/schaback/research/papers/OGMLSaDD.pdf)
23. [Meshless methods: An overview and recent developments (Computer Methods in Applied Mechanics and Engineering, 1996)](https://doi.org/10.1016/s0045-7825%2896%2901078-x)
24. [Computing and Rendering Point Set Surfaces (IEEE TVCG 9(1), 2003)](https://www.sci.utah.edu/~shachar/Publications/crpss.pdf)
25. [Moving Least Squares Method and its Improvement: A Concise Review](https://jacm.scu.ac.ir/article_16360_3434d06cc4cf25246805f5af3fa75df0.pdf)
26. [Levin, David and colleagues (2024). Data dependent Moving Least Squares. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2412.02304)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 统计学与概率论 › Statistical inference, estimation, sampling, and testing › Regression analysis › Spline and basis-expansion regression

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/moving-least-squares

English original: https://www.edgepedia.org/moving-least-squares
