# Lever Position from Mouse Brain Activity

*English translation by SOTA – AI Community of the Japanese original, shared under CC BY-NC-SA 3.0 IGO like the original. Organisers who would like this translation removed can email sota.ai.community@gmail.com.*

*Competition overview of the Kaggle competition "[Playground]JOAI Competition 2026": "A competition page equivalent to JOAI Competition 2026".*

## What is JOAI2026?

The Japan Olympiad in Artificial Intelligence (JOAI) was held from 5 to 15 February 2026 and also served as the selection of Japan's national team for the International Olympiad in Artificial Intelligence (IOAI), one of the international science olympiads. This competition makes content equivalent to JOAI2026 available for practice.

## Summary

In this competition, you will build a prediction model that estimates, from a mouse's brain activity data, how far the mouse is pulling a lever (the lever position). The brain activity was measured with a technique called wide-field calcium imaging and is provided as multiple time-series signals, one for each brain region. Using the brain activity information at each time point, predict the lever position at the same time point, as a time series.

![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1305588%2F0aed7bf1a5a5329bffb670ecb74c40ce%2F2026-02-04%2023.18.56.png?generation=1770214749802924&alt=media)

*Figure labels (translated): brain activity (time series) → AI model → predicted values, compared with the ground truth. "The figure is for illustration only."*

## Description

### Data for this competition

In this competition, you will build a model that estimates **the position (state) of the lever at each time point** from the mouse's brain activity. Predictions are made **for every time step of the time series**.

The information available is mainly of the following three kinds.

- **Experimental information** (e.g. mouse ID, experiment day, time information)
- **Brain activity information** (time-series signals obtained by wide-field calcium imaging; explained below)
- **Lever state (target)**

Because the lever state (target) is the quantity to be predicted, it is **included only in the train data** and **is not included in the test data**.

For details such as the data format, the meaning of the columns and the granularity of the time series provided, see the Data tab.


### The mouse experiment

The mice perform the following learning task (behavioural experiment).

**A sound (cue) is played** → **the mouse pulls the lever and holds it for a set time** → **a reward (water) is given**

The sound is presented at random times, after which the mouse may or may not pull the lever.  
The experiment is designed so that, as the trials accumulate, the mouse is expected to learn the relationship "if I pull the lever when the sound plays, I get a reward".

![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1305588%2Fe80b1f5cc4d4a48eb1f9858e5e264263%2Fjoai2026_mouse_experiment.png?generation=1767014030183908&alt=media)

Note: detailed event information from the experiment, such as the timing of the "reward" and the "sound", is not included in this data (the data have been arranged in the form needed so that the analysis concentrates on the prediction task).


### Brain activity (wide-field Ca²⁺ imaging)

The brain activity data provided in this competition are based on signals measured with a technique called **wide-field calcium imaging (wide-field Ca²⁺ imaging)**.

When a nerve cell (neuron) is stimulated, it produces a small electrical signal, which travels to the far end of the cell. When the signal reaches the terminal, a switch is turned on that passes the information on to the next cell. One of the key substances in this process is **Ca²⁺ (calcium ions)**. When a neuron is active, Ca²⁺ temporarily flows into the cell, and this rise in Ca²⁺ triggers the neuron to send a message to the next cell.

Calcium imaging uses a mechanism by which cells light up when Ca²⁺ increases: by observing the changes in Ca²⁺ that result from neural activity, it observes the activity of neurons indirectly.

Wide-field calcium imaging records activity over a wide area covering the whole surface of the brain (the cerebral neocortex). Because it observes such a wide area, its resolution is low; it is used to analyse activity patterns across regions rather than the activity of single cells.

For this wide-field calcium imaging, the Data tab explains how it was measured and preprocessed in this dataset and the form in which it is provided (sensor values per region, etc.).



### Source data of the competition

This competition was created from the data of the following paper.

>Kondo, M., Sehara, K., Harukuni, R. et al. Multimodal dataset linking wide‐field calcium imaging to behavior changes in operant lever‐pull task in mice. Sci Data 12, 1264 (2025). 
https://doi.org/10.1038/s41597-025-05482-y


You may read the paper to understand the dataset in detail, but please note that using that dataset is prohibited.

## Evaluation

The predictions of the state of "lever" are evaluated with the MSE (Mean Squared Error).

The MSE is one of the metrics that express "how far off" the predictions are.  
It is **the mean of the squared differences between the predictions and the correct values**.
In Japanese it is called "heikin nijō gosa" (平均二乗誤差, mean squared error).

The MSE has the following properties:
- the smaller, the better (the closer to 0, the more accurate the predictions)
- it penalises "predictions that are far off" heavily

When there are $n$ data points, with the correct value $y_i$ and the prediction $\hat{y}_i$, the formula is:

$$
\mathrm{MSE}=\frac{1}{n}\sum_{i=1}^{n}\left(\hat{y}_i-y_i\right)^2
$$

- $y_i$: the correct value (the true value)
- $\hat{y}_i$: the predicted value
- $\hat{y}_i - y_i$: the error (deviation)

Squaring this and taking the mean gives the MSE.

![MSE example](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1305588%2Fdde91e1f348e74b1b4c0f9908bfd6b79%2Fmse.jpg?generation=1770095090022390&alt=media)

*Figure (translated): worked example of the MSE (Mean Squared Error).*

| | Prediction | Correct value | Squared difference (squared error) |
|---|---|---|---|
| 1. | 2 | 3 | $(2-3)^2 = 1$ |
| 2. | 4 | 2 | $(4-2)^2 = 4$ |
| 3. | 6 | 6 | $(6-6)^2 = 0$ |
| 4. | 8 | 7 | $(8-7)^2 = 1$ |

*Sum: $1+4+0+1 = 6$. Mean (MSE): $6 / 4$ (number of data points $n=4$) $= 1.5$. $\mathrm{MSE} = \frac{1}{n} \sum (\text{prediction} - \text{correct value})^2$.*

## Timeline

- 27 February 2027, 18:00 – End  

All times are Japan Standard Time (JST) unless otherwise stated. The organisers reserve the right to update the competition schedule if they consider it necessary.

## Submission File

For each index in the evaluation set, you must predict the state of the lever. Create the file in the following format, including the header.

```python
id, lever
mouse_78_day_4_002_0, 0.0
mouse_78_day_4_002_1, 0.0
mouse_78_day_4_002_2, 0.0
mouse_78_day_4_002_3, 0.0

etc.
```
For a detailed description of the columns, see the Data tab.

## Special Thanks

In planning and designing this competition, we received a wide range of valuable advice and support from Kaggle Competitions Grandmaster tk (https://www.kaggle.com/tanakar) and fellow Grandmaster Junkoda (https://www.kaggle.com/junkoda), drawing on the deep expertise and extensive experience they have gained through competitions. We record this here with our sincere gratitude.
