Author: Rishab Nuguru
Original Copyright: © 2025 Rishab Nuguru
Company: Space-Labs-AI
License: GNU Affero General Public License
Repository: https://github.com/r0nlt/Space-Radiation-Tolerant
Author Page: https://www.linkedin.com/rishabnuguru
Email: spacelabsai@gmail.com
Version: v1.0.2.5
A C++ software framework for implementing machine learning models that can operate reliably in radiation environments, such as space. This framework is meant to extend fault tolerance to machine learning. RadML is a custom library focused to engineer systems resilient to radiation effects in Space Environments. Currently the framework explores embedded databases using VAE neural network alongside LMDB (Lightning Memory Mapped Database).
📖 Complete Technical Documentation: For the full mathematical foundations, code cross-references, and implementation details, see
docs/RadML_Complete_Technical.pdf— a comprehensive 65+ page technical manual covering quantum physics models, ECC algorithms, defense-in-depth architecture, and validation methodology.
Space-Radiation-Tolerant is a research project by Rishab Nuguru with core principles focused around sustainability in space. RadML was designed to help provide cost efficient solution for COTS processors as AI demand increases.
Status: December 27 2025
- Enhanced radiation sim (Dirac+BSE+Green’s), energy/material-aware cascade
- New verification tests (intensity; cascade) + CTest
- FAQ with math, mapping, code refs
- AVX2 mat-vec fix; SIMD condition corrected
- Thread-safe pool fix (no T::next; defined size_type)
- Going for AIS Space Force bid
- Open Source First: Software is released under the AGPL v3 license
- Research-Driven: Solutions are inspired by physics, sustainability, mathematics, and Tour of C++ / modern programming
- Community Focused: Feel free to research, this is mostly just a radiation defense manual
- Quality Assurance: High bench mark and robust testing as we approach hardware-in-the-loop validation.
- Documentation: Comprehensive documentation and on going updates
Smarter physics, tighter tests, clearer docs.
-
Simulator
- Dirac cascade (24 angles), cross-section–weighted secondaries
- Energy/material-aware yield (explicit-energy API)
- Composed Dirac + BSE + Green’s →
DefectDistribution
-
Tests
- Intensity: SPE 1/r², SAA ~2.5×, atmosphere/magnetic ratios, combined exact, noise (multi-seed)
- Cascade: electron-only, size [3–24], material/energy checks
- Run:
cmake -S /Users/rishabnuguru/space -B /Users/rishabnuguru/space/build-radiation -DCMAKE_BUILD_TYPE=Release cmake --build /Users/rishabnuguru/space/build-radiation --target radiation_intensity_aggregation_test relativistic_cascade_test -j 8 ctest --test-dir /Users/rishabnuguru/space/build-radiation -R "radiation_intensity_aggregation_test|relativistic_cascade_test" --output-on-failure
-
Docs
FAQ/Enhanced_Physics_Radiation_Simulator.md(math, API mapping, code refs, test guide)FAQ/Differentiable_Optimization_Layer.md(optimization layer plan, build/run, progress)- Gradient check: build
diff_qp_gradcheckand run CTest targetdiff_qp_gradcheck_run. - Simplex projection: see FAQ for enabling
setUseSimplexProjection(true)and runningsimplex_projection_*tests.
-
Fixes
- Neural: AVX2 mat-vec safe loads + correct reduction; SIMD not gated by protection
- Memory: lock-free pool with internal node; explicit
size_type
-
Next
- Add stopping power/depth energy loss; calibrate BSE/Green’s; derive energy from particle/env
Multi-Operator Adaptive Genetic Algorithm with Real-Time Performance Tracking
Recent improvements:
- Refactored Auto Arch Search
- Adaptive operator-credit learning wired into the GA loop (per-child operator tracking and credit updates each generation).
- Per-generation analytics exported to CSV: operator applications, success, credit, selection probability, diversity, and mutation rate.
- Decoupled mutation-rate policy: schedule-based updates and late-generation freeze; cached rate managed via
std::optional<double>. - Operator introspection APIs: exposed last-selected operator, current operator probabilities, and exploration factor for transparency.
- Example app upgrades: robust CLI (
--trials,--schedule,--freeze) and per-run summary CSVs with run-specific operator stats.
- What it is: A physics-informed MAP-Elites archive with novelty search that maintains diverse, high-quality architectures across a 6D behavioral space:
- Complexity, Protection efficiency, Computational cost, Radiation tolerance, Graceful degradation, Power efficiency.
- How it works:
- Each evaluated config is mapped to a behavior cell; if its fitness (preservation + novelty) improves the cell, it becomes the elite.
- Novelty is computed via KNN (k=5) in behavioral space to reward exploration.
- Each generation, we replace the worst K individuals with diverse elites sampled from the archive to inject quality and diversity.
- Enable via CLI (example):
./examples/auto_arch_search_example \
--qd \
--adv-qd \
--trials 5 \
--schedule 2 \
--freeze 4 \
--save-gen 1 \
--save-iter 5-
Interpreting logs:
- QD coverage: percentage of occupied cells; with 6D×10 bins (=1,000,000 cells), short runs show tiny percentages (expected). Track occupied cells rising per generation.
- Elites injected: should be >0 after the replacement policy; indicates archive is influencing the population.
-
CSV outputs (examples/auto_arch_search_results.csv):
- Preservation distribution by protection level (e.g., SpaceOptimized/AdaptiveTMR scoring highest) indicates healthy diversity-pressure.
- Layer-count distribution confirms exploration across shapes.
-
Tuning knobs:
- Grid resolution: default 10 per dim; for quicker, more visible coverage in short runs, consider 5 per dim.
- Novelty weight: fitness = 0.8×preservation + 0.2×novelty; adjust to bias exploration vs exploitation.
- Elite sampling mix: sampled by fitness/novelty/uniform; adjust ratios for your search goals.
-
When to adjust:
- Occupied cells plateau early or elites injected remain 0 → lower resolution or increase novelty weight.
- Diversity collapses to a single protection strategy → increase novelty or sampling of diverse cells.
- Complete Technical Manual (PDF) — 65+ page comprehensive documentation with quantum physics, ECC algorithms, and defense-in-depth architecture
- Auto Architecture Search Guide
- Scientific Validation Report
- Genetic Algorithm Architecture
graph TB
%% Define styles for different component types
classDef userInterface fill:#e1f5fe,stroke:#01579b,stroke-width:2px
classDef optimization fill:#f3e5f5,stroke:#4a148c,stroke-width:2px
classDef evaluation fill:#e8f5e8,stroke:#1b5e20,stroke-width:2px
classDef protection fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef core fill:#fce4ec,stroke:#880e4f,stroke-width:2px
classDef data fill:#f5f5f5,stroke:#424242,stroke-width:1px
classDef external fill:#fff8e1,stroke:#f57f17,stroke-width:1px
%% Main Architecture Flow
UI[🎯 User Interface<br/>Configuration API<br/>Results Visualization] --> OE[🧬 Optimization Engine<br/>Evolutionary Search<br/>Population Management]
OE --> EE[📊 Evaluation Engine<br/>Radiation Testing<br/>Performance Metrics]
EE --> PE[🛡️ Protection Engine<br/>Fault Tolerance<br/>Error Correction]
PE --> CF[⚙️ Core Framework<br/>Neural Networks<br/>Radiation Simulation]
%% Optimization Engine Subsystems
AMC[🎲 Adaptive Mutation Controller<br/>5 Specialized Operators<br/>Credit Assignment System] --> OE
PDM[📈 Population Diversity Monitor<br/>Real-time Convergence<br/>Adaptive Rate Control] --> OE
OSS[🎯 Operator Selection System<br/>Epsilon-Greedy Strategy<br/>Performance Tracking] --> OE
%% Evaluation Engine Subsystems
RES[🌌 Radiation Environment Simulator<br/>7 Space Environments<br/>Physics-Based Modeling] --> EE
MVC[🎯 Monte Carlo Validator<br/>Statistical Reliability<br/>Confidence Intervals] --> EE
SA[📊 Statistical Analyzer<br/>Performance Metrics<br/>Comparative Analysis] --> EE
%% Protection Engine Subsystems
TMR[🔄 TMR Manager<br/>Triple Modular Redundancy<br/>Dynamic Allocation] --> PE
AP[🎛️ Adaptive Protection<br/>Context-Aware Strategies<br/>Performance Optimization] --> PE
ECS[🔧 Error Correction System<br/>Detection & Recovery<br/>Fault Classification] --> PE
%% Core Framework Subsystems
NN[🧠 Neural Network Engine<br/>Architecture Optimization<br/>Weight Protection] --> CF
RS[🌌 Radiation Simulator<br/>SEU/SEFI Modeling<br/>Multi-Particle Effects] --> CF
TM[📊 Training Manager<br/>Radiation-Aware Learning<br/>Adaptive Algorithms] --> CF
%% Data Flow and External Interfaces
DB[(📁 Results Database<br/>CSV Export<br/>Performance Logs)] --> UI
CF --> DB
CONFIG[📄 Configuration Files<br/>Mission Profiles<br/>Optimization Settings] --> UI
EXT[🔗 External Interfaces<br/>Spacecraft Systems<br/>Telemetry Integration] --> UI
UI --> EXT
%% Apply styling
class UI userInterface
class OE optimization
class EE evaluation
class PE protection
class CF core
class DB data
class CONFIG,EXT external
-
GTest Streamlined Installation problems, better cross development for various environments and testing/troubleshooting
- 📚 GTest Troubleshooting & Usage Guide - Complete testing documentation, troubleshooting, and command reference
-
More things will be extended like this as well for more flexibility.
graph TD
A["Start generation g"] --> B{"Schedule hit and not frozen?"}
B -- Yes --> B1["Compute adaptive mutation rate"]
B -- No --> B2["Use cached rate (or base)"]
B1 --> C["Select parents (e.g., tournament)"]
B2 --> C
C --> D["Crossover -> children"]
D --> E["Mutate via AdaptiveMutationController"]
E --> E1["Epsilon-greedy operator selection\n(probabilities + exploration)"]
E1 --> E2["Apply chosen mutation operator"]
E2 --> F["Evaluate child fitness (Monte Carlo)"]
F --> G["Improvement vs best parent"]
G --> H["Record (operator_index, improvement)"]
H --> I["Survivor selection -> new population"]
I --> J["Update operator credits (per generation)"]
J --> K["Recompute operator probabilities"]
K --> L["Log metrics: operator_stats.csv, results.csv"]
L --> M{"Stop criterion met?"}
M -- No --> A
M -- Yes --> N["Report best config + confidence"]
%% Notes
subgraph Decoupled Mutation-Rate Controls
B1
B2
note1["Schedule: recompute every K generations\nFreeze: hold rate after cutoff"]
end
Required Dependencies:
- CMake (3.10 or higher)
- C++17 compatible compiler (GCC 7+, Clang 5+, MSVC 2017+)
- Eigen3 (linear algebra library)
- Threads (pthreads on Unix/Linux, native on Windows)
- LMDB (for AI Native Database)
Optional Dependencies:
- PyTorch/LibTorch (for PyTorch integration)
- GoogleTest (for comprehensive testing)
- OpenCV (for visualization features)
# Install required dependencies
brew install cmake eigen lmdb googletest
# Install PyTorch (optional)
brew install pytorch
# Or install PyTorch manually
# Download from: https://pytorch.org/get-started/locally/# Install required dependencies
sudo apt-get update
sudo apt-get install cmake libeigen3-dev liblmdb-dev libgtest-dev
# Install PyTorch (optional)
pip install torch torchvision torchaudio# Install required dependencies
vcpkg install eigen3 lmdb gtest
# Install PyTorch (optional)
vcpkg install pytorch(These build configurations are not finalized and will be finalized eventually when I can think of a good way to organize this better currently everything in being built in root but separate build directories will be organized with certain builds being used to validate and test the framework more efficiently since make now takes a lot more time as the project gets better.)
The framework uses modern CMake with configurable options. Here are the main root-based build configurations:
cmake .
make -j$(nproc) # or make -j4 on macOScmake -DENABLE_PYTORCH=ON -DBUILD_TESTING=ON -DENABLE_VISUALIZATION=ON .
make -j$(nproc)cmake -DENABLE_PYTORCH=ON -DBUILD_TESTING=ON -DENABLE_IDE_INTEGRATION=ON .
make -j$(nproc)cmake -DENABLE_PYTORCH=OFF -DBUILD_TESTING=OFF -DUSE_MINIMAL_PYTHON_BINDINGS=ON .
make -j$(nproc)| Option | Default | Description |
|---|---|---|
ENABLE_PYTORCH |
OFF | Enable PyTorch/LibTorch integration |
BUILD_TESTING |
ON | Build comprehensive test suite |
BUILD_PYTHON_BINDINGS |
OFF | Build Python bindings |
ENABLE_VISUALIZATION |
OFF | Enable OpenCV visualization features |
USE_MINIMAL_PYTHON_BINDINGS |
ON | Use minimal Python bindings to avoid compilation errors |
ENABLE_IDE_INTEGRATION |
ON | Enable IDE integration features |
cmake -S . -B build-release -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS_RELEASE="-O3 -march=native -DNDEBUG -flto" -DEigen3_DIR=/usr/local/share/eigen3/cmake -DEIGEN3_INCLUDE_DIR=/usr/local/include/eigen3If you encounter PyTorch compilation issues (common with PyTorch 2.2.2), the framework includes fixes:
-
Automatic Fix: The CMake configuration automatically handles PyTorch include path issues
-
Manual Setup: If needed, set environment variables:
export PyTorch_ROOT=/path/to/pytorch export PYTORCH_ROOT=/path/to/pytorch
-
Download LibTorch: If PyTorch is not found:
# Download from: https://pytorch.org/get-started/locally/ # Extract to /usr/local/opt/pytorch or set PyTorch_ROOT
After building, run the comprehensive test suite:
# Run all tests
make test
# Run specific tests
./build_test/monte_carlo_validation
./build_test/enhanced_tmr_test
./build_test/framework_verification_test
# Run PyTorch integration tests (if enabled)
./build_test/libtorch_radiation_integration_test
./build_test/libtorch_resilience_test
./build_test/pytorch_integration_testPyTorch not found:
# Set PyTorch path
export PyTorch_ROOT=/usr/local/opt/pytorch
cmake -DENABLE_PYTORCH=ON ..LMDB not found:
# macOS
brew install lmdb
# Ubuntu
sudo apt-get install liblmdb-dev
# Set LMDB path if needed
export LMDB_ROOT=/path/to/lmdbEigen3 not found:
# macOS
brew install eigen
# Ubuntu
sudo apt-get install libeigen3-devCompilation errors:
# Clean and rebuild
make clean
make -j$(nproc)The Monte Carlo validation test provides comprehensive statistical validation of the radiation-tolerant framework using NASA-aligned methodologies. This test validates the effectiveness of enhanced voting mechanisms and protection methods across multiple space radiation environments.
This updated test expands the network compared to the old simple one.
To run the Monte Carlo validation:
./monte_carlo_validationSource: test/verification/monte_carlo_validation.cpp
What This Test Validates:
- 28.8 Million Total Trials: 100,000 trials per test case across 4 data types, 8 environments, and 9 test scenarios
- Real Space Environments: LEO, GEO, LUNAR, SAA, SOLAR_STORM, JUPITER, MARS, EUROPA with physics-based radiation modeling
- Comprehensive Error Injection: Single-bit upsets (SEUs), multi-bit upsets (MCUs), burst errors, word errors, and physics-based quantum simulation
- 13 Protection Methods: Standard voting, bit-level voting, adaptive voting, weighted voting, pattern detection, protected values, aligned memory, and more
- Advanced Test Scenarios: Multi-copy corruption, edge cases, correlated errors, recovery testing, neural network protection, mission-adaptive protection, and temperature effects
Test Output:
=== Summary Results ===
Average Success Rates Across All Tests:
---------------------------------------------------------
ORIGINAL METHODS:
Standard Voting: 99.9994%
Bit-Level Voting: 99.9994%
Word-Error Voting: 99.9994%
Burst-Error Voting: 99.9994%
Adaptive Voting: 99.9994%
ENHANCED METHODS:
Weighted Voting: 99.9994%
Fast Bit Correction: 99.9994%
Pattern Detection: 100.0000%
MEMORY PROTECTION:
Protected Value: 100.0000%
Aligned Memory: 100.0000%
CHALLENGING TEST SCENARIOS (Success Rates):
[Shows: adaptive_voting% | best_real_method% (method_name)]
Multi-Copy Corruption: 55.9812% adaptive | 100.0000% Aligned Memory/Pattern Detection/Protected Value
Edge Cases: 100.0000% adaptive | 100.0000% Aligned Memory/Pattern Detection/Protected Value/Weighted Voting
Correlated Errors: 21.4286% adaptive | 100.0000% Aligned Memory/Pattern Detection/Protected Value (prevents spatial correlation)
Recovery Detection: 100.0000%
Recovery Correction: 100.0000%
Recovery Uncorrectable:0.0000%
Most Effective Method: Aligned Memory (100.0000%)
Enhanced Methods Improvement: 0.0004% over traditional methods
NASA-style verification report generated: nasa_verification_report.txt
Key Insights from Enhanced Results:
- Dual Reporting: Shows both realistic adaptive voting performance and best achievable results with optimal method selection
- Prevention vs Correction Paradigm: Three prevention-based methods (Aligned Memory/Pattern Detection/Protected Value) consistently achieve 100% success, while correction-based approaches hit mathematical limits (21-56%)
- Correlated Errors Challenge: Reed-Solomon adaptive voting achieves 21.43% (hitting mathematical limits for spatial correlation), while prevention methods avoid the problem entirely (100%)
- Multi-Copy Corruption: Demonstrates the 44% performance gap between correction approaches (56%) and prevention strategies (100%)
- Tie Detection: Enhanced floating-point safe winner detection reveals that multiple prevention strategies achieve identical performance, showing this is an architectural class advantage rather than a single algorithm win
- Physics Over Mathematics: Prevention-based approaches that understand radiation physics consistently outperform even sophisticated mathematical error correction algorithms
Expected Runtime: ~3-10 minutes depending on number of trials and system being used.
For simplified building and testing instructions, please refer to the Student Guide.
The Student Guide provides easy-to-follow steps for:
- Installing dependencies
- Building the project
- Running tests and examples
- Troubleshooting common issues
- How Radiation Affects Computing
- How to Build
- Quick Start Guide
- Common API Usage Examples
- Python Bindings Usage
- Performance and Resource Utilization
- Neural Network Fine-Tuning Results
- Features
- Key Scientific Advancements
- Framework Architecture
- Getting Started
- Validation Results
- Scientific References
- Project Structure
- Library Structure and Dependencies
- NASA Mission Compatibility and Standards Compliance
- Recent Enhancements
- Self-Monitoring Radiation Detection
- Industry Recognition and Benchmarks
- Potential Applications
- Practical Use Cases
- Case Studies and Simulated Mission Scenarios
- Current Limitations
- Future Research Directions
- Troubleshooting
- License
- Acknowledgments
- Contributing
- Versioning
- Release History
- Contact Information
- Citation Information
For a detailed guide on radiation effects, see Radiation Effects Guide.
For a complete quick start example with code, see Quick Start Guide.
For the full code example, see Advanced Reed-Solomon Error Correction Guide.
For the full code example, see Adaptive Protection Strategy Guide.
For the full code example, see Protecting Simple Calculations.
Coming Soon!: More formal documentation on API.
For the full code example, see Protecting Neural Network Inference.
More in depth examples coming soon!
For the full code example, see Configuring Environment-Specific Protection.
More in depth examples coming soon!
For the full code example, see Handling Detected Errors.
For the full code example, see Enhanced Mission Simulator Guide.
Status: ✅ Implemented and Tested (Development Phase) Version: v1.0.2 Last Updated: August 5, 2025 Development Phase: Advanced Implementation & Testing
AI Native Database is a modern C++ database that uses Variational Autoencoders (VAEs) for intelligent data compression with LMDB for persistent storage. Designed for datacenter applications with radiation tolerance considerations. Currently in advanced development phase with core functionality implemented and tested.
- AINativeDatabase: Main database class with VAE compression
- SimpleAINativeDatabase: Lightweight version for basic use cases
- LMDB Integration: Persistent storage backend
- VAE Models: Per-data-type compression models
- Async Operations: Non-blocking store/retrieve operations
-
AI Native Database Implementation
- Complete implementation guide for AI Native Database
- VAE compression and LMDB storage integration
- Thread safety and error handling mechanisms
- Performance optimization strategies
-
- Current development status and implementation progress
- Performance metrics and test results
- Development roadmap and next steps
- Research validation status
-
- Complete database integration patterns
- Data compression and retrieval operations
- Thread-safe operations and concurrent access
- Performance optimization strategies
-
Adaptive Protection Implementation
- Complete implementation guide for adaptive protection mechanisms
- Thread safety improvements and error correction
- Multi-bit protection and data integrity
- Comprehensive testing methodologies
-
- Initial improvements summary and implementation details
- Error detection and correction enhancements
- Test results and performance characteristics
-
Selective Hardening Improvements
- O(1) protection lookups, refactored helper policies
- Fail-safe defaults for unknown protection levels
- CRC safety constraints and expanded strategy handling
-
- Comprehensive database functionality verification
- C++ testing methodologies and validation
- Automated build and test procedures
- Troubleshooting and validation procedures
- ✅ Data Storage/Retrieval: Store and retrieve compressed data with metrics
- ✅ Multiple Data Types: Support for float, double, int with type safety
- ✅ Async Operations: Non-blocking operations with futures
- ✅ Background Optimization: Automatic VAE model optimization
- ✅ Error Handling: Comprehensive error handling and edge cases
- ✅ Statistics Tracking: Compression ratios, reconstruction errors, timing
- ✅ Thread Safety: Mutex-protected operations for concurrent access
- ✅ Reed-Solomon Integration: Advanced error correction with Galois Field arithmetic
- ✅ Memory Management: RAII, move semantics, and efficient resource handling
- ✅ Type Safety: Strong typing with concepts and compile-time checks
// Initialize database
AINativeDatabase db;
db.initialize({{"sensors", 16}, {"telemetry", 32}});
// Store data
auto result = db.store("sensor_data", sensor_values, "sensors");
// Retrieve data
auto [data, metrics] = db.retrieve("sensor_data");- Uses modern C++17 features (RAII, move semantics, concepts)
- LMDB for ACID-compliant storage
- VAE models for intelligent compression
- Background optimization thread for model tuning
- Recent Achievements: Fixed PyTorch compilation issues, cleaned up broken Reed-Solomon implementations, validated error correction algorithms
- Code Quality: Peer-reviewed as development-ready with A+ grade (95/100)
- Next Steps: Complete testing, optimization, and production deployment preparation
- Comprehensive error handling with Result pattern
- 8 Space Environments: LEO, GEO, LUNAR, SAA, SOLAR_STORM, JUPITER, MARS, EUROPA
- 13 Protection Methods: All validated and functional
- Radiation Hardening: SEU, MCU, burst error, and temperature protection
- Thread Safety: No race conditions during 297-second validation tests
- PyTorch Integration: Full tensor and model protection
- Monte Carlo Validation: Comprehensive statistical validation
- Build System: CMake integration with optional PyTorch support
- Testing Framework: PyTorch-aware test system
- Validation Tools: Standalone LibTorch testing and verification
- ✅ Complete LibTorch Integration: Implemented and tested (18 tests passing)
- ✅ Portable Build System: Implemented and working on any macOS system
- ✅ Core Protection: Implemented and tested
- ✅ Thread Safety: Implemented and validated
- ✅ Multi-Bit Handling: Implemented and functional
- ✅ Neural Network Interface: Implemented and tested
- ✅ Build Integration: Implemented and working
- ✅ Comprehensive Testing: 28.8 million trials completed
- ✅ LibTorch Testing Framework: Implemented and tested
- 🔄 Advanced Radiation Hardening: In development for v1.0.2
- 🔄 Space Mission Validation: In development for v1.0.2
- 🔄 Production Readiness: In development for v1.0.2
- 🔄 Cuda: In development for v1.0.2
- Framework Enhancement: Continue improving protection mechanisms
- Performance Optimization: Optimize error correction algorithms
- Additional Testing: Expand test coverage and scenarios
- Documentation: Maintain comprehensive documentation
- GPU Acceleration: CUDA-enabled protection mechanisms
- Dynamic Protection: Runtime protection level adjustment
- Memory Pooling: Optimized memory management for protected tensors
- Distributed Protection: Multi-GPU protection coordination
- Training VAE: Using PyTorch and NVIDIA GPU to get better compression & decompression ratio
The AI-NATIVE-DATABASE library enables:
- Satellite AI Systems: Protected neural networks for autonomous decision-making
- Deep Space Missions: Radiation-hardened machine learning for long-duration missions
- Mars Rovers: AI systems that can operate reliably in high-radiation environments
- Space Stations: Protected AI for life support and navigation systems
- Interplanetary Probes: Autonomous AI systems for scientific data processing
- Foundation for Datacenters: Expanding protection strategies to larger data can enable functional cost effective data centers with machine learning capabilities.
To explore the AI-NATIVE-DATABASE library:
# Navigate to the documentation
cd FAQ/AI-NATIVE-DATABASE/
# View comprehensive protection fixes
cat COMPREHENSIVE_ADAPTIVE_PROTECTION_FIXES.md
# View PyTorch integration guide
cat PYTORCH_INTEGRATION.md
# View adaptive protection improvements
cat ADAPTIVE_PROTECTION_IMPROVEMENTS.md
# View LibTorch testing guide
cat LibTorchTesting/TESTING_LIBTORCH.mdFor development and testing:
# Install PyTorch via Homebrew (recommended)
brew install pytorch
# Build with LibTorch integration
cmake -DENABLE_PYTORCH=ON .
make libtorch_macos_compatibility_test
# Run LibTorch tests
./libtorch_macos_compatibility_test
cd test && ./run_macos_libtorch_tests.sh
# Test LibTorch installation (legacy)
./test_libtorch.sh
# Test PyTorch from Python
python3 test_libtorch_python.py
# Build with PyTorch integration
./tools/build_with_pytorch.sh -d
# Run comprehensive tests
./test_comprehensive_adaptive_protection
# Run basic protection tests
./test_adaptive_protection#include "rad_ml/research/variational_autoencoder.hpp"
using namespace rad_ml::research;
int main() {
// Configure VAE for satellite telemetry processing
size_t telemetry_dim = 12; // 12-dimensional spacecraft telemetry
size_t latent_dim = 4; // Compress to 4D (3:1 compression ratio)
VAEConfig config;
config.latent_dim = latent_dim;
config.learning_rate = 0.01f;
config.beta = 0.8f; // β-VAE for better compression
config.use_interpolation = true;
// Create radiation-tolerant VAE
VariationalAutoencoder<float> space_vae(
telemetry_dim, latent_dim, {16, 8}, // Hidden layers: 16->8
neural::ProtectionLevel::FULL_TMR, // Maximum protection
config
);
// Production training with comprehensive pipeline
std::vector<std::vector<float>> training_data = loadTelemetryData();
TrainingMetrics metrics = space_vae.trainProduction(training_data);
std::cout << "Training completed at epoch " << metrics.best_epoch
<< " with validation loss: " << metrics.best_val_loss << std::endl;
// Save trained model for mission deployment
space_vae.saveModel("spacecraft_vae_model.bin");
// Production evaluation with comprehensive metrics
auto eval_metrics = space_vae.evaluateComprehensive(validation_data);
std::cout << "Reconstruction Loss: " << eval_metrics["reconstruction_loss"]
<< ", KL Divergence: " << eval_metrics["kl_divergence"] << std::endl;
// Real-time telemetry processing with radiation protection
auto current_telemetry = getCurrentTelemetry();
double radiation_level = getCurrentRadiationLevel(); // 0.0-1.0
// Compress telemetry for transmission (3:1 compression)
auto [mean, log_var] = space_vae.encode(current_telemetry, radiation_level);
auto compressed_latent = space_vae.sample(mean, log_var);
// On ground: decompress received data
auto reconstructed = space_vae.decode(compressed_latent, 0.0);
// Anomaly detection: check reconstruction error
float reconstruction_error = calculateRMSE(current_telemetry, reconstructed);
if (reconstruction_error > anomaly_threshold) {
std::cout << "SPACECRAFT ANOMALY DETECTED!" << std::endl;
initiateEmergencyProtocols();
}
// Generate synthetic telemetry for mission planning
auto synthetic_data = space_vae.generate(100, radiation_level);
// Check radiation error statistics
auto [detected_errors, corrected_errors] = space_vae.getErrorStats();
std::cout << "Radiation errors detected: " << detected_errors
<< ", corrected: " << corrected_errors << std::endl;
return 0;
}For comprehensive Python bindings documentation and usage examples, see Python Bindings Usage Guide.
The framework's protection mechanisms come with computational overhead that varies based on the protection level:
| Protection Level | Computational Overhead | Memory Overhead | Radiation Tolerance | Error Correction |
|---|---|---|---|---|
| None | 0% | 0% | Low | 0% |
| Minimal | ~25% | ~25% | Low-Medium | ~30% |
| Moderate | ~50% | ~50% | Medium | ~70% |
| High | ~100% | ~100% | High | ~90% |
| Very High | ~200% | ~200% | Very High | ~95% |
| Adaptive | ~75% | ~75% | Environment-Based | ~85% |
| Reed-Solomon (12,8) | ~50% | ~50% | High | ~96% |
| Gradient Mismatch Protection | 100% prevention | 0% | <0.1% | High |
These metrics represent performance across various radiation environments as validated by Monte Carlo testing. The Adaptive protection strategy dynamically balances overhead and protection based on the current radiation environment, optimizing for both performance and reliability.
Recent breakthroughs in our Monte Carlo testing with neural network fine-tuning have yielded surprising and significant findings that challenge conventional wisdom about radiation protection:
Extensive Monte Carlo simulations (3240 configurations) revealed that:
-
Architecture Over Protection: Wider neural network architectures (32-16 nodes) demonstrated superior radiation tolerance compared to standard architectures with explicit protection mechanisms.
-
Counterintuitive Performance: The best-performing configuration actually achieved 146.84% accuracy preservation in a Mars radiation environment - meaning it performed better under radiation than in normal conditions. This is something I determined that was due to noise, I did another test in the same radiation environment on Mars to further investigate and I still got counterintuitive performance due to the nature of how the algorithm was functioning within the radiation environments set for Mars within the simulation.
-
Optimal Configuration:
- Architecture: Wide (32-16) neural network
- Radiation Environment: Mars
- Protection Level: None (0% memory overhead)
- Training Parameters: 500 epochs, near-zero learning rate, 0.5 dropout rate
-
Training Factors Matter: Networks trained with high dropout rates (0.5) demonstrated significantly enhanced radiation tolerance, likely due to the inherent redundancy introduced during training. Further testing revealed that pre-trained networks consistently showed improved radiation tolerance across multiple test scenarios.
A network can be trained and use software mitigation strategies to adapt radiation environment. Networks can be trained for various tasks.
-
Natural Tolerance: Some neural network architectures appear to possess inherent radiation tolerance without requiring explicit protection mechanisms. This Natural Tolerance was noticed in wide networks.
-
Performance Enhancement: In certain configurations, radiation effects may actually enhance classification performance, suggesting new approaches to network design. These enhancements were seen only in martian radiation. Seems like the stochastic nature of martian nature may increase network performance.
-
Resource Efficiency: Zero-overhead protection strategies through architecture and training optimization can replace computationally expensive protection mechanisms.
-
Mission-Specific Optimization: Different environments (Mars, GEO, Solar Probe) benefit from different architectural approaches, allowing for mission-specific neural network designs.
All results are available in optimized_fine_tuning_results.csv for further analysis. These findings have been incorporated into our fine-tuning framework components to automatically optimize neural networks for specific radiation environments.
- Space-Radiation-Tolerant Variational Autoencoder (NEW in v1.0.1):
- Complete generative modeling system with encoder, decoder, and interpolator networks
- Mission-critical applications: telemetry compression (3:1 ratio), anomaly detection, data generation
- Validated across space environments from LEO to Jupiter orbit with 95%+ reliability
- Advanced preprocessing with logarithmic transformations and standardization
- Multiple VAE variants (β-VAE, Factor-VAE) with configurable sampling techniques
- Triple Modular Redundancy (TMR) with multiple variants:
- Basic TMR with majority voting (implemented as MINIMAL protection)
- Enhanced TMR with CRC checksums (implemented as MODERATE protection)
- Stuck-Bit TMR with specialized bit-level protection (part of HIGH protection)
- Health-Weighted TMR for improved resilience (part of VERY_HIGH protection)
- Hybrid Redundancy combining spatial and temporal approaches (part of ADAPTIVE protection)
- Advanced Reed-Solomon Error Correction:
- Configurable symbol sizes (4-bit, 8-bit options)
- Adjustable redundancy levels for different protection needs
- Interleaving support for burst error resilience
- Galois Field arithmetic optimized for neural network protection
- Adaptive Protection System:
- Dynamic protection level selection based on environment
- Weight criticality analysis for targeted protection
- Resource optimization through protection prioritization
- Real-time adaptation to changing radiation conditions
- Unified memory management system:
- Memory protection through Reed-Solomon ECC and redundancy
- Automatic error detection and correction
- Memory scrubbing with background verification
- Comprehensive error handling system:
- Structured error categorization with severity levels
- Result-based error propagation
- Detailed diagnostic information
- Physics-based radiation simulation:
- Models of different space environments (LEO, GEO, Lunar, Mars, Solar Probe)
- Simulation of various radiation effects (SEUs, MBUs)
- Configurable mission parameters (altitude, shielding, solar activity)
- Validation tools:
- Monte Carlo validation framework for comprehensive testing
- Cross-section calculation utilities
- Industry standard comparison metrics
The framework introduces several novel scientific and technical advancements:
-
Physics-Driven Protection Model: Unlike traditional static protection systems, our framework implements a dynamic model that translates environmental physics into computational protection:
- Maps trapped particle flux (protons/electrons) to bit-flip probability using empirically-derived transfer functions
- Applies temperature correction factors (0.73-1.16 observed in testing) to account for thermal effects on semiconductor vulnerability
- Implements synergy factor modeling for combined radiation/temperature effects
- Achieved accurate error rate prediction from 10⁻⁶ to 10⁻¹ across 8 radiation environments
-
Advanced Quantum Physics Models: Our framework incorporates first-principles quantum physics to enhance radiation effect modeling beyond classical empirical models:
- Dirac Equation Solver (
physics/advanced_quantum_models.hpp): Relativistic electron behavior in silicon for high-energy particle interactions - Bethe-Salpeter Equation Solver: Models electron-hole pair creation and defect clustering—predicts multi-bit upset (MBU) patterns
- Green's Function Propagator: Tracks charge propagation through the crystal lattice after ion strikes
- Quantum Field Theory Framework (
physics/quantum_field_theory.hpp): Discretized field evolution on lattice with Gaussian/coherent state initialization - Quantum-Enhanced Radiation (
physics/quantum_enhanced_radiation.hpp): Bridges QFT to practical SEU calculations including temperature-dependent critical charge and device sensitivity - Automatically applies quantum corrections via
applyQuantumFieldCorrections()when feature sizes (<20nm) or temperatures (<150K) warrant it - Enhances prediction accuracy by up to 22% in extreme conditions (4.2K, 5nm)
- Dirac Equation Solver (
-
Multi-Scale Temporal Protection: Implements protection at multiple timescales simultaneously:
- Microsecond scale: Individual computation protection (TMR voting)
- Second scale: Layer-level validation with Stuck-Bit detection
- Minute scale: Mission phase adaptation via protection level changes
- Hour scale: System health monitoring with degradation tracking
- Day scale: Long-term trend adaptation for extended missions
- Demonstrated 30× dynamic range in checkpoint interval adaptation (10s-302s)
-
Adaptive Resource Allocation Algorithm: Dynamically allocates computational protection resources:
- Sensitivity-based allocation prioritizes critical neural network layers
- Layer-specific protection levels adjust based on observed error patterns
- Resource utilization scales with radiation intensity (25%-200% overhead)
- Maintained 98.5%-100% accuracy from LEO (10⁷ particles/cm²/s) to Solar Probe missions (10¹² particles/cm²/s)
-
Health-Weighted Voting System: Novel voting mechanism that:
- Tracks reliability history of each redundant component
- Applies weighted voting based on observed error patterns
- Outperformed traditional TMR by 2.3× in high-radiation environments
- Demonstrated 9.1× SEU mitigation ratio compared to unprotected computation
-
Reed-Solomon with Optimized Symbol Size: Innovative implementation of Reed-Solomon codes:
- 4-bit symbol representation optimized for neural network quantization
- Achieved 96.40% error correction with only 50% memory overhead
- Outperformed traditional 8-bit symbol implementations for space-grade neural networks
- Demonstrated ability to recover from both random and burst errors
Recent testing with gradient size mismatch protection demonstrates a significant breakthrough in radiation-tolerant machine learning:
- Resilient Neural Network Training: Framework maintains training stability even when 30% of samples experience radiation-induced memory errors
- Minimal Accuracy Impact: Testing shows the ability to converge to optimal accuracy despite frequent gradient corruption
- Error-Tolerant Architecture: Skipping corrupted samples proves more effective than attempting to correct or resize corrupted data
- Resource Optimization: Protection approach requires no additional memory overhead unlike traditional redundancy techniques
This finding challenges the conventional approach of always attempting to correct errors, showing that for neural networks, intelligently discarding corrupted data can be more effective and resource-efficient than complex error correction schemes.
These advancements collectively represent a significant step forward in radiation-tolerant computing for space applications, enabling ML systems to operate reliably across the full spectrum of space radiation environments.
RadML's effectiveness comes from the integration of physics, protection, and adaptation—not just individual techniques:
┌─────────────────────────────────────────────────────────────────────┐
│ Why RadML Works │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ Physics Models ──────► Protection Selection ──────► ECC/TMR │
│ (Weibull, Bendel, (Adaptive based on (Hamming, RS, │
│ Quantum corrections) environment + criticality) Health-TMR) │
│ │ │ │ │
│ └────────────────────────┼────────────────────────┘ │
│ │ │
│ Error Tracking │
│ │ │
│ ┌─────────────┴─────────────┐ │
│ ▼ ▼ │
│ Feedback Loop Mission Adaptation │
│ (Adjust protection (SAA, Solar events, │
│ based on observed errors) Power constraints) │
│ │
└─────────────────────────────────────────────────────────────────────┘
Key Design Principles:
- Physics-Informed Protection: Uses real Weibull/Bendel cross-section models with quantum corrections for modern nanoscale devices
- Zero-Overhead Abstractions: C++ template metaprogramming ensures protection logic is resolved at compile-time, not runtime
- Adaptive Resource Allocation: Protection scales with radiation intensity—no wasted overhead in benign environments
- Defense-in-Depth: 10 independent protection layers ensure single-point failures don't compromise the system
- Self-Monitoring: Framework infers radiation levels from error statistics, eliminating need for dedicated sensors
RadML implements a 10-layer defense-in-depth architecture where each layer catches what the previous might miss:
| Layer | Component | Protection Mechanism | Files |
|---|---|---|---|
| 1 | Physical Memory Placement | Allocates critical data in shielded regions (10,000× SEU reduction) | memory/radiation_mapped_allocator.hpp |
| 2 | Memory Scrubbing | Periodic ECC syndrome verification and correction | core/memory/memory_scrubber.hpp |
| 3 | Error Correcting Codes | Hamming(7,4) and Reed-Solomon with Berlekamp-Massey decoder | neural/galois_field.hpp, neural/adaptive_protection.hpp |
| 4 | Basic TMR | Triple Modular Redundancy with majority voting | tmr/tmr.hpp |
| 5 | Enhanced TMR | CRC32 checksums + health-weighted voting | tmr/enhanced_tmr.hpp, tmr/health_weighted_tmr.hpp |
| 6 | Temporal Redundancy | Time-delayed re-execution to detect transients | tmr/temporal_redundancy.hpp |
| 7 | Hybrid Redundancy | Combined spatial + temporal with checkpointing | tmr/hybrid_redundancy.hpp |
| 8 | Checkpoint Manager | Periodic state snapshots for rollback recovery | core/recovery/checkpoint_manager.hpp |
| 9 | Error Tracking | Real-time statistics for adaptive protection | core/runtime/error_tracker.hpp |
| 10 | Power-Aware Protection | Scales protection based on power budget | power/power_aware_protection.hpp |
This multi-layered approach ensures that a single protection failure doesn't compromise the system—each layer provides independent protection against different radiation effects.
The framework's memory protection integrates both redundancy-based approaches and Reed-Solomon error correction:
- Critical neural network weights and parameters are protected with appropriate levels of redundancy
- Reed-Solomon ECC provides robust protection for larger data structures with minimal overhead
- Memory regions can be selectively protected based on criticality analysis
- The Adaptive protection system dynamically adjusts memory protection based on:
- Current radiation environment
- Observed error patterns
- Resource constraints
- Criticality of data structures
- For maximum reliability, critical memory can be protected with both redundancy and Reed-Solomon coding
The protection levels implemented in the framework correspond to different protection mechanisms:
-
MINIMAL Protection (25% overhead): Implements basic TMR with simple majority voting:
[Copy A] [Copy B] → Simple Voting → Corrected Value -
MODERATE Protection (50% overhead): Enhanced protection with checksums:
[Copy A + CRC] [Copy B + CRC] → CRC Verification → Voter → Corrected Value -
HIGH Protection (100% overhead): Comprehensive TMR with bit-level analysis:
[Copy A] [Copy B] [Copy C] → Bit-level Analysis → Voter → Corrected Value -
VERY_HIGH Protection (200% overhead): Extensive redundancy with health tracking:
[Copy A+CRC] [Copy B+CRC] [Copy C+CRC] [Copy D+CRC] → Health-weighted Voter → Corrected Value -
ADAPTIVE Protection (75% average overhead): Dynamic protection that adjusts based on environment:
[Environment Analysis] → [Protection Level Selection] → [Appropriate Protection Mechanism] -
Reed-Solomon (12,8) (50% overhead): Error correction coding for efficient recovery:
[Data Block] → [RS Encoder] → [Protected Block with 4 ECC symbols] → [RS Decoder] → [Recovered Data]
The framework's error modeling system is based on empirical data from Monte Carlo testing across radiation environments:
-
Environment Error Rates: Validated error rates derived from testing:
- LEO: 10^-6 errors/bit
- MEO: 5×10^-6 errors/bit
- GEO: 10^-5 errors/bit
- Lunar: 2×10^-5 errors/bit
- Mars: 5×10^-5 errors/bit
- Solar Probe: 10^-4 errors/bit
-
Error Pattern Distribution:
- 78% Single bit errors
- 15% Adjacent bit errors
- 7% Multi-bit errors
-
Temperature Sensitivity: Based on empirical testing, error rates increase approximately 8% per 10°C increase in operational temperature above baseline.
-
Quantum Field Effects:
- Quantum tunneling becomes significant below 150K, affecting defect mobility
- Feature sizes below 20nm show enhanced quantum field effects
- Extreme conditions (4.2K, 5nm) demonstrate up to 22.14% improvement with quantum corrections
- Interstitial defects show 1.5× greater quantum enhancement than vacancies
These models are used to simulate realistic radiation environments for framework validation and to dynamically adjust protection strategies.
When radiation events occur, the framework follows this validated workflow:
- Detection: Error is detected through checksums, redundancy disagreement, or Reed-Solomon syndrome
- Classification: Error is categorized by type (single-bit, adjacent-bit, or multi-bit) and location
- Correction:
- For redundancy-protected data: Voting mechanisms attempt correction
- For RS-protected data: Galois Field arithmetic enables error recovery
- For hybrid-protected data: Both mechanisms are applied in sequence
- Reporting: Error statistics are tracked and used to adapt protection levels
- Adaptation: Protection strategy may be adjusted based on observed error patterns
The framework can adapt its protection level based on the radiation environment:
- In low-radiation environments (LEO), it may use lighter protection for efficiency
- When entering high-radiation zones (Van Allen Belts), protection is automatically strengthened
- During solar events, maximum protection is applied to critical components
This project follows industry best practices and is designed with consideration for space and radiation-related standards. While not formally certified, the development approach is informed by:
-
Space Systems Best Practices:
- Radiation hardening considerations for electronic components
- Space debris mitigation principles
- Space data link protocol guidelines
-
Radiation Testing Considerations:
- Single Event Effects (SEE) testing methodologies
- Total ionizing dose (TID) considerations
- Radiation hardening techniques
-
Software Quality Practices:
- Critical system development guidelines
- Software safety considerations
- MISRA C++ coding guidelines where applicable
-
Development Approach:
- Regular code reviews and testing
- Documentation of design decisions
- Continuous integration and testing
- Version control and change management
Major breakthrough in space-grade generative AI! We've successfully implemented, validated, and production-tested a comprehensive Variational Autoencoder (VAE) system specifically designed for space missions:
- Complete Production Pipeline:
trainProduction()with automatic train/validation splitting, batch processing, early stopping, and learning rate decay - Advanced Training System: Adam optimizer with bias correction, comprehensive loss tracking, and validation monitoring
- Model Persistence & Checkpointing: Full save/load system with binary serialization for mission-critical model recovery
- Comprehensive Evaluation:
evaluateComprehensive()returning detailed metrics (reconstruction loss, KL divergence, total loss) - Production Optimizers: Sophisticated Adam optimizer implementation with proper moment estimates and bias correction
- Total Tests: 29 comprehensive tests across multiple categories
- Success Rate: 93.1% (27 passed, 2 failed)
- Test Categories: Unit tests, integration tests, mathematical validation, performance tests, robustness tests, real-world validation
- Assessment: "GOOD: Minor issues to address" - Ready for deployment with optimizations needed for extreme conditions
Test Results Breakdown:
- ✅ Unit Tests: VAE construction, encoder/decoder functionality, sampling functions, loss functions, optimizer initialization
- ✅ Integration Tests: Training pipeline convergence, data handling, model persistence
- ✅ Mathematical Validation: Variational properties, reconstruction quality, latent space continuity
- ✅ Performance Tests: Inference performance (689μs average), memory efficiency
- ✅ Robustness Tests: Radiation tolerance, edge cases, stress conditions
- ✅ Real-world Validation: Spacecraft telemetry patterns, anomaly detection, training reproducibility
⚠️ Minor Issues: Training scalability optimization needed, extreme radiation (10x normal) handling
- Complete VAE Architecture: Encoder, decoder, and interpolator networks with full radiation protection
- Mathematical Foundation: Implements ELBO loss with reparameterization trick and KL divergence regularization
- Multiple VAE Variants: β-VAE, Factor-VAE, and Controlled-VAE with configurable sampling techniques
- Advanced Preprocessing: Logarithmic transformations and standardization optimized for telemetry data
- Protected Neural Networks: All VAE components use
ProtectedNeuralNetworkwith TMR and Reed-Solomon codes - Latent Variable Protection: Redundant storage and majority voting for critical latent representations
- Dynamic Adaptation: Protection levels automatically adjust based on radiation intensity
- Comprehensive Error Tracking: Real-time monitoring of detected and corrected radiation errors
- Satellite Telemetry Compression: Achieves 3:1 compression ratio for bandwidth-limited space communications
- Spacecraft Anomaly Detection: Early warning system using reconstruction error thresholds
- Data Generation: Synthetic telemetry generation for mission planning and testing
- Real-time Processing: Optimized for onboard processing in resource-constrained environments
The VAE has been successfully tested across multiple space environments:
- LEO (ISS Orbit): 100% uptime, perfect performance
- GEO (Geostationary): 100% uptime through Van Allen belt radiation
- Lunar Transit: 97% uptime surviving deep space radiation
- Mars Mission: Validated for long-duration deep space operations
- Jupiter Orbit: Extreme radiation environment testing
- Compression Efficiency: 3:1 ratio for 12-dimensional telemetry data
- Radiation Tolerance: >99% error correction rate for single-bit upsets
- Mission Reliability: 95%+ uptime maintained across all space environments
- Production Training: Early stopping at epoch 14/50 with stable convergence
- Real-world Testing: Comprehensive space mission simulator with realistic radiation effects
- Space missions with normal radiation environments
- Real-time spacecraft anomaly detection systems
- Satellite telemetry processing and compression
- Research and development applications
- Non-critical autonomous systems
- Large-scale batch processing (training scalability)
- Extreme radiation environments (>10x normal levels)
- Mission-critical systems requiring 100% reliability
- Template Design: Support for float/double precision with memory optimization
- Configuration Options: Extensive customization for mission-specific requirements
- Integration: Seamless integration with existing rad_ml framework components
- Documentation: Comprehensive technical documentation with usage examples
For detailed technical documentation, see: include/rad_ml/research/VARIATIONAL_AUTOENCODER.md
- This represents a major milestone in making advanced AI capabilities available for space missions, enabling autonomous spacecraft operation, intelligent data processing, and real-time decision making in the harshest environments known to humanity. Version 1.0.1
- Fixed critical bug in the architecture testing framework where all configurations produced identical performance metrics
- Implemented architecture-based performance modeling with physics-inspired radiation impact formulas
- Added proper random seed generation for reliable Monte Carlo testing across different architectures
- Created environment-specific radiation impact profiles for all supported space environments
- Developed protection level effectiveness modeling based on protection mechanism
- Enhanced Monte Carlo statistics with standard deviation reporting for better reliability assessment
- Validated the framework with experimental testing across multiple network architectures
- Added debugging outputs for better visibility into architecture performance under radiation
- Achieved meaningful differentiation between network architectures under various radiation conditions
- Demonstrated proper interaction between network complexity, protection levels, and radiation tolerance
For detailed usage of this feature, see the Auto Architecture Search Guide.
- Added
GaloisFieldtemplate class enabling efficient finite field arithmetic - Optimized for 4-bit and 8-bit symbol representations common in neural networks
- Implemented lookup tables for performance-critical operations
- Support for polynomial operations necessary for Reed-Solomon ECC
- Implemented configurable Reed-Solomon encoder/decoder
- Support for various symbol sizes (4-bit, 8-bit) and code rates
- Interleaving capabilities for burst error resilience
- Achieves 96.40% error correction with RS(12,8) using 4-bit symbols
- Dynamic protection level selection based on radiation environment
- Weight criticality analysis for targeted protection of sensitive parameters
- Error statistics tracking and analysis for protection optimization
- Environment-aware adaptation for balanced protection/performance
- Simulates neural networks under various radiation environments
- Tests all protection strategies across different error models
- Gathers detailed statistics on error detection, correction, and performance impact
- Validates protection effectiveness in conditions from LEO to Solar Probe missions
- Discovered that moderate protection (50% overhead) outperforms very high protection (200% overhead) in extreme radiation environments
- Validated that 4-bit Reed-Solomon symbols provide better correction/overhead ratio than 8-bit symbols
- Confirmed the effectiveness of adaptive protection in balancing resources and reliability
- Implemented a comprehensive neural network fine-tuning system for radiation environments
- Discovered that wider architectures (32-16) have inherent radiation tolerance without explicit protection
- Demonstrated that networks with high dropout (0.5) show enhanced radiation resilience
- Achieved 146.84% accuracy preservation in Mars environment with zero protection overhead
- Developed techniques to optimize neural network design based on specific mission radiation profiles
- Added quantum field theory models for more accurate defect propagation predictions
- Implemented adaptive quantum correction system that applies enhancements only when appropriate
- Developed material-specific quantum parameter calibration for silicon, germanium, and GaAs
- Threshold-based decision logic for quantum effects based on temperature, feature size, and radiation
- Detailed visualization and analysis tools for quantum enhancement validation
- Achieved significant accuracy improvements in extreme conditions (cold temperatures, nanoscale devices)
- Comprehensive test suite validating quantum corrections across temperature ranges and device sizes
Our latest research has yielded significant enhancements in memory safety for radiation environments:
- Robust Mutex Protection: Advanced exception handling for mutex operations vulnerable to radiation-induced corruption
- Safe Memory Access Patterns: Redesigned TMR access with proper null checks and corruption detection
- Static Memory Registration: Enhanced memory region registration with static allocation guarantees
- Graceful Degradation: Neural networks now continue functioning even when portions of memory are corrupted
- Thread-Safe Error Reporting: Improved error statistics collection that remains operational even after memory corruption
- Safe Value Recovery: Enhanced value recovery from corrupted protected variables using tryGet() with optional return
- Memory Region Isolation: Better isolation of critical memory regions from volatile sections
- Comprehensive Mission Testing: Validated with 95% error correction rates in intense radiation simulations
- Radiation-Hardened Operations: Critical operations now use multiple layers of protection to ensure completion
These enhancements significantly improve the framework's resilience to radiation-induced memory corruption, directly addressing segmentation faults and other catastrophic failure modes observed in high-radiation environments. The system now achieves 100% mission completion rates even under extreme radiation conditions that previously caused system failures.
The framework now includes a robust gradient size mismatch detection and handling mechanism that significantly improves neural network reliability in radiation environments:
- Heap Buffer Overflow Prevention: Critical safety checks detect gradient size mismatches before application, preventing memory corruption
- Intelligent Sample Skipping: Instead of attempting risky gradient resizing, the system safely skips affected samples
- Perfect Accuracy Preservation: Testing demonstrates 100% accuracy preservation under simulated radiation conditions
- Zero Performance Impact: Protection mechanism adds negligible computational overhead while providing significant safety benefits
This enhancement addresses a critical vulnerability in neural network training pipelines where radiation effects can cause gradient dimensions to unexpectedly change, potentially leading to system crashes or unpredictable behavior.
These enhancements significantly improve the framework's capabilities for protecting neural networks in radiation environments, while offering better performance and resource utilization than previous versions.
A key innovation in v0.9.6 is the framework's ability to function as its own radiation detector by monitoring internal error statistics, eliminating the need for dedicated radiation sensors in many mission profiles.
The framework continuously monitors:
- Error detection rates across protected memory regions
- Correction success/failure patterns
- Spatial and temporal distribution of bit flips
This data is processed to infer real-time radiation levels, enabling:
- Dynamic protection adjustment without external sensors
- Significant reduction in hardware requirements (mass/volume)
- More efficient resource allocation during mission phases
// Example: Using internal error statistics for radiation inference
auto mission_stats = simulator.getErrorStatistics();
// Check if radiation environment has changed based on internal metrics
if (mission_stats.error_rate > threshold) {
// Dynamically increase protection without external sensors
protection.setProtectionLevel(neural::ProtectionLevel::HIGH);
memory_controller.enableIntensiveScrubbing();
}- Mass/Volume Reduction: Eliminates dedicated sensor hardware
- Power Efficiency: No additional power required for sensing
- Integration Simplicity: Works with existing computing hardware
- Cost Effectiveness: Reduces component count and integration complexity
- Reliability: No single point of failure in radiation detection
This capability is particularly valuable for small satellites, CubeSats, and deep space missions where resource constraints are significant.
The framework's effectiveness has been evaluated through comprehensive Monte Carlo testing:
-
Monte Carlo Testing:
- 3,000,000+ test cases across 6 radiation environments
- 42 unique simulation configurations
- 500-sample synthetic datasets with 10 inputs and 3 outputs per test
- Complete neural network testing in each environment
-
Test Results:
- Successfully corrected 96.40% of errors using Reed-Solomon (12,8) with 4-bit symbols
- Demonstrated counterintuitive protection behavior with MODERATE outperforming VERY_HIGH in extreme environments
- ADAPTIVE protection achieved 85.58% correction effectiveness in Solar Probe conditions
- Successfully tested framework across error rates spanning four orders of magnitude (10^-6 to 10^-4)
-
Performance Comparison:
- vs. Hardware TMR: Provides comparable protection at significantly lower cost
- vs. ABFT Methods: More effective at handling multi-bit upsets
- vs. ECC Memory: Offers protection beyond memory to computational elements
- vs. Traditional Software TMR: 3.8× more resource-efficient per unit of protection
-
Computational Overhead Comparison:
System Performance Overhead Memory Overhead Error Correction in High Radiation This Framework 25-200% 25-200% Up to 100% Hardware TMR 300% 300% ~95% Lockstep Processors 300-500% 100% ~92% ABFT Methods 150-200% 50-100% ~80% ECC Memory Only 5-10% 12.5% ~40%
These test results demonstrate the framework's effectiveness at providing radiation tolerance through software-based protection mechanisms, with particular strength in extreme radiation environments where traditional approaches often fail.
The framework enables several mission-critical applications:
- Autonomous Navigation: ML-based navigation systems that maintain accuracy during solar storms or high-radiation zones
- Onboard Image Processing: Real-time image classification for target identification without Earth communication
- Fault Prediction: ML models that predict system failures before they occur, even in high-radiation environments
- Resource Optimization: Intelligent power and thermal management in dynamically changing radiation conditions
- Science Data Processing: Onboard analysis of collected data to prioritize downlink content
- Advanced Telemetry Processing (NEW with VAE):
- Data Compression: 3:1 compression ratios for bandwidth-limited space communications
- Anomaly Detection: Real-time spacecraft health monitoring and early warning systems
- Synthetic Data Generation: Mission planning and training data augmentation
- Intelligent Data Prioritization: Automated selection of critical data for transmission
These applications can significantly enhance mission capabilities while reducing reliance on Earth-based computing and communication.
The framework has been evaluated in several simulated mission scenarios demonstrating its effectiveness:
- Environment: Low Earth Orbit with South Atlantic Anomaly crossings
- Application: Real-time cloud cover and weather pattern detection
- Results:
- 100% computational accuracy maintained throughout 75-day simulation
- SAA crossings handled with zero unrecoverable errors
- Protection overhead automatically reduced by 18% during non-SAA regions
- Environment: Interplanetary transit and Mars surface operations
- Application: Autonomous navigation and science target prioritization
- Results:
- Successfully handled 142 simulated radiation events
- Maintained 99.97% decision accuracy during solar activity spikes
- Seamlessly adapted protection levels across changing radiation environments
- Environment: Solar Probe orbit with extreme radiation exposure
- Application: Neural network for spectrometer data analysis
- Results:
- Reduced radiation-induced false positives by 99.83%
- Maintained scientific data integrity through 36 simulated radiation storms
- Demonstrated cost-effective alternative to radiation-hardened hardware
The framework consistently demonstrated its ability to maintain computational integrity across diverse space environments, validating its suitability for real-world space-based machine learning applications.
To demonstrate the framework's capabilities in realistic space mission contexts, several case studies and simulated mission scenarios were conducted using v0.9.2 of the framework:
A simulated Europa lander mission using onboard ML-based image classification for identifying surface features of scientific interest:
-
Mission Profile:
- Continuous exposure to extreme radiation (1.0×10¹¹ p/cm²/s)
- Temperature cycling from -180°C to -140°C
- Limited power and communication windows
-
Framework Configuration:
- Hybrid Redundancy with 10-second checkpoint intervals
- Adaptive voting with emphasis on burst error correction
- Memory scrubbing at 2-second intervals
-
Results:
- ML classifier maintained 99.97% accuracy throughout the 30-day simulation
- Only 0.0023% of images required retransmission to Earth
- Detected 100% of injected radiation events
- Recovered from 99.953% of radiation-induced errors
- Correctly identified 2,847 scientific targets from 3,000 simulated images
A simulated deep learning inference workload running on the Lunar Gateway station during a solar storm:
-
Mission Profile:
- Baseline radiation (1.0×10⁹ p/cm²/s) with solar storm spike (1.0×10¹¹ p/cm²/s)
- 5-day continuous operation through varying radiation conditions
- ML inference tasks: environmental monitoring, system diagnostics, crew assistance
-
Framework Configuration:
- Enhanced TMR with dynamic protection level adjustment
- Environment-aware checkpoint scheduling
- Health-weighted voting for multi-bit error resistance
-
Results:
- Zero undetected errors throughout the 5-day simulation
- Dynamic protection level correctly increased during solar event
- Computational overhead automatically scaled from 228% (baseline) to 265% (storm peak)
- 100% task completion rate despite 732 injected radiation events
- Checkpoint interval dynamically adjusted from 28.3s (baseline) to 10.0s (storm)
A simulated Mars rover using ML for autonomous navigation and sample selection during a dust storm:
-
Mission Profile:
- Moderate radiation (5.0×10⁸ p/cm²/s) with atmospheric dust interference
- Limited power budget with thermal cycling (-80°C to +30°C)
- Real-time decision requirements with no Earth communication
-
Framework Configuration:
- Enhanced TMR with thermal compensation
- Selective protection focusing on critical decision pathways
- Resource-aware protection scaling based on power availability
-
Results:
- Successfully navigated 8.2km simulated terrain without mission-critical errors
- Correctly identified 97.8% of high-value sample targets
- Maintained detection and correction capabilities throughout dust storm
- Adjusted protection levels to optimize power consumption
- Recovered from all 58 simulated radiation-induced errors
These case studies demonstrate the framework's ability to maintain ML system reliability across diverse space mission scenarios with varying radiation environments, operational constraints, and performance requirements.
The framework currently has the following limitations:
- Hardware Dependency: The framework is designed to work with specific hardware configurations. It may not be suitable for all hardware platforms.
- Model Accuracy: The radiation environment models used in the framework are based on empirical data and may not perfectly represent real-world radiation conditions.
- Resource Utilization: The framework's protection mechanisms come with a computational overhead. In some scenarios, this overhead may be significant.
- Error Handling: The framework's error handling system is designed to be robust, but it may not be perfect. There is always a small chance of undetected errors.
While the current framework demonstrates exceptional performance, several avenues for future research have been identified:
-
Hardware Co-design: Integration with radiation-hardened FPGA architectures for hardware acceleration of TMR voting
-
Dynamic Adaptation: Self-tuning redundancy levels based on measured radiation environment
-
Error Prediction: Machine learning-based prediction of radiation effects to preemptively adjust protection
-
Power Optimization: Techniques to minimize the energy overhead of redundancy in power-constrained spacecraft
-
Network Topology Hardening: Research into inherently radiation-resilient neural network architectures
-
Distributed Redundancy: Cloud-like distributed computing approach for redundancy across multiple spacecraft
-
Quantum Error Correction Integration: Exploring the application of quantum error correction principles to classical computing in radiation environments
-
Formal Verification: Development of formal methods to mathematically prove radiation tolerance properties
Ongoing collaboration with space agencies and research institutions will drive these research directions toward practical implementation.
The Space-Radiation-Tolerant machine learning framework has several potential applications:
- Satellite Image Processing: On-board processing of images from satellites operating in high-radiation environments.
- Space Exploration: Real-time data analysis for rovers and probes exploring planets or moons with high radiation levels.
- Nuclear Facilities: Machine learning applications in environments with elevated radiation levels.
- Particle Physics: Data processing near particle accelerators or detectors where radiation may affect computing equipment.
- High-Altitude Aircraft: ML systems for aircraft operating in regions with increased cosmic radiation exposure.
-
CMake Error with pybind11: If you encounter an error about pybind11's minimum CMake version being no longer supported:
CMake Error at _deps/pybind11-src/CMakeLists.txt:8 (cmake_minimum_required): cmake_minimum_required VERSION "3.4" is no longer supported by CMake.Apply the included patch by running:
./apply-patches.sh
This patch updates pybind11's minimum required CMake version from 3.4 to 3.5 for compatibility with modern CMake versions.
-
Eigen3 Not Found: If you encounter Eigen3-related build errors, you can install it using:
# Ubuntu/Debian sudo apt-get install libeigen3-dev # macOS brew install eigen # Windows (with vcpkg) vcpkg install eigen3
Alternatively, the framework will use its minimal stub implementation.
-
Boost Not Found: If Boost libraries are not found, install them:
# Ubuntu/Debian
sudo apt-get install libboost-all-dev
# macOS
brew install boost
# Windows (with vcpkg)
vcpkg install boost-
Unexpected Protection Behavior: Verify your mission environment configuration. Protection levels adapt to the environment, so an incorrect environment configuration can lead to unexpected protection behavior.
-
High CPU Usage: The TMR implementations, especially Hybrid Redundancy, are computationally intensive by design. Consider using a lower protection level for testing or development environments.
-
Checkpoint Interval Too Short: For extreme radiation environments, the framework may reduce checkpoint intervals to very small values (e.g., 10s). This is expected behavior in high-radiation scenarios.
The framework includes various debugging tools:
- Set the environment variable
RAD_ML_LOG_LEVELto control log verbosity:
export RAD_ML_LOG_LEVEL=DEBUG # Options: ERROR, WARNING, INFO, DEBUG, TRACE- Enable detailed diagnostics with:
export RAD_ML_DIAGNOSTICS=1- Simulate specific radiation events with the test tools:
./build/radiation_event_simulator --environment=LEO --event=SEUThe framework uses enum classes for type safety rather than strings:
// In mission_environment.hpp
namespace rad_ml::sim {
enum class Environment {
LEO, // Low Earth Orbit
MEO, // Medium Earth Orbit
GEO, // Geostationary Orbit
LUNAR, // Lunar vicinity
MARS, // Mars vicinity
SOLAR_PROBE, // Solar probe mission
SAA // South Atlantic Anomaly region
};
enum class MissionPhase {
LAUNCH,
CRUISE,
ORBIT_INSERTION,
SCIENCE_OPERATIONS,
SAA_CROSSING,
SOLAR_STORM,
SAFE_MODE
};
RadiationEnvironment createEnvironment(Environment env);
} // namespace rad_ml::simUsing enum classes instead of strings provides:
- Compile-time type checking
- IDE autocompletion
- Protection against typos or invalid inputs
- Better code documentation
This project and its work is licensed under the AGPL v3 license
- NASA's radiation effects research and CREME96 model
- ESA's ECSS-Q-ST-60-15C radiation hardness assurance standard
- JEDEC JESD57 test procedures
- MIL-STD-883 Method 1019 radiation test procedures
- Nuclear and Radiation Research on Materials
Contributions to improve the framework are welcome. Please follow these guidelines:
- Fork the Repository: Create your own fork of the project
- Create a Branch: Create a feature branch for your contributions
- Make Changes: Implement your changes, additions, or fixes
- Test Thoroughly: Ensure your changes pass all tests
- Document Your Changes: Update documentation to reflect your changes
- Submit a Pull Request: Create a pull request with a clear description of your changes
Contributions are particularly welcome in the following areas:
- Additional TMR Strategies: New approaches to redundancy management
- Environment Models: Improved radiation environment models
- Performance Optimizations: Reducing the overhead of protection mechanisms
- Documentation: Improving or extending documentation
- Testing: Additional test cases or improved test coverage
- Mission Profiles: Adding configurations for additional mission types
- Follow the existing code style and naming conventions
- Add unit tests for new functionality
- Document new APIs using standard C++ documentation comments
- Ensure compatibility with the existing build system
If you find a bug or have a suggestion for improvement:
- Check existing issues to see if it has already been reported
- Create a new issue with a clear description and reproduction steps
- Include relevant information about your environment (OS, compiler, etc.)
This project follows Semantic Versioning (SemVer):
- Major version: Incompatible API changes
- Minor version: Backwards-compatible functionality additions
- Patch version: Backwards-compatible bug fixes
Current version: 0.9.3 (Pre-release)
- v1.0.1 (Current) - Space-Radiation-Tolerant Variational Autoencoder
- 🚀 Major Feature: Complete VAE implementation with encoder, decoder, and interpolator networks
- 🛡️ Radiation Protection: Full integration with TMR and Reed-Solomon error correction
- 🛰️ Space Validation: Tested across all space environments from LEO to Jupiter orbit
- 📊 Performance: 3:1 compression, >99% error correction, 95%+ mission reliability
- 🔧 Applications: Telemetry compression, anomaly detection, synthetic data generation
- 📚 Documentation: Comprehensive technical documentation with usage examples
- v0.9.7 (May 12, 2025) - Auto Architecture Search Enhancement
For a complete history of previous releases, please see the VERSION_HISTORY.md file.