Centro Pi presents projects at thematic session of the 35th CBM.
The Pi Center (Center for Projects and Innovation IMPA) presented two papers in the thematic session “Vision and Computer Graphics” held on Monday afternoon (28) at the 35th Brazilian Mathematics Colloquium . Organised by researchers from Visgraf (Vision and Computer Graphics Laboratory at IMPA) Luiz Velho, Tiago Novello and Luiz Henrique de Figueiredo, the session featured eight lectures covering a variety of topics.
Opening the Thematic Session, the Pi Center team presented a project for automating the correction of answer sheets from the 1st phase of the OBMEP (Brazilian Mathematics Olympiad for Public Schools). The research uses computer vision methods to process the answer sheets of OBMEP participants and obtain the information in an automated way. The project uses classic computer graphics methods such as homography for image alignment and neural networks for character recognition, as well as modern autoencoder techniques .
“The use of automated methods for reading information from the answer sheets in the first phase can lead to a significant reduction in costs and work for OBMEP. Considering the context of an Olympiad present in 99.9% of Brazilian municipalities, we conclude that this work will have a great impact on future editions of the competition,” said Lucas Nissenbaum, project scientist at IMPA.
The automated extraction of exam information faces several challenges, especially considering a universe of 18 million participants. Otávio Moreira, a doctoral student at IMPA, explains that the markings made by students on the answer sheets often deviate from the pattern expected for reading by computer systems.
“It’s very common for children not to put spaces between names, for example. They also often put an extra character per space. Many use different markings on the card to indicate the correct answer. There are unexpected answers, such as putting the letter in the CPF (Brazilian tax identification number) and phrases that exceed the space allotted, among other challenges,” explained Moreira.
Mathematically, the group is using a processing pipeline system for the project, divided into two main stages. The first consists of a rectification system, in which the original image is cropped and aligned. The key point is to achieve the best possible alignment to proceed with the other stages. According to the Pi Center team, this work has been successful. The second stage of the pipeline uses the cropped, aligned images to predict the content. The models used in the second stage of the project are variable.

“We start by trying to find matches in some way and compute a perspective change transformation. In other words, the famous homography. We have a card that is initially not aligned, and then we find the points and manage to make a slight fine adjustment to the image, improving the results a bit. And then we have the final result of the card so we can move on to other tasks,” explained Daniel Perazzo, a doctoral student at IMPA.
One of the most recent adjustments to the research was the development of strategies to refine the model's predictions and slightly improve its accuracy. The idea works with a model that constructs a probability measure from the results of the logits associated with each digit . This probability is refined using syntax data.
“Having this refined probability, we can establish a new maximum among the valid or probable options and achieve a better prediction. With this, we were able to reach a CPF accuracy of 99%. For the name, we went from 78% to 84%. For birth, from 91% to 94%. This considers the accuracy of the entire field,” concluded Rodrigo Schuller.
Scientific Machine Learning: Neural Networks in Modeling Physical Dynamics
The Pi Center also presented the results of the project “Scientific Machine Learning: Neural Networks in the Modeling of Physical Dynamics”. In the lecture, the team presented the ideas behind Physically Informed Neural Networks (PINN) in their original 2019 formulation. The group demonstrated several applications in problems such as heat propagation and acoustic wave propagation. Afterwards, the team presented some variations of the research that are being developed by the IMPA laboratory, such as the new Neuro-Spectral Architectures.
“Basically, a neural network receives an input that is a vector — a vector from R2, R3, or any space. This vector is passed to the first layer, a layer of neurons. Each of these neurons has a vector of weights and a bias. The vector coming from the first layer is taken as an inner product in each of the neurons, a bias is added, and an activation function is passed to the next layer to repeat the operation. Mathematically, it's a multiplication by a matrix, plus the sum of a vector, and in each resulting coordinate we pass the activation function, which will introduce non-linearity. Then we take this resulting vector from the first layer and pass it to the next, and to the next, and so on, until the output is another vector, or a number, depending on how you want to define the architecture. After you create this neural network, these weights and biases are parameters of your neural network,” explained Victor Balestro, professor at UFF and postdoctoral researcher at IMPA, about the functioning of neural networks.
In a PINN (Point-of-Nature) system, these weights are trained to minimize losses related to satisfying the differential equation and its initial and boundary conditions. This conceptual basis is being used in various applications.
“We can, for example, use a heat transfer equation, and the Navier-Stokes equations that model the behavior of air as it flows. What can be seen is that PINN is able to model temperature very well. PINN is able to learn the qualitative behavior of temperature very well, this is very clear visually, but quantitatively we also have a very good result, consistent with what is expected from physical dynamics,” explains Leonardo Mendonça, a master's student at IMPA.
In an application developed by the Pi Center, students demonstrated the power of using absorbing edge conditions in conjunction with adaptive sampling, exerting a regulating role on the behavior of the neural network. “The use of adaptive sampling allows us to achieve the same accuracy with a smaller number of samples from the equation's domain. The propagation support of a wave is a small piece of the space-time product, so not using an adaptive sampling method makes the network less likely to converge to the trivial null solution. That said, this also increases the chance of overfitting the solution. The edge conditions work to reduce this effect, as well as prevent interference from outside the domain, generating a more accurate final solution,” explains Márcio Marques, a doctoral student at IMPA. This work was presented at the Underwater Acoustics Conference and Exhibition (UACE2025) in Greece.
The Pi Center is also working on the development of new architectures, focused on solving evolution equations such as the partial differential equation for wave propagation in heterogeneous media. “The development of new architectures focused on these applications, often inspired by numerical methods, allows us to achieve very high accuracy with a lower training time,” said Leonardo Moreira, a doctoral student at UERJ who is participating in the Pi Center project.
Read also: Outreach lectures combine teaching methods and friendliness at the 35th CBM

