NeuroCde

A machine learning–driven system that models and scores human cognitive load in software.

Description
  • NeuroCode is an AI-powered, human-centered static analysis system that measures the cognitive effort required to understand source code, rather than just structural complexity.

  • Unlike traditional tools that focus on cyclomatic complexity, lines of code, or lint errors, NeuroCode evaluates the mental burden placed on developers while reading and maintaining software.

  • The system begins by parsing source code into an Abstract Syntax Tree (AST) and constructing Control Flow Graphs (CFG) and Data Flow Graphs (DFG) to analyze program structure and execution paths.

  • It extracts advanced cognitive features such as:

    • Nested Mental Stack Depth

    • Branching Density

    • Variable Reuse Entropy

    • Abstraction Jump Frequency

    • Call Graph Depth

    • Recursion Detection

  • These features are combined into a structured feature vector and processed using a Machine Learning regression model to generate a normalized Cognitive Load Score (CLS) between 0–100.

  • The system provides an interactive web dashboard that displays:

    • Overall Cognitive Load Score

    • Function-level complexity analysis

    • Line-by-line cognitive heatmap

    • Visualization of mentally expensive regions

  • NeuroCode is built entirely using open-source technologies such as Python, FastAPI, React, NetworkX, and scikit-learn, ensuring full FOSS compliance and no reliance on proprietary APIs.

  • The project integrates concepts from software engineering, graph theory, machine learning, and cognitive science, making it both technically deep and research-oriented.

  • The tool aims to improve code maintainability, developer productivity, onboarding efficiency, and software quality by quantifying mental strain in codebases.

  • Future enhancements may include multi-language support, IDE integration, CI/CD pipeline integration, and cognitive drift tracking across Git history.

Issues & Pull Requests Thread
No issues or pull requests added.