A standard combinatorial construction, due to Kontsevich, associates to any $\ai$-algebra with an invariant inner product, an inhomogeneous class in the cohomology of the moduli spaces of Riemann surfaces with marked points. We propose an alternative version of this construction based on noncommutative geometry and use it to prove that homotopy equivalent algebras give rise to the same cohomology classes. Along the way we re-prove Kontsevich's theorem relating graph homology to the homology of certain infinite-dimensional Lie algebras. An application to topological conformal field theories is given.
Journal of Homotopy and Related Structures, Vol. 3(2008), No. 1, pp. 65-111