space-radiation-tolerant

Space Labs AI presents: A radiation-tolerant machine learning framework enabling neural networks to operate reliably in space environments. Features adaptive protection, Reed-Solomon error correction, and breakthrough architecture optimizations that improve performance under radiation.

https://github.com/r0nlt/space-radiation-tolerant

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.2%) to scientific vocabulary

Keywords

company-site

Scientific Fields

Computer Science Computer Science - 69% confidence
Engineering Computer Science - 45% confidence
Biology Life Sciences - 40% confidence
Last synced: 4 months ago · JSON representation ·

Repository

Space Labs AI presents: A radiation-tolerant machine learning framework enabling neural networks to operate reliably in space environments. Features adaptive protection, Reed-Solomon error correction, and breakthrough architecture optimizations that improve performance under radiation.

Basic Info
Statistics
  • Stars: 10
  • Watchers: 1
  • Forks: 2
  • Open Issues: 8
  • Releases: 0
Topics
company-site
Created 8 months ago · Last pushed 4 months ago
Metadata Files
Readme Contributing Funding License Citation

README.md

Radiation-Tolerant Machine Learning Framework

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.1

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).

About Space-Radiation-Tolerant

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: August 26 2025 - Started refreshing and updating older documentation, tests, and optimizing foundational code - PyTorch has been integrated, there are a few tests but I will find time to explore that later - Cleaning up codebase and better documentation and become a priority in terms of making sure the repo becomes ready to integrate with a custom LLM. - increase in better documentation and visuals - Radiation Tolerant AI Native Embedded Database (in development, mostly looking to get through documentation and updating outdated things before I finish this) - CUDA is postponed until I get a better GPU - This is now just a project I do on the side.

Approach

  • 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

🚀 Enhanced Evolutionary System Architecture (v1.0.2.1)

Multi-Operator Adaptive Genetic Algorithm with Real-Time Performance Tracking

📚 Documentation Links:

```mermaid 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.

Building the Framework

Prerequisites

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)

Installation

macOS (using Homebrew)

```bash

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/

```

Ubuntu/Debian

```bash

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 ```

Windows (using vcpkg)

```bash

Install required dependencies

vcpkg install eigen3 lmdb gtest

Install PyTorch (optional)

vcpkg install pytorch ```

CMake Configuration

(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:

Basic Build (Core Framework)

bash cmake . make -j$(nproc) # or make -j4 on macOS

Full Build with PyTorch Integration

bash cmake -DENABLE_PYTORCH=ON -DBUILD_TESTING=ON -DENABLE_VISUALIZATION=ON . make -j$(nproc)

Development Build (Recommended)

bash cmake -DENABLE_PYTORCH=ON -DBUILD_TESTING=ON -DENABLE_IDE_INTEGRATION=ON . make -j$(nproc)

Minimal Build (Core Only)

bash cmake -DENABLE_PYTORCH=OFF -DBUILD_TESTING=OFF -DUSE_MINIMAL_PYTHON_BINDINGS=ON . make -j$(nproc)

CMake Options

| 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 |

PyTorch Integration Setup

If you encounter PyTorch compilation issues (common with PyTorch 2.2.2), the framework includes fixes:

  1. Automatic Fix: The CMake configuration automatically handles PyTorch include path issues
  2. Manual Setup: If needed, set environment variables: bash export PyTorch_ROOT=/path/to/pytorch export PYTORCH_ROOT=/path/to/pytorch

  3. Download LibTorch: If PyTorch is not found: ```bash

    Download from: https://pytorch.org/get-started/locally/

    Extract to /usr/local/opt/pytorch or set PyTorch_ROOT

    ```

Running Tests

After building, run the comprehensive test suite:

```bash

Run all tests

make test

Run specific tests

./buildtest/montecarlovalidation ./buildtest/enhancedtmrtest ./buildtest/frameworkverification_test

Run PyTorch integration tests (if enabled)

./buildtest/libtorchradiationintegrationtest ./buildtest/libtorchresiliencetest ./buildtest/pytorchintegrationtest ```

Troubleshooting

Common Issues

PyTorch not found: ```bash

Set PyTorch path

export PyTorchROOT=/usr/local/opt/pytorch cmake -DENABLEPYTORCH=ON .. ```

LMDB not found: ```bash

macOS

brew install lmdb

Ubuntu

sudo apt-get install liblmdb-dev

Set LMDB path if needed

export LMDB_ROOT=/path/to/lmdb ```

Eigen3 not found: ```bash

macOS

