FalconCode
FalconCode is a large-scale dataset of student programming solutions, collected from multiple introductory programming courses.
It is designed for research on automatic programming feedback, code understanding, and educational AI.
The dataset has been curated and processed for SIGCSE 2024 and is described in detail in the FalconCode project page.
Dataset Summary
FalconCode contains programming assignments, student submissions, execution results, and rich metadata from three introductory programming courses.
It provides both the original problem statements (in Markdown) and cleaned/compilable student code.
This dataset enables research in:
- Automated feedback generation
- Code grading
- Program repair
- Code embeddings and representation learning
- Programming pedagogy
Two main subsets are provided:
full
– All submissions (including non-compiling code)submitted
– Filtered set of submissions that compile, from standalone assignments only (i.e., those which can be automatically evaluated through unit tests)
Supported Tasks and Benchmarks
This dataset can be used for:
- Code Completion (fill-in-the-middle or prefix completion)
- Code Classification (e.g., correct vs. incorrect, concept tagging)
- Feedback Generation (free-text)
- Program Repair
- Educational Modeling (student modeling, performance prediction)
Dataset Structure
Data Fields
Each record contains:
Field | Description |
---|---|
problem_id |
Unique problem identifier |
course_id |
Course identifier (2=train, 3=validation, 4=test) |
source_code |
Cleaned Python source code |
original_source_code |
Original unmodified source code |
score |
Unit test score (float, -1 if not executed) |
concepts |
List of programming concepts covered |
prompt |
Problem description in Markdown |
type |
Problem type (e.g., "lab", "project") |
student_id (if present) |
Anonymized student identifier |
Additional metadata fields from course logs |
Data Splits
Splits are defined by course:
Split | course_id | Description |
---|---|---|
train |
2 | Training data |
validation |
3 | Validation data |
test |
4 | Test data |
Each split is further sharded into 10 parquet files for efficient streaming.
Processing
The raw CSVs were processed with the following pipeline:
Load and merge:
- Problem statements (
falconcode_v1_table_problems.csv
) - Code samples (
falconcode_v1_code_samples.csv
) - Run results (
falconcode_v1_table_runs.csv
)
- Problem statements (
Prompt cleaning:
- HTML problem statements converted to Markdown
Concept extraction:
- Programming concept columns collapsed into a single
concepts
list
- Programming concept columns collapsed into a single
Filtering (for the "submitted" subset):
- Removed non-standalone assignments (e.g., those requiring external files or which cannot be automatically evaluated with unit tests)
- Removed
project
-type problems - Removed submissions with
score = -1
- Dropped rows with missing data
Code compilation check:
submitted
subset contains only code that compiles
Code cleaning:
- Normalized formatting and whitespace for consistency
Subsets
full
: All available submissions from all assignments (including non-compiling ones)submitted
: Only submissions that compile, for standalone assignments
Usage
from datasets import load_dataset
# Load the "submitted" subset for training
ds = load_dataset("username/falconcode", "submitted")
print(ds["train"][0])
Citation
@inproceedings{10.1145/3545945.3569822,
author = {de Freitas, Adrian and Coffman, Joel and de Freitas, Michelle and Wilson, Justin and Weingart, Troy},
title = {FalconCode: A Multiyear Dataset of Python Code Samples from an Introductory Computer Science Course},
year = {2023},
isbn = {9781450394314},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/3545945.3569822},
doi = {10.1145/3545945.3569822},
abstract = {The lack of large and diverse datasets of student code samples limits some forms of computer science education research. To address this problem, we created FalconCode, a novel collection of over 1.5 million Python programs from over two thousand undergraduate students at the United States Air Force Academy. FalconCode captures over five semesters worth of code samples from our introduction to computing course, which is taken by every student regardless of their academic major. The dataset contains student code submissions for over 800 programming assignments, as well as additional metadata such as the prompt for each assignment, the testcase(s) used to evaluate student submissions, and the specific skills needed to solve each problem. In this paper, we describe the methodology used to create FalconCode and the steps taken to anonymize the data. We then describe FalconCode's data schema, and show how it can support a wide range of research---including those utilizing machine learning (ML) and artificial intelligence (AI). FalconCode is provided free-of-charge, and is available upon request for computer science education research.},
booktitle = {Proceedings of the 54th ACM Technical Symposium on Computer Science Education V. 1},
pages = {938–944},
numpages = {7},
keywords = {computer science education, dataset, student code repository},
location = {Toronto ON, Canada},
series = {SIGCSE 2023}
}
- Downloads last month
- 30