Inflammasomes are filamentous signaling platforms integral to innate immunity. Currently, little is known about how these structurally similar filaments recognize and distinguish one another. A cryo-EM structure of the AIM2PYD filament reveals that the architecture of the upstream filament is essentially identical to that of the adaptor ASCPYD filament. In silico simulations using Rosetta and molecular dynamics followed by biochemical and cellular experiments consistently demonstrate that individual filaments assemble bidirectionally. By contrast, the recognition between AIM2 and ASC requires at least one to be oligomeric and occurs in a head-to-tail manner. Using in silico mutagenesis as a guide, we also identify specific axial and lateral interfaces that dictate the recognition and distinction between AIM2 and ASC filaments. Together, the results here provide a robust framework for delineating the signaling specificity and order of inflammasomes.