brew install eigen

Ubuntu

sudo apt-get install libeigen3-dev ```

Compilation errors: ```bash

Clean and rebuild

make clean make -j$(nproc) ```

RadML Monte Carlo Validation

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: bash ./monte_carlo_validation

Source: 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: adaptivevoting% | bestrealmethod% (methodname)] 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: nasaverificationreport.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.

Important Note for Students

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

Table of Contents

How Radiation Affects Computing

For a detailed guide on radiation effects, see Radiation Effects Guide.

Quick Start Guide

For a complete quick start example with code, see Quick Start Guide.

Using Advanced Reed-Solomon Error Correction

For the full code example, see Advanced Reed-Solomon Error Correction Guide.

Using Adaptive Protection Strategy

For the full code example, see Adaptive Protection Strategy Guide.

Common API Usage Examples

Protecting a Simple Calculation

For the full code example, see Protecting Simple Calculations.

Coming Soon!: More formal documentation on API.

Protecting Neural Network Inference

For the full code example, see Protecting Neural Network Inference.

More in depth examples coming soon!

Configuring Environment-Specific Protection

For the full code example, see Configuring Environment-Specific Protection.

More in depth examples coming soon!

Handling Detected Errors

For the full code example, see Handling Detected Errors.

Using the Enhanced Mission Simulator (v0.9.6)

For the full code example, see Enhanced Mission Simulator Guide.

AI Native Database (v1.0.2): In Dev

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.

Implementation Status

Core Components

  • 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

📚 Documentation Library

  • 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
  • Database Development Status

    • Current development status and implementation progress
    • Performance metrics and test results
    • Development roadmap and next steps
    • Research validation status
  • Database Integration Guide

    • 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
  • Protection Improvements

    • 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
  • Database Testing Guide

    • Comprehensive database functionality verification
    • C++ testing methodologies and validation
    • Automated build and test procedures
    • Troubleshooting and validation procedures

Features Implemented

  • 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

Usage Example

```cpp // Initialize database AINativeDatabase db; db.initialize({{"sensors", 16}, {"telemetry", 32}});

// Store data auto result = db.store("sensordata", sensorvalues, "sensors");

// Retrieve data auto [data, metrics] = db.retrieve("sensor_data"); ```

Development Notes

  • 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

🚀 Space Mission Readiness

  • 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

🔬 Integration Points

  • 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

📈 Development Status

  • ✅ 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

🎯 Next Steps

  1. Framework Enhancement: Continue improving protection mechanisms
  2. Performance Optimization: Optimize error correction algorithms
  3. Additional Testing: Expand test coverage and scenarios
  4. Documentation: Maintain comprehensive documentation

🔮 Future Enhancements

  • 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

🛰️ Mission Applications

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.

📖 Getting Started

To explore the AI-NATIVE-DATABASE library:

```bash

Navigate to the documentation

cd FAQ/AI-NATIVE-DATABASE/

View comprehensive protection fixes

cat COMPREHENSIVEADAPTIVEPROTECTION_FIXES.md

View PyTorch integration guide

cat PYTORCH_INTEGRATION.md

View adaptive protection improvements

cat ADAPTIVEPROTECTIONIMPROVEMENTS.md

View LibTorch testing guide

cat LibTorchTesting/TESTING_LIBTORCH.md ```

For development and testing:

```bash

Install PyTorch via Homebrew (recommended)

brew install pytorch

Build with LibTorch integration

cmake -DENABLEPYTORCH=ON . make libtorchmacoscompatibilitytest

Run LibTorch tests

./libtorchmacoscompatibilitytest cd test && ./runmacoslibtorchtests.sh

Test LibTorch installation (legacy)

./test_libtorch.sh

Test PyTorch from Python

python3 testlibtorchpython.py

Build with PyTorch integration

./tools/buildwithpytorch.sh -d

Run comprehensive tests

./testcomprehensiveadaptive_protection

Run basic protection tests

./testadaptiveprotection ```

Using Space-Radiation-Tolerant VAE (NEW in v1.0.1)

```cpp

include "radml/research/variationalautoencoder.hpp"

using namespace rad_ml::research;

int main() { // Configure VAE for satellite telemetry processing sizet telemetrydim = 12; // 12-dimensional spacecraft telemetry sizet latentdim = 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;

} ```

Python Bindings Usage (v0.9.5)

For comprehensive Python bindings documentation and usage examples, see Python Bindings Usage Guide.

Performance and Resource Utilization

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.

Neural Network Fine-Tuning Results

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:

