Introduction
Computational notebooks, such as Jupyter, have become the gold standard for data science by integrating code, results, and narrative text into a single document. However, as these notebooks grow in complexity, they often suffer from a "linear layout" problem. In a standard notebook, the explanation for a specific chart might be screens away from the code that generated it, creating what researchers call a "scrolling nightmare."
InterLink is a JupyterLab plugin designed to address these challenges by transforming the traditional linear notebook into a side-by-side layout. By explicitly linking descriptive text to its corresponding code and output, InterLink reduces the cognitive burden on readers and improves the overall understanding of complex data analyses.
The Problem: The "Scrolling Nightmare"
The authors identify three core pain points that hinder the readability of traditional notebooks:
- Relationship Inference: It is often difficult to discern which paragraph refers to which specific code block or visualization.
- Demanding Cross-Referencing: Readers expend significant cognitive energy scrolling back and forth to connect narrative descriptions with their technical counterparts.
- Disrupted Focus: The interleaving of different content types (text, code, and plots) makes it difficult for users to stay "in the zone" for a specific part of the analysis.
Essentially, while notebooks are excellent for writing code, the linear structure often makes them a nightmare to read and synthesize.
The InterLink Approach
InterLink was developed based on five key design requirements derived from a formative study with experienced notebook users. The system moves away from the single-column scroll in favor of a more structured, dual-column interface.
Key Features
- Side-by-Side Layout: The interface is split into two columns—narrative text on the left, and code/outputs on the right.
- Heuristic-Based Alignment: Rather than simply splitting the screen, InterLink uses a heuristic algorithm to position text cells as close as possible to their related code or output while maintaining the original narrative order.
- Visual Linking: The system uses aggregated links (lines connecting text to code) and fine-grained cues, such as color-coded underlines in text and dashed "sketches" over plots, to highlight specific segments of interest.
- Interactive Focus Modes:
- Hover-to-Highlight: Hovering over a link highlights all related components.
- "Shift" Focus Mode: By pressing the Shift key, users can filter out all unrelated cells, allowing them to concentrate solely on one specific "thread" of the analysis.
- Click-to-Fix: Users can "pin" a cell so it remains visible while they navigate other related parts of the notebook.
Evaluation and Results
To evaluate InterLink, the authors utilized two complex, real-world notebooks from Kaggle: the House Prices notebook (55 text cells, 32 code cells) and the Titanic notebook (49 text cells, 52 code cells).
A within-subject study involving 12 participants (graduate students and engineers) compared InterLink to the standard JupyterLab interface. The results demonstrated significant improvements across several metrics:
- Accuracy: Participants were 13.6% more accurate at answering complex questions about the notebooks when using InterLink.
- Efficiency: InterLink users achieved a significantly lower Inverse Efficiency Score (IES), reaching correct answers faster and with less effort.
- Usability: The tool received a System Usability Scale (SUS) score of 76.5, placing it in the top 20% of applications for usability.
- Qualitative Feedback: Users praised the "Shift" focus mode and the side-by-side layout for providing a "holistic view" that made the notebook's structure immediately apparent.
Discussion and Future Work
A key insight from the study is the "Finding vs. Understanding" gap. In standard interfaces, users spend the majority of their time retrieving information (scrolling and searching). InterLink flips this ratio, allowing users to spend more time processing the actual logic of the data science. By reducing the "mental tax" of remembering details while scrolling, the tool facilitates deeper comprehension.
Limitations
Despite its success, InterLink currently has several limitations:
- Manual Annotation: Relationships between cells must currently be specified manually. The authors identify automatic relationship mining—potentially using Large Language Models (LLMs) or static code analysis—as the next major step.
- Learning Curve: Some users found the transition from a linear to a side-by-side layout slightly jarring initially.
- Dynamic Layouts: Future iterations may include resizable columns and better handling of link maintenance as users edit and re-run cells in a live environment.
Conclusion
InterLink demonstrates that by rethinking the spatial relationship between narrative and code, we can significantly improve the readability of computational notebooks. By moving from a linear scroll to a linked, side-by-side interface, InterLink helps data scientists and readers alike navigate the complexity of modern data analysis with greater precision and less cognitive strain.
Summary updated