Dyadic treatment effects with unknown confounders

Learn how to estimate treatment effects in dyadic data even with unobserved confounders. Application to trade agreements and bilateral flow.

14 jul 2026 • 5 min read • Q2BSTUDIO Team

New method for estimating causal effects in dyadic data

In modern data analysis, one of the most complex challenges is to estimate the causal effect of a treatment when the units of observation are not independent, but form pairs or dyads. This type of structure, known as dyadic data, is common in contexts such as international trade (pairs of countries), social networks (interactions between users) or the collaborative economy (transactions between customer and supplier). When there are also confounders (unobserved variables that affect both treatment and outcome), estimation becomes especially delicate. A recent approach, based on neighborhood smoothing techniques and conformal inference, offers a robust solution that does not require explicitly modeling such confounders, but takes advantage of the interchangeability property of treatments. This article takes an in-depth look at these tools, their practical relevance, and how they can be integrated into modern technology solutions.

To understand the magnitude of the problem, consider a typical example: assessing the impact of a free trade agreement (treatment) on the bilateral flow of exports (outcome). Each observation is a pair of countries. The problem is that countries with unobserved characteristics (e.g., cultural affinity or political stability) can self-select to sign agreements, generating endogeneity. Traditional methods require strong exogeneity instruments or assumptions. However, the new approach proposes that if treatments are assigned interchangeably (i.e., the joint distribution does not depend on the order of the pairs), it is possible to estimate the average dyadic treatment effect using a neighborhood smoothing estimator based on the graphon function. This concept comes from network analysis and allows us to approximate the probability of treatment between peers based on a latent representation of the nodes.

The neighbourhood kernel smoothing technique consists of grouping pairs with similar observed characteristics and averaging their results, but correcting for the dyadic structure. Instead of assuming peer-to-peer independence, a kernel is used that weights similarity between nodes based on a low-dimensional representation. This allows convergence rates to be obtained under conditions of regularity, such as smoothness of the treatment function and bounded density. A key aspect is that the method does not require knowledge of the confounders; you only need the treatments and the observed results. This makes it especially attractive for applications where data is rich but hidden variables are plentiful.

In addition to point estimation, the article stresses the importance of inference. This is where conformal inference comes in, a non-parametric tool that allows the construction of valid prediction intervals under interchangeability assumptions. Applied to the dyadic context, it allows predicting the outcome conditioned by the treatment state, offering finite coverage guarantees without the need to assume parametric models. This is invaluable for decision-making, since not only the average effect is known, but also the uncertainty associated with each prediction.

From a practical perspective, these methodologies have enormous potential in sectors such as international trade, network epidemiology or digital marketing. For example, a company that wants to measure the impact of an ad campaign targeting pairs of users (referrals) could benefit from this approach. Or a government evaluating bilateral investment agreements. Computational implementation, however, requires efficient handling of large volumes of pairs and kernels, which makes it necessary to have a robust technological infrastructure.

This is where collaboration with technology specialists becomes crucial. At Q2BSTUDIO, as a software and technology development company, we understand that the application of advanced causal models requires much more than statistical libraries. A robust data architecture, scalable compute capacity, and seamless integration with existing systems are needed. That is why we offer artificial intelligence solutions for companies that allow these estimators to be implemented in production environments, either by developing custom applications that incorporate causal inference or by creating optimized data pipelines.

The adoption of techniques such as neighborhood smoothing for dyadic data also benefits from cloud services. Processing kernels over thousands of pairs can require parallelization, and both AWS and Azure offer elastic environments for this. At Q2BSTUDIO we provide AWS and Azure cloud services that guarantee scalability and security in the handling of sensitive data, such as bilateral trade flows. In addition, integrating these models with visualization dashboards allows analysts to interpret results intuitively. Our business intelligence services with Power BI make it easy to create dashboards that show causal effects and their confidence intervals, empowering organizations to make evidence-based decisions.

On the other hand, cybersecurity is an indispensable pillar when handling international trade data or user interactions. Unknown confounders should not be an excuse to neglect information protection. At Q2BSTUDIO we offer cybersecurity and pentesting services that ensure that the dyadic data processed is not exposed to vulnerabilities during the estimation process. In addition, the use of AI agents can automate parts of the workflow, such as kernel parameter selection or compliant cross-validation, freeing up time for data scientists.

The application of these techniques is not limited to trade. In the field of health, effects of treatments in patient pairs can be studied (for example, in clinical trials with caregiver dyads). On social networks, the impact of an intervention on the dissemination of information can be measured. The versatility of the approach lies in the fact that it does not require modeling the confounders, only the interchangeability of the treatments. This greatly simplifies deployment as long as the right infrastructure is in place.

However, not everything is simple. Choosing kernel bandwidth and validating the interchangeability condition are aspects that require expertise. Here, tailor-made software can make all the difference. At Q2BSTUDIO we develop custom modules that integrate these routines with the client's databases, allowing continuous monitoring of assumptions. For example, we can design a system that automatically evaluates the quality of graph fit and recalculates estimators when new pairs are added.

In summary, the estimation of dyadic treatment effects with unknown confounders represents a significant advance in causal inference for structured data in pairs. Methodologies such as neighborhood smoothing and conformal inference offer statistical rigor without the need for complex instruments. But to transfer this knowledge to business or government practice, a technological ecosystem that integrates artificial intelligence, cloud computing and data visualization is needed. At Q2BSTUDIO we are prepared to accompany this process, transforming academic models into operational tools that generate real value.

A BREAK?

Play for a moment before you go

OUR SERVICES

How we can help you

Artificial intelligence

AI agents, chatbots, and intelligent assistants that automate tasks and serve your customers 24/7 to improve the efficiency of your business.

More info

Software Development

Web, mobile, and desktop applications, intranets, e-commerce, SaaS, and management platforms designed for your company's specific needs.

More info

Cloud services

Migration, infrastructure, managed hosting, high availability, and security on Microsoft Azure and Amazon Web Services to help your business scale without limits.

More info

Cybersecurity and pentesting

Security audits, penetration testing and protection of applications, data and infrastructure on-premise and cloud, with ethical hacking and regulatory compliance.

More info

Business Intelligence

Dashboards and data analysis with Power BI: we integrate your sources, design dashboards and KPIs and turn your data into decisions.

More info

Process automation

We automate repetitive tasks and connect your applications with n8n, Power Automate, Make, and RPA, eliminating manual work and increasing productivity.

More info

Training for Companies

We train your teams in technology with criteria: web development, databases, Git, best practices and security, automation with n8n, artificial intelligence for companies and creation of AI solutions with Azure AI Foundry.

More info

Code Auditing

We audit the code that you, your team or an AI create: we tell you what is good and what to improve, we secure it and make it ready for production, web or app.

More info

AI Image Generation

We create for you the images that your business needs with artificial intelligence: product, networks, advertising, illustration and avatars. You tell us what you want and we deliver it ready to use.

More info

AI Video Generation

We create videos with artificial intelligence for you: promotional, networking, virtual presenters, dubbing and animations. You tell us the idea and we will deliver it assembled and ready to publish.

More info

AI Conversational Avatars

We create conversational avatars with AI – digital humans with a face and voice – that serve your customers and teams with the knowledge of your company, on your website, interactive monitors, WhatsApp or Teams.

More info

Online Marketing and AI

Google Ads, Meta Ads, LinkedIn Ads and AI Engine Positioning (GEO/AEO): we attract customers and make your brand appear where they search for you, also on ChatGPT, Gemini and Perplexity.

More info

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.