Key Findings

Extensive Monte Carlo simulations (3240 configurations) revealed that:

  1. Architecture Over Protection: Wider neural network architectures (32-16 nodes) demonstrated superior radiation tolerance compared to standard architectures with explicit protection mechanisms.

  2. 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.

  3. 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
  4. 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.

Implications

A network can be trained and use software mitigation strategies to adapt radiation environment. Networks can be trained for various tasks.

  1. 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.

  2. 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.

  3. Resource Efficiency: Zero-overhead protection strategies through architecture and training optimization can replace computationally expensive protection mechanisms.

  4. 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.

Features

  • 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

Key Scientific Advancements

The framework introduces several novel scientific and technical advancements:

  1. 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
  2. Quantum Field Theory Integration: Our framework incorporates quantum field theory to enhance radiation effect modeling at quantum scales:

    • Implements quantum tunneling calculations for improved defect mobility predictions
    • Applies Klein-Gordon equation solutions for more accurate defect propagation modeling
    • Accounts for zero-point energy contributions at low temperatures
    • Enhances prediction accuracy by up to 22% in extreme conditions (4.2K, 5nm)
    • Automatically applies quantum corrections only when appropriate thresholds are met
    • Shows significant accuracy improvements in nanoscale devices (<20nm) and cryogenic environments (<150K)
  3. 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)
  4. 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)
  5. 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
  6. 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

Robust Error Recovery Under Radiation

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.

Framework Architecture

Overall Design

Space-Radiation-Tolerant follows a layered architecture designed to provide radiation protection at multiple levels:

  1. Memory Layer: The foundation that ensures data integrity through protected memory regions and continuous scrubbing.
  2. Redundancy Layer: Implements various TMR strategies to protect computation through redundant execution and voting.
  3. Error Correction Layer: Provides advanced Reed-Solomon ECC capabilities for recovering from complex error patterns.
  4. Adaptive Layer: Dynamically adjusts protection strategies based on environment and criticality.
  5. Application Layer: Provides radiation-hardened ML components that leverage the protection layers.

This multi-layered approach allows for defense-in-depth, where each layer provides protection against different radiation effects.

Memory Management Approach

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

Radiation Protection Mechanisms

The protection levels implemented in the framework correspond to different protection mechanisms:

  1. MINIMAL Protection (25% overhead): Implements basic TMR with simple majority voting: [Copy A] [Copy B] → Simple Voting → Corrected Value

  2. MODERATE Protection (50% overhead): Enhanced protection with checksums: [Copy A + CRC] [Copy B + CRC] → CRC Verification → Voter → Corrected Value

  3. HIGH Protection (100% overhead): Comprehensive TMR with bit-level analysis: [Copy A] [Copy B] [Copy C] → Bit-level Analysis → Voter → Corrected Value

  4. 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

  5. ADAPTIVE Protection (75% average overhead): Dynamic protection that adjusts based on environment: [Environment Analysis] → [Protection Level Selection] → [Appropriate Protection Mechanism]

  6. 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]

Physics-Based Error Modeling

The framework's error modeling system is based on empirical data from Monte Carlo testing across radiation environments:

  1. 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
  2. Error Pattern Distribution:

    • 78% Single bit errors
    • 15% Adjacent bit errors
    • 7% Multi-bit errors
  3. Temperature Sensitivity: Based on empirical testing, error rates increase approximately 8% per 10°C increase in operational temperature above baseline.

  4. 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.

Error Detection and Recovery Flow

When radiation events occur, the framework follows this validated workflow:

  1. Detection: Error is detected through checksums, redundancy disagreement, or Reed-Solomon syndrome
  2. Classification: Error is categorized by type (single-bit, adjacent-bit, or multi-bit) and location
  3. 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
  4. Reporting: Error statistics are tracked and used to adapt protection levels
  5. Adaptation: Protection strategy may be adjusted based on observed error patterns

Mission Environment Adaptation

The framework can adapt its protection level based on the radiation environment:

  1. In low-radiation environments (LEO), it may use lighter protection for efficiency
  2. When entering high-radiation zones (Van Allen Belts), protection is automatically strengthened
  3. During solar events, maximum protection is applied to critical components

Development Standards and Best Practices

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

History of Enhancements

1. Space-Radiation-Tolerant Variational Autoencoder (v1.0.1) 🚀

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:

🏭 Production-Ready Features

  • 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

🧪 Comprehensive Testing & Validation

  • 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

🔬 Advanced Generative Modeling

  • 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

