EuPhO 2025, Експеримент — Задача 1. E1 – Deep Learning
Experimental Problems Language: English · 10 т.
Условие
Modern ANNs (artificial neural networks) are made of billions of neurons. Each neuron transforms its input(s) to an output . First,
is calculated, with real numbered weights and real numbered bias . Then an activation function is applied to to produce the final output . In the present problem you will investigate a physical model of a neuron with the electric voltages and as inputs, with the activation function being , graphed below, where is called sigmoid function.

Equipment
Important! Do not switch off any power outlets.
(i) A box containing a voltage source, an electronic circuit that models the neuron, and two potentiometers (the A-potentiometer and the B-potentiometer). The electric terminals on the box are denoted as follows:
- Two electrically connected GND terminals: the electrical ground serving as a common negative terminal for , , , and .
- : the positive terminal of the voltage source.
- X1 and X2: the positive terminals of the neuron input voltages and , respectively. The neuron output behaves unpredictably if either of these terminals has no input voltage.
- Y: the positive output terminal. It behaves like a real voltage source, consisting of an ideal voltage source of voltage and a series output resistor , and operates as shown below.
- A1, A2, A3: terminals of the A-potentiometer.
- B1, B2, B3: terminals of the B-potentiometer.
- T: a terminal not to be used in this task.
(ii) Digital multimeter with two probe wires.
(iii) Wires with banana connectors. Two or more wires could be connected to the same terminal in the box by using the holes in the banana connectors. Using the banana connectors with the multimeter may form an unstable connection. Use the alligator clamp if needed.
(iv) Graph paper. You can ask for more if needed.
Training involves optimizing the network weights to achieve desired functionality. This allows ANNs to approximate arbitrary functions. For each of the following tasks you have to approximate a different function of a single input voltage using the given equipment. Make sure that the input and output that you define are clearly marked in your circuits.

Task 1 (0.5 pts) Terminals A1, A2, and A3 are connected to the A-potentiometer and an additional load resistor . Which of the schemes below corresponds to the circuit in the box? Determine the resistances and ; document the measurements made.

Note The B-potentiometer is connected to terminals B1, B2, B3 in exactly the same way with the same resistances and , within manufacturing tolerances. [0,5 т.]
Task 2 - (0.5 pts) Sketch how the terminals have to be connected so that the neuron input voltages can be varied with the widest possible range. [0,5 т.]
Task 3 - (1.5 pts) Devise (and document) a strategy allowing you to find the combination of input voltages and that maximizes the output voltage with the least possible number of measurements, irrespectively of with which set of input voltages you start the search. Determine this maximal voltage that will be henceforth used as an approximation for the amplitude , and document your measurements. [1,5 т.]
Task 4 - (3.5 pts) Determine the weights , and the bias . Describe your measurements and document your data in a table. Estimate , , and by using a graphical approach. [3,5 т.]
Task 5 - (1.5 pts) Connect the terminal X1 directly to . Design a circuit to approximate the function , where is the voltage applied to your newly defined input terminal. Determine theoretically. Implement the circuit, take measurements and verify that your setup works as expected. Validate the value of from your data. [1,5 т.]
Task 6 - (2.5 pts) a Determine the internal series output resistance of the Y terminal. (0.5 pts)
b Design and implement a circuit to approximate the function , where . Determine theoretically. Implement the circuit and verify experimentally that your setup works as expected. Confirm the values of and from your data. (2.0 pts) [2,5 т.]
Решение
E1- Solution
The term “neuron” has been chosen in analogy to the cells of the nervous system, which transmit electrochemical signals across the nerves (variable ) depending on the integral stimulus () on their input extremities (variables ). The theory behind the artificial neurons and artificial neural networks has been developed in a close analogy to basic physical concepts. In recognition of this fact, the Nobel Prize in physics in 2024 was awarded to John J. Hopfield and Geoffrey E. Hinton “for foundational discoveries and inventions that enable machine learning with artificial neural networks”. The artificial neurons could also be real physical systems, which transform mechanical, electrical, or optical signals.

