# NOAI 2026: Product · Sum

**Note: This problem will be evaluated in an environment based on the `noai:2026v1.1` image. Participants should select `noai:2026v1.1` as the training image.**



## 1. Task Description

While sorting through old books, Xiao Zhou discovered a yellowed handwritten ledger. Every page in the ledger recorded four handwritten digits along with their sum and product. However, on the last few pages, although the four digits remain clearly legible, the sum and product columns have been blotted out by ink. Xiao Zhou needs your help to recover these missing values.

In this problem, you are given a **28×112** grayscale image composed of four concatenated handwritten digits (0–9), and are asked to simultaneously predict:

- **Sum**: range 0–36
- **Product**: range 0–6561

This is a dual-target prediction task: given one image as input, output the sum and product of the four digits.



## 2. Dataset

### 2.1 Data Scale

| Split                       | # Images   |
| --------------------------- | ---------- |
| Training Set (Train)        | 10,000     |
| Validation Set (Validation) | 1,000      |
| Test Set (Test)             | 1,000      |
| **Total**                   | **12,000** |

### 2.2 File Naming

Image filenames correspond to sample indices, using 6-digit numbering:

| Split          | Index Range                  |
| -------------- | ---------------------------- |
| Training Set   | `000001.png` to `010000.png` |
| Validation Set | `010001.png` to `011000.png` |
| Test Set       | `011001.png` to `012000.png` |

### 2.3 Image Specifications

| Parameter   | Value          |
| ----------- | -------------- |
| Image size  | 28 × 112       |
| Format      | PNG, grayscale |
| Digit range | 0–9            |

### 2.4 Label Format

The label file (e.g., `train.csv`) contains three columns: `id` (sample index), `sum` (sum), and `product` (product).

Sample data:

| id     | sum  | product |
| ------ | ---- | ------- |
| 000001 | 9    | 12      |
| 000002 | 32   | 4032    |
| 000003 | 18   | 0       |

This indicates that for the image with index `000001`, the sum of the four handwritten digits is 9 and their product is 12.

### 2.5 Training Data Access

During the development phase, participants can only directly access the training set. The validation set and test set are only available in the official evaluation environment; participants must read their storage paths via specified environment variables. Please refer to the [baseline](https://www.bohrium.com/en/notebooks/22512147682) Notebook for details.



## 3. Task

Participants must predict the sum and product of the four handwritten digits in each input image.

- **Input**: A 28×112 grayscale PNG image
- **Output**: Two values — the sum (`sum`) and product (`product`) of the four digits

For example, if the four digits in an image from left to right are `2, 3, 4, 5`, the correct output is:

- `sum = 14`
- `product = 120`



## 4. Submission

Participants must submit a Notebook named `submission.ipynb`. This Notebook should include the complete workflow for training, inference, and result file generation, and must be runnable from scratch in the evaluation environment.

### 4.1 Notebook Output

After the Notebook finishes running, it should generate a compressed file named `submission.zip` at the specified location. The root of the archive must directly contain the following two files, with no additional directory levels:

- `submission_val.csv` — validation set prediction results
- `submission_test.csv` — test set prediction results

The row order of each CSV file should be consistent with the sample index order in the corresponding dataset, and no samples may be missing or duplicated.

### 4.2 File Structure

Please refer to the complete file structure in the [baseline](https://www.bohrium.com/en/notebooks/22512147682) Notebook.

### 4.3 CSV Format Generated by the Notebook

Each CSV file must include the header `id,sum,product`:

```csv
id,sum,product
010001,18,168
010002,5,0
010003,31,3528
```

| Column    | Description                            |
| --------- | -------------------------------------- |
| `id`      | The image filename with `.png` removed |
| `sum`     | Predicted sum of the four digits       |
| `product` | Predicted product of the four digits   |

### 4.4 Only one Notebook file may be submitted for this problem; additional datasets or other files are not permitted.



## 5. Scoring

### 5.1 Metric: Accuracy

For each sample, `sum` and `product` are evaluated independently. The total number of correct predictions for both targets is summed and then divided by the total number of judgments.

For the validation set or test set (1,000 samples each):

​	$$\text{Accuracy} = \frac{\text{Number of correct sum predictions} + \text{Number of correct product predictions}}{2000}$$

### 5.2 Public Leaderboard and Private Leaderboard

- **Public Leaderboard (A)**: Calculated based on the prediction accuracy on the Validation Set;
- **Private Leaderboard (B)**: Calculated based on the prediction accuracy on the Test Set, and published after the competition ends.



## 6. Constraints

- Downloading or using any external data beyond the dataset provided for this problem is not allowed; however, participants may draw their own samples or perform secondary annotation on the provided data;
- Using external large language model APIs (such as GPT or Claude) for prediction, feature generation, data annotation, or model ensembling is not allowed;
- The evaluation machine has no internet access; `pip install` operations and network access are not permitted;
- The total time for training + inference must not exceed 25 minutes (Tesla L20 GPU).



## 7. Baseline Score and Reference Score

- **Leaderboard B Baseline Score ([baseline](https://www.bohrium.com/en/notebooks/22512147682))**: 0.0440
- **Leaderboard B Scientific Committee Reference Score (Reference Result)**: 0.9600



## 8. Acknowledgements

Thanks to Scientific Committee member ZYZ for providing this problem.