Discord

Checklist ROAI 2024 County Stage · Task 1

Problem 1

Romanian title: Problema 1

Show, theoretically or empirically, which functions small ReLU multilayer perceptrons can and cannot represent relative to each other.

  • Theoretical/empirical analysis of neural-network expressivity
  • Romanian original · English translation

The task

The problem studies what ReLU multilayer perceptrons can represent. Question 1.1 asks whether MLP1 (Linear(2,4) → ReLU → Linear(4,1) without bias) can represent every function learned by MLP2 (Linear(2,3) → ReLU → Linear(3,1)), to be shown either theoretically or through experiments on a chosen dataset.

Question 1.2 asks for the opposite direction and then whether the single-hidden-layer MLP4 (Linear(1,5) → ReLU → Linear(5,1)) can express every function implemented by the two-hidden-layer MLP3 (Linear(1,3) → ReLU → Linear(3,2) → ReLU → Linear(2,1)), with hints based on the geometric view of ReLU units and linear layers.

Abridged and translated by SOTA from the official Romanian materials. The official statement has the exact rules, and it wins wherever this summary differs.

In English

This task was published in Romanian. SOTA translated it into English on 16 September 2026.

Read the task statement in English 869 words

Problem 1

English translation by SOTA – AI Community of the Romanian original, published with the permission of Asociația Nitro. Organisers who would like this translation removed can email [email protected].

Neural networks are a family of models that can represent a wide class of functions. In this problem we will try to understand better what such networks can and cannot do. We will restrict ourselves to multi-layer perceptron (MLP) networks, using ReLU as the activation function.

Useful functions:

  • ReLU(x)={0if x<0,xotherwiseReLU(x) = \begin{cases} 0 & \text{if } x < 0, \\ x & \text{otherwise} \end{cases}

  • nn.Linear(x,y,bias)nn.Linear(x, y, bias)

    If x∈Rnx \in R^{n} (the input), y∈Rmy \in R^{m} (the output), then y=W×x+by = W \times x + b, where W∈R(m×n)W \in R^{(m \times n)}.

    b∈Rmb \in R^{m} is 0 and cannot be modified by the learning algorithm if the parameter bias=Falsebias = False; otherwise it is considered a learnable parameter and is used in computing the output yy.

Question 1.1:

Can the network MLP1 represent any function learned by the network MLP2?

MLP1:

Code:

import torch.nn as nn
model = nn.Sequential(
    nn.Linear(2, 4),
    nn.ReLU(),
    nn.Linear(4, 1, bias=False),
)

Corresponding graphical representation:

[Figure: see the original statement. It shows the input xx (2 input nodes), connected through W1W_1 to the hidden layer hh (4 hidden-layer neurons), connected through W2W_2 to the output yy (output without a bias term).]

MLP 2:

import torch.nn as nn
model = nn.Sequential(
    nn.Linear(2, 3),
    nn.ReLU(),
    nn.Linear(3, 1),
)

[Figure: see the original statement. It shows the input xx (2 input nodes), connected through U1U_1 to the hidden layer zz (3 hidden-layer neurons), connected through U2U_2 to the output yy (output with a bias term).]

Legend (for the figures):

  • Input (a plain light-purple circle)
  • Output (without a bias term) (a plain pink circle)
  • Output (with a bias term) (a pink double circle)
  • Hidden-layer neuron (contains a bias, and ReLU is applied at the end of the operation) (a green circle with the ReLU symbol)

You may demonstrate this in one of two ways:

a) Theoretically,

b) Empirically, using experiments on a use case and a dataset of your choice; try to extract the intuition behind the answer from these experiments

Question 1.2:

The general intuition in the AI community is that the number of layers plays an important role. This is also where the term deep-learning comes from, because deep refers to a large number of layers.

In the previous part, we tried to see whether MLP1 can express any function represented by MLP2. We will now consider the opposite direction.

a) Can MLP2 express any function expressed by MLP1?

In the same context, we can also think about the number of layers. The question then, given that the number of parameters and neurons is constant, becomes: can a model with a single layer represent the same functions as a model with several layers?

b) Concretely, can MLP 4 (given below) express any function implemented by MLP 3?

Can you show (empirically, or theoretically as above) whether this is true?

A few remarks:

  • Both networks have approximately the same number of parameters, and they have the same total number of neurons

  • Try to think about the problem from a geometric point of view.

    A. A ReLU unit divides the input space into two regions (using a line in 2D, the plane is divided into 2 half-planes; using a point in 1D, the line is divided into two half-lines):

    • A region in which the output is always 0 (for negative values of the input).
    • A region in which it behaves like a linear function (for positive values of the input).

    B. A linear layer can be seen as a combination of scaling, rotation and translation applied to the input, following the definition in part 1.1, y=W×x+by = W \times x + b. Thus, the parameter bb can be considered a translation, and the matrix WW can represent the operations of rotation (in the plane) and scaling.

MLP 3:

model = nn.Sequential(
    nn.Linear(1, 3),
    nn.ReLU(),
    nn.Linear(3, 2),
    nn.ReLU(),
    nn.Linear(2, 1),
)

Graphical representation:

[Figure: see the original statement. It shows the input xx (1 input node), connected through W1W_1 to the hidden layer hh (3 hidden-layer neurons), connected through W2W_2 to the hidden layer vv (2 hidden-layer neurons), connected to the output yy (output with a bias term); the last set of connections is also labelled W2W_2 in the figure.]

MLP 4:

import torch.nn as nn
model = nn.Sequential(
    nn.Linear(1, 5),
    nn.ReLU(),
    nn.Linear(5, 1),
)

Graphical representation:

[Figure: see the original statement. It shows the input xx (1 input node), connected through U1U_1 to the hidden layer zz (5 hidden-layer neurons), connected through U2U_2 to the output yy (output with a bias term).]

Translated by SOTA. The Romanian original is the official version and wins wherever the two differ. The four network diagrams are described in text; the drawings are in the original document. In the MLP 3 diagram, the original labels both the second and the third set of weights W2. Published with the permission of Asociația Nitro, which runs ROAI (17 September 2026). If you organise this olympiad and would like the translation removed, email [email protected] and we will take it down.

At a glance

You get
The problem document only (PyTorch model definitions and diagrams).
You submit
Answers justified theoretically or empirically; the document does not specify a submission format.
Scoring
Not stated in the document.
Rules
  • 4-hour test, common paper for all grades (per the stage page)
Format
ROAI 2024 county stage, 28 June 2024, held at UB, UBB, UAIC and UVT; the top 20 overall qualified for the national stage.

Details

Year
2024, Romania (UB, UBB, UAIC, UVT)
Round
County Stage · Task 1
Language
Romanian; English translation by SOTA
License
Not stated by the source