Skip to content

Conversation

@KartikP
Copy link
Contributor

@KartikP KartikP commented May 14, 2025

Do not merge.

Add a description.

@aneesabeck
Copy link

Initial implementation of Brain-Score layer visualization tool

Author: Aneesa Beckford

Summary:
This pull request introduces the complete first version of the Brain-Score interactive layer visualization tool, developed as part of my UROP project.
The goal of this tool is to provide an interactive visualization of brain-model layer architectures and their relationships, enabling researchers to quickly inspect layer metadata, structure, and connectivity. It is designed to support scalable and interactive integration into model card visualizations for the Brain-Score platform.

Features Implemented:

  • Interactive Layer Rendering
    • Renders each layer as a 3D block using SVG <rect> and <polygon> elements (front, top, side).
    • Text labels identify each layer visually.
  • Layer Colors
    • Yellow: Layer is associated to a brain region
    • Green: No associated region annotation
  • Zoom & Pan Support
    • Implements D3’s zoom() behavior to allow smooth scaling and translation across complex architectures.
    • Limits scale extent to keep interaction manageable.
  • Metadata Inspection
    • Clicking on a layer displays a floating tooltip with detailed metadata.
    • Shift-click allows multi-layer selection, populating a side panel with combined metadata.
  • Connection Arrows
    • Directed connections between layers are rendered as straight or curved Bezier paths.
    • Includes self-loop arrows for recurrent connections.
    • Arrowheads are styled using SVG definitions and scale properly with zoom.
  • Dynamic Layout Logic
    • Layer positions are dynamically computed based on dimensions provided in JSON input.
  • Robust User Experience
    • Clicking outside a layer clears selections and tooltips.
    • Visual highlighting makes selected layers easily identifiable.

Final Visualization Demo:

final-brainscore-visualization.mov

Future Enhancements:

  • Extend visualization to support real neural networks beyond the current dummy architecture.
  • Replace hardcoded or placeholder layer data with dynamic loading from actual model metadata.

@KartikP KartikP requested review from mike-ferguson and removed request for mike-ferguson May 19, 2025 22:19
Copy link
Contributor Author

@KartikP KartikP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything LGTM! Suggested some small changes. Once you do that, happy to approve.

@@ -1,5 +1,4 @@
asgiref==3.7.2
backports.zoneinfo==0.2.1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be related to the use of Python 3.11 vs 3.8. Related to #346

@KartikP KartikP closed this May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants