In the emerging field of mechanical metamaterials, using periodic lattice
structures as a primary ingredient is relatively frequent. However, the choice
of aperiodic lattices in these structures presents unique advantages regarding
failure, e.g., buckling or fracture, because avoiding repeated patterns
prevents global failures, with local failures occurring in turn that can
beneficially delay structural collapse. Therefore, it is expedient to develop
models for computing efficiently the effective mechanical properties in
lattices from different general features while addressing the challenge of
presenting topologies (or graphs) of different sizes. In this paper, we develop
a deep learning model to predict energetically-equivalent mechanical properties
of linear elastic lattices effectively. Considering the lattice as a graph and
defining material and geometrical features on such, we show that Graph Neural
Networks provide more accurate predictions than a dense, fully connected
strategy, thanks to the geometrically induced bias through graph
representation, closer to the underlying equilibrium laws from mechanics solved
in the direct problem. Leveraging the efficient forward-evaluation of a vast
number of lattices using this surrogate enables the inverse problem, i.e., to
obtain a structure having prescribed specific behavior, which is ultimately
suitable for multiscale structural optimization problems