Task 1
The multimeter is connected in an ohmmeter mode to the three possible pairs of output terminals of A-potentiometer. By turning the knob of the potentiometer we measure the maximum and minimum resistance for each pair:
| Terminals: | ||
|---|---|---|
| A1-A2 | 1000 | 1000 |
| A1-A3 | 222 | 1222 |
| A2-A3 | 222 | 1222 |
If the load resistor was connected to either A1 or A2, then the for A1-A3 and A2-A3 pairs would close to zero, in contrast to measurements. Therefore the load resistor is connected between A3 and the potentiometer slider. In this case, for either of A1-A3 and A2-A3 pairs we have: and and
| Task 1 | Pts | |
|---|---|---|
| A | States or shows in a drawing that the resistance between the three pairs of terminals has been measured. | 0.2 |
| B | Results for the resistances: | 0.1 |
| C | 0.1 | |
| D | Concludes that the resistor is connected to terminal 3. | 0.1 |
| Total on Task 1 | 0.5 |
Task 2
The necessary connections are shown in Fig. 1.
| Task 2 | Pts | |
|---|---|---|
| A | Potentiometers are connected to X1 and X2 | 0.2 |
| Correct connections to ground and supply | 0.3 | |
| -0.1 per wrong connection | ||
| -0.2 fixed penalty for the specific case that X1 / X2 are connected to A1/A2 and V+ and GND on the remaining terminals of the potentiometer. This setup gives only limited variation of the input voltage (0V - 2.67V) | ||
| -0.5 if only 2 terminals the potentiometers are connected. | ||
| Total on Task 2 | 0.5 |
Task 3
By turning the potentiometers’ knobs one can establish that the input voltages change independently between and (Note that due to the protection circuit inside the box, this voltage decreases slightly with connected circuitry). Therefore, any combination of input voltages could be mapped to a point inside the shaded square area in the plane, as shown in Fig 2. Points corresponding to a constant output voltage satisfy the equation:
![Two side-by-side plots of the x1–x2 plane with a shaded square [0,3]×[0,3], dashed parallel lines of constant y labelled y_min and y_max, vector w, and points A and B with an arrow.](https://pub-43290baaaff14857b5dd59610ea438c7.r2.dev/problems/eupho-2025-experiment-x/p1-sol-fig2-v2.png)
which defines a family of parallel straight lines, perpendicular to the vector (see the dashed lines in Fig. 2). It is clear that for any set of weights, the maximum voltage and the minimum voltage are always met at the vertices of the rectangle. Therefore, only three corners need to be measured in order to determine the maximum voltage . First, two corners are measured, which are next to each other. Therefore, the maximum along the connecting edge can be found. Using the corner with the higher voltage, the other edge from that corner is followed to a third corner. Consequently, the highest voltage can be determined, as the fourth corner needs to be lower than the third measured corner. Table 1 summarizes the measurements of the output voltage at the four vertices. The maximum of the output voltage is:
corresponding to the input voltages:
Table 1: Output voltage at the vertices
| 0.00 | 0.00 | 2.30 |
| 3.15 | 0.00 | 1.15 |
| 3.15 | 3.15 | 2.56 |
| 0.00 | 3.15 | 2.73 |
| Task 3 | Pts | |
|---|---|---|
| A | Strategy that three measurements are sufficient to obtain | 0.7 |
| Penalty for four measurements | -0.3 | |
| No points for more than four measurements | ||
| Note that turning the knob for and watching the change of does count as at least 2 measurements per . For solutions where the knob is turned a little for , then the other for , the conclusion about the signs of the is made and only then the input gets adjusted to reach , this counts as at least 5 measurements, which is awarded no points here. | ||
| B | Lower bound of measurements < 0.02V | 0.1 |
| C | Upper bound of measurements > 3V | 0.2 |
| Note that to obtain these 0.1 + 0.2 points, the student must write its input values for and down explicitly, or, at least write that they are directly connected to GND or +V if that is the case. | ||
| D | Per measurement 0.1 up to 0.3 | 0.3 |
| E | Value for | 0.2 |
| Penalty for more than three significant digits | -0.2 | |
| Penalty for only one significant digit | -0.2 | |
| Total on Task 3 | 1.5 |
Task 4
The three parameters could be determined in two series of measurements of the output voltage by setting each of the input voltages constant and changing the other input voltage. The dependence of the output voltage on and can be linearized by transforming to the auxiliary variable:
since:
Measurements close to the maximum output voltage should be avoided because of the large systematic error in calculated values of when approximating in equation (1) the unknown A with ymax. Therefore, the suitable set of measurements is along the path in the -plane. Tables 2 and 3 summarize the results of measurements along the lines and respectively. The values of the variable calculated by means of (1) are shown in the last column of the tables. Figure 3 shows the data in Table 2 in variables and with the corresponding linear fit. The weight corresponds to the slope of the fitting line:
Since , the bias could be estimated by crossing point of the fitting line with the -axis:
Table 2: Measurements for
| 0.00 | 2.31 | 1.68 |
| 0.26 | 2.24 | 1.50 |
| 0.59 | 2.15 | 1.29 |
| 0.83 | 2.08 | 1.15 |
| 1.09 | 2.00 | 0.99 |
| 1.32 | 1.92 | 0.85 |
| 1.72 | 1.76 | 0.59 |
| 1.98 | 1.65 | 0.41 |
| 2.20 | 1.57 | 0.29 |
| 2.53 | 1.44 | 0.10 |
| 2.88 | 1.29 | -0.12 |
| 3.02 | 1.23 | -0.21 |
Table 3: Measurements for
| 0.00 | 1.23 | -0.21 |
| 0.22 | 1.38 | 0.01 |
| 0.51 | 1.56 | 0.28 |
| 0.81 | 1.74 | 0.55 |
| 1.06 | 1.88 | 0.78 |
| 1.37 | 2.04 | 1.07 |
| 1.75 | 2.21 | 1.43 |
| 1.99 | 2.30 | 1.65 |
| 2.22 | 2.38 | 1.89 |
| 2.53 | 2.47 | 2.21 |
| 2.74 | 2.52 | 2.44 |
| 3.02 | 2.57 | 2.72 |
The data for and in Table 3, and the corresponding linear fit are shown in Figure 4. The slope of the fitting line gives the weight :

According to equation (2) the crossing point, -0,22, of the fitting line with axis at satisfies the equation
Therefore, we obtain a second estimate for the bias . As a most likely estimate of , the mean of the -values obtained from the two graphs should be taken:
| Task 4 | Pts | |
|---|---|---|
| A | Linearizes the dependence by means of formulae (1) and (2) or equivalent | 0.4 |
| No points are awarded for the following parts B-Q if there is no documentation of a circuit that is able to provide varying voltages to the X1 and/or X2 terminals at all. | ||
| B | Avoiding (0,3) corner (even without explicit reasoning) but award points only if two usable data-sets have been recorded | 0.3 |
| C | Raw measurement values of for varying — Roughly linear distribution of | 0.1 |
| Number of Points ≤ 3 | 0 | |
| D | 4-5 | 0.1 |
| 6-7 | 0.2 | |
| ≥ 8 | 0.3 | |
| E | Raw measurement values of for varying | |
| Roughly linear distribution of | 0.1 | |
| Number of Points ≤ 3 | 0 | |
| F | 4-5 | 0.1 |
| 6-7 | 0.2 | |
| ≥ 8 | 0.3 | |
| G | Conversion of into | 0.2 |
| H | Plot for versus — Size & Axes | 0.2 |
| I | Values in plot | 0.2 |
| J | Linear regression line (only if data is actually linear, which is not the case when plotting vs ) | 0.2 |
| K | Plot for versus — Size & Axes | 0.2 |
| L | Values in plot | 0.2 |
| M | Linear regression line (only if data is actually linear, which is not the case when plotting vs ) | 0.2 |
| N | Value for between and | 0.2 |
| O | Value for between and | 0.2 |
| P | Value for between 1.64 and 1.70 | 0.2 |
| Note that these boundaries are strict and outside no points are awarded here, even if they are close. | ||
| Q | Overall penalty for significant digits other than 2-3 (rare occasion only -0.2) | -0.4 |
| Total on Task 4 | 3.5 |
Task 5
Since X1 is connected to +V, the input voltage must somehow be supplied through X2. Conveniently, the neuron that we have to build in this task requires a weight of , which we can effectively achieve by reducing the input voltage on X2 by a factor of two. For this, one of the potentiometers can be used to halve the input voltage. To find the correct position, the resistance between terminals 1-2 and 2-3 is measured while adjusting the knob. Due to the non-linear behavior of the potentiometer, the final position is not the physical middle position. Alternatively, if a voltage is applied to the potentiometer, this can be tuned with the voltmeter function. The circuit for the modified neuron is visible in Fig. 5.


For this circuit, the input voltage is converted to via the following relation:
Therefore, the intermediate function becomes
This means that our new bias is the constant part, so
Note that it is also possible and fully correct to connect the other end of the potentiometer to +V instead of the ground, which leads to the same effective weight but a different of approximately 1.2.
Table 4
| 0.00 | 1.13 | -0.36 |
| 0.20 | 1.19 | -0.27 |
| 0.40 | 1.25 | -0.18 |
| 0.60 | 1.32 | -0.08 |
| 0.80 | 1.39 | 0.02 |
| 1.00 | 1.46 | 0.12 |
| 1.20 | 1.51 | 0.20 |
| 1.40 | 1.58 | 0.30 |
| 1.60 | 1.63 | 0.38 |
| 1.80 | 1.69 | 0.47 |
| 2.00 | 1.77 | 0.59 |
| 2.20 | 1.82 | 0.67 |
| 2.40 | 1.87 | 0.75 |
| 2.56 | 1.93 | 0.86 |
However, in this solution we only consider the case shown in Fig. 5. When the circuit is assembled, we can use the A-potentiometer (connected to +V and GND) to supply a variable voltage to the input of the new neuron. This way, we can take a few measurements to confirm that our circuit behaves as desired, which leads to the data in Tab. 4.
By linearization via the inverse activation function
we can plot vs and determine the effective weight from the slope and the bias from the intercept, see Fig. 6.
Experimentally, we obtain , which is close to the theoretical value and an effective weight of . Since the linear fit is also in good agreement with the data points, we have shown that our circuit fulfils the expectations.


| Task 5 | Pts | |
|---|---|---|
| A | Idea and drawing of circuit | 0.3 |
| B | Theoretical derivation and calculation of | 0.2 |
| partial credit for just the formula | 0.1 | |
| No points are awarded for the following parts C-I if the circuit used is no different than the one used in task 4 or the only change is that X1 is connected to +V, or if there is no documentation of a circuit that is able to provide varying voltages here or in previous tasks. | ||
| C | Raw measurement values of for varying | |
| Usage of whole span for | 0.1 | |
| D | Number of Points ≤ 2 | 0 |
| 3-4 | 0.1 | |
| ≥ 5 | 0.2 | |
| E | Plot for versus — Size & Axes | 0.2 |
| F | Converted values in plot | 0.2 |
| G | Linear regression line | 0.2 |
| H | Comparison of | 0.1 |
| I | Overall penalty for significant digits other than 2-3 | -0.2 |
| Total on Task 5 | 1.5 |
Task 6
a To determine the internal series output resistance , we have (at least) two options. We can either set the output of the neuron to a known value and connect the terminal via an ampere-meter directly to ground - essentially shorting it - and dividing the neuron output voltage by the measured short-circuit current.
Alternatively, we can set the neuron to a known open-circuit voltage by connecting +V to X2, connect Y to ground via the potentiometer resistance and measure the voltage drop over it. This is the safer version, in case we do not know how small is and we prevent dangerous currents. We measure:
This results in:
b We want our circuit to approximate the function
with . First, it is obvious that does not influence , and therefore terminal X1 needs to be connected to ground. To increase the voltage of terminal Y, we need to add a voltage divider in the form of a potentiometer between terminal Y and the supply voltage, as shown in Fig. 7.
The output voltage can be expressed by
where is the voltage division ratio of the and combined:
with being the fraction of that lies in between B1 and B3. With this, we can use the given value of to get :
And thus we gain a theoretical value for :
To experimentally verify that our neuron behaves as expected, once again, the remaining potentiometer can be used to apply different input voltages and the output is recorded. The multimeter can be used to set the internal B-potentiometer to the right ratio - do not forget to measure in the ohmmeter mode only if there are no currents running through the potentiometer. To linearize the data, we rescale the -values by applying the sigmoid function to it. The resulting numerical values can be seen in Tab. 5.
If one plots against , one expects a linear function with slope and intercept . The raw data is shown in Fig. 8 and the linear fit in Fig. 9.
| 0.00 | 2.73 | 1.38 |
| 0.15 | 2.76 | 1.48 |
| 0.30 | 2.78 | 1.58 |
| 0.45 | 2.80 | 1.68 |
| 0.60 | 2.83 | 1.78 |
| 0.75 | 2.85 | 1.87 |
| 0.90 | 2.86 | 1.96 |
| 1.20 | 2.89 | 2.11 |
| 1.50 | 2.91 | 2.25 |
| 1.80 | 2.92 | 2.36 |
| 2.10 | 2.94 | 2.45 |
| 2.40 | 2.95 | 2.52 |
| 2.70 | 2.96 | 2.58 |
| 3.00 | 2.96 | 2.62 |
| 3.23 | 2.97 | 2.65 |
Table 5

From the fit, we read and , which is in agreement with our theoretical values up to 2 significant digits. The fact that the linear fit function agrees well with the data points further confirms that the neuron behaves as intended.

| Task 6 | Pts | |
|---|---|---|
| A | Idea for output resistance | 0.2 |
| B | Measurements | 0.2 |
| C | 0.1 | |
| D | Idea and drawing of circuit | 0.5 |
| No points are awarded for the following parts E-L if the circuit used is the same as used in task 4 or task 5 or the only change is that X1 is connected to GND or if there is no documentation of a circuit that is able to provide varying voltages here or in previous tasks. | ||
| E | Derivation of (8) | 0.4 |
| Penalty for neglecting | -0.2 | |
| F | Raw measurement values of for varying | |
| Usage of whole span for | 0.1 | |
| G | Number of Points <= 2 | 0 |
| 3-4 | 0.1 | |
| >= 5 | 0.2 | |
| H | Plot for versus — Size & Axes | 0.2 |
| I | Converted values in plot | 0.2 |
| J | Linear regression line | 0.2 |
| K | Alignment of measured and theoretical values | 0.2 |
| L | Overall penalty for significant digits other than 2-3 | -0.2 |
| Total on Task 6 | 2.5 |
Оригинал в Архива: eupho2025_experiment_problems.pdf · официални решения: eupho2025_experiment_solutions.pdf