I don't think you will be declared on. I usually don't bother building any more military in this kind of come-from-behind space race because the greater danger is that the AI tech leader will launch first.
It´s not about beeing declared upon... ...sorry for beeing not clear about that. What I ment is this:
I think aelf should inflict some wars to slow the AI´s tech pace down. This is the most efficient way... ...but when doing so, he will be very likely asked to join and should do so (fake war) to keep relations up with the winning team... ...and then some additional defences aren´t a bad thing, to avoid (or counter efficiently) enemy landings (as always, in my opininon)... ...so no huge defences are required, but a solid navy and a landbased "taskforce"