Skip to content

Add robust linear-Gaussian MAP smoothing - #5164

Closed
FlorianPfaff wants to merge 7 commits into
mainfrom
agent/robust-linear-gaussian-map-smoother
Closed

Add robust linear-Gaussian MAP smoothing#5164
FlorianPfaff wants to merge 7 commits into
mainfrom
agent/robust-linear-gaussian-map-smoother

Conversation

@FlorianPfaff

Copy link
Copy Markdown
Owner

Summary

  • add a generic sparse robust MAP smoother for linear-Gaussian state sequences;
  • support arbitrary state/measurement dimensions, transition offsets, vector-valued factors, and trusted non-robust factors;
  • provide full-interval and timestamp-based fixed-lag APIs;
  • expose linear, Huber, soft-L1, Cauchy, and arctangent losses;
  • use one IRLS weight per whitened vector factor, preserving coordinate-rotation invariance;
  • document the API and explicitly report covariances=None until MAP marginals are computed correctly.

Design

The public model is

x[k+1] = F[k] x[k] + b[k] + w[k]
z[j]   = H[j] x[k(j)] + d[j] + v[j]

Prior and process factors remain quadratic. Robust measurement factors are solved with sparse LSMR-based IRLS and a monotone backtracking line search. Fixed-lag smoothing solves the window beginning at each timestamp and returns the first state plus per-window diagnostics.

The implementation deliberately does not reuse filtered covariances as smoother covariances. Selected inverse-Hessian blocks can be added later as a separate marginal-covariance API.

Regression coverage

  • linear-loss solution against dense weighted least squares;
  • gross measurement outlier downweighting;
  • vector measurements and deterministic offsets;
  • fixed-lag window boundaries and batch parity for a covering lag;
  • single-state empty transition sequences;
  • malformed lag, factor index, and observation-shape rejection.

Validation

  • focused local test module: 12 passed;
  • production and regression modules pass py_compile;
  • documentation example executed successfully.

Repository CI provides the authoritative multi-backend, lint, documentation, packaging, and integration validation.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ COPYPASTE jscpd yes no no 28.16s
✅ JSON prettier 7 0 0 0 1.57s
✅ JSON v8r 7 0 0 3.55s
✅ MARKDOWN markdownlint 69 0 0 0 2.19s
✅ MARKDOWN markdown-table-formatter 69 0 0 0 0.49s
✅ PYTHON black 1867 88 0 0 109.9s
✅ PYTHON isort 1867 142 0 0 3.21s
✅ REPOSITORY betterleaks yes no no 2.34s
✅ REPOSITORY checkov yes no no 63.98s
✅ REPOSITORY gitleaks yes no no 19.13s
✅ REPOSITORY git_diff yes no no 0.15s
✅ REPOSITORY secretlint yes no no 105.27s
✅ REPOSITORY syft yes no no 5.77s
✅ REPOSITORY trivy-sbom yes no no 6.98s
✅ REPOSITORY trufflehog yes no no 36.32s
✅ YAML prettier 11 0 0 0 0.9s
✅ YAML v8r 11 0 0 14.08s
✅ YAML yamllint 11 0 0 0.59s

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.6.0 --custom-flavor-setup --custom-flavor-linters PYTHON_BLACK,PYTHON_ISORT,COPYPASTE_JSCPD,JSON_V8R,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_GITLEAKS,REPOSITORY_BETTERLEAKS,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

Copy link
Copy Markdown
Owner Author

Closing as a high-maintenance, evidence-incomplete integration rather than merging a red 1,206-line solver. The package, documentation, lint, CodeQL, security, and dependency checks passed, but every backend test-matrix job failed (NumPy, JAX, and PyTorch across supported Python versions). The PR also intentionally omits MAP marginal covariances (covariances=None), while its downstream RaFT-UAV adapter is pinned to this unpublished implementation. The branch and commits remain recoverable if the smoother is later split into a smaller core PR with a fully green multi-backend matrix and a separately validated covariance/API contract.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant