-
Table of contents
+
diff --git a/content/course/assignments/capstone.mdx b/content/course/assignments/capstone.mdx
index 43b7f82c..a267bc61 100644
--- a/content/course/assignments/capstone.mdx
+++ b/content/course/assignments/capstone.mdx
@@ -1,377 +1,95 @@
---
-title: 'Capstone Project: Textbook Contribution & Implementation'
+title: 'The VLA Capstone: Engineering the Frontier'
assignment: 3
-due: 'Week 16'
-points: 300
+due: 'Finals Week'
+points: 250
---
-
-
⚠️ DRAFT: NOT YET ASSIGNED
-
This assignment is still under review and subject to change. Do not begin work until this notice is removed.
-
+# The VLA Capstone: From Audit to Architecture
-# Capstone Project: Textbook Contribution & Implementation
+**Weight:** 25% of Final Grade
+**Initial Project Specification Due:** Leading into the Architecture Lab (This Thursday).
+**Mastery Deadline:** Finals Week.
-## Objective
+## The Philosophy: Audit, Implement, Extend
-Make a substantive contribution to the VLA Foundations textbook by authoring technical content, implementing code, and presenting your work to the class.
-
-## Learning Goals
-
-- **Synthesize** knowledge from multiple research papers
-- **Implement** a non-trivial VLA component or experiment
-- **Communicate** technical concepts clearly in writing
-- **Present** findings to a technical audience
+In this course, we do not perform "re-implementations" for the sake of practice. The Capstone is a substantive contribution to the `vlm-robotics.dev` living textbook. You are expected to move from an auditor (Assignment 2) to an architect—identifying a bottleneck, proposing a delta, and proving it via implementation.
## Project Tracks
-Choose **one** of the following tracks:
-
-### Track 1: Research Extension
-
-Extend an existing VLA paper with novel experiments or analysis.
-
-**Requirements:**
-- Reproduce baseline results from a published paper
-- Design and run new experiments that test an unexplored dimension
-- Contribute a textbook section analyzing your findings
-
-**Example Projects:**
-- "Does RT-2 generalize to novel object geometries?" - Test on CAD-generated objects
-- "Scaling laws for VLA data diversity" - Ablate dataset composition
-- "Failure modes of diffusion policies in cluttered scenes" - Systematic failure analysis
+Choose **one** of the following tracks for your technical deep-dive:
-### Track 2: Engineering Implementation
+### Track 1: Research Extension (The "Delta" Track)
+Extend an existing VLA paper with novel experiments.
+- **Requirement:** Reproduce a baseline, then design experiments testing a specific "Initial Dissolve" (e.g., "Does RT-2 generalize to novel object geometries created in simulation?").
+- **Textbook Contribution:** A section analyzing your findings and the "Information Decay" observed.
+### Track 2: Engineering Implementation (The "Systems" Track)
Build a production-grade VLA component from scratch.
+- **Requirement:** Implement a key technique (e.g., an optimized vision encoder for 50Hz control, a cross-embodiment training harness).
+- **Textbook Contribution:** A technical "Implementation Gotchas" guide and practitioners' manual for your component.
-**Requirements:**
-- Implement a key VLA technique (encoder, policy, training pipeline)
-- Write clean, documented, tested code
-- Contribute a textbook section with implementation details
-
-**Example Projects:**
-- "Efficient vision encoder for real-time robotic control" - Optimized transformer
-- "Multi-task policy training framework" - PyTorch training harness
-- "Sim-to-real transfer toolkit" - Domain randomization + evaluation suite
-
-### Track 3: Comprehensive Survey
-
-Write an authoritative survey of a VLA subtopic.
-
-**Requirements:**
-- Read 15-20 papers in a focused area
-- Identify trends, gaps, and open questions
-- Contribute a textbook section synthesizing the literature
-
-**Example Projects:**
-- "Data augmentation strategies for robotic learning" - Survey + taxonomy
-- "Benchmarking protocols for manipulation tasks" - Analysis of evaluation methods
-- "Foundation models for embodied AI: A critical review" - Strengths/weaknesses analysis
-
-## Deliverables
-
-### 1. Proposal (Week 8)
-
-**Submit**: 1-2 page proposal via pull request
-
-**Contents:**
-- Track selection (Research/Engineering/Survey)
-- Problem statement and motivation
-- Planned approach and timeline
-- Expected contribution to textbook
-
-**Grading**: Pass/Fail (instructor feedback provided)
-
-### 2. Textbook Chapter Contribution (Week 16)
-
-**Submit**: MDX file with written content
-
-**Requirements:**
-- 2000-4000 words of technical writing
-- LaTeX equations for mathematical formulations
-- Code snippets (if applicable)
-- References to relevant papers
-- Fits cohesively into one of the 8 textbook chapters
-
-**Location**: `content/textbook/[chapter-name]/your-section.mdx`
-
-**Example Structure:**
+### Track 3: Synthesis & Taxonomy (The "Survey" Track)
+Write an authoritative survey of a VLA sub-domain.
+- **Requirement:** Read 15-20 papers. Identify the "Lineage of Failure" and the scaling laws of the sub-topic.
+- **Textbook Contribution:** A foundational chapter synthesizing the literature into a cohesive taxonomy.
-```mdx
---
-title: "3.5 Your Section Title"
-chapter: 3
-subsection: 5
-author: "Your Name"
----
-
-# 3.5 Your Section Title
-
-## Motivation
-
-Why does this topic matter?
-
-## Background
-
-What do readers need to know?
-
-## Method
-
-How does it work? (Include equations)
-
-## Results
-
-What did you find? (Include figures/tables)
-
-## Discussion
-
-What are the implications?
-
-## References
-
-[Numbered references]
-```
-
-### 3. Code Implementation (Weeks 12-16)
-
-**Required for Research & Engineering tracks** (optional for Survey track)
-
-**Submit**: Pull request with code
-
-**Requirements:**
-- Clean, documented Python code
-- README with setup instructions
-- Example usage / demo script
-- Unit tests (if applicable)
-
-**Location**: `code/capstone/your-project-name/`
-
-**Grading Criteria:**
-- Code quality and organization (30%)
-- Documentation and comments (30%)
-- Functionality and correctness (40%)
-### 4. Final Presentation (Week 16)
+## Technical Requirements
-**Format**: 15-minute presentation + 5-minute Q&A
+### 1. The Architectural Delta
+Your project must identify a specific bottleneck in a "Primary Paper." You are not parrots; you are auditors. If you choose Track 1 or 2, you must justify your architectural changes using the **Amazon Principle**: write a technical specification that proves why this change is necessary.
-**Contents:**
-1. Problem statement and motivation (2 min)
-2. Approach and methodology (5 min)
-3. Results and findings (5 min)
-4. Textbook contribution overview (2 min)
-5. Lessons learned and future work (1 min)
+### 2. The Data Mix
+You must explicitly define your data curation strategy:
+- **Foundational Priors:** Which internet-scale weights (SigLIP, DINOv2) are you using?
+- **Embodied Data:** Which subset of Open X-Embodiment or DROID are you sampling?
+- **Synthetic Multiplication:** Are you using *MimicGen* or *RoboGen* to scale your seeds?
-**Slides**: Submit PDF via pull request
+### 3. Formalized Logic & Derivations
+Your documentation must be grounded in $\LaTeX$.
+- Derive your specific loss function $\mathcal{L}_{total}$.
+- Define the state-space $S$ and the action-space $A$ (e.g., Delta-EE, Joint Velocities, or Latent Tokens).
-## Timeline
+### 4. Semantic Form
+All MDX contributions must follow the **Semantic Line Break** rule (one sentence per line). This is mandatory for the PR review process.
-| Week | Milestone |
-|------|-----------|
-| 8 | Proposal due |
-| 10 | Progress check-in (office hours) |
-| 12 | Draft textbook section (optional feedback) |
-| 14 | Code implementation complete |
-| 16 | Final presentation + all deliverables due |
-
-## Grading Rubric (300 points)
-
-| Component | Points |
-|-----------|--------|
-| **Textbook Contribution** | **150** |
-| - Technical accuracy | 50 |
-| - Writing clarity | 40 |
-| - Integration with existing chapters | 30 |
-| - References and citations | 30 |
-| **Implementation / Code** | **100** |
-| - Functionality | 40 |
-| - Code quality | 30 |
-| - Documentation | 30 |
-| **Presentation** | **50** |
-| - Content clarity | 20 |
-| - Slide quality | 15 |
-| - Q&A responses | 15 |
-| **Total** | **300** |
-
-## Evaluation Criteria
-
-### Textbook Contribution
-
-**Excellent (90-100%)**:
-- Novel insights or analysis
-- Crystal-clear explanations
-- Publication-quality figures and equations
-- Comprehensive references
-
-**Good (80-89%)**:
-- Accurate technical content
-- Clear writing with minor issues
-- Relevant figures and equations
-- Adequate references
-
-**Acceptable (70-79%)**:
-- Mostly accurate content
-- Understandable but needs polish
-- Basic figures/equations
-- Some key references missing
-
-### Code Implementation
-
-**Excellent (90-100%)**:
-- Production-ready code
-- Comprehensive documentation
-- Runs out-of-the-box
-- Includes tests and examples
-
-**Good (80-89%)**:
-- Functional code
-- Adequate documentation
-- Minor setup issues
-- Basic examples
-
-**Acceptable (70-79%)**:
-- Code works with effort
-- Minimal documentation
-- Requires debugging
-- No examples
-
-### Presentation
-
-**Excellent (90-100%)**:
-- Engaging and clear
-- Well-structured slides
-- Confident Q&A responses
-- On time
-
-**Good (80-89%)**:
-- Clear presentation
-- Decent slides
-- Handles most questions
-- Slightly over/under time
-
-**Acceptable (70-79%)**:
-- Understandable content
-- Basic slides
-- Struggles with some questions
-- Noticeable timing issues
-
-## Submission Process
-
-### Proposal (Week 8)
-
-```bash
-git checkout -b capstone-proposal-yourname
-# Add file: content/course/proposals/yourname-proposal.md
-git add content/course/proposals/yourname-proposal.md
-git commit -m "Add capstone proposal: Your Name"
-git push origin capstone-proposal-yourname
-# Open PR to staging
-```
-
-### Final Submission (Week 16)
-
-```bash
-git checkout -b capstone-final-yourname
-# Add textbook section: content/textbook/[chapter]/your-section.mdx
-# Add code (if applicable): code/capstone/your-project/
-# Add slides: presentations/yourname-final.pdf
-git add .
-git commit -m "Add capstone project: Your Title"
-git push origin capstone-final-yourname
-# Open PR to staging
-```
-
-## Example Projects from Past Semesters
-
-### Research Track
-
-**"Generalization of RT-2 to Novel Objects"** (Jane Doe, 2025)
-- Reproduced RT-2 baseline on Open-X dataset
-- Generated 50 novel 3D objects with unseen geometries
-- Found 23% performance drop on novel objects
-- Contributed to Chapter 4 (Evaluation)
-
-**"Data Augmentation for Robotic Grasping"** (John Smith, 2025)
-- Implemented 8 augmentation strategies
-- Trained policies with systematic ablations
-- Identified that rotation augmentation improves generalization by 15%
-- Contributed to Chapter 2 (Data)
-
-### Engineering Track
-
-**"Real-Time Vision Encoder for Edge Deployment"** (Alice Johnson, 2025)
-- Implemented MobileViT-based encoder
-- Achieved 30 FPS on Jetson Orin
-- Only 5% accuracy drop vs. ViT-B
-- Contributed to Chapter 5 (Deployment)
-
-**"Multi-Task Policy Training Framework"** (Bob Williams, 2025)
-- Built PyTorch training harness for 10+ tasks
-- Supports multi-GPU, checkpointing, logging
-- Open-sourced with 500+ GitHub stars
-- Contributed to Chapter 3 (Training)
-
-### Survey Track
-
-**"Benchmarking Protocols for Manipulation"** (Carol Lee, 2025)
-- Analyzed 30 papers on manipulation benchmarks
-- Created taxonomy of evaluation metrics
-- Identified reproducibility issues in 60% of papers
-- Contributed to Chapter 4 (Evaluation)
-
-**"Foundation Models for Embodied AI: A Survey"** (David Chen, 2025)
-- Surveyed 40 papers on VLMs for robotics
-- Mapped landscape of architectures and datasets
-- Identified key open problems
-- Contributed to Chapter 7 (Future Directions)
-
-## Resources
-
-### Writing
-
-- [How to Write a Great Research Paper](https://www.microsoft.com/en-us/research/academic-program/write-great-research-paper/)
-- [LaTeX Math Symbols](https://www.overleaf.com/learn/latex/List_of_Greek_letters_and_math_symbols)
-- [MDX Documentation](https://mdxjs.com/)
-
-### Code
-
-- [Google Python Style Guide](https://google.github.io/styleguide/pyguide.html)
-- [PyTorch Best Practices](https://pytorch.org/tutorials/beginner/saving_loading_models.html)
-- [Writing Good Documentation](https://www.writethedocs.org/guide/writing/beginners-guide-to-docs/)
-
-### Presentation
-
-- [How to Give a Great Research Talk](https://www.microsoft.com/en-us/research/academic-program/give-great-research-talk/)
-- [Presentation Tips](https://www.cs.cmu.edu/~wloescher/presentations.html)
+---
-## FAQs
+## Team Structure: The $2\times$ Rule
-**Q: Can I work in a team?**
-A: No, capstone projects must be individual work. However, you can discuss ideas with classmates.
+- **Individual Work:** The baseline for a high-quality contribution.
+- **Group Work (Optional):** If you choose to work in a group, the technical bar for "Mastery" scales linearly. A 2-person team must go **$2\times$ as far**—meaning significantly larger data mixes, more robust baseline comparisons, or cross-embodiment evaluation.
+- **Note:** Groups must provide a "Team Contribution Statement" in their proposal.
-**Q: Can I extend my paper audit into a capstone?**
-A: Yes! If you found an interesting research question during a paper audit, you can explore it further.
+---
-**Q: What if my code doesn't work perfectly?**
-A: Document what worked, what didn't, and why. Partial results are acceptable if well-analyzed.
+## Deliverables & Grading Rubric (250 Points Total)
-**Q: Can I contribute to multiple textbook chapters?**
-A: Focus on one cohesive section. Quality over quantity.
+### 1. Project Specification / Proposal (Pass/Fail - First Architectural Lab)
+Submit via the **VLA Architecture Lab Form**. Includes team members, the "Initial Dissolve," and compute/data requirements.
-**Q: What if my project scope changes?**
-A: Discuss with the instructor. Pivots are allowed with justification.
+### 2. Textbook Chapter Contribution (100 Points)
+- **Technical Accuracy & Rigor (50 pts):** Correct $\LaTeX$, sound mathematical derivations, and deep critique.
+- **Writing & Insights (50 pts):** Must include *Lineage of Failure*, *Intuitive Derivations*, and *Implementation Gotchas*.
-## Getting Help
+### 3. Code Implementation (75 Points)
+- **Functionality & Correctness (50 pts):** Does it solve the stated bottleneck?
+- **Code Quality & Docs (25 pts):** Clean Python, README with setup, and unit tests.
-- **Office Hours**: Every Tuesday/Thursday 3-4 PM
-- **Discussion Forum**: Post questions and get peer feedback
-- **Mid-Project Check-In**: Schedule a meeting in Week 12
+### 4. Final Presentation (75 Points)
+- **Content Density (50 pts):** 15-minute technical brief.
+- **Q&A Rigor (25 pts):** Ability to defend your load-bearing assertions.
-## Final Notes
+---
-The capstone is your opportunity to make a lasting contribution to the VLA research community. Past student projects have been cited in papers, used by other researchers, and featured in the textbook for future cohorts.
+## Submission Process: The PR Workflow
-**Aim for work you'd be proud to showcase in a job interview or PhD application.**
+1. **Branching:** `git checkout -b project/your-handle-topic`
+2. **Pathing:** - **Textbook:** `content/textbook/[chapter]/your-section.mdx`
+ - **Code:** `code/capstone/your-project/`
+ - **Slides:** `presentations/your-name-final.pdf`
+3. **The Loop:** Open a PR to `staging`. A bot will provide a preview link. Iterate until your project reaches **Level 3 (Mastery)** and is merged into the `main` textbook.
-Good luck!
+> **Final Note:** The capstone is your opportunity to make a lasting contribution to the VLA research community. Aim for work you would be proud to showcase in an AI Engineering interview.
diff --git a/content/course/assignments/scratch-1.mdx b/content/course/assignments/scratch-1.mdx
index 2b1f2bce..cdb5636d 100644
--- a/content/course/assignments/scratch-1.mdx
+++ b/content/course/assignments/scratch-1.mdx
@@ -5,11 +5,6 @@ due: 'Sunday, February 1, 9:00 AM MST'
points: 100
---
-
-
⚠️ DRAFT: NOT YET ASSIGNED
-
This assignment is still under review and subject to change. Do not begin work until this notice is removed.
-
-
# Scratch-1: The Transformer Backbone
**Focus**: Implementing the $O(1)$ engine of the VLA stack.
@@ -187,7 +182,9 @@ When I removed the causal mask, the following happened:
### Pass Level (B): 70-89 points
- ✅ Successful implementation of the backbone
-- ✅ Loss converges on the synthetic dataset (< 1.0)
+- ✅ Loss shows clear convergence (appreciable decrease from initial loss)
+ - Expected: Initial loss ~3-4, Final loss ~1.9-2.2
+ - Model should demonstrate learning, not achieve arbitrary threshold
- ✅ Attention maps visualization included
- ✅ Causal mask audit completed
- ✅ Code is clean and documented
@@ -307,6 +304,13 @@ A: Check:
2. Is the learning rate too high? (Try 1e-4)
3. Are gradients exploding? (Enable gradient clipping)
+**Q: What loss should I expect?**
+A: With correct implementation on the synthetic trajectory dataset:
+- **Initial loss**: ~3-4 (near random guessing for 256-way classification)
+- **Final loss**: ~1.9-2.2 (showing clear learning)
+- **Key metric**: Appreciable decrease indicating the model learns patterns
+- The action encoding represents direction + magnitude toward target, which is learnable but not trivial
+
## 11. Deadline
**Due**: Sunday, February 1, 9:00 AM MST
diff --git a/content/course/submissions/scratch-1/Soorej S Nair.mdx b/content/course/submissions/scratch-1/Soorej S Nair.mdx
new file mode 100644
index 00000000..9b291ef7
--- /dev/null
+++ b/content/course/submissions/scratch-1/Soorej S Nair.mdx
@@ -0,0 +1,133 @@
+---
+title: "Scratch-1 Submission: Soorej S Nair"
+student: "Soorej S Nair"
+date: "2026-02-03"
+---
+
+# Scratch-1: The Transformer Backbone
+
+## Loss Curve
+
+
+
+The model converged after around 10 iterations with final loss of 1.9277.
+
+## Attention Visualization
+
+
+
+The attention patterns show the causal mask has worked. The dark upper right triangle does not receive any attention, this demonstrates that because of the causal mask, the future tokens are masked and are not passed into the model. The bright diagonal shows that the model focuses most on the latest token in the input sequence. The attention reduces as we go away from the recent tokens, as expected.
+
+### Sample output
+```
+Using device: cpu
+Epoch 1 Batch 100: avg_loss = 4.142927
+Epoch 1 Batch 200: avg_loss = 3.567831
+Epoch 1/20 - Loss: 3.2584
+Epoch 2 Batch 100: avg_loss = 2.299740
+Epoch 2 Batch 200: avg_loss = 2.243028
+Epoch 2/20 - Loss: 2.2111
+Epoch 3 Batch 100: avg_loss = 2.099218
+Epoch 3 Batch 200: avg_loss = 2.090066
+Epoch 3/20 - Loss: 2.0819
+Epoch 4 Batch 100: avg_loss = 2.046171
+Epoch 4 Batch 200: avg_loss = 2.041124
+Epoch 4/20 - Loss: 2.0388
+Epoch 5 Batch 100: avg_loss = 2.021413
+Epoch 5 Batch 200: avg_loss = 2.018425
+Epoch 5/20 - Loss: 2.0147
+Epoch 6 Batch 100: avg_loss = 2.001702
+Epoch 6 Batch 200: avg_loss = 2.000735
+Epoch 6/20 - Loss: 1.9991
+Epoch 7 Batch 100: avg_loss = 1.989224
+Epoch 7 Batch 200: avg_loss = 1.988070
+Epoch 7/20 - Loss: 1.9868
+Epoch 8 Batch 100: avg_loss = 1.981476
+Epoch 8 Batch 200: avg_loss = 1.981199
+Epoch 8/20 - Loss: 1.9792
+Epoch 9 Batch 100: avg_loss = 1.971384
+Epoch 9 Batch 200: avg_loss = 1.971669
+Epoch 9/20 - Loss: 1.9706
+Epoch 10 Batch 100: avg_loss = 1.963031
+Epoch 10 Batch 200: avg_loss = 1.963841
+Epoch 10/20 - Loss: 1.9645
+Epoch 11 Batch 100: avg_loss = 1.956031
+Epoch 11 Batch 200: avg_loss = 1.958478
+Epoch 11/20 - Loss: 1.9595
+Epoch 12 Batch 100: avg_loss = 1.950375
+Epoch 12 Batch 200: avg_loss = 1.952415
+Epoch 12/20 - Loss: 1.9539
+Epoch 13 Batch 100: avg_loss = 1.945426
+Epoch 13 Batch 200: avg_loss = 1.948742
+Epoch 13/20 - Loss: 1.9498
+Epoch 14 Batch 100: avg_loss = 1.942955
+Epoch 14 Batch 200: avg_loss = 1.944969
+Epoch 14/20 - Loss: 1.9462
+Epoch 15 Batch 100: avg_loss = 1.941023
+Epoch 15 Batch 200: avg_loss = 1.941831
+Epoch 15/20 - Loss: 1.9429
+Epoch 16 Batch 100: avg_loss = 1.936545
+Epoch 16 Batch 200: avg_loss = 1.938385
+Epoch 16/20 - Loss: 1.9388
+Epoch 17 Batch 100: avg_loss = 1.931708
+Epoch 17 Batch 200: avg_loss = 1.934831
+Epoch 17/20 - Loss: 1.9356
+Epoch 18 Batch 100: avg_loss = 1.929214
+Epoch 18 Batch 200: avg_loss = 1.931722
+Epoch 18/20 - Loss: 1.9326
+Epoch 19 Batch 100: avg_loss = 1.926539
+Epoch 19 Batch 200: avg_loss = 1.928762
+Epoch 19/20 - Loss: 1.9301
+Epoch 20 Batch 100: avg_loss = 1.923337
+Epoch 20 Batch 200: avg_loss = 1.926616
+Epoch 20/20 - Loss: 1.9277
+Saved loss curve to /Users/soorejsnair/Documents/code/Course Folder/Spring 26/CSCI 7000/vla-foundations/content/course/submissions/scratch-1/images/loss_curve.png
+Saved attention heatmap to /Users/soorejsnair/Documents/code/Course Folder/Spring 26/CSCI 7000/vla-foundations/content/course/submissions/scratch-1/images/attention_maps.png
+```
+## The Audit: Removing the Causal Mask
+
+When I removed the causal mask, the following happened:
+
+* Loss observed
+
+We see that the loss converges quickly with a final loss of 0.0460 which is much lower than the one with the causal mask. This is because of data leak. Since we do not use causal mask the model uses the future tokens to train the model and causes accuracy to skyrocket since it is predicting tokens it is already trained on.
+
+
+* Attention Map
+
+The attention map also says the same thing, instead of the lower triangle alone, the attention is now spread over all the tokens (including the future tokens)
+
+### Why the Model "Cheats"
+
+* This behaviour shows that, the model makes a prediction using the future rokens, which is unlike the expected behavious of autoregressive models. The model knowing the future token, training on it and then making a prediction with very low loss is considered "cheating"
+
+
+## Why RoPE Is Superior to Sinusoidal Positional Embeddings
+
+In standard sinusoidal positional embeddings, absolute position vectors are added directly to token embeddings before attention is computed. This causes the dot-product attention score to entangle content and absolute position, making the model sensitive to when a pattern occurs rather than how tokens relate to each other.
+
+Rotary Positional Embeddings (RoPE) instead apply a position-dependent rotation to the query and key vectors. This transforms the attention score as:
+
+$ (R(i)q_i)^\top (R(j)k_j) = q_i^\top R(j - i) k_j $
+
+
+This formula shows that attention depends explicitly on the relative difference between the tokens rather than on their absolute positions. For spatial and trajectory data, where motion patterns are translation-invariant, this is a more appropriate inductive bias.
+
+### Ablation: RoPE vs Sinusoidal Embeddings
+
+We trained two identical models differing only in their positional encoding scheme. The RoPE-based model converged faster and achieved lower final loss (1.9277) compared to the sinusoidal baseline(1.9858). This confirms that relative positional encoding improves learning efficiency and generalization for spatial robot trajectories.
+
+
+
+## Code Highlights
+
+* **Configurable Positional Encoding (RoPE vs. Sinusoidal).**
+ * The implementation supports both Rotary Positional Embeddings (RoPE) and sinusoidal positional embeddings using the global variable SINUSOIDAL flag. When SINUSOIDAL is False, RoPE embeddings are used and when SINUSOIDAL = True, absolute sinusoidal embeddings are passed to the model.
+
+* **KV caching for efficient inference.**
+
+ * KV caching reduces inference complexity from O(T²) to O(T) by reusing key/value tensors across decoding steps. Empirically, generation latency per token drops significantly after the first token.
+
+* **Causal mask control**
+ * Causal masking is implemented explicitly using a lower-triangular attention mask and can be toggled via the CAUSAL_MASKING flag. This allowed direct inspection of the “causal cheating” behavior when the mask is disabled, making the effect of information leakage easy to observe both in loss curves and attention visualizations.
+
diff --git a/content/course/submissions/scratch-1/images/attention_maps.png b/content/course/submissions/scratch-1/images/attention_maps.png
new file mode 100644
index 00000000..3915b39e
Binary files /dev/null and b/content/course/submissions/scratch-1/images/attention_maps.png differ
diff --git a/content/course/submissions/scratch-1/images/attention_maps_sinusoidal.png b/content/course/submissions/scratch-1/images/attention_maps_sinusoidal.png
new file mode 100644
index 00000000..60711548
Binary files /dev/null and b/content/course/submissions/scratch-1/images/attention_maps_sinusoidal.png differ
diff --git a/content/course/submissions/scratch-1/images/attention_maps_without_causal_mask.png b/content/course/submissions/scratch-1/images/attention_maps_without_causal_mask.png
new file mode 100644
index 00000000..b7ca6c1e
Binary files /dev/null and b/content/course/submissions/scratch-1/images/attention_maps_without_causal_mask.png differ
diff --git a/content/course/submissions/scratch-1/images/loss_curve.png b/content/course/submissions/scratch-1/images/loss_curve.png
new file mode 100644
index 00000000..1a1780c4
Binary files /dev/null and b/content/course/submissions/scratch-1/images/loss_curve.png differ
diff --git a/content/course/submissions/scratch-1/images/loss_curve_sinusoidal.png b/content/course/submissions/scratch-1/images/loss_curve_sinusoidal.png
new file mode 100644
index 00000000..46777ba2
Binary files /dev/null and b/content/course/submissions/scratch-1/images/loss_curve_sinusoidal.png differ
diff --git a/content/course/submissions/scratch-1/images/loss_curve_without_causal_mask.png b/content/course/submissions/scratch-1/images/loss_curve_without_causal_mask.png
new file mode 100644
index 00000000..6eb5dac8
Binary files /dev/null and b/content/course/submissions/scratch-1/images/loss_curve_without_causal_mask.png differ
diff --git a/data/trajectories.pkl b/data/trajectories.pkl
new file mode 100644
index 00000000..d5b55493
Binary files /dev/null and b/data/trajectories.pkl differ
diff --git a/grading_reports/GRADING_REPORT.md b/grading_reports/GRADING_REPORT.md
new file mode 100644
index 00000000..ad99928c
--- /dev/null
+++ b/grading_reports/GRADING_REPORT.md
@@ -0,0 +1,65 @@
+
+### 🤖 Chris's Grading Assistant - Feedback Report
+
+**Student:** @Soorej30
+**PR:** #45
+**Branch:** `scratch-1-Soorej30`
+
+Hi! I've reviewed your submission. Here's what I found:
+
+---
+
+## 📊 Component Feedback
+
+### ✅ Causal Self-Attention
+
+✅ Perfect! Your causal mask correctly prevents future token leakage.
+
+✅ Test passed.
+
+### ✅ RMSNorm
+
+✅ RMSNorm implemented correctly with proper normalization and learnable scale.
+
+✅ Test passed.
+
+### ✅ Training Loop
+
+✅ Excellent! Your model trains successfully and loss converges.
+
+### ✅ RoPE Embeddings
+
+✅ RoPE correctly applied to Q and K tensors.
+
+### ✅ Model Architecture
+
+✅ Model forward pass works end-to-end with correct output shapes.
+
+✅ Model has the expected number of trainable parameters.
+
+### ✅ Code Quality
+
+Your code imports and runs cleanly. Nice! ✨
+
+---
+
+## 📝 Documentation & Analysis
+
+✅ Report submitted! I found:
+- `content/course/submissions/scratch-1/Soorej S Nair.mdx`
+- `README.md`
+
+Your instructor will review the quality of your analysis.
+
+---
+
+## 🎯 Mastery Features Detected
+
+I noticed you implemented:
+- RoPE vs Sinusoidal ablation study
+
+Great work going beyond the requirements! Your instructor will verify implementation quality.
+
+---
+
+> *Grading is automated but reviewed by an instructor. If you have questions, reach out on Slack!*
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 00000000..fa8661a8
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,55 @@
+[project]
+name = "vla-foundations"
+version = "0.1.0"
+description = "VLA Foundations Course - Private Instructor Repository"
+readme = "README.md"
+requires-python = ">=3.10,<3.14"
+dependencies = [
+ "torch>=2.0.0",
+ "torchvision",
+ "numpy>=1.24.0",
+ "pytest>=7.0.0",
+ "pytest-html>=4.0.0",
+ "matplotlib>=3.5.0",
+ "pandas>=2.0.0",
+]
+
+[[tool.uv.index]]
+name = "pytorch-cpu"
+url = "https://download.pytorch.org/whl/cpu"
+explicit = true
+
+[[tool.uv.index]]
+name = "pytorch-cu118"
+url = "https://download.pytorch.org/whl/cu118"
+explicit = true
+
+[tool.uv.sources]
+torch = [
+ { index = "pytorch-cpu", marker = "sys_platform == 'darwin'" },
+ { index = "pytorch-cu118", marker = "sys_platform == 'linux'" }
+]
+torchvision = [
+ { index = "pytorch-cpu", marker = "sys_platform == 'darwin'" },
+ { index = "pytorch-cu118", marker = "sys_platform == 'linux'" }
+]
+
+[tool.hatch.build.targets.wheel]
+packages = []
+
+[tool.pytest.ini_options]
+markers = [
+ "internal: internal grading tests (never public)",
+ "rigor: rigorous grading tests",
+ "gradient: gradient flow tests",
+ "fidelity: output comparison tests",
+ "training: training convergence tests",
+ "mastery: optional mastery-level features (DINOv2, KV-cache, etc.)",
+]
+testpaths = ["tests"]
+python_files = ["test_*.py"]
+python_classes = ["Test*"]
+python_functions = ["test_*"]
+
+[dependency-groups]
+dev = []
diff --git a/pytest.ini b/pytest.ini
new file mode 100644
index 00000000..ea7a96da
--- /dev/null
+++ b/pytest.ini
@@ -0,0 +1,13 @@
+[pytest]
+testpaths = tests
+python_files = test_*.py
+python_classes = Test*
+python_functions = test_*
+markers =
+ public: Tests that students can see and run
+ internal: Internal grading tests (never public)
+ rigor: Rigorous validation tests for grading
+ gradient: Tests for gradient flow validation
+ fidelity: Tests for output quality validation
+ training: Tests for training convergence
+ mastery: Optional mastery-level features (DINOv2, KV-cache, etc.)
diff --git a/scripts/README.md b/scripts/README.md
new file mode 100644
index 00000000..0e328843
--- /dev/null
+++ b/scripts/README.md
@@ -0,0 +1,49 @@
+# CI/CD Scripts
+
+**Critical infrastructure scripts** used in GitHub Actions workflows.
+
+## Contents
+
+### Production Scripts
+
+- **`manage_solutions.py`** - Inject/reset assignment solutions (used in testing)
+- **`sanitize.sh`** - Main sanitization pipeline for public sync
+- **`_sanitize_todos.py`** - Remove solution hints from code
+- **`audit_linter.py`** - Validate paper audit MDX files
+
+### Usage in CI/CD
+
+| Script | Workflow | Purpose |
+|--------|----------|---------|
+| `audit_linter.py` | `vla-audit.yml` | Validate audit frontmatter |
+| `sanitize.sh` | `sync-to-public.yml` | Remove private content |
+| `_sanitize_todos.py` | `sync-to-public.yml` | Strip solution hints |
+| `manage_solutions.py` | (local testing) | Inject/reset solutions |
+
+### Critical Requirements
+
+1. **Fail-Safe**: All scripts must return non-zero exit codes on failure
+2. **Idempotent**: Can be run multiple times safely
+3. **Validated**: Must pass linting before sync
+4. **Documented**: Clear error messages and usage
+
+## Development Scripts
+
+Local development helpers are in `scripts/dev/`. These are **not** used in CI/CD.
+
+## Modification Guidelines
+
+Changes to scripts in this directory affect production workflows. Always:
+
+1. Test locally first
+2. Verify exit codes
+3. Check GitHub Actions logs
+4. Update documentation
+
+## Security
+
+These scripts handle sensitive operations:
+- `sanitize.sh` - Removes private content before public sync
+- `manage_solutions.py` - Manages private solutions
+
+Never commit secrets or tokens to these scripts.
diff --git a/scripts/audit_linter.py b/scripts/audit_linter.py
index 8ecfa1b8..ff1952a6 100755
--- a/scripts/audit_linter.py
+++ b/scripts/audit_linter.py
@@ -32,6 +32,62 @@ def check_semantic_breaks(file_path):
)
return errors
+def validate_frontmatter(file_path, content, lines):
+ """Validate YAML frontmatter contains required fields."""
+ errors = []
+
+ # Extract frontmatter
+ if not content.startswith('---'):
+ errors.append(
+ f"{file_path}: Missing YAML frontmatter. File must start with '---' followed by "
+ "title, author, paper, and topic fields."
+ )
+ return errors
+
+ # Find the end of frontmatter
+ frontmatter_end = None
+ for i, line in enumerate(lines[1:], start=1):
+ if line.strip() == '---':
+ frontmatter_end = i
+ break
+
+ if frontmatter_end is None:
+ errors.append(
+ f"{file_path}: Malformed YAML frontmatter. Missing closing '---'."
+ )
+ return errors
+
+ frontmatter_lines = lines[1:frontmatter_end]
+ frontmatter_text = '\n'.join(frontmatter_lines)
+
+ # Required fields for audit MDX files
+ required_fields = ['title', 'author', 'topic', 'paper']
+
+ for field in required_fields:
+ # Check if field exists (case-insensitive)
+ if not any(line.strip().lower().startswith(f'{field}:') for line in frontmatter_lines):
+ errors.append(
+ f"{file_path}: Missing required frontmatter field: '{field}'"
+ )
+
+ # Validate field values are not empty
+ for line in frontmatter_lines:
+ stripped = line.strip()
+ if ':' in stripped:
+ field_name, field_value = stripped.split(':', 1)
+ field_name = field_name.strip().lower()
+ field_value = field_value.strip()
+
+ if field_name in required_fields:
+ # Check for empty values or placeholder values
+ if not field_value or field_value in ['""', "''", 'null', 'TBD', 'TODO']:
+ errors.append(
+ f"{file_path}: Empty or placeholder value for required field: '{field_name}'"
+ )
+
+ return errors
+
+
def check_mdx_syntax(file_path):
"""Check for MDX-specific syntax issues."""
with open(file_path, 'r', encoding='utf-8') as f:
@@ -40,12 +96,8 @@ def check_mdx_syntax(file_path):
errors = []
- # Check 1: Must have YAML frontmatter at the start
- if not content.startswith('---'):
- errors.append(
- f"{file_path}: Missing YAML frontmatter. File must start with '---' followed by "
- "title, author, paper, and topic fields."
- )
+ # Check 1: Validate frontmatter fields
+ errors.extend(validate_frontmatter(file_path, content, lines))
# Check 2: No HTML comments (should use JSX-style {/* */})
if '