🛡️ Space-Grade Radiation Tolerance

  • Protected Neural Networks: All VAE components use ProtectedNeuralNetwork with 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

🛰️ Mission-Critical Applications

  • 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

🌌 Space Environment Validation

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

📊 Outstanding Performance Results

  • 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

🚀 Deployment Readiness

  • 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

⚠️ Optimization Recommended: - Large-scale batch processing (training scalability) - Extreme radiation environments (>10x normal levels) - Mission-critical systems requiring 100% reliability

🔧 Technical Specifications

  • 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

2. Auto Architecture Search Enhancement (v0.9.7)

  • 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.

2. Galois Field Implementation

  • Added GaloisField template 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

3. Advanced Reed-Solomon Error Correction

  • 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

4. Adaptive Protection System

  • 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

5. Comprehensive Monte Carlo Validation

  • 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

6. Protection Strategy Insights

  • 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

7. Neural Network Fine-Tuning Framework

  • 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

8. Quantum Field Theory Integration

  • 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

9. Memory Safety & Radiation-Tolerant Execution (v0.9.6)

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.

Gradient Size Mismatch Protection (v0.9.4)

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.

Self-Monitoring Radiation Detection

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.

How It Works

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: 1. Dynamic protection adjustment without external sensors 2. Significant reduction in hardware requirements (mass/volume) 3. More efficient resource allocation during mission phases

```cpp // Example: Using internal error statistics for radiation inference auto mission_stats = simulator.getErrorStatistics();

// Check if radiation environment has changed based on internal metrics if (missionstats.errorrate > threshold) { // Dynamically increase protection without external sensors protection.setProtectionLevel(neural::ProtectionLevel::HIGH); memory_controller.enableIntensiveScrubbing(); } ```

Advantages Over External Sensors

  • 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.

Industry Recognition and Benchmarks

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.

Potential Applications

The framework enables several mission-critical applications:

  1. Autonomous Navigation: ML-based navigation systems that maintain accuracy during solar storms or high-radiation zones
  2. Onboard Image Processing: Real-time image classification for target identification without Earth communication
  3. Fault Prediction: ML models that predict system failures before they occur, even in high-radiation environments
  4. Resource Optimization: Intelligent power and thermal management in dynamically changing radiation conditions
  5. Science Data Processing: Onboard analysis of collected data to prioritize downlink content
  6. 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.

Practical Use Cases

The framework has been evaluated in several simulated mission scenarios demonstrating its effectiveness:

LEO Satellite Image Classification

  • 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

Mars Mission Decision Support

  • 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

Deep Space Scientific Instrument Control

  • 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.

Case Studies and Simulated Mission Scenarios

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:

1. Europa Lander Image Classification

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

2. Lunar Gateway Neural Network Inference

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)

3. Mars Rover Real-time Decision Making

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.

Current Limitations

The framework currently has the following limitations:

  1. Hardware Dependency: The framework is designed to work with specific hardware configurations. It may not be suitable for all hardware platforms.
  2. Model Accuracy: The radiation environment models used in the framework are based on empirical data and may not perfectly represent real-world radiation conditions.
  3. Resource Utilization: The framework's protection mechanisms come with a computational overhead. In some scenarios, this overhead may be significant.
  4. 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.

Future Research Directions

While the current framework demonstrates exceptional performance, several avenues for future research have been identified:

  1. Hardware Co-design: Integration with radiation-hardened FPGA architectures for hardware acceleration of TMR voting

  2. Dynamic Adaptation: Self-tuning redundancy levels based on measured radiation environment

  3. Error Prediction: Machine learning-based prediction of radiation effects to preemptively adjust protection

  4. Power Optimization: Techniques to minimize the energy overhead of redundancy in power-constrained spacecraft

  5. Network Topology Hardening: Research into inherently radiation-resilient neural network architectures

  6. Distributed Redundancy: Cloud-like distributed computing approach for redundancy across multiple spacecraft

  7. Quantum Error Correction Integration: Exploring the application of quantum error correction principles to classical computing in radiation environments

  8. 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.

Conclusion

The Space-Radiation-Tolerant machine learning framework has several potential applications:

  1. Satellite Image Processing: On-board processing of images from satellites operating in high-radiation environments.
  2. Space Exploration: Real-time data analysis for rovers and probes exploring planets or moons with high radiation levels.
  3. Nuclear Facilities: Machine learning applications in environments with elevated radiation levels.
  4. Particle Physics: Data processing near particle accelerators or detectors where radiation may affect computing equipment.
  5. High-Altitude Aircraft: ML systems for aircraft operating in regions with increased cosmic radiation exposure.

Troubleshooting

Common Issues

Build Errors

  • 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: bash ./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: ```bash

    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: ```bash # Ubuntu/Debian sudo apt-get install libboost-all-dev

# macOS brew install boost

# Windows (with vcpkg) vcpkg install boost ```

Runtime Issues

  • 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.

Debugging

The framework includes various debugging tools:

  • Set the environment variable RAD_ML_LOG_LEVEL to control log verbosity: bash export RAD_ML_LOG_LEVEL=DEBUG # Options: ERROR, WARNING, INFO, DEBUG, TRACE

  • Enable detailed diagnostics with: bash export RAD_ML_DIAGNOSTICS=1

  • Simulate specific radiation events with the test tools: bash ./build/radiation_event_simulator --environment=LEO --event=SEU

Framework Design Notes

Type-Safe Environment Specification

The framework uses enum classes for type safety rather than strings:

```cpp // In missionenvironment.hpp namespace radml::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, ORBITINSERTION, SCIENCEOPERATIONS, SAACROSSING, SOLARSTORM, SAFE_MODE };

RadiationEnvironment createEnvironment(Environment env);

} // namespace rad_ml::sim ```

Using enum classes instead of strings provides: - Compile-time type checking - IDE autocompletion - Protection against typos or invalid inputs - Better code documentation

License

This project and its work is licensed under the AGPL v3 license

Acknowledgments

  • 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

Contributing

Contributions to improve the framework are welcome. Please follow these guidelines:

How to Contribute

  1. Fork the Repository: Create your own fork of the project
  2. Create a Branch: Create a feature branch for your contributions
  3. Make Changes: Implement your changes, additions, or fixes
  4. Test Thoroughly: Ensure your changes pass all tests
  5. Document Your Changes: Update documentation to reflect your changes
  6. Submit a Pull Request: Create a pull request with a clear description of your changes

Contribution Areas

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

Code Standards

  • 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

Reporting Issues

If you find a bug or have a suggestion for improvement:

  1. Check existing issues to see if it has already been reported
  2. Create a new issue with a clear description and reproduction steps
  3. Include relevant information about your environment (OS, compiler, etc.)

Versioning

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)

Release History

  • 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.

Owner

  • Name: Rishab Nuguru
  • Login: r0nlt
  • Kind: user
  • Location: Fort Collins

Citation (CITATION.md)

# Citing This Work

If you use this framework in your research or project, please cite it as:

```
Nuguru, Rishab. (2025). Radiation-Tolerant Machine Learning Framework.
GitHub repository: https://github.com/r0nlt/Space-Radiation-Tolerant
```

For BibTeX users:
```bibtex
@software{nuguru2025radml,
  author = {Nuguru, Rishab},
  title = {Radiation-Tolerant Machine Learning Framework},
  year = {2025},
  url = {https://github.com/r0nlt/Space-Radiation-Tolerant},
  license = {AGPL v3 license}
}
```


## Usage Notification

Please contact Space Labs AI for commercial use.

GitHub Events

Total
  • Create event: 55
  • Issues event: 17
  • Watch event: 20
  • Delete event: 40
  • Issue comment event: 41
  • Public event: 1
  • Push event: 157
  • Pull request review comment event: 185
  • Pull request review event: 86
  • Gollum event: 2
  • Pull request event: 155
  • Fork event: 3
Last Year
  • Create event: 55
  • Issues event: 17
  • Watch event: 20
  • Delete event: 40
  • Issue comment event: 41
  • Public event: 1
  • Push event: 157
  • Pull request review comment event: 185
  • Pull request review event: 86
  • Gollum event: 2
  • Pull request event: 155
  • Fork event: 3

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 8
  • Total pull requests: 47
  • Average time to close issues: 2 months
  • Average time to close pull requests: about 19 hours
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 0.13
  • Average comments per pull request: 0.66
  • Merged pull requests: 32
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 8
  • Pull requests: 47
  • Average time to close issues: 2 months
  • Average time to close pull requests: about 19 hours
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.13
  • Average comments per pull request: 0.66
  • Merged pull requests: 32
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • r0nlt (10)
Pull Request Authors
  • r0nlt (86)
Top Labels
Issue Labels
enhancement (6) good first issue (2) help wanted (1) Awesome (1) question (1) documentation (1)
Pull Request Labels
documentation (7) enhancement (5) good first issue (2) Awesome (2) bug (1)